Golden Encyclopedia | What is Validium? How does it work?
Validiums is a Layer 2 scaling solution that aims to optimize Ethereum’s performance by processing transactions off-chain.
JinseFinanceValidium is also a Layer2 expansion solution for Ethereum. It mainly processes transactions off-chain, ensures data availability off-chain (stores data off-chain), and generates zero-knowledge proofs to confirm the validity of transactions.
When a user submits a transaction, the transaction will be submitted to the Operator operator. The operator here is actually the Validium Node that executes the transaction. The Operator here can be single or multiple
The operator collects transactions within a certain period of time and organizes these transactions into a batch
18px;">Verify signature: The operator first verifies the signature of each transaction to ensure that the transaction is initiated by a legitimate account Check balance: Verify whether the transaction account has enough balance to trade. This step ensures that there will be no overspending and ensures the validity of the transaction funds.
The Operator sorts transactions according to certain rules (such as timestamp, fee, etc.). The purpose of sorting is to optimize processing efficiency and ensure the fairness of transactions.
Pack multiple transactions into a batch for subsequent unified processing
The operator updates the status of the account (such as balance changes) based on the transaction content. This step involves modifying the off-chain status database to record the new status of each account. Generate new hash values for each updated state, which will be used to generate new state roots
The operator uses a specific proof circuit to generate a zero-knowledge proof to verify the correctness of these off-chain transactions. ZK proofs ensure that all off-chain calculations are performed correctly while protecting the privacy of transactions.
The Operator generates the latest state root according to the batch as a state commitment, and submits it to the L1 main network together with the generated zero-knowledge proof (proving the correctness of the off-chain transaction)
Validium relies on the Data Availability Committee (DAC) to manage the storage and availability of off-chain data. This ensures that data can be accessed and verified when needed.
The Ethereum mainnet smart contract verification will verify the submitted zero-knowledge proof after receiving it, thereby confirming the correctness of the off-chain processing and the validity of the new state root.
Once the verification is passed, the new state root (State Root) is recorded on Ethereum to ensure the legitimacy and finality of the off-chain state. Usually recorded in the block header or a dedicated smart contract. This step ensures the transparency and traceability of the off-chain state.
The record of the state root is equivalent to a commitment to the off-chain state, indicating that all submitted off-chain transactions have been confirmed and recorded. By recording the state root, users and validators can use Merkle Proofs to verify whether a specific transaction is included in the state without downloading and verifying the entire state. This greatly improves the efficiency of data verification. Dispute Resolution: In the event of a dispute, the state root can be used as a basis for verifying the integrity of off-chain data. Users can submit relevant proofs to resolve disputes and ensure the transparency and correctness of data
Users send ETH or other tokens to a special contract on Ethereum. The contract records the deposit and notifies the Validium operator off-chain. Operator credits user’s deposit in off-chain account Operator credits user’s deposit in off-chain account 2.7.2 Withdrawal User withdrawal request: User submits withdrawal request to operator. Batch withdrawal request: Operator includes withdrawal request in a batch and generates corresponding ZK proof. Verification and withdrawal: Mainnet verifies submitted ZK proof and withdrawal request. Once verified, user can withdraw corresponding funds from the contract of Ethereum mainnet.
Off-chain data availability improves throughput and enhances scalability
No need to publish transaction data to the main chain, which greatly reduces transaction fees
Data is only stored off-chain, not on-chain, so it will not be accessed on the chain, so it has a certain privacy protection effect
Validium relies on off-chain data availability, which brings certain risks. Because if the Operator or Data Availability Manager conceals transaction data, it may not be possible to generate the necessary proofs to withdraw user funds
Generating validity proofs requires the use of dedicated hardware, which brings centralization risks. Because if only a few entities can afford the required resources, they may dominate the network and undermine its decentralized nature
Generating zero-knowledge proofs requires powerful computing power; it is not cost-effective for low-throughput applications
Unlike zero-knowledge convolution, which relies entirely on cryptographic security mechanisms, it also relies on trust assumptions and cryptoeconomic incentives
First: Both are Layer2 off-chain expansion solutions, which can increase transaction throughput and reduce transaction fees Second: Both reduce the burden on the main chain by moving most transactions and data processing off-chain
Plasma: Deposit and withdrawal are initiated from the L1 layer; state submission is required Root to L1 main chain Validium: Deposit is initiated by L1, withdrawal is initiated by L2; not only state root needs to be submitted, but also zero-knowledge proof needs to be generated and submitted to L1 main chain
Plasma: Use fraud proof mechanism to ensure security by handling disputes through the main chain. Users have a certain time window to submit fraud proofs. Validium: Mainly relies on zero-knowledge proof to verify the correctness of off-chain transactions and ensure data privacy and security
Plasma: Most transaction calculations are processed off-chain, with lower fees. However, when submitting checkpoints and handling disputes, certain on-chain costs may be incurred Validium: Most transaction calculations are processed off-chain, with lower fees. Users only need to pay the cost of submitting ZK proofs and state roots
Plasma: Suitable for applications that require high security and complex transaction processing, but the cost does not need to be very high. Suitable for enterprise-level applications and cross-chain solutions Validium: Suitable for high-frequency trading, decentralized finance (DeFi), games and other applications that require high throughput and low cost. Because of its efficient off-chain processing capabilities and lower transaction costs
Both move most of the computing and transaction processing to the off-chain to reduce the burden on the main chain and improve the scalability and throughput of the system
5.1.3 State root submitted to the main chain
Validium and ZK Rollup both regularly submit state roots to the Ethereum main chain to ensure the update and verification of off-chain states
Validium: Data is stored under the L1 chain ZK Rollup: Data batch compression is submitted to L1 chain storage
Validium: Store transaction data in the off-chain Data Availability Committee (DAC) or other distributed storage systems. Data is not stored directly on the main chain. If the Data Availability Committee fails to perform its duties or is malicious (downtime, deliberately not packaging some transactions), users may not be able to access necessary data.
ZK Rollup: Since all transaction data is stored on the main chain, data availability is more guaranteed, and users can access and verify transaction data at any time
Validium: Dependence on the Data Availability Committee The security of Validium depends in part on the behavior of the Data Availability Committee. If the committee fails to perform its duties or is malicious, it may affect the security of the system. ZK Rollup: Full on-chain verification ZK Rollup completely relies on the main chain for data verification and storage, ensuring higher security and transparency
Validium: Since data does not need to be stored on the main chain, Validium can significantly reduce transaction costs, especially for a large number of small transactions. ZK Rollup: Although the transaction cost of ZK Rollup is lower than that of traditional on-chain transactions, since all data must eventually be submitted to the main chain, the transaction cost of ZK Rollup is still higher than that of Validium
Validium: Because the data is stored off-chain and not on the main chain, it has a certain degree of privacy ZK Rollup: Data is stored on-chain and does not have privacy
Validium: More suitable for high-frequency transactions or scenarios with privacy requirements ZK Rollup: Suitable for some ordinary scenes or scenes without privacy requirements