What is Validium?
Validium is a Layer2 scaling solution for Ethereum that primarily focuses on off-chain transaction processing and off-chain data availability (off-chain data storage), while also generating zero-knowledge proofs to confirm the validity of transactions.
How does Validium work?
2.1 Submitting transactions
Users submit transactions, which are then sent to the Operator, who is essentially the Validium Node responsible for executing the transactions. The Operator can be a single entity or multiple entities.
2.2 Processing transactions
2.2.1 Collecting and batching transactions
The Operator collects transactions within a certain time period and organizes them into batches.
2.2.2 Processing transactions
2.2.2.1 Verifying transaction validity
Signature verification: The Operator first verifies the signature of each transaction to ensure it was initiated by a legitimate account.
Balance validation: The Operator verifies if the transaction account has sufficient balance for the transaction. This step ensures there are no overspending situations and validates the funds of the transaction.
2.2.2.2 Sorting transactions
The Operator sorts the transactions based on certain criteria such as timestamps and fees. The purpose of sorting is to optimize processing efficiency and ensure fairness in transaction handling.
2.2.2.3 Packaging batches
Multiple transactions are packaged into a batch for unified processing in the subsequent steps.
2.2.2.4 Updating state
The Operator updates the account’s state (e.g., balance changes) based on the transaction content. This step involves modifying the off-chain state database and recording the new state of each account. New hash values are generated for each updated state, which will be used to generate a new state root.
2.3 Generating zero-knowledge proofs
The Operator uses specific proof circuits to generate zero-knowledge proofs to verify the correctness of off-chain transactions. Zero-knowledge proofs ensure the accuracy of all off-chain computations while protecting the privacy of transactions.
2.4 Submitting state commitment and zero-knowledge proofs to the main chain
The Operator generates the latest state root as a state commitment and submits it to the L1 mainnet along with the generated zero-knowledge proofs (to prove the correctness of off-chain transactions).
2.5 Off-chain data storage
Validium relies on a 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 Verifying zero-knowledge proofs
The Ethereum mainnet’s smart contract verifies the submitted zero-knowledge proofs, confirming the correctness of off-chain processing and the validity of the new state root.
2.6.2 Recording state root
Once verified, the new state root is recorded on the Ethereum mainnet, ensuring the legality and finality of the off-chain state. It is typically recorded in block headers or dedicated smart contracts. This step guarantees the transparency and traceability of the off-chain state.
Recording the state root serves as 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 specific transactions’ inclusion in the state without downloading and verifying the entire state. This greatly improves data verification efficiency. Dispute resolution: In case of disputes, the state root can serve as evidence to verify the integrity of off-chain data. Users can submit relevant proofs to resolve disputes and ensure data transparency and correctness.
2.7 Deposits and withdrawals
2.7.1 Deposits
Users send ETH or other tokens to a special contract on the Ethereum mainnet. The contract records the deposit and notifies the Validium Operator. The Operator records the user’s deposit in the off-chain account.
2.7.2 Withdrawals
User withdrawal request: Users submit withdrawal requests to the Operator.
Batch processing withdrawals: The Operator includes withdrawal requests in a batch and generates corresponding ZK proofs.
Verification and withdrawal: The mainnet verifies the submitted ZK proofs and withdrawal requests. Once verified, users can withdraw the corresponding funds from the contract on the Ethereum mainnet.
Advantages and disadvantages of Validium
3.1 Advantages
3.1.1 High throughput
Off-chain data availability improves throughput and enhances scalability.
3.1.2 Reduced transaction fees
There is no need to publish transaction data to the main chain, significantly reducing transaction fees.
3.1.3 Some level of privacy
Since data is stored off-chain and not accessible on the main chain, it provides a certain level of privacy protection.
3.1.4 Quick withdrawals without challenge periods, etc.
3.2 Disadvantages
3.2.1 Data availability risk
Validium relies on off-chain data availability, which introduces some risk. If the Operator or the data availability manager withholds 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 specialized hardware, which poses a centralization risk. If only a few entities can afford the required resources, they may dominate the network and undermine its decentralization.
3.2.3 Computational cost
Generating zero-knowledge proofs requires significant computational power, making it less cost-effective for low-throughput applications.
3.2.4 Not solely reliant on cryptographic security mechanisms
Unlike zero-knowledge rollups that rely entirely on cryptographic security mechanisms, Validium also depends on trust assumptions and cryptographic economic incentives.
Comparison between Validium and Plasma
4.1 Similarities
First: Both are Layer2 off-chain scaling solutions that increase transaction throughput and reduce transaction fees.
Second: Both move a majority of transactions and data processing off-chain to reduce the burden on the main chain.
4.2 Differences
4.2.1 Different data processing methods
Plasma: Deposits and withdrawals are initiated from the L1 layer, requiring the submission of state root to the L1 main chain.
Validium: Deposits are initiated from L1, while withdrawals are initiated from L2. It requires both the submission of state root and the generation of zero-knowledge proofs to be submitted to the L1 main chain.
4.2.2 Different security models
Plasma: Uses fraud proofs and relies on the main chain to handle disputes to ensure security. Users have a certain time window to submit fraud proofs.
Validium: Relies mainly on zero-knowledge proofs to verify the correctness of off-chain transactions, ensuring data privacy and security.
4.2.3 Different costs and performance
Plasma: Most transaction computations are processed off-chain, resulting in lower costs. However, there may be some on-chain costs when submitting checkpoints and handling disputes.
Validium: Most transaction computations are processed off-chain, resulting in lower costs. Users only need to pay for the cost of submitting ZK proofs and state roots.
4.2.4 Different use cases
Plasma: Suitable for applications that require high security and complex transaction processing, but with moderate costs. It is suitable for enterprise-level applications and cross-chain solutions.
Validium: Suitable for high-frequency trading, decentralized finance (DeFi), gaming, and other applications that require high throughput and low costs. It benefits from efficient off-chain processing capabilities and lower transaction costs.
Comparison between Validium and ZK Rollup
5.1 Similarities
5.1.1 Off-chain computation
Both move a majority of computation and transaction processing off-chain to reduce the burden on the main chain, improving scalability and throughput.
5.1.2 Zero-knowledge proofs
Both use zero-knowledge proof technology to verify the correctness and legality of off-chain transactions. Zero-knowledge proofs ensure privacy and data integrity without revealing specific transaction details.
5.1.3 Submission of state root to the main chain
Both Validium and ZK Rollup periodically 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 off-chain.
ZK Rollup: Data is compressed and submitted in batches to be stored on the main chain.
5.2.2 Data availability risk
Validium: Stores transaction data in the off-chain Data Availability Committee (DAC) or other distributed storage systems. Data is not directly stored on the main chain. If the DAC fails or acts maliciously (e.g., downtime, intentionally not including 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 security levels
Validium: Relies on the Data Availability Committee. The security of Validium partially depends on the behavior of the Data Availability Committee. If the committee fails or acts maliciously, it may impact the system’s security.
ZK Rollup: Relies entirely on on-chain verification. ZK Rollup depends 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 transaction costs are lower compared to traditional on-chain transactions, as all data needs to be eventually submitted to the main chain, ZK Rollup’s transaction costs are still higher than Validium’s.
5.2.5 Privacy
Validium: Due to off-chain data storage, it provides a certain level of privacy.
ZK Rollup: Data is stored on-chain, without privacy.
5.2.6 Use cases
Validium: More suitable for high-frequency trading or scenarios that require privacy.
ZK Rollup: Suitable for general applications or scenarios that do not require privacy.