Cryptocurrencies: why you should know about rollups
- The “rollup” uses a cryptographic technique known as the Merkle tree: in a single transaction, it can be used to initiate and confirm thousands more.
- However, this technique cannot work on all cryptocurrencies, such as Ethereum, which does not accept more than 12 transactions per second.
- This limit on usage drives up costs and makes this type of Blockchain less attractive.
- Automating transaction systems does, however, raise security issues: it is necessary to ensure that the operator of the rollups is regulated.
- The aim is to reduce the amount of information per transaction and to push the proof of validity as far as possible towards cryptographic mechanisms.
The world of blockchain and cryptoassets have seen better days. Indeed, we only need to look at the resounding collapse of the FTX exchange or the recent Ethereum update – the largest in the young history of the cryptocurrency – to understand this. Nevertheless, even if this news gets a lot of attention, other developments are underway in the cryptoasset world… More discreet certainly, but no less influential in the long run. Among them are rollups: a new technique that researchers identify as being decisive for the future of cryptocurrency.
Back to basics
To better understand the importance of these techniques, let’s remember that the blockchain is an indestructible system of records that anyone can consult at will. Moreover, anyone can write on it, which makes the blockchain a constantly evolving system. However, it would benefit from becoming faster, cheaper, and more environmentally friendly, which is one of the promises of future transformations in this sector. Especially since these improvements are becoming increasingly urgent as blockchain is becoming more widespread across all sectors: sports, commerce, and culture.
However, it is not as simple as it may seem due to many obstacles, mainly due to the fact that these promising developments must preserve the three pillars of the blockchain: security (the network must be able to validate the authenticity of transactions); decentralisation (it must be sufficiently autonomous so as not to be subject to a central body); and scalability (i.e. its capacity to process a given number of transactions). This scalability is the keystone of current research, particularly in cryptography. For example, Bitcoin can only process seven transactions per second, compared with 24,000 for the VISA system. It is therefore understandable that the simple validation of a banal purchase can become a difficulty in the event of massive transactions on the network.
To meet these challenges in part, two important concepts have become established in the field of cryptocurrencies: rollup and zero knowledge.
What is a rollup?
The rollup mechanism uses a cryptographic technique called a Merkle tree (or hash tree). The hash transforms any input – a text or an image, for example – into a string of bytes of fixed length and structure. In a single short transaction, this Merkle tree makes it possible to commit and confirm not one, but thousands of transactions with it, something that was not possible before.
To better understand the importance of the rollup, we need another essential notion: the block header. This block, the one present in the term Blockchain, refers to those links where successive transactions between users are stored chronologically since the creation of the blockchain, each of the blocks and their sequence being protected against any modification.
The case of Bitcoin
Even within the best-known cryptocurrency, Bitcoin, there is a notion of a block header and block content. This header contains only the root of the Merkle tree, while the block contains all transactions. This mechanism makes it possible, for example, to design lightweight applications to manage cryptoassets on smartphones. These application programs only use the block headers when paying with bitcoins, for example, because they only weigh a few megabytes each, and do not embed the entire blockchain, which would be technically impossible to manage.
It is possible to approve thousands of transactions that can then be verified as having been initiated. And all at low cost.
These headers are generated by cryptographic hashing and validated by what is called a Proof of Work. This is the main consensus mechanism of blockchains. The rollup mechanism offers the same security as Bitcoin’s Proof of Work but, in reality, the user is only dealing with headers and does not see the entirety of the transactions contained in the Merkle trees. Here, with very little information, it is possible to approve thousands of transactions that can then be verified as having been initiated. And all this at low cost.
The case of Ethereum
This notion of rollup can be found on other blockchains that include an operator: the famous smart contracts, and first and foremost Ethereum. This cryptocurrency is experiencing an ever-increasing demand from users. As a result, transaction speeds are falling, while transaction fees are rising inexorably.
Within Ethereum, smart contracts are programs stored in the blockchain that are automatically activated by each transaction. They guarantee the integrity, validity, and inviolability of transactions, if and only if all the conditions are met. The whole process is automated. However, these smart contracts, which are executed with each transaction, also slow down the validation system.
In a single operation, 1,000 or 10,000 transactions can be carried out. Today, Ethereum only accepts 12 transactions per second.
The idea of integrating rollups into Ethereum is based on the same idea as Bitcoin: freeing up bandwidth. The rollup operator, which is actually outside the blockchain, regularly updates the root of the Merkle tree in a single transaction filed on the main blockchain.
This cryptographic mechanism makes it possible, with very little information, to provide evidence later that transactions have been carried out, to prove their existence in the future. In a single operation, 1,000 or 10,000 transactions can be carried out. However, Ethereum currently accepts only 12 transactions per second, which causes transaction costs to soar and makes this blockchain less and less attractive.
A question of security
The major challenge raised by this mechanism is security, as it is necessary to ensure that the rollup operator does not make a mess of things. This process allows him to place a hash on the blockchain that does not immediately validate a pending transaction. The blockchain must be able to certify the hash. Two philosophies emerge from this. On the one hand, there are the so-called optimistic rollups and on the other hand, the rollups that are somewhat inappropriately called zero knowledge (ZK) rollups.
Optimistic rollups are proofs of fraud issued by agents, usually programs, that observe the blockchain and users’ transactions. If the hash placed by an operator is fraudulent with respect to the application rules, the operator is punished, and the observer is rewarded. All this happens over a long time-window of several days. This off-chain process is called optimistic because all that is hoped for is that this warning mechanism does not get triggered.
The other family, ZK rollups, works differently. Every time the rollup operator places the root of the Merkle tree on the blockchain, it also deposits proof, in the cryptographic sense, that everything is correct. This process uses a major concept in cryptography called SNARK, which proves that a calculation has been carried out correctly. Above all, this proof is very short even if the calculation is very long. If the calculation involves 100 million operations, it weighs only a few hundred bytes at most. This is a bit of a miracle.
These two technologies, optimistic rollups and ZK rollups, are based on the same philosophy: to reduce the amount of information per transaction and to push the proof of validity as far as possible towards cryptographic mechanisms.