# ZKBase Markdown version of https://ethbeat.org/layer2s/projects/zkspace ## Summary **Warning:** This project is archived and no longer maintained. - Total Value Secured: $210.08 K (-2.33% compared to seven days ago; canonically bridged $210.08 K, natively minted $0.00, externally bridged $0.00; 0.00% with additional trust assumptions compared to the tokens involved and the Stage assigned to the project's canonical messaging bridge) - TVS by asset: ETH & derivatives $99.90 K (47.5%), Stablecoins $22.71 K (10.8%), BTC & derivatives $72.69 K (34.6%), Other $14.77 K (7.03%) - Associated tokens: ZKS: $14.63 K (6.96% of TVS) - Past day UOPS: No data - Stage: Stage 0 (Appchain: ZKBase provides the infrastructure for token transfer, swaps and NFT minting. Arbitrary contracts are not supported.) - Type: ZK Rollup - Purposes: NFT, Exchange, Payments - Host chain: Ethereum ### Risks - Sequencer failure: Force via L1 (sentiment: good) - State validation: Validity proofs (SN) (No execution delay; sentiment: good) - Data availability: Onchain (sentiment: good) - Exit window: 5d (sentiment: bad) - Proposer failure: Use escape hatch (sentiment: good) ### About ZKBase is an infrastructure protocol based on Zero-Knowledge (ZK) proof technology. It aims to support various projects across the Bitcoin and Ethereum networks. ### Links - Website: https://zkbase.org/ - Bridge: https://zkbase.app - Docs: https://en.wiki.zks.org/ - Explorer: https://explorer.zkbase.app/ - Repository: https://github.com/l2labs/zkswap-contracts - Social: https://discord.gg/MJKtaYcYw8, https://twitter.com/ZKBaseOfficial, https://t.me/ZKSpaceOfficial - Contracts explorer (Disco): https://disco.ethbeat.org/ui/p/zkspace ### Badges - Application-specific chain: This project is built to operate a specific application - Ethereum with calldata: This project is posting its data to Ethereum as calldata - Fork of ZKsync Lite: The project is a fork of ZKsync Lite ## Value Secured The interactive TVS charts are shown on [the HTML page](https://ethbeat.org/layer2s/projects/zkspace#tvs). Token by token: [TVS breakdown](https://ethbeat.org/layer2s/projects/zkspace/tvs-breakdown). - [TVS chart (JSON)](https://ethbeat.org/api/scaling/tvs/zkspace?range=max) - [TVS breakdown by token (JSON)](https://ethbeat.org/api/scaling/tvs/zkspace/breakdown) ## Onchain costs The section shows the operating costs that L2s pay to Ethereum. The interactive costs chart is shown on [the HTML page](https://ethbeat.org/layer2s/projects/zkspace#onchain-costs). ### Tracked transactions #### State updates - functionCall: 2021-12-15 11:53 UTC - now; currently used; address: [0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8](https://etherscan.io/address/0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8); selector: 0x6898e6fc; signature: `function verifyBlocks(uint32 _blockNumberFrom, uint32 _blockNumberTo, uint256[] _recursiveInput, uint256[] _proof, uint256[] _subProofLimbs)` ## Liveness This section shows how "live" the project's operators are by displaying how frequently they submit transactions of the selected type. It also highlights anomalies - significant deviations from their typical schedule. The interactive liveness chart is shown on [the HTML page](https://ethbeat.org/layer2s/projects/zkspace#liveness). ### Tracked transactions #### State updates - functionCall: 2021-12-15 11:53 UTC - now; currently used; address: [0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8](https://etherscan.io/address/0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8); selector: 0x6898e6fc; signature: `function verifyBlocks(uint32 _blockNumberFrom, uint32 _blockNumberTo, uint256[] _recursiveInput, uint256[] _proof, uint256[] _subProofLimbs)` ## Milestones & Incidents - 2023-12-29: [ZKSpace Officially Upgrades to ZKBase](https://zkbaseofficial.medium.com/zkbase-is-undergoing-a-brand-new-upgrade-and-setting-sail-again-in-2024-3d71418a10e1). The ZKSpace team has rebranded to ZKBase. - 2022-02-21: [Token Deposit Campaign started](https://medium.com/@zkspaceofficial/zkspace-releases-token-deposit-campaign-with-fascinating-zks-rewards-151e2492549e). Incentives program to onboard new users has started. - 2021-12-20: [ZKSpace launched](https://x.com/ZKBaseOfficial/status/1465943738157465605). All-in-One ScalingProject Platform ZKSpace, Featuring ZKSwap v3.0, NFTs, & Payments is launched. ## Risk summary ### Funds can be stolen if 1. a contract receives a malicious code upgrade. There is a 8d delay on code upgrades. ### Funds can be lost if 2. the user is unable to generate the non-trivial ZK proof for exodus withdraw. ### Users can be censored if 3. the operator refuses to include their transactions. However, there exists a mechanism to independently exit the system. ### MEV can be extracted if 4. the operator exploits their centralized position and frontruns user transactions. ## Risk analysis ### Sequencer failure Force via L1 (sentiment: good) Users can force the sequencer to include a transaction by submitting a request through L1. If the sequencer censors or is down for for more than 3d, users can use the exit hatch to withdraw their funds. ### State validation Validity proofs (SN) (No execution delay; sentiment: good) SNARKs are succinct zero knowledge proofs that ensure state correctness, but require trusted setup. ### Data availability Onchain (sentiment: good) All of the data needed for proof construction is published on Ethereum L1. ### Exit window 5d (sentiment: bad) Users have 5d to exit funds in case of an unwanted upgrade. There is a 8d delay before a upgrade is applied, and withdrawals can take up to 3d to be processed. ### Proposer failure Use escape hatch (sentiment: good) Users are able to trustlessly exit by submitting a zero knowledge proof of funds. ## Stage ZKBase is a Stage 0 Appchain ZK Rollup. **The project does not pass the walkaway test**: users are not able to exit in the presence of malicious operators if the Security Council disappears. Rollup operators cannot compromise the system, but being **application-specific** might bring additional risk. ZKBase provides the infrastructure for token transfer, swaps and NFT minting. Arbitrary contracts are not supported. **Note:** We're still in the process of formalizing how to properly integrate appchains in the Stages framework. **Warning:** There is no available node software that can reconstruct the state from L1 data, hence there is no way to verify that this system is a rollup. ### Stage 0 1 issue needs fixing. - Met: A complete and functional proof system is deployed. - Met: The project calls itself a rollup. - Met: State roots are posted to Ethereum L1. - Met: Inputs for the state transition function are posted to Ethereum L1. - Issue: No source-available node exists that can recreate the state from L1 data. ### Stage 1 2 issues need fixing. **Principle** - Issue: Compromising ≥75% of the Security Council should be the only way (other than bugs) for a rollup to indefinitely block an L2→L1 message (e.g. a withdrawal) or push an invalid L2→L1 message (e.g. an invalid withdrawal) with a <7d exit window. **Guidelines** - Met: Users are able to exit without the help of the permissioned operators. - Issue: Upgrades executed by actors with more centralized control than a Security Council provide less than 7d for users to exit if the permissioned operator is down or censoring. ### Stage 2 1 issue needs fixing. - Issue: Upgrades unrelated to onchain provable bugs provide less than 30d to exit. [Learn more about Stages](https://ethbeat.org/stages). Please keep in mind that these stages do not reflect project security, this is an opinionated assessment of project maturity based on subjective criteria, created with a goal of incentivizing projects to push toward better decentralization. Each team may have taken different paths to achieve this goal. ## Data availability ### All data required for proofs is published onchain All the data that is used to construct the system state is published onchain in the form of cheap calldata. This ensures that it will always be available when needed. **References** - [ZKSwap Introduces Practical ZK Rollups - Medium blog](https://medium.com/zkswap/zkswap-introduces-practical-zk-rollups-zkspeed-achieving-high-tps-and-low-gas-fees-in-real-6effe4e789e0) Learn more about the DA layer here: [Ethereum](https://ethbeat.org/projects/ethereum) ## State validation ### Validity proofs Each update to the system state must be accompanied by a ZK proof that ensures that the new state was derived by correctly applying a series of valid user transactions to the previous state. These proofs are then verified on Ethereum by a smart contract. **References** - [ZKSwap Introduces Practical ZK Rollups - Medium blog](https://medium.com/zkswap/zkswap-introduces-practical-zk-rollups-zkspeed-achieving-high-tps-and-low-gas-fees-in-real-6effe4e789e0) ## Updates Each date links the update on the HTML page, which also shows its contract diffs. ### [2025-07-14 12:46 UTC](https://ethbeat.org/layer2s/projects/zkspace?update=8c0f2817) (9 changes) Discovery rerun on the same block number with only config-related changes. ### [2023-09-26 13:47 UTC](https://ethbeat.org/layer2s/projects/zkspace?update=a3489626) (1 change) ## Operator ### The system has a centralized operator The operator is the only entity that can propose blocks. A live and trustworthy operator is vital to the health of the system. **Risks** - MEV can be extracted if the operator exploits their centralized position and frontruns user transactions. **References** - [ZKSwap Validator - ZKSwap wiki](https://en.wiki.zks.org/techonology#3-validator) ### Users can force exit the system Force exit allows the users to escape censorship by withdrawing their funds. The system allows users to force the withdrawal of funds by submitting a request directly to the contract onchain. The request must be served within a defined time period. If this does not happen, the system will halt regular operation and permit trustless withdrawal of funds. **Risks** - Users can be censored if the operator refuses to include their transactions. However, there exists a mechanism to independently exit the system. **References** - [ZkSync.sol#L404 - ZKSwap source code](https://github.com/l2labs/zkswap-contracts-v2/blob/master/contracts/ZkSync.sol#L404) ## Withdrawals ### Regular exit The user initiates the withdrawal by submitting a regular transaction on this chain. When the block containing that transaction is settled the funds become available for withdrawal on L1. ZK proofs are required to settle blocks. Finally the user submits an L1 transaction to claim the funds. **References** - [Make Transaction](https://en.wiki.zks.org/interact-with-zkswap/make-transaction#withdraw) ### Forced exit If the user experiences censorship from the operator with regular exit they can submit their withdrawal requests directly on L1. The system is then obliged to service this request. Once the force operation is submitted and if the request is serviced, the operation follows the flow of a regular exit. **References** - [ZkSync.sol#L404 - ZKSwap source code](https://github.com/l2labs/zkswap-contracts-v2/blob/master/contracts/ZkSync.sol#L404) ### Emergency exit If the enough time deadline passes and the forced exit is still ignored the user can put the system into Exodus Mode, disallowing further state updates. In that case everybody can withdraw by submitting a zero knowledge proof of their funds with their L1 transaction. **Risks** - Funds can be lost if the user is unable to generate the non-trivial ZK proof for exodus withdraw. **References** - [ZkSyncCommitBlock.sol#L230-L246 - ZKSwap source code](https://github.com/l2labs/zkswap-contracts-v2/blob/3f650d28a266a56d49a3b3d2049cde34112efb14/contracts/ZkSyncCommitBlock.sol#L230-L246) ## Permissions Explore these contracts and permissions in Disco, ETHBEAT's contract explorer: https://disco.ethbeat.org/ui/p/zkspace ### Ethereum #### Actors ##### zkSpace Admin Addresses: [0xfCAE399eA757DDf0a4020198C59BF2270c2B05Be](https://etherscan.io/address/0xfCAE399eA757DDf0a4020198C59BF2270c2B05Be) This address is the master of Upgrade Gatekeeper contract, which is allowed to perform upgrades for Governance, Verifier, VerifierExit, PairManager, ZkSeaNFT and ZkSync contracts. ##### Active validator Addresses: [0x5bd9404260D2B0D55081E599e4e085BE080141E2](https://etherscan.io/address/0x5bd9404260D2B0D55081E599e4e085BE080141E2) This actor is allowed to propose, revert and execute L2 blocks on L1. A list of active validators is kept inside Governance contract and can be updated by zkSpace Admin. ## Smart contracts ![A diagram of the smart contract architecture](https://ethbeat.org/static/images/architecture/zkspace.6b604aeb.png) Explore these contracts and permissions in Disco, ETHBEAT's contract explorer: https://disco.ethbeat.org/ui/p/zkspace ### Ethereum #### ZkSync (escrow) Addresses: [0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8](https://etherscan.io/address/0x5CDAF83E077DBaC2692b5864CA18b61d67453Be8#code), [0x467a2B91f231D930F5eeB6B982C7666E81DA8626](https://etherscan.io/address/0x467a2B91f231D930F5eeB6B982C7666E81DA8626#code) (Implementation #1 (Upgradable)), [0x899A605a3B7A11eA5D928958b77014e763c53426](https://etherscan.io/address/0x899A605a3B7A11eA5D928958b77014e763c53426#code) (Implementation #2 (Upgradable)), [0x49dCe53faeAD4538F77c3b8Bae8347f1644101Db](https://etherscan.io/address/0x49dCe53faeAD4538F77c3b8Bae8347f1644101Db#code) (Implementation #3 (Upgradable)), [0x6A4E7dd4c546Ca2DD84b48803040732fC30206D7](https://etherscan.io/address/0x6A4E7dd4c546Ca2DD84b48803040732fC30206D7#code) (Implementation #4 (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) The main Rollup contract. Operator commits blocks, provides ZK proof which is validated by the Verifier contract and process withdrawals (executes blocks). Users deposit ETH and ERC20 tokens. This contract defines the upgrade delay in the UPGRADE_NOTICE_PERIOD constant that is currently set to 8 days. All supported tokens in this escrow are included in the value secured calculation. Can be upgraded by: zkSpace Admin with 8d delay #### Governance Addresses: [0x83Cb1531Ec8447366501aE440478da245EcffB89](https://etherscan.io/address/0x83Cb1531Ec8447366501aE440478da245EcffB89#code), [0x6659174CdB0c445B897aEd25181f293E468941a5](https://etherscan.io/address/0x6659174CdB0c445B897aEd25181f293E468941a5#code) (Implementation (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) Keeps a list of block producers and whitelisted tokens. Can be upgraded by: zkSpace Admin with 8d delay #### UniswapV2Factory Addresses: [0xc07f850b60E0EEd49a09E455b01a869C25963735](https://etherscan.io/address/0xc07f850b60E0EEd49a09E455b01a869C25963735#code), [0x5f3bE7846efC473552C5619b929F7d4aa640fb54](https://etherscan.io/address/0x5f3bE7846efC473552C5619b929F7d4aa640fb54#code) (Implementation (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) Manages trading pairs. Can be upgraded by: zkSpace Admin with 8d delay #### ZkSeaNFT Addresses: [0xc632347cc96A4400653E3514eA148630455295b5](https://etherscan.io/address/0xc632347cc96A4400653E3514eA148630455295b5#code), [0xD06986022EFE62A5BC8258299e4495Bb27567BE0](https://etherscan.io/address/0xD06986022EFE62A5BC8258299e4495Bb27567BE0#code) (Implementation (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) Contract managing deposits and withdrawals of NFTs to ScalingProject. Can be upgraded by: zkSpace Admin with 8d delay #### Verifier Addresses: [0xB7A4f3eFBe8e2B2FC973FfDb1b1D7F19F012A7af](https://etherscan.io/address/0xB7A4f3eFBe8e2B2FC973FfDb1b1D7F19F012A7af#code), [0x44DedA2C824458A5DfE1e363c679dea33f1ffA39](https://etherscan.io/address/0x44DedA2C824458A5DfE1e363c679dea33f1ffA39#code) (Implementation (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) zkSNARK Plonk Verifier. Can be upgraded by: zkSpace Admin with 8d delay #### VerifierExit Addresses: [0x1d8d584F1aef51ad5E2f436F057E43e0d788Be81](https://etherscan.io/address/0x1d8d584F1aef51ad5E2f436F057E43e0d788Be81#code), [0x41455808B3109AD0f79672C44D75933D3529FEaE](https://etherscan.io/address/0x41455808B3109AD0f79672C44D75933D3529FEaE#code) (Implementation (Upgradable)), [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) (Admin) zkSNARK Verifier for the escape hatch. Can be upgraded by: zkSpace Admin with 8d delay #### UpgradeGatekeeper Addresses: [0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390](https://etherscan.io/address/0xB0C7E781f70C0B8E3e62F1766a4Be6e435431390#code) This is the contract that implements the upgrade mechanism for Governance, Verifier and ZkSync. It relies on the ZkSync contract to enforce upgrade delays. The current deployment carries some associated risks: - Funds can be stolen if a contract receives a malicious code upgrade. There is a 8d delay on code upgrades.