Send Funds with only 1 confirmation
With Zecwallet v1.7.3, which is now available on www.zecwallet.co and on the app stores, Zecwallet now requires just 1 confirmation to spend funds. So you can now spend funds, usually within 1 minute of receiving them.
Why we need confirmations
Up until now, Zecwallet required 5 confirmations before funds could be spent. This is a significant irritant to new users of Zcash, because it makes for an awkward ~5 minute wait before funds can be spent.
When wallets construct shielded transactions, they need to pick an “anchor block”. The problem is that if this anchor block gets re-orged, the transactions becomes invalid. So, to be on the safe side, Zecwallet used to pick an anchor block 5 blocks deep, to reduce the risk of reorgs.
Re-org risk
Light wallets can sometimes be behind the zcash blockchain tip because:
- LightwalletD polls zcashd at 20 second intervals, so LightwalletD can be 20s behind
- Wallets poll LightwalletD at regular intervals, so they can be further behind.
- 1-block reorgs were not detected, neither by LightwalletD nor by the wallet, so the reorg is not detected until the next block, which can be several minutes later.
A combination of these factors can make it possible for the wallet to be several minutes behind the chain tip.
Simply decreasing the polling intervals is not a great option, because it can drain the phone’s battery, increase network usage and lightwalletD resource usage.
Solution
The recent work done on Mempool APIs on LightwalletD makes it very efficient to detect new blocks. In addition, new PRs submitted by Zecwallet to LightwalletD mempool PR and block hash detection allows wallet to now detect reorgs as soon as they happen, significantly reducing the risk that the anchor block picked by the wallet will be reorged. Especially, detecting 1-block reorgs significantly improves the reliability of the picking recent anchor blocks.
Of course, just as before, there is always a risk that the block will be reorg’d, so if you are sending / receiving large funds, please wait for a few confirmations before treating the Tx as final.