Skip to content
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 313] Reduce Conventional Transaction Fee to 1000 zatoshis #408

Merged
merged 38 commits into from
Dec 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3cf9d11
Draft ZIP for reducing default tx fee
nighthawk24 Oct 12, 2020
0973905
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Oct 12, 2020
a62c68a
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Oct 12, 2020
05a6e97
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Oct 12, 2020
bb2acb6
Update ZIP #313
nighthawk24 Oct 21, 2020
bd1e9b2
Fix typo
nighthawk24 Nov 5, 2020
f4c6935
Added Support Wallets
nighthawk24 Nov 6, 2020
ccbb876
ZIP ownership terminology
nighthawk24 Nov 6, 2020
adaf4cf
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Nov 6, 2020
ccef71e
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Nov 6, 2020
a39730c
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Nov 6, 2020
549403d
DoS section
nighthawk24 Nov 6, 2020
9e66359
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Nov 6, 2020
0795dd6
Update Activation Schedule
nighthawk24 Nov 17, 2020
4210404
Accept suggestions to change Editors to Owners.
nighthawk24 Nov 17, 2020
8049d10
Update zip-reduce-shielded_tx_fee.rst
nighthawk24 Nov 17, 2020
dc52b7e
Add notice to wallet devs to monitor Zcash network
nighthawk24 Nov 17, 2020
842d1e3
Modify ZIP to specify default fee for all transactions
nighthawk24 Dec 20, 2020
5ec589f
Remove Original-Author field
nighthawk24 Dec 20, 2020
ea4ff4b
Update category
nighthawk24 Dec 20, 2020
147cae0
Update status
nighthawk24 Dec 20, 2020
c02bb0c
Update wording and harmonizing.
nighthawk24 Dec 20, 2020
9b321cf
Include all tx types in scope
nighthawk24 Dec 20, 2020
fc3f63a
Fix formatting
nighthawk24 Dec 20, 2020
6bb093a
Add Zooko's last name
nighthawk24 Dec 20, 2020
730d2b4
Add Ian Miers name
nighthawk24 Dec 20, 2020
1b4698c
Remove ZIP Comments field
nighthawk24 Dec 20, 2020
2dae307
Fix grammar
nighthawk24 Dec 20, 2020
38d0a8c
Move text
nighthawk24 Dec 20, 2020
ba7eb97
Move text
nighthawk24 Dec 20, 2020
8639b3e
Update wording
nighthawk24 Dec 20, 2020
79afded
Update grammar
nighthawk24 Dec 20, 2020
755d79f
Apply suggestions from code review
nighthawk24 Dec 20, 2020
67bbc45
Apply suggestions from code review
nighthawk24 Dec 20, 2020
4051868
Formatting, Suggestions and add Acknowledgement
nighthawk24 Dec 20, 2020
0aa739f
Remove guarantee wording.
nighthawk24 Dec 20, 2020
3a2adec
Rename zip-reduce-shielded_tx_fee.rst to zip-0313.rst .
daira Dec 23, 2020
4a36917
ZIP 313: final editing, and add more detail about zcashd support.
daira Dec 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Index of ZIPs
<tr> <td>310</td> <td class="left"><a href="zip-0310.rst">Security Properties of Sapling Viewing Keys</a></td> <td>Draft</td>
<tr> <td><span class="reserved">311</span></td> <td class="left"><a class="reserved" href="zip-0311.rst">Sapling Payment Disclosure</a></td> <td>Reserved</td>
<tr> <td><span class="reserved">312</span></td> <td class="left"><a class="reserved" href="zip-0312.rst">Shielded Multisignatures using FROST</a></td> <td>Reserved</td>
<tr> <td><span class="reserved">313</span></td> <td class="left"><a class="reserved" href="zip-0313.rst">Reduce Default Transaction Fee</a></td> <td>Reserved</td>
<tr> <td>313</td> <td class="left"><a href="zip-0313.rst">Reduce Conventional Transaction Fee to 1000 zatoshis</a></td> <td>Active</td>
<tr> <td>321</td> <td class="left"><a href="zip-0321.rst">Payment Request URIs</a></td> <td>Proposed</td>
<tr> <td><span class="reserved">339</span></td> <td class="left"><a class="reserved" href="zip-0339.rst">Wallet Recovery Words</a></td> <td>Reserved</td>
<tr> <td>400</td> <td class="left"><a href="zip-0400.rst">Wallet.dat format</a></td> <td>Draft</td>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<tr> <td>310</td> <td class="left"><a href="zip-0310">Security Properties of Sapling Viewing Keys</a></td> <td>Draft</td>
<tr> <td><span class="reserved">311</span></td> <td class="left"><a class="reserved" href="zip-0311">Sapling Payment Disclosure</a></td> <td>Reserved</td>
<tr> <td><span class="reserved">312</span></td> <td class="left"><a class="reserved" href="zip-0312">Shielded Multisignatures using FROST</a></td> <td>Reserved</td>
<tr> <td><span class="reserved">313</span></td> <td class="left"><a class="reserved" href="zip-0313">Reduce Default Transaction Fee</a></td> <td>Reserved</td>
<tr> <td>313</td> <td class="left"><a href="zip-0313">Reduce Conventional Transaction Fee to 1000 zatoshis</a></td> <td>Active</td>
<tr> <td>321</td> <td class="left"><a href="zip-0321">Payment Request URIs</a></td> <td>Proposed</td>
<tr> <td><span class="reserved">339</span></td> <td class="left"><a class="reserved" href="zip-0339">Wallet Recovery Words</a></td> <td>Reserved</td>
<tr> <td>400</td> <td class="left"><a href="zip-0400">Wallet.dat format</a></td> <td>Draft</td>
Expand Down
141 changes: 136 additions & 5 deletions zip-0313.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,148 @@
<!DOCTYPE html>
<html>
<head>
<title>ZIP 313: Reduce Default Transaction Fee</title>
<title>ZIP 313: Reduce Conventional Transaction Fee to 1000 zatoshis</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="css/style.css"></head>
<body>
<section>
<pre>ZIP: 313
Title: Reduce Default Transaction Fee
Status: Reserved
Title: Reduce Conventional Transaction Fee to 1000 zatoshis
Owners: Aditya Bharadwaj &lt;[email protected]&gt;
Credits: Daira Hopwood
Deirdre Connolly
Nathan Wilcox
Status: Active
Category: Wallet
Pull-Request: &lt;<a href="https://github.com/zcash/zips/pull/408">https://github.com/zcash/zips/pull/408</a>&gt;
Discussions-To: &lt;<a href="https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566/41">https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566/41</a>&gt;</pre>
Created: 2020-10-11
License: MIT
Discussions-To: &lt;<a href="https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566">https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566</a>&gt;
Pull-Request: &lt;<a href="https://github.com/zcash/zips/pull/408">https://github.com/zcash/zips/pull/408</a>&gt;</pre>
<section id="terminology"><h2><span class="section-heading">Terminology</span><span class="section-anchor"> <a rel="bookmark" href="#terminology"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>The term "conventional transaction fee" in this document is in reference to the value of a transaction fee that is conventionally used by wallets, and that a user can reasonably expect miners on the Zcash network to accept for including a transaction in a block.</p>
</section>
<section id="abstract"><h2><span class="section-heading">Abstract</span><span class="section-anchor"> <a rel="bookmark" href="#abstract"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>The goal of this ZIP is to gather wallet developers, miners &amp; Zcash users for social consensus on reducing the conventional transaction fees and to get the Zcash conventional transaction fee reduced from 10,000 zatoshis to 1,000 zatoshis.</p>
<p>In addition, this specification harmonizes transaction fees between different kinds of transaction (involving shielded addresses, transparent addresses, or both), as proposed in <a id="id1" class="footnote_reference" href="#zcash-2942">6</a>.</p>
</section>
<section id="motivation"><h2><span class="section-heading">Motivation</span><span class="section-anchor"> <a rel="bookmark" href="#motivation"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>The conventional transaction fee presently is 0.0001 ZEC or 10,000 zatoshis. At a ZEC market price of USD 100, for example, a user can send 10,000 transactions for 1 ZEC. This works out to 1 U.S. cent per transaction and it rises with any increase in the price of ZEC.</p>
<p>With increase in light wallet adoptions on mobile clients, many users will be new to the Zcash eco-system. And the fact that the transaction fees are paid by the sender (not the receiver) is new information to users who might use Zcash for e-commerce and app interactions that might result in several transactions each day.</p>
<p>Privacy must not cost a premium. The cost of 10 shielded transactions buys 1GB of mobile data <cite>in India today &lt;<a href="https://www.cable.co.uk/mobiles/worldwide-data-pricing/">https://www.cable.co.uk/mobiles/worldwide-data-pricing/</a>&gt;</cite>.</p>
<p>Zcash users must be able to do more with their ZEC balance than worry about paying the premium for shielded transactions.</p>
<p>With reduced fees, it will be cheaper to transact on the Zcash network, while also inviting novel use cases for privacy-preserving applications that would benefit from the privacy, security, and programmable money aspects of the Zcash chain.</p>
<p>The harmonization of fees between different kinds of transaction can be expected to improve usability, consistency, and predictability.</p>
<section id="requirements-for-adoption"><h3><span class="section-heading">Requirements for adoption</span><span class="section-anchor"> <a rel="bookmark" href="#requirements-for-adoption"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>The change to the conventional transaction fees should be undertaken soon as it gets difficult to gain consensus with the growth in the network of wallets, exchanges, miners and third parties involved.</p>
<p>The following parties need to be part of the consensus:</p>
<ul>
<li>Support from mining groups is required to include the lowered conventional fee transactions in the next block.</li>
<li>Wallet developers need to provide commitment to update the software to use the new fee.</li>
<li>Zcash documentation and community outreach must be undertaken to make the change known.</li>
</ul>
</section>
<section id="security-and-privacy-considerations"><h3><span class="section-heading">Security and privacy considerations</span><span class="section-anchor"> <a rel="bookmark" href="#security-and-privacy-considerations"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>Unique transaction fees may reveal specific users or wallets or wallet versions, which would reduce privacy for those specific users and the rest of the network. Hence this change should be accepted by a majority of shielded transaction software providers before deploying the change.</p>
<p>Varying/unique fees are bad for privacy. For the short term before blocks get full, it is fine for everyone to use a constant fee, as long as it is enough to compensate miners for including the transaction. <a id="id2" class="footnote_reference" href="#nathan-1">1</a></p>
<p>Long term, the issue of fees needs to be re-visited in separate future proposals as the blocks start getting consistently full. New ZIPs with flexible fees, such as <a id="id3" class="footnote_reference" href="#ian-1">2</a>, along with scaling solutions, will need to be evaluated and applied.</p>
<section id="denial-of-service-vulnerability"><h4><span class="section-heading">Denial of Service Vulnerability</span><span class="section-anchor"> <a rel="bookmark" href="#denial-of-service-vulnerability"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h4>
<p>A transaction-rate-based denial of service attack occurs when an attacker generates enough transactions over a window of time to prevent legitimate transactions from being mined, or to hinder syncing blocks for full nodes or miners.</p>
<p>There are two primary protections to this kind of attack in Zcash: the block size limit, and transaction fees. The block size limit ensures that full nodes and miners can keep up with the block chain even if blocks are completely full. However, users sending legitimate transactions may not have their transactions confirmed in a timely manner.</p>
<p>Variable fees could mitigate this kind of denial of service: if there are more transactions available than can fit into a single block, then a miner will typically choose the transactions that pay the highest fees. If legitimate wallets were to increase their fees during this condition, the attacker would also increase the fees of their transactions. It is sometimes argued that this would impose a cost to the attacker that would limit the time window for which they can continue the attack. However, there is little evidence that the actual costs involved would be a sufficient disincentive.</p>
<p>This proposal does not alter how fees are paid from transactions to miners. However, it does establish a fixed flat fee that wallets are expected to use. Therefore during a transaction rate denial-of-service attack, legitimate fees from those wallets will not rise, so an attacker can extend an attack for a longer window for the same cost.</p>
<p>This ZIP does not address this concern. A future ZIP should address this issue. Wallet developers and operators should monitor the Zcash network for rapid growth in transaction rates.</p>
</section>
</section>
</section>
<section id="specification"><h2><span class="section-heading">Specification</span><span class="section-anchor"> <a rel="bookmark" href="#specification"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>Wallets implementing this specification will use a default fee of 0.00001 ZEC (1000 zatoshis) from block 1,080,000, for all transactions.</p>
<section id="transaction-relaying"><h3><span class="section-heading">Transaction relaying</span><span class="section-anchor"> <a rel="bookmark" href="#transaction-relaying"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>zcashd, and potentially other node implementations, implements fee-based restrictions on relaying of mempool transactions. Nodes that normally relay transactions are expected to do so for transactions that pay at least the conventional fee, unless there are other reasons not to do so for robustness or denial-of-service mitigation.</p>
<p>In zcashd 4.2.0, this change is implemented by <a id="id4" class="footnote_reference" href="#zcash-relaying">7</a>.</p>
</section>
<section id="mempool-size-limiting"><h3><span class="section-heading">Mempool size limiting</span><span class="section-anchor"> <a rel="bookmark" href="#mempool-size-limiting"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h3>
<p>zcashd limits the size of the mempool as described in <a id="id5" class="footnote_reference" href="#zip-0401">8</a>. This specifies a <em>low_fee_penalty</em> that is added to the "eviction weight" if the transaction pays a fee less than (in the original ZIP) 10,000 zatoshis. This threshold is modified to match the new conventional fee in zcashd 4.2.0.</p>
</section>
</section>
<section id="support"><h2><span class="section-heading">Support</span><span class="section-anchor"> <a rel="bookmark" href="#support"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>The developers of the following wallets intend to implement the reduced fees:</p>
<ul>
<li>Zbay;</li>
<li>Zecwallet Suite (Zecwallet Lite for Desktop/iOS/Android &amp; Zecwallet FullNode);</li>
<li>Nighthawk Wallet for Android &amp; iOS;</li>
<li>zcashd built-in wallet <a id="id6" class="footnote_reference" href="#zcash-4916">5</a>.</li>
</ul>
<p>In zcashd this fee change is implemented in version 4.2.0 (not dependent on block height), and in that version is limited to transactions created using <cite>z_*</cite> RPC APIs. It is planned to extend this to all transactions in a future version <a id="id7" class="footnote_reference" href="#zcash-2942">6</a>.</p>
</section>
<section id="acknowledgements"><h2><span class="section-heading">Acknowledgements</span><span class="section-anchor"> <a rel="bookmark" href="#acknowledgements"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<p>Thanks to Nathan Wilcox for suggesting improvements to the denial of service section. Thanks to Daira Hopwood and Deirdre Connolly for reviewing and fixing the wording in this ZIP.</p>
</section>
<section id="references"><h2><span class="section-heading">References</span><span class="section-anchor"> <a rel="bookmark" href="#references"><img width="24" height="24" src="assets/images/section-anchor.png" alt=""></a></span></h2>
<table id="nathan-1" class="footnote">
<tbody>
<tr>
<th>1</th>
<td><a href="https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566/40">Conventional Shielded Fees</a></td>
</tr>
</tbody>
</table>
<table id="ian-1" class="footnote">
<tbody>
<tr>
<th>2</th>
<td><a href="https://forum.zcashcommunity.com/t/zip-reduce-default-shielded-transaction-fee-to-1000-zats/37566/31">Ian Miers. Mechanism for fee suggester/oracle</a></td>
</tr>
</tbody>
</table>
<table id="zooko-1" class="footnote">
<tbody>
<tr>
<th>3</th>
<td><a href="https://twitter.com/zooko/status/1295032258282156034?s=20">Zooko Wilcox. Tweet on reducing tx fees</a></td>
</tr>
</tbody>
</table>
<table id="zooko-2" class="footnote">
<tbody>
<tr>
<th>4</th>
<td><a href="https://twitter.com/zooko/status/1295032621294956545?s=20">Zooko Wilcox. Tweet on sharing tx fee with wallet developer</a></td>
</tr>
</tbody>
</table>
<table id="zcash-4916" class="footnote">
<tbody>
<tr>
<th>5</th>
<td><a href="https://github.com/zcash/zcash/pull/4916">Reduce default fee to 1000 zatoshis</a></td>
</tr>
</tbody>
</table>
<table id="zcash-2942" class="footnote">
<tbody>
<tr>
<th>6</th>
<td><a href="https://github.com/zcash/zcash/pull/2942">Ecosystem-wide standard transaction fee</a></td>
</tr>
</tbody>
</table>
<table id="zcash-relaying" class="footnote">
<tbody>
<tr>
<th>7</th>
<td><a href="https://github.com/zcash/zcash/pull/4916/commits/e6a44ff833bce280a30115d10ef0070ad4d52b38">zcashd commit e6a44ff: Always allow transactions paying at least DEFAULT_FEE to be relayed</a></td>
</tr>
</tbody>
</table>
<table id="zip-0401" class="footnote">
<tbody>
<tr>
<th>8</th>
<td><a href="zip-0401">ZIP 401: Addressing mempool denial-of-service</a></td>
</tr>
</tbody>
</table>
</section>
</section>
</body>
</html>
Loading