<p>A UTXO is an unspent transaction output. That UTXO is tied to an address, and that address is made up of hashes of keys that are tied to payment keys for that address. You can spend a single UTXO, or multiple. It's up to the design of your application. To simplify things, we'll ignore native tokens first.</p>
<p>Lets start with an assumption my wallet has received 2 transactions from others. One is for 1 ada and another one is for 1000 ada. If I try to make a transaction using just the 1 ada one, all I can do is pay the full ada as a fee with no output. If I make one just using the 1000 ada one, i can pay my 0.7 fee in ada and send the remaining of the 1000 ada to another address, the same address, or multiple addresses.</p>
<p>Now, once that transaction is added to a block, the old txins are &quot;spent&quot; and a new utxos are created based on the hash of the transaction you just made and the index.</p>
<p>When we add transactions sending native tokens (not minting yet), things get a little more complicated. For one, every UTXO containing a native asset has a minutxo greater than 1. So every UTXO holding a native asset must have some Ada in the same UTXO. This means you can't just send SANTA tokens without also sending some ada with them. The same rules apply, except you can't spend a native asset as a fee. So all outputs of native assets must add up to all inputs in the TXIN's defined in the transaction.</p>
<p>Earlier I mentioned that you can send to one or multiple addresses as outputs in a transaction. Well, you can also send multiple times to the same address! So I can take that 1000 ada I had in a UTXO and say 100 SANTA tokens in the same UTXO and then send them to the same address in <code>1.5 ada + 1 SANTA</code> UTXOs to split it up. In this case I'd have 100 outputs to the same address, with a 101st output sending the change of 849 ada and say a 1 ada fee. Each of these new utxos can be spent individually, so now I could individually send out SANTA tokens to people spending 1 of those UTXOs every time.</p>
<p>So now, we finally arrive minting that you were asking about When you mint assets in a transcation, you specify the policy hash and asset name making new assets out of thin air based on a policy you set in your policy script. Those newly minted assets need to be sent totaling the amount minted + any assets consumed from the txins for the minting transaction. So if we take the same example above and say we have 500 SANTA and 1000 ada in a single UTXO. We now mint 10000 SANTA, and we want to output this to a single address in a single UTXO. Now we sent <code>999 ada + 10500 SANTA</code> to our address. The same goes with burning, but in this case, we mint a negative value and subtract that from the outputs. So if I have that above UTXO and I want to burn 500 SANTA tokens, the output would be <code>998 ada + 10000 SANTA</code>. I'm using 1 ada fees in these examples for simplicity.</p>

CC BY-SA 4.0
2021-12-22T18:07:14.303Z
2021-12-22T18:07:14.303Z
Samuel Leathers
<p>I've been following this guide <a href="https://developers.cardano.org/docs/native-tokens/minting" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting</a> to mint some native tokens but the process of sending native tokens to an address that has multiple UTXOs when I also have multiple UTXOs at my address is unclear to me.</p>
<ol>
<li><p>I want to send my native tokens to some foreign address but my wallet has 2 UTXOs instead of just 1 as seen in the guide <a href="https://developers.cardano.org/docs/native-tokens/minting#:%7E:text=Here%E2%80%99s%20what%20the%20raw%20transaction%20looks%20like%3A" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting#:~:text=Here%E2%80%99s%20what%20the%20raw%20transaction%20looks%20like%3A</a>. For multiple UTXOs, are you supposed to add all of your txhash and txix values for each UTXO to --tx in? What is the syntax/formatting?</p>
</li>
<li><p>I need to set the 'funds' variable here <a href="https://developers.cardano.org/docs/native-tokens/minting#:%7E:text=Copy-,Again,-%2D%20here%20is%20an" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting#:~:text=Copy-,Again,-%2D%20here%20is%20an</a> but there is multiple UTXOs in my wallet. Is 'funds' the total lovelace in all UTXOs in my wallet?</p>
</li>
<li><p>I need to set the 'receiver_output' variable here <a href="https://developers.cardano.org/docs/native-tokens/minting/#:%7E:text=Copy-,Again,-%2D%20here%20is%20an" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting/#:~:text=Copy-,Again,-%2D%20here%20is%20an</a> and there are multiple UTXOs at the receiver's address. Is 'receiver_output' the total amount of lovelace at all UTXOs in the receiver's wallet?</p>
</li>
</ol>
<p>Thanks, Myles</p>

