Spending UTXO with native assets
Native assets follow a set of predefined rules often known as the minting policy. The minting policy is defined by the issuer and sets the upper and lower limits on what a token can do, who can do it, and often at what point in the transaction lifecycle it can be done.
The minting policy is also bound by the network protocol and the rules defined in the ledger. One such rule is the min UTXO value. For more information about the min UTXO value please visit here.
The min UTXO value is the minimum amount of ada that must be sent in a single transaction. Currently, the min UTXO value is 1 ada which means in order to transact any Native asset on the Cardano network a minimum of 1 ada must be included and accounted for within the transaction. Note this doesn't mean you have to send only 1 ada in order to transact native assets it could be any number of ada larger than 1 so it is important that Exchanges and wallets are aware of this and know what to do in such cases.
Note: It is possible to verify and pinpoint these specific native asset transactions using cardano-graphql or cardano-rosetta
As you can see when building a transaction with native assets using cardano-cli as outlined here it’s important to account for two things:
- The ADA value you wish to send
- The number of tokens.
The above is also true for any exchange or 3rd party wishing to either spend, return or store any multi-asset. Receiving a multi-asset by definition is the same as receiving any other Cardano transaction. The only difference is that some other data like multi-asset may be attached.
We strongly recommend that all exchanges and 3rd party wallets verify all transactions in the block for multi-asset’s and handle them accordingly. How these types of transactions are managed is an enterprise decision.
What to do with unwanted tokens?
The purpose of any multi-asset can be arbitrary, however, it's important to remember that like ada a multi-asset is part of the transaction and needs to be handled and balanced in the same way.
Multi-assets will cause no issue whether located in the issuer's wallet or the Exchanges wallet it will exist until otherwise redeemed, used, or eventually burnt.
The decision of what to do with a multi-asset lyes with the exchange or 3rd party wallet and even more specifically with an exchange that manages their own UTXO’s.
cardano-wallet uses a UTXO algorithm to handle and manage UTXO’s therefore a multi-asset living on the blockchain and being handled by cardano-wallet can easily go unnoticed.
Choosing a UTXO means having to account for the asset attached to that UTXO. If this extra input is not handled correctly an out-of-balance error will occur.
What you do with the Native asset is up to you, you can either return the native asset back to the sender only if you know the address of course, or alternatively you can move the native asset in and address in your wallet adhering to the network guidelines and min UTXO value.
For more information on creating and balancing a transaction with a native asset attached please see the following documentation here