1. What is Validium?
Validium 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.
2. How does Validium work?
2.1 Submitting a transaction
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
2.2 Processing transactions
2.2.1 Collecting transactions and forming batches
The operator collects transactions within a certain period of time and organizes these transactions into a batch
2.2.2 Processing transactions
2.2.2.1 Verifying transaction validity
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.
2.2.2.2 Transaction Sorting
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.
2.2.2.3 Batching
Pack multiple transactions into a batch for subsequent unified processing
2.2.2.4 Status Update
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
2.3 Generate Zero-Knowledge Proof
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.
2.4 Submit state commitment and zero-knowledge proof to the chain
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)
2.5 Data off-chain storage
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.
2.6 Mainnet Verification and Recording
2.6.1 Verify Zero-Knowledge Proof
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.
2.6.2 Record 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
2.7 Deposits and Withdrawals
2.7.1 Deposits
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.
Three Validium Advantages and Disadvantages
3.1 Advantages
3.1.1 High Throughput
Off-chain data availability improves throughput and enhances scalability
3.1.2 Reduced transaction fees
No need to publish transaction data to the main chain, which greatly reduces transaction fees
3.1.3 Has a certain degree of privacy
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
3.1.4 Can withdraw quickly, no challenge period limit, etc.
3.2 Disadvantages
3.2.1 Data Availability Risk
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
3.2.2 Centralization Risk
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
3.2.3 Computational cost
Generating zero-knowledge proofs requires powerful computing power; it is not cost-effective for low-throughput applications
3.2.4 Cannot rely on cryptographic security mechanisms
Unlike zero-knowledge convolution, which relies entirely on cryptographic security mechanisms, it also relies on trust assumptions and cryptoeconomic incentives
IV. Comparison of validium and plasma
4.1 Similarities
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
4.2 Differences
4.2.1 Different data processing methods
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
4.2.2 Different security models
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
4.2.3 Cost and performance are different
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
4.2.4 Different usage scenarios
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
Five Comparisons between Validium and ZK Rollup
5.1 Similarities
5.1.1 Off-chain Calculation
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.2 Zero-knowledge Proof
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
5.2 Differences
5.2.1 Different data storage
Validium: Data is stored under the L1 chain
ZK Rollup: Data batch compression is submitted to L1 chain storage
5.2.2 Data Availability Risk
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
5.2.3 Different levels of security
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
5.2.4 Transaction costs
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
5.2.5 Privacy
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
5.2.6 Usage scenarios
Validium: More suitable for high-frequency transactions or scenarios with privacy requirements
ZK Rollup: Suitable for some ordinary scenes or scenes without privacy requirements