<cardano-cli><native-assets>
About building a transaction using the cli
# About building a transaction using the cli

(Asked by: username_0 on 2021-12-22)

I've been following this guide <https://developers.cardano.org/docs/native-tokens/minting> to mint some native tokens but the process of sending native tokens to an address that has multiple UTXOs when I also have multiple UTXOs at my address is unclear to me.

1. I want to send my native tokens to some foreign address but my wallet has 2 UTXOs instead of just 1 as seen in the guide [https://developers.cardano.org/docs/native-tokens/minting#:~:text=Here%E2%80%99s%20what%20the%20raw%20transaction%20looks%20like%3A](https://developers.cardano.org/docs/native-tokens/minting#:%7E:text=Here%E2%80%99s%20what%20the%20raw%20transaction%20looks%20like%3A). For multiple UTXOs, are you supposed to add all of your txhash and txix values for each UTXO to --tx in? What is the syntax/formatting?
2. I need to set the 'funds' variable here [https://developers.cardano.org/docs/native-tokens/minting#:~:text=Copy-,Again,-%2D%20here%20is%20an](https://developers.cardano.org/docs/native-tokens/minting#:%7E:text=Copy-,Again,-%2D%20here%20is%20an) but there is multiple UTXOs in my wallet. Is 'funds' the total lovelace in all UTXOs in my wallet?
3. I need to set the 'receiver\_output' variable here [https://developers.cardano.org/docs/native-tokens/minting/#:~:text=Copy-,Again,-%2D%20here%20is%20an](https://developers.cardano.org/docs/native-tokens/minting/#:%7E:text=Copy-,Again,-%2D%20here%20is%20an) and there are multiple UTXOs at the receiver's address. Is 'receiver\_output' the total amount of lovelace at all UTXOs in the receiver's wallet?

Thanks, Myles

**Tags:** cardano-cli, native-assets

---

## 1 answers

### Answer by username_1 on 2021-12-22. Score: 1

A UTXO is an unspent transaction output. That UTXO is tied to an address, and that address is made up of hashes of keys that are tied to payment keys for that address. You can spend a single UTXO, or multiple. It's up to the design of your application. To simplify things, we'll ignore native tokens first.

Lets start with an assumption my wallet has received 2 transactions from others. One is for 1 ada and another one is for 1000 ada. If I try to make a transaction using just the 1 ada one, all I can do is pay the full ada as a fee with no output. If I make one just using the 1000 ada one, i can pay my 0.7 fee in ada and send the remaining of the 1000 ada to another address, the same address, or multiple addresses.

Now, once that transaction is added to a block, the old txins are "spent" and a new utxos are created based on the hash of the transaction you just made and the index.

When we add transactions sending native tokens (not minting yet), things get a little more complicated. For one, every UTXO containing a native asset has a minutxo greater than 1. So every UTXO holding a native asset must have some Ada in the same UTXO. This means you can't just send SANTA tokens without also sending some ada with them. The same rules apply, except you can't spend a native asset as a fee. So all outputs of native assets must add up to all inputs in the TXIN's defined in the transaction.

Earlier I mentioned that you can send to one or multiple addresses as outputs in a transaction. Well, you can also send multiple times to the same address! So I can take that 1000 ada I had in a UTXO and say 100 SANTA tokens in the same UTXO and then send them to the same address in `1.5 ada + 1 SANTA` UTXOs to split it up. In this case I'd have 100 outputs to the same address, with a 101st output sending the change of 849 ada and say a 1 ada fee. Each of these new utxos can be spent individually, so now I could individually send out SANTA tokens to people spending 1 of those UTXOs every time.

So now, we finally arrive minting that you were asking about When you mint assets in a transcation, you specify the policy hash and asset name making new assets out of thin air based on a policy you set in your policy script. Those newly minted assets need to be sent totaling the amount minted + any assets consumed from the txins for the minting transaction. So if we take the same example above and say we have 500 SANTA and 1000 ada in a single UTXO. We now mint 10000 SANTA, and we want to output this to a single address in a single UTXO. Now we sent `999 ada + 10500 SANTA` to our address. The same goes with burning, but in this case, we mint a negative value and subtract that from the outputs. So if I have that above UTXO and I want to burn 500 SANTA tokens, the output would be `998 ada + 10000 SANTA`. I'm using 1 ada fees in these examples for simplicity.


---

