<blockquote>
<p>As the contract always has to have some ADA</p>
</blockquote>
<p>All <strong>UTxOs</strong> must have the <code>minLovelace</code> amount of ADA attached to it. That includes UTxOs at script addresses and in wallets. A transaction couldn't output the <code>T</code> token to Wallet 3 without including the <code>minLovelace</code> ADA (both are included in the same UTxO).</p>
<p>This is so bad actors don't just mint tons of new UTxOs and bloat the network. There is a maximum number of UTxOs that can exists since ADA is capped.</p>

CC BY-SA 4.0
2022-01-13T19:04:11.553Z
Isn't that what fees are for?
Sandro
CC BY-SA 4.0
2022-01-13T19:39:54.320Z
Fees are to pay the network for validating your transaction.
Mitchell Turner
CC BY-SA 4.0
2022-01-13T19:50:42.727Z
Oh, you mean to prevent bloating of the chain? Fees are great to prevent spamming the network, but it's not sufficient to prevent someone from doing permanent damage to the chain. Every time someone spins up a new node, they need to validate every transaction in the history of the chain. Without a `minLovelace` amount, someone could  mint 1,000,000,000 tokens, each with their own output. That would take up a lot of storage on the node machine. Sure, that would be an expensive transaction, but it would permanently bloat the chain. `minLovelace` protects against that attack vector.
Mitchell Turner
CC BY-SA 4.0
2022-01-13T20:05:55.470Z
I understand that fees are also for paying the platform. But I don't understand why it needs fees and the additional mechanism you mention to prevent that someone spams the network. I thought it is rather a collateral. If someone forces to send an invalid transaction then this collateral would be used. See https://docs.cardano.org/plutus/collateral-mechanism
Sandro
CC BY-SA 4.0
2022-01-13T21:57:33.723Z
The `minLovelace` mechanism isn't the collateral. That is, again, separate. The collateral is related to transaction validation on Cardano being deterministic, which is awesome, but requires the safety measures mentioned in the link you included.
Mitchell Turner
CC BY-SA 4.0
2022-01-13T18:13:45.937Z
2022-01-13T21:59:27.250Z
2022-01-13T21:59:27.250Z
Mitchell Turner
<p>Due to my low rep score, I cannot comment in Mitchell Turner's answer, so I answer here instead :)</p>
<p>As Mitchell said, all UTxOs must have the minLovelace amount of ADA attached to it. I just want to add a couple points to it</p>
<ol>
<li><p>The amount of minLovelace (in the EnglishAuction) is hardcoded by Lars to 2 ADA - <a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L54" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L54</a></p>
</li>
<li><p>When Wallet1 closes the Auction, token T is sent to Wallet3 -&gt; so the 2 ADA stored alongside token T is send to Wallet3 as well (See this <a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L323" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L323</a>)</p>
</li>
<li><p>This min-ada-value requirement will set size bound to both max number of UTxO and max UTxO size. Main reason is: A ledger without a size bound is vulnerable to being populated by so much data that users will unable to process it (or run a node) with machines meeting the recommended specifications for running a node.</p>
</li>
<li><p>min-ada-value is adjusted and calculated values depending on size of UTxO (note: 1 UTxO can contains multiple different types of Tokens including ADA)</p>
</li>
</ol>
<p>You can see this for more information <a href="https://docs.cardano.org/native-tokens/minimum-ada-value-requirement" rel="nofollow noreferrer">https://docs.cardano.org/native-tokens/minimum-ada-value-requirement</a></p>
<blockquote>
<p>If the address is not spendable by the user sending the tokens, the ada sent alongside the tokens no longer belongs to the sender</p>
</blockquote>
<blockquote>
<p>Before transferring custom tokens, users may choose to use off-chain communication to negotiate who supplies the ada to cover the min-ada-value in the output made by the transferring transaction</p>
</blockquote>

CC BY-SA 4.0
2022-01-13T21:49:00.367Z
2022-01-13T22:25:05.563Z
2022-01-13T22:25:05.563Z
Hoa Ho
<p>In my example (same as in the lecture) the wallet 1 starts the auction and wallet 3 wins it.
As the contract always has to have some ADA as Lars explains it looks like Wallet 1 pays 2 ADA to the contract in slot 1 to satisfy this rule as it has 2 ADA less (minus fees) in the UTxO. See:
<a href="https://i.sstatic.net/iDETi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/iDETi.png" alt="start of the auction" /></a></p>
<p>But in the end Wallet 3 who wins the auction gets this 2 ADA.
I guess those 2 ADA have to be there to cover some fees in some special cases.
But why does Wallet 3 and not Wallet 1 gets the 2 ADA in the end?
<a href="https://i.sstatic.net/eqJzj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eqJzj.png" alt="end of the auction" /></a></p>

<plutus><plutus-pioneer-program>
PPP Cohort 3 Lecture 1 (English Auction): Why does the buyer get the `minLovelace` (2 ADA) in the end even though the seller payed it initially?
# PPP Cohort 3 Lecture 1 (English Auction): Why does the buyer get the `minLovelace` (2 ADA) in the end even though the seller payed it initially?

(Asked by: username_0 on 2022-01-13)

In my example (same as in the lecture) the wallet 1 starts the auction and wallet 3 wins it.
As the contract always has to have some ADA as Lars explains it looks like Wallet 1 pays 2 ADA to the contract in slot 1 to satisfy this rule as it has 2 ADA less (minus fees) in the UTxO. See:
[![start of the auction](https://i.sstatic.net/iDETi.png)](https://i.sstatic.net/iDETi.png)

But in the end Wallet 3 who wins the auction gets this 2 ADA.
I guess those 2 ADA have to be there to cover some fees in some special cases.
But why does Wallet 3 and not Wallet 1 gets the 2 ADA in the end?
[![end of the auction](https://i.sstatic.net/eqJzj.png)](https://i.sstatic.net/eqJzj.png)

**Tags:** plutus, plutus-pioneer-program

---

## 2 answers

### Answer by username_2 on 2022-01-13. Score: 2 | Accepted answer

Due to my low rep score, I cannot comment in Mitchell Turner's answer, so I answer here instead :)

As Mitchell said, all UTxOs must have the minLovelace amount of ADA attached to it. I just want to add a couple points to it

1. The amount of minLovelace (in the EnglishAuction) is hardcoded by Lars to 2 ADA - <https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L54>
2. When Wallet1 closes the Auction, token T is sent to Wallet3 -> so the 2 ADA stored alongside token T is send to Wallet3 as well (See this <https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs#L323>)
3. This min-ada-value requirement will set size bound to both max number of UTxO and max UTxO size. Main reason is: A ledger without a size bound is vulnerable to being populated by so much data that users will unable to process it (or run a node) with machines meeting the recommended specifications for running a node.
4. min-ada-value is adjusted and calculated values depending on size of UTxO (note: 1 UTxO can contains multiple different types of Tokens including ADA)

You can see this for more information <https://docs.cardano.org/native-tokens/minimum-ada-value-requirement>

> If the address is not spendable by the user sending the tokens, the ada sent alongside the tokens no longer belongs to the sender

> Before transferring custom tokens, users may choose to use off-chain communication to negotiate who supplies the ada to cover the min-ada-value in the output made by the transferring transaction


---

### Answer by username_1 on 2022-01-13. Score: 4

> As the contract always has to have some ADA

All **UTxOs** must have the `minLovelace` amount of ADA attached to it. That includes UTxOs at script addresses and in wallets. A transaction couldn't output the `T` token to Wallet 3 without including the `minLovelace` ADA (both are included in the same UTxO).

This is so bad actors don't just mint tons of new UTxOs and bloat the network. There is a maximum number of UTxOs that can exists since ADA is capped.

> **Comments:**
> **username_0**: Isn't that what fees are for?  
> **username_1**: Fees are to pay the network for validating your transaction.  
> **username_1**: Oh, you mean to prevent bloating of the chain? Fees are great to prevent spamming the network, but it's not sufficient to prevent someone from doing permanent damage to the chain. Every time someone spins up a new node, they need to validate every transaction in the history of the chain. Without a `minLovelace` amount, someone could  mint 1,000,000,000 tokens, each with their own output. That would take up a lot of storage on the node machine. Sure, that would be an expensive transaction, but it would permanently bloat the chain. `minLovelace` protects against that attack vector.  
> **username_0**: I understand that fees are also for paying the platform. But I don't understand why it needs fees and the additional mechanism you mention to prevent that someone spams the network. I thought it is rather a collateral. If someone forces to send an invalid transaction then this collateral would be used. See https://docs.cardano.org/plutus/collateral-mechanism  
> **username_1**: The `minLovelace` mechanism isn't the collateral. That is, again, separate. The collateral is related to transaction validation on Cardano being deterministic, which is awesome, but requires the safety measures mentioned in the link you included.  

---

