# Want to be able to add "free" transactions in each block

**URL:** https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470
**Category:** Cosmos-SDK
**Created:** [December 24, 2018, 2:56pm UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470 "2018-12-24T14:56:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![svaishnavy](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@svaishnavy](https://forum.cosmos.network/u/svaishnavy)
#### Post date: [December 24, 2018, 2:56pm UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470/1 "2018-12-24T14:56:19Z")

</div>

Hi,

I am developing a cosmos sdk based application, and would like to have some transactions/transaction types without any fee or gas. Is it possible? Could someone point me how to accomplish this?

Thanks!

---

<div class="post-metadata">

### Author: ![valardragon](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@valardragon](https://forum.cosmos.network/u/valardragon)
#### Post date: [December 26, 2018, 4:38pm UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470/2 "2018-12-26T16:38:10Z")

</div>

The options I see for how to handle this are:

- Make a tx-dependent gas meter, and make auth use it
- Make auth completely tx aware
- Don’t use any API’s that increase gas within your special tx.

I think making your own gas meter and forking auth to use it is your best bet atm. This kind of sucks, and you should make a github issue for this to be do-able without forking the codebase :).

The line you have to change is: [https://github.com/cosmos/cosmos-sdk/blob/develop/x/auth/ante.go#L316](https://github.com/cosmos/cosmos-sdk/blob/develop/x/auth/ante.go#L316), and you’d have to make your own gas meter that took in the tx as well.

---

<div class="post-metadata">

### Author: ![svaishnavy](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@svaishnavy](https://forum.cosmos.network/u/svaishnavy)
#### Post date: [December 26, 2018, 9:09pm UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470/3 "2018-12-26T21:09:40Z")

</div>

Thanks @valardragon - I’ve submitted an issue in github. [https://github.com/cosmos/cosmos-sdk/issues/3193](https://github.com/cosmos/cosmos-sdk/issues/3193)

Please take a look and let me know if the requirements are clear.

---

<div class="post-metadata">

### Author: ![svaishnavy](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@svaishnavy](https://forum.cosmos.network/u/svaishnavy)
#### Post date: [December 26, 2018, 9:41pm UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470/4 "2018-12-26T21:41:44Z")

</div>

@valardragon - I went through the AnteHandler code, looks like the fee/gas calculation is handled there. We can create our own AnteHandler and set it in the app. Of course, we have to then replicate the AnteHandler implementation, but I think that is better than forking the auth module. Would you recommend this approach?

---

<div class="post-metadata">

### Author: ![valardragon](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@valardragon](https://forum.cosmos.network/u/valardragon)
#### Post date: [December 29, 2018, 4:35am UTC](https://forum.cosmos.network/t/want-to-be-able-to-add-free-transactions-in-each-block/1470/5 "2018-12-29T04:35:34Z")

</div>

That makes sense to do, as long as you c/p all the unexported methods for the ante handler as well.
