# (?) Possible to generate a transaction with 0 ZEC

**URL:** <https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826>\
**Category:** Technology\
**Created:** [July 17, 2020, 12:29am UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826 "2020-07-17T00:29:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitchellpkt](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/mitchellpkt/32/21357_2.png) [@mitchellpkt](https://forum.zcashcommunity.com/u/mitchellpkt)\
**Post date:** [July 17, 2020, 12:29am UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/1 "2020-07-17T00:29:11Z")

</div>

Silly question - would it be possible to create a z2z transaction that consumes a dummy 0 ZEC note in the Sapling pool, [pays no fee](https://forum.zcashcommunity.com/t/bug-in-my-wallet-or-in-blockchain/35812/7), and creates more 0 ZEC note(s)?

The transaction would satisfy: `sum(inputs) = fee + sum(outputs)`

This could be viewed as a feature (free encrypted memo messaging) or a bug (literally free blockchain spam/bloat vector) depending on your perspective.

Curious what y’all think - is this possible and/or useful? I might hack together a proof of concept, unless there’s already some mechanism in the protocol that enforces `sum(inputs)>0`

Cheers,  
-:- Mitchell / Isthmus

---

<div class="post-metadata">

**Author:** ![dontpanicburns](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/dontpanicburns/32/32565_2.png) [@dontpanicburns](https://forum.zcashcommunity.com/u/dontpanicburns)\
**Post date:** [July 17, 2020, 2:12pm UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/2 "2020-07-17T14:12:16Z")

</div>

Yes this is possible

 ![image](https://global.discourse-cdn.com/zcash/original/3X/6/9/69ec85f9344868623412fddc9c699573b2268052.jpeg)

---

<div class="post-metadata">

**Author:** ![kek](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/kek/32/17068_2.png) [@kek](https://forum.zcashcommunity.com/u/kek)\
**Post date:** [July 17, 2020, 2:59pm UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/4 "2020-07-17T14:59:03Z")

</div>

> [@mitchellpkt](#):
>
> might hack together a proof of concept

would be interested to see what you come up with!

---

<div class="post-metadata">

**Author:** ![Anton1](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Anton1](https://forum.zcashcommunity.com/u/Anton1)\
**Post date:** [July 17, 2020, 3:03pm UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/5 "2020-07-17T15:03:25Z")

</div>

Now apparently there will be a decrease in transactions z2z  
🙂

---

<div class="post-metadata">

**Author:** ![zooko](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/zooko/32/32232_2.png) [@zooko](https://forum.zcashcommunity.com/u/zooko)\
**Post date:** [July 17, 2020, 4:20pm UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/6 "2020-07-17T16:20:26Z")

</div>

For what it is worth, this is part of the history of Bitcoin. In the early days, part of the narrative for why someone should care about this new “Bitcoin” thing was that transactions were free! You could literally pay a 0-satoshi fee and your transaction would still be mined. 🙂

---

<div class="post-metadata">

**Author:** ![str4d](https://sea2.discourse-cdn.com/zcash/user_avatar/forum.zcashcommunity.com/str4d/32/64_2.png) [@str4d](https://forum.zcashcommunity.com/u/str4d)\
**Post date:** [July 18, 2020, 12:49am UTC](https://forum.zcashcommunity.com/t/possible-to-generate-a-transaction-with-0-zec/36826/7 "2020-07-18T00:49:25Z")

</div>

Note also that while a zero-fee z2z transaction is identifiably distinct from fee-paying transactions, nothing is revealed about the values of the inputs or outputs, so a zero-fee zero-value “message-only” transaction is indistinguishable from a zero-fee value transfer.

A zero-fee zero-value transaction is slightly easier to create and mine than a value-carrying transaction, as dummy inputs are not required to be in the global commitment tree, and thus can be created independent of transactions that are currently in the mempool, whereas value-carrying transactions cannot spend unmined notes. I say “slightly” because note sharding and management can achieve close to the same outcome (as e.g. Zbay is doing by ensuring some minimum number of notes are in the wallet). In any case, imposing a minimum fee across the network would trivially remove this difference.

`zcashd`’s default mempool-selection rules would mean that in the case of many zero-fee shielded transactions and a few fee-paying transparent transactions (which are prioritised below all shielded transactions), the zero-fee transactions would take up at most half of a block before the fee-paying transactions would be selected.
