π¦ZK-Rollup Asset Proof Design
Last updated
Last updated
ZKP RoadmapοΌ
Testnet Live: End of June.
MUFEX Dunkirk Asset Recovery Test: Middle of July.
Mainnet Live(contains escape mode capability): End of July.
Support multiple cryptocurrencies: 2023.Q4
Smart Contract RoadmapοΌ
Phase 1: Updatable, to prevent the occurrence of extreme vulnerabilities and risks that needed to be urgently fixed.
Phase 2: Addition of a time lock to prevent backdoors to funds (anticipated end of Q3/start of Q4).
The Operator assumes a vital role within the protocol, fulfilling several crucial responsibilities:
Production of ZK Snapshots: The Operator efficiently processes each ZK Rollup event batch, adhering to predetermined rules, to generate ZKSnapshots.
Generation of Zero-Knowledge Proofs: The Operator leverages on the circuit to generate zero-knowledge proofs for the ZKSnapshots, ensuring data integrity and privacy.
Submission of ZK Snapshot Data: The Operator seamlessly interfaces with the ZK Push Gateway to submit the ZK Snapshots' data to the on-chain smart contract, facilitating verification and confirmation of state changes.
V1οΌZero-knowledge proof and verification in the MUFEX protocol require the asset information of each user
ZK Snapshot can be regarded conceptually as MUFEX's "L3 block". One ZK Snapshot is generated for each batch of events that the Operator processes. This ZKSnapshot is then passed to the circuit for ZK proof computation.
This is not a physical circuit, but a ZK SNARK circuit. The Circuit is responsible for describing events that require zero-knowledge proofs, such as order completions and deposits, and thus an important part of zero-knowledge proofs. The Circuit receives inputs, and the input signal generates an output through the path of the electric gate to produce zk-proofs for the corresponding ZKSnapshots.
To improve computing and storage efficiencies, MUFEX has implemented data selection and compression. As Merkle tree balances complexity, computing time, and user-friendliness, the protocol has created two Merkle trees: Asset Merkle TreeγWithdraw Merkle Tree.
The Asset Merkle Tree guarantees usersβ self-custody of their assets. Even when the MUFEX node operator cannot provide any services, users can still withdraw their assets safely. The Asset Merkle Tree records all MUFEX accounts and assets information.
The Withdraw Merkle Tree documents users' withdrawal records for withdrawal operations.
Once the zk proof of a ZKSnapshot is generated, the Operator calls the submit method of the MUFEX smart contract through ZK Push Gateway to submit ZKSnapshot-related data on-chain for confirmation of status change (multiple ZKSnapshots can be submitted simultaneously in strict accordance with the sequence of snapshot generation ). These data mainly include:
The root hash of the Asset Merkle Tree
Zero-knowledge proofs
Additional data for withdrawal tree
As the Node operator has to pay ETH as Gas to submit ZKSnapshots on-chain, users will be charged gas fees(free Now).
The on-chain MUFEX smart contract is responsible for storing user funds, verifying the zero-knowledge proofs submitted by the off-chain node and storing the latest Merkle tree roots. It consists of multiple contracts, the main contracts of which are:
MainTreasury: interactions where the Operator submits ZKSnapshot or usersβ deposits or force withdrawals, escrow user funds.
HotTreasury:
Main chain(Mantle): Fast withdrawal
Other chains: Stewarding the assets deposited by users, and providing the functions of deposit, fast withdrawal.
Verifier: registering verifying key and verifying zero-knowledge proofs.
DepositWalletFactoryοΌgenerating deposit contract addresses.
The Operator calls the MUFEX smart contract through ZK Push Gateway, and submits ZKSnapshots' data on chain in strict accordance with the sequence of ZKSnapshots generation.
Observing all on-chain transactions of the MUFEX smart contract, such as deposits, force withdrawals, and Rollup transactions, and notifying the node after a transaction is confirmed.The above is a brief description of the ZK-Rollup part of the MUFEX protocol.