This page is the Simplified Technical English version of ZIP 2001. The source ZIP is the normative text. Read the writing rules to understand the marked words.
ZIP 2001: Lockbox Funding Streams
ZIP: 2001
Title: Lockbox Funding Streams
Owners: Kris Nuttycombe <kris@nutty.land>
Credits: Daira-Emma Hopwood
Jack Grigg
Status: Final
Category: Consensus
Created: 2024-07-02
License: MIT
Pull-Request: <https://github.com/zcash/zips/pull/>
Terminology
On this page, STE words are in the place of the BCP 14 key words of the source. Refer to the key word table.
Abstract
This ZIP contains the specification of a change to the Zcash consensus protocol. The change contains the definition of a pool of issued Zcash value. The value in this pool is for the funding of future development work in the Zcash ecosystem.
This ZIP is an extension of the funding stream mechanism that is defined in ZIP 207 [zip-0207]. This ZIP contains the definition of a new funding stream type, "DEFERRED_POOL". A part of the block reward that is sent to a stream of this type is deposited directly into the deferred funding pool. This deposit is in the place of a payment to a recipient address.
Other ways to add value to the pool can be defined in the future. Two examples are direct deposits, and fee value that goes to miners at this time.
Motivation
The allocation of the Zcash block reward agrees with ZIP 1014 [zip-1014]. 80% of the block reward goes to miners. The remaining 20% is divided among these recipients:
- The Major Grants Fund (8%).
- Electric Coin Company (ECC) (7%).
- The Zcash Foundation (ZF) (5%).
This funding structure supports different essential activities, for example:
- Protocol development.
- Security.
- Marketing.
- Legal expenses.
But this model expires in November 2024. If no changes are made, the full block reward then goes to miners.
Several ZIP drafts are under consideration as replacements for the current direct allocation of block rewards. These ZIP drafts contain a proposal: a part of the block reward goes to a reserve. The distribution of this reserve is to be decided in a future ZIP. This ZIP is intended to supply a common mechanism. This mechanism can be used to implement these different proposals.
Requirements
The Zcash protocol has a new Deferred chain pool value balance, \(\mathsf{ChainValuePoolBalance^{Deferred}}\), for the deferred funding pool. This balance is kept in much the same way as the chain pool value balances for these pools:
- The transparent pool.
- The Sprout pool.
- The Sapling pool.
- The Orchard pool.
The funding stream mechanism of ZIP 207 [zip-0207] is changed. After the change, funds from a funding stream can be deposited into the deferred funding pool.
Specification
Changes to ZIP 207 [zip-0207]
This paragraph is added to the section Motivation of ZIP 207:
As of NU6, ZIP 1015 [zip-1015] directs part of the block reward to a reserve, the distribution of which is to be determined via a future ZIP. ZIP 2001 [zip-2001] modified the present ZIP to augment the funding stream mechanism with a common mechanism to implement this proposal.
In the section Funding streams [zip-0207-funding-streams], this text is replaced:
Each funding stream has an associated sequence of recipient addresses, each of which MUST be either a transparent P2SH address or a Sapling address.
This is the text after the change:
Each element of \(\mathsf{fs.Recipients}\) MUST represent either a transparent P2SH address as specified in [protocol-transparentaddrencoding], or a Sapling shielded payment address as specified in [protocol-saplingpaymentaddrencoding], or the identifier \(\mathsf{DEFERRED\_POOL}\).
After the section Funding streams, a new section is added. The heading of the new section is "Deferred Development Fund Chain Value Pool Balance". This is the text of the new section:
Full node implementations MUST track an additional \(\mathsf{ChainValuePoolBalance^{Deferred}}\) chain value pool balance, in addition to the Sprout, Sapling, and Orchard chain value pool balances.
Define \(\mathsf{totalDeferredOutput}(\mathsf{height}) := \sum_{\mathsf{fs} \in \mathsf{DeferredFundingStreams}(\mathsf{height})} \mathsf{fs.Value}(\mathsf{height})\) where \(\mathsf{DeferredFundingStreams}(\mathsf{height})\) is the set of funding streams with recipient identifier \(\mathsf{DEFERRED\_POOL}\) in the block at height \(\mathsf{height}\).
The \(\mathsf{ChainValuePoolBalance^{Deferred}}\) chain value pool balance for a given block chain is the sum of the values of payments to \(\mathsf{DEFERRED\_POOL}\) for transactions in the block chain.
Equivalently, \(\mathsf{ChainValuePoolBalance^{Deferred}}\) for a block chain up to and including height \(\mathsf{height}\) is given by \(\sum_{\mathsf{h} = 0}^{\mathsf{height}} \mathsf{totalDeferredOutput}(\mathsf{h})\).
Note: \(\mathsf{totalDeferredOutput}(\mathsf{h})\) is necessarily zero for heights \(\mathsf{h}\) prior to NU6 activation.
In the section Consensus rules [zip-0207-consensus-rules], this rule is replaced:
- The coinbase transaction in each block MUST contain at least one output per active funding stream that pays the stream's value in the prescribed way to the stream's recipient address for the block's height.
These are the rules after the change:
- In each block with coinbase transaction \(\mathsf{cb}\) at block height \(\mathsf{height}\), for each funding stream \(\mathsf{fs}\) active at that block height with a recipient identifier other than \(\mathsf{DEFERRED\_POOL}\) given by \(\mathsf{fs.Recipient}(\mathsf{height})\), \(\mathsf{cb}\) MUST contain at least one output that pays \(\mathsf{fs.Value}(\mathsf{height})\) zatoshi in the prescribed way to the address represented by that recipient identifier.
- \(\mathsf{fs.Recipient}(\mathsf{height})\) is defined as \(\mathsf{fs.Recipients_{\,fs.RecipientIndex}}(\mathsf{height})\).
After the list of post-Canopy consensus rules, these paragraphs are added:
These rules are reproduced in [protocol-fundingstreams].
The effect of the definition of \(\mathsf{ChainValuePoolBalance^{Deferred}}\) above is that payments to the \(\mathsf{DEFERRED\_POOL}\) cause \(\mathsf{FundingStream[FUND].Value}(\mathsf{height})\) to be added to \(\mathsf{ChainValuePoolBalance^{Deferred}}\) for the block chain including that block.
In the section Deployment [zip-0207-deployment], this sentence is added:
Changes to support deferred funding streams are to be deployed with NU6. [zip-0253]
Changes to the Zcash Protocol Specification
In section 4.17 Chain Value Pool Balances [protocol-chainvaluepoolbalances], include this text. (Section 4.17 is new in version 2024.5.1 of the protocol specification.)
Define \(\mathsf{totalDeferredOutput}\) as in [protocol-subsidies].
Then, consistent with [zip-0207], the deferred development fund chain value pool balance for a block chain up to and including height \(\mathsf{height}\) is given by \(\mathsf{ChainValuePoolBalance^{Deferred}}(\mathsf{height}) := \sum_{\mathsf{h} = 0}^{\mathsf{height}} \mathsf{totalDeferredOutput}(\mathsf{h})\).
Non-normative notes:
- \(\mathsf{totalDeferredOutput}(\mathsf{h})\) is necessarily zero for heights \(\mathsf{h}\) prior to NU6 activation.
- Currently there is no way to withdraw from the deferred development fund chain value pool, so there is no possibility of it going negative. Therefore, no consensus rule to prevent that eventuality is needed at this time.
The total issued supply of a block chain at block height \(\mathsf{height}\) is given by the function:
\[\begin{array}{ll} \mathsf{IssuedSupply}(\mathsf{height}) := &\!\!\!\!\mathsf{ChainValuePoolBalance^{Transparent}}(\mathsf{height}) \\ &+\,\; \mathsf{ChainValuePoolBalance^{Sprout}}(\mathsf{height}) \\ &+\,\; \mathsf{ChainValuePoolBalance^{Sapling}}(\mathsf{height}) \\ &+\,\; \mathsf{ChainValuePoolBalance^{Orchard}}(\mathsf{height}) \\ &+\,\; \mathsf{ChainValuePoolBalance^{Deferred}}(\mathsf{height}) \end{array}\]
In section 7.1.2 Transaction Consensus Rules [protocol-txnconsensus], this text is replaced:
The total value in zatoshi of transparent outputs from a coinbase transaction, minus \(\mathsf{v^{balanceSapling}}\), minus \(\mathsf{v^{balanceOrchard}}\), MUST NOT be greater than the value in zatoshi of the block subsidy plus the transaction fees paid by transactions in this block.
This is the text after the change:
For the block at block height \(\mathsf{height}\):
- define the "total output value" of its coinbase transaction to be the total value in zatoshi of its transparent outputs, minus \(\mathsf{v^{balanceSapling}}\), minus \(\mathsf{v^{balanceOrchard}}\), plus \(\mathsf{totalDeferredOutput}(\mathsf{height})\);
- define the "total input value" of its coinbase transaction to be the value in zatoshi of the block subsidy, plus the transaction fees paid by transactions in the block.
The total output value of a coinbase transaction MUST NOT be greater than its total input value.
In this text, the definition of \(\mathsf{totalDeferredOutput}(\mathsf{height})\) agrees with ZIP 207.
Note: This ZIP and ZIP 236 both contain changes to the rule above. With the two changes together, the last paragraph is replaced by this text:
[Pre-NU6] The total output value of a coinbase transaction MUST NOT be greater than its total input value.
[NU6 onward] The total output value of a coinbase transaction MUST be equal to its total input value.
Section 7.10 Payment of Funding Streams [protocol-fundingstreams] contains text and definitions that are copied from ZIP 207. We recommend that this section is updated to agree with the changes above.
We recommend that the second paragraph of section 1.2 High-level Overview [protocol-overview] is updated to include the deferred chain value pool. That section of the specification is fully non-normative. Thus we do not give the full text of that change here.
References
- [BCP14]
- Information on BCP 14 — "RFC 2119: Key words for use in RFCs to Indicate Requirement Levels" and "RFC 8174: Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"
- [protocol-overview]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 1.2: High-level Overview
- [protocol-transactions]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.4: Transactions and Treestates
- [protocol-coinbasetransactions]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 3.11: Coinbase Transactions and Issuance
- [protocol-chainvaluepoolbalances]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 4.17: Chain Value Pool Balances
- [protocol-transparentaddrencoding]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 5.6.1.1: Transparent Addresses
- [protocol-saplingpaymentaddrencoding]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 5.6.3.1: Sapling Payment Addresses
- [protocol-txnconsensus]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 7.1.2: Transaction Consensus Rules
- [protocol-subsidies]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 7.8: Calculation of Block Subsidy, Funding Streams, and Founders’ Reward
- [protocol-fundingstreams]
- Zcash Protocol Specification, Version 2024.5.1 [NU6]. Section 7.10: Payment of Funding Streams
- [zip-0207]
- ZIP 207: Funding Streams
- [zip-0207-funding-streams]
- ZIP 207: Funding Streams. Section: Funding streams
- [zip-0207-consensus-rules]
- ZIP 207: Funding Streams. Section: Consensus rules
- [zip-0207-deployment]
- ZIP 207: Funding Streams. Section: Deployment
- [zip-0253]
- ZIP 253: Deployment of the NU6 Network Upgrade
- [zip-1014]
- ZIP 1014: Establishing a Dev Fund for ECC, ZF, and Major Grants
- [zip-1015]
- ZIP 1015: Block Reward Allocation for Non-Direct Development Funding
- [zip-2001]
- ZIP 2001: Lockbox Funding Streams