While side chains as a concept are relatively easy to digest, other scaling solutions can be conceptually difficult. Today we’ll be breaking down some popular scaling technology, including rollups, validiums and volitions.
These topics are understandably complex, so it’s best to think of them in terms of the tradeoffs each solution provides. In this case, the tradeoffs are generally security, cost, efficiency, privacy, and trust.
To start, let’s define what each of those mean in the context of a scalability solution:
Security
Security, in this context, can be defined as the cost to ‘fool the system’. In both physical and digital terms, security refers to the resources allocated to defending an objective. These resources often, but not always, equate to the resources required to overtake the objective.
Cost
Fairly straightforward: the cost of transacting. For blockchain infrastructure, the cost of transacting is mostly the cost of bandwidth and the cost of data storage.
Efficiency
Efficiency is the amount of work or resources relative to an equal output. For example, a blockchain that requires verification from 100-of-100 validators is much less efficient than one that requires verification from 51-of-100. Frequently this quality influences the cost.
Privacy
The degree to which information about a transaction is obfuscated from the public.
Trust
Trust is a spectrum. In the cryptoasset universe, this generally comes down to whether the reliability of a mechanism is based on mathematics or economics. If based on economics, are the assumptions reasonable?
Rollups
On-chain computation and execution can be very expensive. To understand why, let’s break down what happens when someone makes a non-standard transaction:
In this example, address_x is buying a functional NFT. This NFT might have complex attributes. For example, this NFT might be a fixed income product that accrues interest (ex: BarnBridge), an options contract that has very specific parameters and functions (ex: Opyn), or a piece of art that gives the artist royalties when transacted (ex: Superrare).
All of this functionality, which makes the hypothetical NFT useful in the first place, also makes it “heavier” and therefore more expensive to transact.
While not explicitly true, the number of lines required to execute a transaction is a good rule of thumb for gauging how “heavy” or expensive a transaction is.
Rollups allow us to do this heavy lifting off-chain and report the changes concisely back to the chain after the computation has been completed. Rollups are often considered superior to sidechains because their validity is maintained by the base layer (e.g. Ethereum mainnet), which makes them more difficult to attack.
As of now, there are two types of rollups: zero-knowledge and optimistic.
ZK-Rollups
Zero-knowledge rollups (zkr) perform calculations off chain and then use zk-proofs to compress the execution data into a rollup. For a digestible explanation of how zk-proofs work, we recommend checking out How to Explain Zero-Knowledge Protocols to Your Children.
Since the verifier in zk-proofs requires minimal information, this technology is great for storing data efficiently, resulting in low transaction costs and rapid transaction processing.
However, today, the complexity of developing zk-proofs limits the functionality of ZK-rollups. Zk-proofs are cutting edge mathematics, and at their current state, the technology is best for simple transactions.
ZK-Rollup Projects
Optimistic Rollups
Whereas zk-rollups rely solely on math to enforce trust, optimistic rollups partially rely on economics. Optimistic rollups assume by default that all transactions are valid. If a transaction is invalid, any node can challenge the rollup and receive a reward while the malicious node is punished. Many consider this incentive/disincentive structure to be sufficient.
This assumption is called the “one honest node” assumption because for it to be valid, you only need one honest node, rather than a majority (which happens to be the case for Layer 1 protocols).
Unlike zk-rollups, there are really no current limitations as to what type of activities you can do on optimistic rollups. However, the optimistic model has two notable downsides:
- The data compression is inferior to zk-tech so the transaction cost is slightly higher than in a zk-rollup.
- The optimistic model requires a grace period for challenging, which means that transactions are executed slightly slower than in a zk-rollup.
However, optimistic rollups are far superior to side chains in both of these aspects. Optimistic rollups are considered “fault proofs” whereas zk-rollups are considered “validity proofs”.
This is because in an optimistic rollup, the verifier is proving “fault” in a set of transactions, whereas in a zk-rollup, the verifier is proving the “validity” of a set of transactions.
Optimistic Rollup Projects
Validiums
Validiums sound complicated, but there’s no need to overthink them. They are identical to zk-rollups, the data is stored off chain. The major difference between a zk-rollup and a validium is data availability. Starkware relies on Data Availability Committees (DAC), which you can read about here, to provide neutral and honest data storage.
As is the case in zk-rollups, while a malicious node(s) can stall a validium solution, they cannot steal the funds because a validium is a validity proof. If the funds are stolen, the proof would be invalid. This drastically reduces the attack vector.
The major downside to validiums is that the underlying data can be taken offline or be unavailable for long periods of time.
Volitions
In a zk-rollup, the data is available on chain, which can be disadvantageous if your priorities are (a) privacy or (b) efficiency. However, if you want (c) reliability or (d) more security, you’d probably opt for a zk-rollup.
The volition is a novel solution, pioneered by StarkWare, that lets you easily switch between a ZK-rollup and a validium. Some applications, such as decentralized derivatives exchanges, might prefer a validium, while still wanting to be interoperable with applications on a ZK-rollup.
Volitions allow these applications and users to easily interoperate between solutions that have opted for on chain data and off chain data.