What is Validium?
Validium is a Layer 2 scaling solution for Ethereum. It primarily focuses on off-chain transaction processing, off-chain data availability (off-chain storage of data), and the generation of zero-knowledge proofs to confirm transaction validity.
How does Validium work?
Submitting Transactions:
Users submit transactions, which are then sent to an operator (Validium Node) for processing. The operator can be a single entity or multiple entities.
Transaction Processing:
Collecting and Batching Transactions:
The operator collects transactions over a certain period of time and organizes them into batches.
Processing Transactions:
Verifying Transaction Validity:
The operator first verifies the signature of each transaction to ensure that it was initiated by a legitimate account. It also checks if the transaction account has sufficient balance to complete the transaction, ensuring the validity of the funds.
Sorting Transactions:
The operator sorts the transactions according to certain rules, such as timestamps or fees, to optimize processing efficiency and ensure fairness.
Packing Batches:
Multiple transactions are packed into a single batch for unified processing.
Updating State:
Based on the transaction content, the operator updates the account’s state (such as balance changes) by modifying the off-chain state database. A new hash value is generated for each updated state, which is used to generate a new state root.
Generating Zero-knowledge Proofs:
The operator uses specific proof circuits to generate zero-knowledge proofs that verify the correctness of the off-chain transactions. These proofs ensure the accuracy of all off-chain computations while protecting transaction privacy.
Submitting State Commitments and Zero-knowledge Proofs to the Mainnet:
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 (proving the correctness of off-chain transactions).
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 the data can be accessed and verified when needed.
Mainnet Verification and Recording:
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.
Recording State Root:
Once verified, the new state root is recorded on the Ethereum blockchain, ensuring the legality and finality of the off-chain state. It is typically recorded in block headers or dedicated smart contracts. This step ensures 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.
Deposits and Withdrawals:
Deposits:
Users send ETH or other tokens to a specific contract on the Ethereum blockchain. This contract records the deposit and notifies the Validium operator, who updates the user’s deposit in the off-chain account.
Withdrawals:
User Withdrawal Requests:
Users submit withdrawal requests to the operator.
Batch Processing Withdrawal Requests:
The operator includes withdrawal requests in a batch and generates the corresponding zero-knowledge proofs.
Verification and Withdrawal:
The mainnet verifies the submitted zero-knowledge proofs and withdrawal requests. Once verified, users can extract the corresponding funds from the Ethereum mainnet contract.
Advantages of Validium:
High Throughput:
Off-chain data availability improves throughput and enhances scalability.
Lower Transaction Fees:
Transactions do not need to be published on the main chain, significantly reducing transaction fees.
Privacy:
Data is stored off-chain and not accessible on the main chain, providing a certain level of privacy protection.
Quick Withdrawals without Challenge Period Limitations, etc.
Disadvantages of Validium:
Data Availability Risk:
Validium relies on off-chain data availability, which introduces some risk. If the operator or data availability committee conceals transaction data, necessary proofs may not be generated to withdraw user funds.
Centralization Risk:
Generating validity proofs requires specialized hardware, which introduces centralization risk. If only a few entities can afford the required resources, they may dominate the network and compromise its decentralization.
Computational Cost:
Generating zero-knowledge proofs requires significant computational power, which may not be cost-effective for low-throughput applications.
Dependence on Trust Assumptions and Cryptoeconomic Incentives instead of solely relying on cryptographic security mechanisms.
Comparison between Validium and Plasma:
Similarities:
Both are Layer 2 off-chain scaling solutions that increase transaction throughput and reduce transaction fees. Both move most transaction and data processing off-chain to reduce the burden on the main chain.
Differences:
Different Data Processing Methods:
Plasma: Deposits and withdrawals are initiated from the L1 layer. State roots need to be submitted to the L1 main chain.
Validium: Deposits are initiated from L1, but withdrawals are initiated from L2. It requires submitting the state root and generating zero-knowledge proofs for submission to L1.
Different Security Models:
Plasma: Utilizes fraud proofs and relies on dispute resolution on the main chain to ensure security. Users have a specific time window to submit fraud proofs.
Validium: Mainly relies on zero-knowledge proofs to verify the correctness of off-chain transactions, ensuring data privacy and security.
Different Cost and Performance:
Plasma: Most transaction computation is done off-chain, resulting in lower costs. However, submitting checkpoints and handling disputes may incur some on-chain costs.
Validium: Most transaction computation is done off-chain, resulting in lower costs. Users only need to pay the cost of submitting zero-knowledge proofs and state roots.
Different Use Cases:
Plasma: Suitable for applications that require high security and complex transaction processing, but with acceptable costs. It is 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 costs. It benefits from efficient off-chain processing capabilities and lower transaction costs.
Comparison between Validium and zk Rollup:
Similarities:
Off-chain computation: Both move most computation and transaction processing off-chain to reduce the burden on the main chain, improving system scalability and throughput.
Zero-knowledge proofs: Both use zero-knowledge proofs to verify the correctness and legality of off-chain transactions. Zero-knowledge proofs ensure privacy and data integrity without revealing specific transaction details.
State Root Submission to the Main Chain: Validium and zk Rollup both periodically submit state roots to the Ethereum main chain to ensure off-chain state updates and verification.
Differences:
Different Data Storage:
Validium: Data is stored off-chain.
zk Rollup: Data is compressed and submitted to the main chain.
Different Data Availability Risk:
Validium: Transaction data is stored in a Data Availability Committee (DAC) or other distributed storage systems off-chain. Data is not directly stored on the main chain. If the DAC fails or behaves maliciously (e.g., downtime, intentionally not packing some transactions), users may be unable 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.
Different Security Levels:
Validium: Partially relies on the behavior of the Data Availability Committee. Validium’s security depends on the committee’s actions. 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.
Different 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, zk Rollup’s transaction costs are still higher than Validium because all data needs to be submitted to the main chain.
Different Privacy:
Validium: Data is stored off-chain, providing a certain level of privacy.
zk Rollup: Data is stored on-chain and does not provide privacy.
Different 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.