Comparing ZK on Ethereum vs Solana

Kyrian Alex
7 min readJun 30, 2024

--

For a long time, the need for scaling solutions in blockchain technology has been a topic of considerable debate.

I guess it is common knowledge that as blockchain networks grow, the number of transactions per second (TPS) becomes a critical issue. The current capacity of major blockchains like Bitcoin and Ethereum is insufficient to handle the volume required for widespread adoption.

For instance, Bitcoin processes around 7 transactions per second, while Ethereum handles about 15. In contrast, Visa processes around 1,700 TPS on average. Without scaling solutions, blockchains cannot compete with traditional financial systems and achieve mass adoption.

What if we look at the actual cost of doing those transactions?

It’s also the same…

Transaction fees get very high as more people use the blockchain at the same time, then during peak usage times it deters users and makes micro-transactions impractical. For example, during the DeFi boom in 2020 and 2021, Ethereum gas fees skyrocketed, making even small transactions excessively expensive.

So, how do we solve this?

We solve this by introducing Scaling solutions.

A scaling solution is a tech designed to improve the capacity and efficiency of a blockchain network to handle a higher volume of transactions. The primary goal of scaling solutions is to increase the throughput of the network, measured in transactions per second (TPS) while maintaining or improving security, decentralization, and cost-effectiveness.

Scaling solutions are necessary to lower transaction costs, making blockchain technology accessible to a broader audience and viable for everyday use. Slow transaction times and high fees degrade the user experience, discouraging new users and limiting the usability of decentralized applications (DApps).

To attract and retain users, blockchain networks must offer seamless, fast, and cost-effective transactions, which is achievable through effective scaling solutions.

Today, we’ll explore how different networks are tackling these challenges, particularly by comparing zk Rollups on Ethereum and zk Compression on Solana. Both of these technologies aim to enhance scalability, but they do so in distinct ways, reflecting the unique design philosophies and priorities of their respective ecosystems.

Let’s dive in…

What are ZK Rollups?

Zk-rollups are L2 scaling solutions that increase blockchain scalability by moving computation and state off-chain while storing transaction data in bundled-up batches on-chain.

They leverage cryptographic proofs called zero-knowledge proofs to prove the validity of these bundled transactions without revealing the actual data. This keeps the Ethereum mainnet secure while enabling faster and cheaper transactions on the sidechain.

How do they work?

  • A sequencer batches transactions off-chain.
  • The sequencer generates a zk-SNARK (Succinct Non-cryptographic Argument of Knowledge) proof, a compact cryptographic proof that verifies the validity of the transactions without revealing all the details.
  • The proof and transaction data are submitted to the Ethereum mainnet.
  • Anyone can verify the proof on the mainnet, ensuring the transactions are valid.
  • In case of disputes, anyone can submit the original transaction data for on-chain settlement, leveraging Ethereum’s robust security. The rollup includes a cryptographic proof (specifically a zero-knowledge proof) that verifies the correctness of the bundled transactions. The Ethereum network only needs to verify this proof instead of each transaction, significantly reducing the computational load.
  • Transactions are grouped off-chain in a rollup.
  • A zero-knowledge proof is generated to confirm the validity of the aggregated transactions.
  • The proof and minimal summary data are submitted to the Ethereum mainnet for verification.
  • Upon successful verification, the state on the Ethereum mainnet is updated to reflect the rollup transactions.

What is zk Compression?

ZK Compression is a technique used to reduce data storage costs on the Solana blockchain by storing only the compressed data’s “fingerprint” (hash) on-chain while maintaining the privacy of the data.

The ‘ZK’ in ZK Compression stands for zero-knowledge, indicating that the privacy of the compressed data is preserved. This method helps to significantly reduce the amount of data that needs to be stored on-chain, which in turn lowers storage costs for developers.

How does ZK Compression fully function?

ZK Compression functions by utilizing zero-knowledge (ZK) technology to reduce the state cost on Solana, which refers to the cost of storing and maintaining data such as account balances and smart contract storage on the blockchain.

