-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ZIP 235] Deposit 60% of Transaction Fees to the ZSF #718
base: main
Are you sure you want to change the base?
Changes from 15 commits
7b8eb0a
5ef964a
16fa913
7858c79
9139ff6
effc321
66e7e85
529e251
b23ab0b
efd69f7
28d6404
dd0cac4
dacf0ec
1cf67e8
2993a5c
cd9e1af
30381fe
44e3864
c6422c7
73a3e6a
4cabaa2
ad2467b
16e536a
e3055c2
5ecb9a1
040a379
6f4532b
bdf0447
ce76fab
7ab294a
49dbbad
fda38cb
2fbee33
4da390e
e7c7f27
716e011
a780b9c
aa38632
a7ae24f
a6a10ee
c1ef6d1
03fa419
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<p><code>ZIP: | ||
Title: Deposit 60% of transaction fees to the Zcash Sustainability Fund | ||
Owners: Jason McGee <jason@shieldedlabs.com> | ||
Mark Henderson <mark@equilibrium.co> | ||
Tomek Piotrowski <tomek@eiger.co> | ||
Mariusz Pilarek <mariusz@eiger.co> | ||
Original-Authors: Nathan Wilcox | ||
Credits: | ||
Status: Draft | ||
Category: Ecosystem | ||
Created: 2023-09-21 | ||
License: BSD-2-Clause</code></p> | ||
<h1>Terminology</h1> | ||
<p>The key words “MUST”, “SHOULD”, “SHOULD NOT”, “MAY”, “RECOMMENDED”, “OPTIONAL”, and “REQUIRED” in this document are to be interpreted as described in RFC 2119. [1]</p> | ||
<p>The term “network upgrade” in this document is to be interpreted as described in ZIP 200. [2]</p> | ||
<p>The term “Block Rewards” in this document is to be interpreted as described in ZIP TBD [3]</p> | ||
<p>The term “Issuance” in this document is to be interpreted as described in ZIP TBD [3]</p> | ||
<p>“We” - the ZIP authors, owners listed in the above front matter</p> | ||
<p>“<code>ZSF_BALANCE_AFTER[h]</code>” is balance of the Zcash Sustainability Fund as defined in ZIP ###</p> | ||
<h1>Abstract</h1> | ||
<p>This ZIP proposes a modification to transaction fees, diverting 60% of transaction fees back into the <code>ZSF_BALANCE_AFTER[h]</code>, while the destination of the remaining 40% is unchanged and goes to the block miner,. This proposal effectively “unmints” a portion of transaction fees, contributing to a deflationary effect and offering long-term support for the Zcash network.</p> | ||
<p>This ZIP attempts to establish a symbiotic relationship between miner incentives and sustained network growth. It achieves this by splitting transaction fees: 40% goes directly to miners, incentivizing them to include transactions, while the remaining 60% is deposited into the <code>ZSF_BALANCE_AFTER[h]</code>. This approach mitigates a "bootstrapping problem", a problem that arises when 100% of transaction fees go to the ZSF and miners are not incentivized to include transactions in block. This ZIP navigates this problem by ensuring miners continue to receive direct rewards for including transactions, while still contributing to the ZSF.</p> | ||
<p>Implementing this change allows the ZSF to accrue value earlier. By ensuring a consistent source of funding, the ZSF contributes to bolstering the Zcash network’s long-term security and sustainability.</p> | ||
<h1>Motivation</h1> | ||
<p>While ZIP-XXX (Establishing the Zcash Sustainability Fund) describes a method by which funds can be added to the Zcash Sustainability Fund by a voluntary <code>ZSF_DEPOSIT</code> transaction field. The default value of this field is zero and it is left up to the app, wallet, and mining software implementers to make use of it.</p> | ||
<p>This ZIP takes a much more explicit and non-optional approach, mandating at the protocol level that 60% of transaction fees be deposited into the ZSF As noted above, implementing this change allows the ZSF to accrue value earlier and contribute to future network sustainability.</p> | ||
<p>If ZIPs ### and ### are accepted, the system looks something like this:</p> | ||
<p>At Every New Block: | ||
- <code>ZSF_DEPOSIT</code> amount is deposited into the ZSF | ||
- Block rewards come from the ZSF | ||
- Transaction fees (inputs - outputs) paid to miner</p> | ||
<p>After the features described in this ZIP are activated (changed parts in bold):</p> | ||
<p>At Every New Block: | ||
- <code>ZSF_DEPOSIT</code> amount is deposited into the ZSF | ||
- Block rewards come from the ZSF | ||
- <strong>40% of transaction fees (inputs - outputs) paid to miner</strong> | ||
- <strong>60% of transaction fees (inputs - outputs) deposited into the ZSF</strong></p> | ||
<p>This has a multitude of benefits:</p> | ||
<ol> | ||
<li><strong>Network Sustainability</strong>: This mechanism involves temporarily reducing the supply of ZEC similar to asset burning in Ethereum’s EIP-1559, but with potential long-term sustainability benefits as the redistribution of deposits contributes to issuance rewards and network development, making it an attractive option for current and future Zcash users.</li> | ||
<li><strong>Ecosystem Benefits of Longer Time Horizons</strong>: A reliable and long-term functioning Zcash blockchain allows users to make secure long-term plans, leading to a sustainable and virtuous adoption cycle, rather than being influenced by short-term trends.</li> | ||
<li><strong>Incentivizing Transaction Inclusion</strong>: By providing a 40% share of transaction fees to miners, this ZIP maintains incentives for miners to prioritize including transactions in their blocks. This helps ensure the efficient processing of transactions and supports a robust and responsive network.</li> | ||
<li><strong>Future-Proofing the Network</strong>: Diverting transaction fees into the <code>ZSF_BALANCE_AFTER[h]</code> is a forward-looking approach that prepares the Zcash network for future challenges and opportunities. It establishes a financial buffer that can be instrumental in addressing unforeseen issues and seizing strategic advantages as the Zcash ecosystem evolves.</li> | ||
</ol> | ||
<h1>Specification</h1> | ||
<p>This ZIP only proposes a single modification to the transaction fees: | ||
1. Keep the current destination of 40% of the fees untouched, but route 60% of the fees back to <code>ZSF_BALANCE_AFTER[h]</code></p> | ||
<h2>Transaction fee routing requirements</h2> | ||
<ul> | ||
<li>For each transaction, 60% of the total fee MUST be paid to the ZSF</li> | ||
<li>Any fractions are rounded in favour of the miner <em>TODO ZIP owners: decide if you want rounding to favour the ZSF here</em></li> | ||
</ul> | ||
<h3>Consensus Rule Changes</h3> | ||
<p>The coinbase transaction at block height <code>height</code> MUST have a <code>zsfDeposit(height)</code> that is greater than or equal to <code>floor(TransactionFees(height)) / 2)</code>, where <code>TransactionFees(height)</code> is the sum of the the remaining value in the transparent transaction value pool of the non-coinbase transactions in the block at <code>height</code>.</p> | ||
<p><em>TODO ZIP owners: if you want rounding to favour the ZSF, use ceiling here</em></p> | ||
<p>TODO ZIP Editors: | ||
- work out how to deal with pre-v6 transactions which don't have the zsfDeposit() field. For example, by requiring the remaining value in the transparent transaction value pool of a coinbase transaction to be greater than or equal to 60% of the fee | ||
- consider imposing this requirement on v6 transactions instead of an explicit <code>ZSF_DEPOSIT</code> field requirement</p> | ||
<h1>Rationale</h1> | ||
<p>We believe that is ultimately a very minor change to the protocol, and quite simple in terms of implementation overhead. Additionally – and at the time of this writing – transaction fees are so small that 60% will likely not have a major impact.</p> | ||
<p>If transaction fees were to increase, future ZIPs can be written to change the 60%/40% split. Finding the optimal fee split may require an iterative approach involving adjustments based on real-world data and network dynamics.</p> | ||
<p>In the future, other ZIPs may be written to fund the ZSF in various ways, including but not limited to: | ||
- ZSA fees | ||
- dApp-specific fees and donations | ||
- “Storage fees” for any future data availability | ||
- Cross-chain bridge usage / Cross-chain messaging | ||
- Note sorting micro-transactional fees</p> | ||
<h2>Future Implications</h2> | ||
<p>Looking into the future, there may come a time when the transaction fees become greater than the block reward issuance. At that time we may need to reconsider the 60/40 split. However, this will likely not be the case for the next 8-10 years due to forcasts based on issuance models and network traffic.</p> | ||
<h1>References</h1> | ||
<p>[1] RFC-2119: https://datatracker.ietf.org/doc/html/rfc2119</p> | ||
<p>[2] ZIP 200: https://zips.z.cash/zip-0200</p> | ||
<p>[3] ZIP TBD: The Zcash Sustainability Fund ZIP (Placeholder)</p> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
``` | ||
ZIP: | ||
Title: Deposit 60% of transaction fees to the Zcash Sustainability Fund | ||
Owners: Jason McGee <jason@shieldedlabs.com> | ||
Mark Henderson <mark@equilibrium.co> | ||
Tomek Piotrowski <tomek@eiger.co> | ||
Mariusz Pilarek <mariusz@eiger.co> | ||
Original-Authors: Nathan Wilcox | ||
Credits: | ||
Status: Draft | ||
Category: Ecosystem | ||
Created: 2023-09-21 | ||
License: BSD-2-Clause | ||
``` | ||
|
||
# Terminology | ||
|
||
The key words “MUST”, “SHOULD”, “SHOULD NOT”, “MAY”, “RECOMMENDED”, “OPTIONAL”, and “REQUIRED” in this document are to be interpreted as described in RFC 2119. [1] | ||
|
||
The term “network upgrade” in this document is to be interpreted as described in ZIP 200. [2] | ||
|
||
The term “Block Rewards” in this document is to be interpreted as described in ZIP TBD [3] | ||
|
||
The term “Issuance” in this document is to be interpreted as described in ZIP TBD [3] | ||
|
||
“We” - the ZIP authors, owners listed in the above front matter | ||
|
||
“`ZSF_BALANCE_AFTER[h]`” is balance of the Zcash Sustainability Fund as defined in ZIP ### | ||
|
||
# Abstract | ||
|
||
This ZIP proposes a modification to transaction fees, diverting 60% of transaction fees back into the `ZSF_BALANCE_AFTER[h]`, while the destination of the remaining 40% is unchanged and goes to the block miner,. This proposal effectively “unmints” a portion of transaction fees, contributing to a deflationary effect and offering long-term support for the Zcash network. | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
This ZIP attempts to establish a symbiotic relationship between miner incentives and sustained network growth. It achieves this by splitting transaction fees: 40% goes directly to miners, incentivizing them to include transactions, while the remaining 60% is deposited into the `ZSF_BALANCE_AFTER[h]`. This approach mitigates a "bootstrapping problem", a problem that arises when 100% of transaction fees go to the ZSF and miners are not incentivized to include transactions in block. This ZIP navigates this problem by ensuring miners continue to receive direct rewards for including transactions, while still contributing to the ZSF. | ||
|
||
Implementing this change allows the ZSF to accrue value earlier. By ensuring a consistent source of funding, the ZSF contributes to bolstering the Zcash network’s long-term security and sustainability. | ||
teor2345 marked this conversation as resolved.
Show resolved
Hide resolved
teor2345 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Motivation | ||
|
||
While ZIP-XXX (Establishing the Zcash Sustainability Fund) describes a method by which funds can be added to the Zcash Sustainability Fund by a voluntary `ZSF_DEPOSIT` transaction field. The default value of this field is zero and it is left up to the app, wallet, and mining software implementers to make use of it. | ||
|
||
This ZIP takes a much more explicit and non-optional approach, mandating at the protocol level that 60% of transaction fees be deposited into the ZSF As noted above, implementing this change allows the ZSF to accrue value earlier and contribute to future network sustainability. | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If ZIPs ### and ### are accepted, the system looks something like this: | ||
|
||
At Every New Block: | ||
- `ZSF_DEPOSIT` amount is deposited into the ZSF | ||
- Block rewards come from the ZSF | ||
- Transaction fees (inputs - outputs) paid to miner | ||
|
||
After the features described in this ZIP are activated (changed parts in bold): | ||
|
||
At Every New Block: | ||
- `ZSF_DEPOSIT` amount is deposited into the ZSF | ||
- Block rewards come from the ZSF | ||
- **40% of transaction fees (inputs - outputs) paid to miner** | ||
- **60% of transaction fees (inputs - outputs) deposited into the ZSF** | ||
|
||
This has a multitude of benefits: | ||
|
||
1. **Network Sustainability**: This mechanism involves temporarily reducing the supply of ZEC similar to asset burning in Ethereum’s EIP-1559, but with potential long-term sustainability benefits as the redistribution of deposits contributes to issuance rewards and network development, making it an attractive option for current and future Zcash users. | ||
2. **Ecosystem Benefits of Longer Time Horizons**: A reliable and long-term functioning Zcash blockchain allows users to make secure long-term plans, leading to a sustainable and virtuous adoption cycle, rather than being influenced by short-term trends. | ||
3. **Incentivizing Transaction Inclusion**: By providing a 40% share of transaction fees to miners, this ZIP maintains incentives for miners to prioritize including transactions in their blocks. This helps ensure the efficient processing of transactions and supports a robust and responsive network. | ||
4. **Future-Proofing the Network**: Diverting transaction fees into the `ZSF_BALANCE_AFTER[h]` is a forward-looking approach that prepares the Zcash network for future challenges and opportunities. It establishes a financial buffer that can be instrumental in addressing unforeseen issues and seizing strategic advantages as the Zcash ecosystem evolves. | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Specification | ||
|
||
This ZIP only proposes a single modification to the transaction fees: | ||
1. Keep the current destination of 40% of the fees untouched, but route 60% of the fees back to `ZSF_BALANCE_AFTER[h]` | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Transaction fee routing requirements | ||
|
||
- For each transaction, 60% of the total fee MUST be paid to the ZSF | ||
- Any fractions are rounded in favour of the miner _TODO ZIP owners: decide if you want rounding to favour the ZSF here_ | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Consensus Rule Changes | ||
tomekpiotrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The coinbase transaction at block height `height` MUST have a `zsfDeposit(height)` that is greater than or equal to `floor(TransactionFees(height)) / 2)`, where `TransactionFees(height)` is the sum of the the remaining value in the transparent transaction value pool of the non-coinbase transactions in the block at `height`. | ||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
_TODO ZIP owners: if you want rounding to favour the ZSF, use ceiling here_ | ||
|
||
aphelionz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
TODO ZIP Editors: | ||
- work out how to deal with pre-v6 transactions which don't have the zsfDeposit() field. For example, by requiring the remaining value in the transparent transaction value pool of a coinbase transaction to be greater than or equal to 60% of the fee | ||
- consider imposing this requirement on v6 transactions instead of an explicit `ZSF_DEPOSIT` field requirement | ||
|
||
tomekpiotrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Rationale | ||
|
||
We believe that is ultimately a very minor change to the protocol, and quite simple in terms of implementation overhead. Additionally – and at the time of this writing – transaction fees are so small that 60% will likely not have a major impact. | ||
tomekpiotrowski marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
If transaction fees were to increase, future ZIPs can be written to change the 60%/40% split. Finding the optimal fee split may require an iterative approach involving adjustments based on real-world data and network dynamics. | ||
|
||
In the future, other ZIPs may be written to fund the ZSF in various ways, including but not limited to: | ||
- ZSA fees | ||
- dApp-specific fees and donations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is "dApp" sufficiently well known to not require a definition or expansion? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've expanded it to 'decentralized applications'. |
||
- “Storage fees” for any future data availability | ||
- Cross-chain bridge usage / Cross-chain messaging | ||
- Note sorting micro-transactional fees | ||
|
||
## Future Implications | ||
|
||
Looking into the future, there may come a time when the transaction fees become greater than the block reward issuance. At that time we may need to reconsider the 60/40 split. However, this will likely not be the case for the next 8-10 years due to forcasts based on issuance models and network traffic. | ||
Comment on lines
+106
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There needs to be an explanation of the security goal, why reducing miner fees is secure now, and when it might not be secure in future. Here is a draft security argument, but I'd like @daira to review it before it gets put into the ZIP: RationaleMining SecurityFor Zcash to be secure, miners need financial incentives to:
If miners don't have those incentives, then they might stop mining transactions, or deliberately create chain forks to re-mine transactions for themselves. These forks can roll back previously mined blocks and transactions, making Zcash transactions less secure and reliable. Since the block reward is currently large in comparison to transaction fees, and the work required to create a block is significant, there is little incentive for miners to roll back blocks to take those transaction fees for themselves. However, the incentive to mine a single transaction with a small fee is also small. So miners won't lose much by skipping mining a single transaction. This is a potential security issue, which can be mitigated by having multiple mining pools using diverse transaction selection policies. Currently, miners only gain significant fees from mining large numbers of transactions (or logical actions) on the chain with the most work. This incentivises them to mine more transactions, because the amount of work required to mine a block is almost the same, regardless of the number of transactions. Since miner fees are small, putting 60% of them into the ZSF does not significantly change the number of blocks a miner needs to mine to make the same profit. And the increase in issuance due to these ZSF deposits is also small. Future Security ConsiderationsIf the block reward becomes small in comparison to miner fees, then Zcash security rests on:
However, smaller block rewards also make single transactions more valuable, so miners have less incentive to skip single transactions. Here is an analysis of each of these factors: If the minimum ZSF deposit fraction is small, then miners have a larger incentive to rollback and take transaction fees, rather than continuously mining to gain the deposit fees through later ZSF issuance. For example, if the deposit fraction is 50%, then miners with less than 100% mining pool share have an incentive to rollback and take 50% of the transaction fee now, rather than waiting for later issuance of the ZSF deposit 50% over the long term. The break-even point depends on the timeframe. Every 4 years 50% of the ZSF is issued, so the break-even point over 4 years is around 33% miner fees, 33% ZSF fees re-issued, and 33% ZSF fees used for future issuance. If median transaction fees are small, then miners have a smaller incentive to continuously mine many transactions. So a smaller ZSF deposit fraction would be more secure. If the largest transactions fees are high enough, then miners have a larger incentive to rollback and take transaction fees. So a larger ZSF deposit fraction would be more secure, to incentivise waiting for future issuance. This incentive also depends on the number of transactions with large fees. If the amount of work required to create a block is small, then miners have a larger incentive to rollback blocks and try mining the same transactions themselves. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @teor2345 's text here makes sense to me. Ok, I wrote a huge comment here that had a bunch of algebra, but was basically tautological, so I edited it to summarize the tautology: Before the issuance reaches 0, these kinds of 0-issuance security issues are less severe. (Tautology) The reason I got confused / distracted is pondering the possible case where the "average fees" being deposited will equal the issuance rate (if we ignore integer rounding errors and assume a fairly consistent rate of fees). If Zcash were likely to enter this era / regime, then we would never reach a true 0 issuance rate. So I do think it's somewhat interesting to have a model that answers this question: "If average fees over some time window (say a month) remain ≥X ZEC, then how long will it be until those fee deposits match the issuance (ZSF withdrawal) rate?" Relatedly if we believe it requires "Y ZEC per block to pay for network security / development / maintenance" then it is tautological that ZSF deposits need to be ≥Y (on average) for sustainability. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @nathan-at-least and thanks for the edit :) I have added the tautology to the ZIP There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might also be useful to survey whether other cryptocurrencies have made any roughly similar changes in issuance or fees, and what the effects on them have been. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I see what you mean, but the second sentence is ambiguous. I think it is intended to mean: "This dilutes the negative impact on security of a smaller ZSF deposit fraction." (I.e. a smaller ZSF deposit fraction is still less secure than a larger one wrt rollback incentives, just not by as much.) |
||
|
||
# References | ||
|
||
[1] RFC-2119: https://datatracker.ietf.org/doc/html/rfc2119 | ||
|
||
[2] ZIP 200: https://zips.z.cash/zip-0200 | ||
|
||
[3] ZIP TBD: The Zcash Sustainability Fund ZIP (Placeholder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assigned ZIP 235.