Image by Reto Scheiwiller from Pixabay
Recap
Last week we discussed zero-knowledge roll-ups under the below three headings :
Zero Knowledge Proof
Zero Knowledge Encryption
Zk-Snark
Zero Knowledge Proof
A zero-knowledge proof is a way of proving the validity of a statement without revealing the statement itself. The 'prover' is the party trying to prove a claim, while the 'verifier' is responsible for validating the claim.
Zero Knowledge Encryption
In the case of zero-knowledge encryption, an application does not store the user password & hence cannot access the user data within their servers. Hence the name zero-knowledge which means the application does not know the user password.
Zk-Snark
ZK-Snark means :
ZK - Zero Knowledge S - Succinct N - Non - Interactive ARK - Argument of Knowledge
We know that ZK or Zero Knowledge Roll-ups move computation & storage away from the main Blockchain by accumulating transactions into a single batch & executing them off-chain.
Once executed, they produce a "validity proof" to confirm the correctness of the transactions. Finally, they submit this validity proof which is the minimal data related to that roll-up to the main Blockchain.
This validity proof proves that the post-state root is correct post-execution of the transactions in that batch.
Optimistic Roll-ups
The concept of optimistic roll-ups is the same as zero-knowledge roll-ups in that they move computation & storage away from the main Blockchain by accumulating transactions into a single batch & executing them off-chain.
But that is where the similarity ends. In Zero Knowledge Roll-ups, a validity proof is produced to confirm the correctness of the transactions. But in optimistic roll-ups, they assume off-chain transactions are valid & don't publish proofs of validity for transaction batches on-chain. (They are optimistic of the validity of the transactions - hence the name optimistic roll-ups)
So where is the control to prevent & detect fraud or incorrect transactions? There is something known as fraud-proof. What is it?
Let us consider the following steps :
A set of transactions get processed off-chain
These transactions are then rolled up into a batch which is executed off-chain.
This roll-up batch is then submitted to the main Blockchain (e.g., Ethereum)
Once the batch is submitted to the main Blockchain, there is a time window (called the challenge window) during which anyone can challenge the results of the roll-up transactions by computing something known as fraud-proof.
What is this fraud-proof?
This is a security model which will runs the transactions to see if any fraud took place.
What if the fraud proof succeeds which means the model detected a fraud?
Then two things will happen :
The roll-up protocol re-executes the transactions & the roll-up's state is updated accordingly.
The address that is responsible for the fraudulent or incorrect transaction is penalized.
What happens once the challenge window elapses ? It means the roll-up transactions are deemed valid & accepted on the main Blockchain.
How does the optimistic roll-ups interact with the main Blockchain? The interactions are made possible through smart contracts deployed on the main Blockchain. The transactions which are processed off-chain are posted to an on-chain smart contract. These transactions are immutable on chain.
The below diagram summarizes the steps above :
These are the main solutions being explored to solve the Blockchain Trilemma & scalability issues in Blockchain adoption.
Let us now go back to the topic we were discussing in Weeks 51 to 54 - Tokenomics.