Batching Transactions Using Fork And Merge
So I imagine one aspect of scalability that will need to be addressed, with the help of recursive proofs, is to allow parties to batch transactions.
There are probably a few ways we could represent batched transactions but to me that feels like a “fork and merge” chain where Zcash allows forks to merge back into Zcash chain as long as the fork doesn’t break a subset of the consensus rules? This also allows for some other interesting scenarios. Things like larger block size, shorter block time, lower difficulty, chain centralisation, etc are all thing we might allow in the fork. Is this possible and/or desired?
I’ll describe in a little more detail below and hopefully convey why I find it interesting…
Forking the Zcash chain
Provide zebrad (or zcashd) APIs for forking the chain. The user could then change a few common features for example:
- Block time
- Difficulty
- Private/centralised chain
- Fees/commision
Merging the fork
As long as the fork doesn’t break a subset of the consensus rules it could be merged back. There might be a couple of different options we want to allow like soft and hard merging. Soft merging could ignores failed transactions (e.g. double spend) and hard merging only merges if all transactions are valid.
There might be some other features we might choose to add to make this move viable like asset locking in the Zcash chain but that’s a larger discussion.
Fork vs Traditional Finance
There are some really interesting similarities of this mechanism to some things in transitional finance.
Direct Debit
A direct debit is just permission for a third party to execute a transaction in the future. A user could execute a transaction on the fork which the third party could execute/merge with the main Zcash chain at a later date. In both instances the transactions can fail if funds available are too low.
Insurance/options
A claim chain could be provided that is only valid when some conditions are met. An example might be a fork that only merges if a transaction did/didn’t occur or funds at a specific address go lower then a certain threshold.
Crowdfunding
Many transactions grouped together that can only be executed if the funding goal is reached.
Futures
Transactions that can only be executed/merged in the future.
Fork vs Smart Contract
Forks also have some similarities to some smart contract applications.
Atomic Transactions
Complex multi-user atomic transactions can be created.
Yield
Lots of small yield transactions are made but the merge (and fees) only occur once.
Receiver Paid Fees
Fork is merged by the receiver of funds effectively making the merge paid by receiver.
Rollups
This could be an automatic feature of the merge process.
L2 Chains
L2 Chains are just L1 forks that regularly merge back.
User Programmed Contracts
Forks could be decentralized with many nodes and include a new subset of consensus rules to manage code execution.
Superset of Consensus Rules
The fork will need to enforce the Zcash rules to allow merging back into Zcash chain but may add new consensus rules.
Conditional Asset Locking
Lock assets and prevent transfers unless a condition is true.
Conditional Transfer
Prevent a transfer from occuring unless a set of conditions are true.
Delayed Transfer
Delay a transfer. Optionally this could trigger contract to be run next block to test conditions for delay again.
Fees/Commision
Fee structure could be changed and routed to different addresses. Part of these funds could fund the merge back to the Zcash chain.