Here’s a detailed breakdown of how it works:

  1. The data of each account is compressed into a unique hash value. This hash includes not only the account’s information but also its position within the state tree, ensuring its uniqueness. This hash is stored in the leaf node of the state tree.

2. The state tree is a data structure similar to a Merkle tree, where each node is the hash of its child nodes. The state tree aggregates all account information and data, compressing it into a single top-level hash value known as the state root.

3. The state root, which is the top-level hash value of the state tree, is stored on the blockchain. This root acts as a fingerprint for the entire state tree, ensuring the integrity and completeness of all data in the tree.

4. Detailed account data is not stored directly on the blockchain. Instead, it is stored as call data in the cheaper Solana ledger space. Only the state root and some basic metadata are stored on-chain, significantly reducing storage costs while maintaining data security.

5. To ensure the integrity and authenticity of the compressed data, ZK Compression uses zero-knowledge proofs (ZK-proofs). These proofs validate the accuracy and integrity of the data without revealing its actual content, ensuring that even compressed data remains secure and verifiable.

Please note that ZK Compression is not an L2 solution but an upgrade to improve data storage efficiency on Solana.

ZK Compression is not a layer 2 rollup because, unlike L2 solutions, transaction execution and state storage in ZK Compression is conducted directly on the layer 1 (L1) chain, in this case, Solana.

The key difference lies in where the execution and state are managed. With zk Rollups, these processes occur on an ancillary chain, which periodically sends commitments and proofs to the main L1 chain. In contrast, ZK Compression keeps all execution and state on Solana itself, rather than on a separate chain.

This fundamental difference means that while zk Rollups offload some processes to a secondary layer to enhance scalability, ZK Compression optimizes data storage directly on the primary blockchain without creating a separate layer for execution.

Key Differences between zk Rollups and zk Compression on Ethereum and Solana

The key differences between zk Rollups on Ethereum and zk Compression on Solana are fundamentally rooted in their approach to enhancing blockchain scalability and optimizing data storage:

  1. Execution and State Management:
  • zk Rollups: Transaction execution and state storage are conducted on an ancillary chain, separate from the Ethereum mainnet. The ancillary chain periodically sends commitments and proofs to the Ethereum mainnet.
  • zk Compression: All transaction execution and state storage occur directly on the layer 1 (L1) chain, which is Solana in this context. There is no separate ancillary chain involved.

2. On-chain Data Handling:

  • zk Rollups: Only cryptographic proofs and minimal summary data are submitted to the Ethereum mainnet for verification. This approach minimizes the computational load on the mainnet.
  • zk Compression: Only the compressed data’s “fingerprint” (hash) and the corresponding ZK-proof are stored on the Solana blockchain. This significantly reduces the amount of data stored on-chain, thereby lowering storage costs.

3. Privacy and Integrity:

  • zk Rollups: Utilize zk-SNARK (Succinct Non-cryptographic Argument of Knowledge) proofs to ensure transaction validity without revealing detailed transaction data. This maintains privacy while securing the Ethereum mainnet.
  • zk Compression: Combines data compression with ZK-proofs to optimize blockchain storage while mathematically proving the integrity of compressed data. It ensures that decompressed data matches the original without revealing the content, thus preserving privacy.

4. Nature of Solution:

  • zk Rollups: Considered layer 2 (L2) scaling solutions as they offload transaction execution and state management to a secondary chain, enhancing scalability and reducing costs on the mainnet.
  • zk Compression: Not categorized as a layer 2 rollup but rather an upgrade to improve data storage efficiency directly on Solana’s layer 1 chain. It optimizes storage costs without introducing a separate execution layer.

Conclusion:

To sum this up, both perspectives on scaling highlight the importance of a balanced approach to ensuring blockchain networks can grow sustainably while maintaining their core principles.

Solana’s achievements in this regard provide a compelling case for the adoption of advanced scaling solutions across the blockchain industry, paving the way for broader adoption and innovation.

--

--

Kyrian Alex

Crypto Research Analyst, Content writer and Mechatronics Engineer. Attempting to be two steps ahead in the fast-paced crypto industry. 0xSese