# Zero fee Grin transactions?

**URL:** <https://forum.grin.mw/t/zero-fee-grin-transactions/9261>\
**Category:** Research\
**Created:** [October 5, 2021, 8:49am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261 "2021-10-05T08:49:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [October 5, 2021, 8:49am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/1 "2021-10-05T08:49:15Z")

</div>

I would like to open the discussion on zero fee transaction for Grin.  
Are they technically possible and are they even desirable? I want to discuss the idea since it is intriguing, not because I think they are way to go for Grin, actually I am inclined to think it is not worth the extra complexity.

A while back I encountered two Komodo projects (SmartFi and OpenFoodChain).  
To my surprise, both blockchains use a zero fee system for transactions. This aspect of zero fee transactions intrigued me. The two projects made me ponder if it would be desirable, and or technically possible, to have a portion of the Grin transactions with a zero transaction fee.

In the Smartfi blockchain they basically lock the transaction fee for a period of 24 hours after which it will be unlocked and accessible to the owner. This idea is simple and not bad, while stimulating economic activity.

For Grin, if transaction would not create more outputs than a transaction consumes, I do not see any security reasons not to allow having a temporarily locked transaction fee instead of the transaction fee being paid to miners. Furthermore, many security mitigations could be put in place to avoid misuse such as a spam attack. For example,by putting a separate cap in to place, allowing for example only 20% of the space in a block to be occupied by transaction fee free transactions. Also we could prioritize transactions with an increased locked transaction fee, to avoid users to continuously spam this free transaction pool 20% of the block space.

Below are some of the Pro’s and Con’s of such an approach:

**PRO’S**

- Free transactions are a great way to stimulate economic activity
- More transaction volume would increase the privacy of all users
- Free transactions would make Grin stand out, especially since most coins which have somewhat private transactions are expensive to use.
- It would incentivize transactions that do not create more outputs than they consume, hence limiting it would incentivize users to keep the blockchain small

**CON’S**

- My biggest concern is unnecessary complexity, would having ‘yet another transaction type’ make using Grin more complex? Would the implementation make Grin’s code more complex, which it against one of its fundamental principals, _minimalism_
- If these transactions can be distinguished from normal fee transactions, this would break transaction uniformity which is important for both simplicity, code minimalism and privacy
- Possible loss of privacy, since fee needs to be transparent and go back to the owner?
- Grin transaction fees are already rather cheap, is making them lower really what users need, or do we simply have to keep improving the user experience with good wallet software

As I said above, it is not that I think this is something Grin needs since there are many con’s, but it is interesting enough to ponder about, discuss the possibility and the possible pro’s and con’s 😁.

**Links to previous discussions on this topic**

> **[0017 fix-fees - Grin Documentation](https://docs.grin.mw/grin-rfcs/text/0017-fix-fees/)**
>
> Grin Documentation

[https://forum.grin.mw/t/why-are-there-transaction-f](https://forum.grin.mw/t/why-are-there-transaction-f)  
ees/8622/4

> [@Grin transaction fees](https://forum.grin.mw/t/grin-transaction-fees/4114/6):
>
> So, the question stands regarding minimum fee. Does it exist, or is tx\_weight/1000 just how it’s implemented in the wallet?

> [@Why are there transaction fees?](https://forum.grin.mw/t/why-are-there-transaction-fees/8622):
>
> Block reward is 60 grin forever. Why is this not enough to secure the network forever? Correct me if I’m wrong, the argument for a constant block reward is to secure the network. If this is one of the main arguments, what are transaction fees for? Fees can function as a bid to be included in a block. However, this can remain as the main function, but what if that’s not needed? What would happen to the network if transaction fees were removed, and block reward was the only function to securing t…

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [October 5, 2021, 10:02am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/2 "2021-10-05T10:02:28Z")

</div>

My first worry that comes to mind is that zero fee transactions open up a spam vector. Nothing prevents me from creating a transaction with 1 input and the maximum number of outputs. While the attacker can only create full blocks, I think it may be enough bloat to make Grin unusable if sustained for a long enough period of time.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 5, 2021, 10:15am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/3 "2021-10-05T10:15:59Z")

</div>

Have you read [https://github.com/mimblewimble/grin-rfcs/blob/master/text/0017-fix-fees.md](https://github.com/mimblewimble/grin-rfcs/blob/master/text/0017-fix-fees.md) ?

> [@Anynomous](#):
>
> - Free transactions are a great way to stimulate economic activity

And an even better way to invite spam, as amply demonstrated by Nano currency.

> [@](#):
>
> - More transaction volume would increase the privacy of all users

I don’t see how, unless you get more aggregation. For which we have much better proposals. More transaction volume that is unwilling to pay the current sub-cent fees is unwanted bloat. It is unreasonable to expect thousands of computers worldwide to relay your transaction  
and store information about your it for eternity for free.

> [@](#):
>
> - Free transactions would make Grin stand out, especially since most coins which have somewhat private transactions are expensive to use.

To me, nano stands out in a negative way for their zero fees.

> [@](#):
>
> - It would incentivize transactions that do not create more outputs than they consume, hence limiting it would incentivize users to keep the blockchain small

This is addressed in the RFC.

---

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [October 5, 2021, 10:22am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/4 "2021-10-05T10:22:18Z")

</div>

> [@oryhp](#):
>
> My first worry that comes to mind is that zero fee transactions open up a spam vector. Nothing prevents me from creating a transaction with 1 input and the maximum number of outputs.

For that reason, if we would ever consider zero transaction fees for some part of the blocks, it would only be for transactions that do not create more outputs then they consume. Also the fee would increase if the 20% of the ‘free transaction’ block space would run out, so users would start to compete only not in paid fee, but in locked fee. In this way the bloat would be limited to only the kernels that are left once an output is spend.

> [@tromp](#):
>
> This is addressed in the RFC.

Yes, it is. So if we would ever consider having some block space for free transactions, this would be a minimal requirements.

Again, not arguing that we ever should go for zero transaction fees, I think there are more important things to improve such as wallets with one time use addresses, multiple accounts and coin-swap. But the idea still intrigued me, hence I opened this discussion.

The biggest issues as far as I can see are the extra complexity and loss of transaction uniformity which outweigh the benefits which are minimal since transactions are sufficiently cheap at the current price of Grin.

---

<div class="post-metadata">

**Author:** ![davidtavarez](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@davidtavarez](https://forum.grin.mw/u/davidtavarez)\
**Post date:** [October 5, 2021, 11:09am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/5 "2021-10-05T11:09:35Z")

</div>

I don’t see how exactly Nano is dealing with the spam. Taken from their whitepaper:

> Unlike Bitcoin, the PoW in Nano is simply used as an anti-spam tool, similar to Hashcash, and can be computed on the order of seconds

I guees we have to read the Hashcash paper to know more about [http://www.hashcash.org/papers/hashcash.pdf](http://www.hashcash.org/papers/hashcash.pdf)

> B. Transaction Flooding. A malicious entity could send many unnecessary but valid transactions between accounts under its control in an attempt to saturate the network. With no transaction fees they are able to continue this attack indefinitely. However, the PoW required for each transaction limits the transaction rate the malicious entity could generate without significantly investing in computational resources. Even under such an attack in an attempt to inflate the ledger, nodes that are not full historical nodes are able to prune old transactions from their chain; this clamps the storage usage from this type of attack for almost all users.

> D. Penny-Spend Attack. A penny-spend attack is where an attacker spends infinitesimal quantities to a large number of accounts in order to waste the storage resources of nodes. Block publishing is ratelimited by the PoW, so this limits the creation of accounts and transactions to a certain extent. Nodes that are not full historical nodes can prune accounts below a statistical metric where the account is most likely not a valid account…

It seems like it requires a little bit more that just prunning.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 5, 2021, 11:27am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/6 "2021-10-05T11:27:28Z")

</div>

> [@davidtavarez](#):
>
> the PoW in Nano is simply used as an anti-spam tool, similar to Hashcash, and can be computed on the order of seconds

The problem is that what is one second for a phone can be a millisecond for a GPU. Nano has a lot of trouble balancing the need to limit spam from powerful hardware like GPUs or even ASICs and the need for a simple phone to solve PoW in reasonable time. I remember years ago watching many dozens of spam txs per second flying across my screen on a nano block explorer. That resulted in dozens of GBs of bloat added to their chain in a matter of weeks.

---

<div class="post-metadata">

**Author:** ![Anynomous](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/anynomous/32/2928_2.png) [@Anynomous](https://forum.grin.mw/u/Anynomous)\
**Post date:** [October 5, 2021, 11:48am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/7 "2021-10-05T11:48:45Z")

</div>

> [@tromp](#):
>
> I remember years ago watching many dozens of spam txs per second flying across my screen on a nano block explorer. That resulted in dozens of GBs of bloat added to their chain in a matter of weeks.

If in the future Grin could let go of keeping all transaction kernels (discussed quite a few times in the past), this would change the situation. In that case Grin would not only become hord resistant, but also bloat resistant. In such a case spam would result in a minor bloat since only the kernels up to to an set event horizon point need to be kept, after which they are not important anymore. Of course this would only work if we have the additional requirement that no more outputs are created then used.

In the current situation the bloat could still be significant. How many transactions fit in a block (I could not find this back)? The bloat would be 20 bytes (transaction kernel ) times the number of transactions per minute times 0.2 (for 20% cap).

---

<div class="post-metadata">

**Author:** ![oryhp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/oryhp/32/2923_2.png) [@oryhp](https://forum.grin.mw/u/oryhp)\
**Post date:** [October 5, 2021, 1:43pm UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/8 "2021-10-05T13:43:56Z")

</div>

Zero fee transactions also incentivize empty blocks for smaller miners. There’s no benefit for the miner in trying to fill a block with transactions. Or, they incentivize the miner to fill the block with garbage txs so that others spend more time validating the block. Not sure if these are likely to happen but it changes game theory.

---

<div class="post-metadata">

**Author:** ![Cobragrin](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@Cobragrin](https://forum.grin.mw/u/Cobragrin)\
**Post date:** [October 7, 2021, 10:25am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/9 "2021-10-07T10:25:35Z")

</div>

why LN bitcoin choosen 0 fee ? i dont understand really.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 7, 2021, 1:40pm UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/10 "2021-10-07T13:40:56Z")

</div>

Lightning charges routing fees on every tx.  
Which serves both as reward for routing nodes and as DDos protection on the LN network.

---

<div class="post-metadata">

**Author:** ![noobvie](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@noobvie](https://forum.grin.mw/u/noobvie)\
**Post date:** [October 7, 2021, 3:17pm UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/11 "2021-10-07T15:17:41Z")

</div>

From my perspective. Current fee is cheap, zero fee is degrading the value.

---

<div class="post-metadata">

**Author:** ![grn](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/grn/32/3722_2.png) [@grn](https://forum.grin.mw/u/grn)\
**Post date:** [October 8, 2021, 2:13am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/12 "2021-10-08T02:13:24Z")

</div>

According to this chart, the fees trippled this year. I wonder what caused that.

> **[Crypto Research, Data, and Tools](https://messari.io/asset/grin/chart/txn-fee-avg-ntv)**
>
> Gain an edge over the crypto market with professional grade data, tools, and research.

I agree that fees are necessary for spam protection, but I wonder if there is a mechanism to lower fees in Grin if the price of Grin will rise. 0.03 Grin at 30ct/Grin is different from 0.03 Grin at 100$/Grin.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 8, 2021, 6:42am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/13 "2021-10-08T06:42:45Z")

</div>

> [@grn](#):
>
> if there is a mechanism to lower fees

Yes, people running nodes (including pools and miners) can just agree to lower the setting

```auto
#base fee that's accepted into the pool
accept_fee_base = 500000

```

in grin-server.toml

Which might makes sense if Grin is priced above $3 for a longer period.

---

<div class="post-metadata">

**Author:** ![grn](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/grn/32/3722_2.png) [@grn](https://forum.grin.mw/u/grn)\
**Post date:** [October 8, 2021, 6:49am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/14 "2021-10-08T06:49:25Z")

</div>

Great, I didn’t notice.  
When you say “agree”, does that mean that there is a majority vote, and an individual node with a different setting would do nothing?

---

<div class="post-metadata">

**Author:** ![Cobragrin](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@Cobragrin](https://forum.grin.mw/u/Cobragrin)\
**Post date:** [October 8, 2021, 8:23am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/15 "2021-10-08T08:23:34Z")

</div>

so if someone pays coffee with lightning 0.5$ with no fee ,but if he pays with Grin 0.5$+ fee or merchant can adjust fee in this 0.5$  
i mean it can mix a consumers mind …like that

> <https://twitter.com/NickSzabo4/status/635244338268663808>

thnx.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 8, 2021, 8:57am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/16 "2021-10-08T08:57:01Z")

</div>

> [@Cobragrin](#):
>
> so if someone pays coffee with lightning 0.5$ with no fee

There is still a fee. The merchant just sells coffee inclusive of fee for $0.5 (which btw, would only cover a few sips in most coffee shops:).

Just like in European stores, all consumer prices quoted are inclusive of tax.

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [October 8, 2021, 9:00am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/17 "2021-10-08T09:00:31Z")

</div>

> [@grn](#):
>
> does that mean that there is a majority vote

In whatever way you reach social consensus that a large majority of nodes will adopt the new setting. Individual nodes that keep the higher base fee will stop relaying transactions, but still function otherwise. Miners that keep the higher base fee will start mining empty blocks.  
So you’d want at least all the known pools to agree.

---

<div class="post-metadata">

**Author:** ![fernandabradley](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/fernandabradley/32/4388_2.png) [@fernandabradley](https://forum.grin.mw/u/fernandabradley)\
**Post date:** [October 12, 2021, 8:29am UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/18 "2021-10-12T08:29:17Z")

</div>

Interesting, I didn’t know much, thanks for the information!!

---

<div class="post-metadata">

**Author:** ![tromp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.grin.mw/tromp/32/22_2.png) [@tromp](https://forum.grin.mw/u/tromp)\
**Post date:** [May 16, 2022, 9:26pm UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/21 "2022-05-16T21:26:24Z")

</div>

Although lack of fees is one DOS vector, there are apparently several other DOS vectors at play in this recent attack.

---

<div class="post-metadata">

**Author:** ![Doogevol](https://avatars.discourse-cdn.com/v4/letter/d/5f8ce5/32.png) [@Doogevol](https://forum.grin.mw/u/Doogevol)\
**Post date:** [May 16, 2022, 11:08pm UTC](https://forum.grin.mw/t/zero-fee-grin-transactions/9261/22 "2022-05-16T23:08:44Z")

</div>

> [@Anynomous](#):
>
> I would like to open the discussion on zero fee transaction for Grin.  
> Are they technically possible and are they even desirable?

As I understood zero fee transactions are technically possible at the consensus level. So a Block with one or more zero fee transaction would be accreted by recent nodes. (right?)  
So miners actually could spam to the chain with full blocks If they want and have some knowledge. What is the block-size-limit? (must be about 0.5MB for 10TPS?) Are there two separate limits for Kernels and outputs+Rangeproofs?  
Zero-Fees transactions actually would have the special capability that you can build closed transaction graph loops, and systems of them. I don’t know if they could lead to practical use-cases somehow:

> **[15 Puzzle](https://en.wikipedia.org/wiki/15_puzzle)**
>
> The 15 Puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle which has 15 square tiles numbered 1 to 15 in a frame that is 4 tile positions high and 4 positions wide, with one unoccupied position. Tiles in the same row or column of the open position can be moved by sliding them horizontally or vertically, respectively. The goal of the puzzle is to place the tiles in numerical order (from left to right, top to bottom).
> Named after the n...

I Like fees for their contribution for protection against long term 51% attacks. Because of the 10TPS Limit an average grin could get moved exclusively by an **absolute maximum of 10 times**. I hope most grin get moved some 100 times but mostly together with other grin. So I don’t see a reason why to expect many regular transactions smaller than 1 grin. (They are not possible.) So a fee of 0.1 Grin per transaction on the base layer seems very ok.

[Next page](https://forum.grin.mw/t/zero-fee-grin-transactions/9261.md?page=2)
