(?) Possible to generate a transaction with 0 ZEC

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, 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

2 Likes

Yes this is possible

3 Likes

would be interested to see what you come up with!

Now apparently there will be a decrease in transactions z2z
:slight_smile:

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. :slight_smile:

5 Likes

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.

6 Likes