Transaction fees tied to assets?

+1 vote
I am a little confused when using createrawtransaction for assets.  How are assets handling transaction fees?  For native raw transactions the basic idea is to createrawtransaction and spend an unspent.  The difference between in and out is the transaction fee which I assume automatically gets sent back to the original miner of the block correct?

How does this work with assets?  Can you collect a fee using createrawtransaction?  For example an unspent txid asset A contains 100 units.  I send 80 units to an address.  What happens to the 20 units? Does the transaction fail? Does it not work like bitcoin core? If I want to collect a fee would I just create a raw transaction that sends part to one address and part to the fee collecting address? Is that the only solution? If I set min transaction fees in the native currency then moving assets will require native currency? If I use createrawtransaction does it ignore the min transaction fees? Transaction fees are really not very clear.
asked Aug 13, 2016 by anonymous

1 Answer

+1 vote
The total number of native assets in input and output should be same in Multichain. Hence if you happen to manually select input and output in such a manner that the the total number of assets in input and output are not same, the signed transaction will not be getting accepted with an error 'Input and Output Balance Mismatch'. The transaction shall fail. I think if you need to implement fee for transaction, apart from spending assets in input, you may put native currency as well in input which would be used as fees if configured.
answered Aug 15, 2016 by 7sigma
Yes, just to add to this, fees can be collected by miners in the native currency only, not in any issued assets.
...