Architecture
Last updated
Last updated
zkHub applies zero-knowledge rollups (zk-rollup) scaling solutions to ensure fund security while achieve great system performance (high TPS, fast finality).
When users deposit funds to zkHub from a zk-rollup network, funds will be transferred to zkLinkβs contract. After obtaining the Deposit Event, if it is the first time the user deposits, a default account will be created. The zkLink Validator will continue to synchronize with on-chain activities. After receiving notification from the zkLink Validator, the zkHub should maintain a copy of the user account balance data locally in the zkHub.
When user withdraw, user submits the Transaction Signature to the zkHub, and after the zkHub confirms the Signature, it is sent to the zkLink Validator. Once zkLink Validator implement the zero-knowledge proof and upload it to zk-rollup networks, the fund can be received.
Built upon zkLinkβs zk-Rollup trading infrastructure, zkHub is connected to multiple zk-rollup networks in Ethereum ecosystem. zkHub allows users to trade multi-chain assets on a unified user interface, and multi-chain token portfolios can be managed with a single wallet.
Tokens issued on Ethereum and different zk-rollups by the same entity, for instance, USDT ERC20, USDT BEP20, USDT ARB, etc β will be merged into a single USDT token in zkHub.
Through zkLink Nexus, multi-chain state synchronization is achieved via Ethereum. It allows for a secure and effective synchronization of states cross-L2s, ensuring that deposit fraud issues are prevented.
zkHub applies order book model to provide the best trading experience and flexibility. In order to save computational resources and the gas cost of zero knowledge proving, off-chain applications will process computation tasks including account risk management, order placement and match engine.
To order to ensure trading security, trades (matched orders) that could change account balance will be sent to provers to generate zero-knowledge proofs. Trades will be batched and rolled up to update the state of smart contracts on zk-rollup networks.