Link copied đź‘Ť

Chapter 09

Ethereum & Smart Contract Platforms

The vending machine is a contract with bearer: anybody with coins can participate in an exchange with the vendor. The lockbox and other security mechanisms protect the stored coins and contents from attackers, sufficiently to allow profitable deployment of vending machines in a wide variety of areas.
Smart contracts go beyond the vending machine in proposing to embed contracts in all sorts of property that is valuable and controlled by digital means. Smart contracts reference that property in a dynamic, often proactively enforced form, and provide much better observation and verification where proactive measures must fall short.

The term smart contracts is inevitably connected to Nick Szabo, a computer scientist and cryptographer we mentioned in the book a couple of times already as he came up with the idea of Bitgold. However, he had come up with the idea of smart contracts even before Bitgold, in 1997. Szabo used a famous above-mentioned analogy of a vending machine to explain what he means by the term in a paper he published that year. The paper was called “Formalizing and Securing Relationships on Public Networks” and he proposed the concept of smart contracts as a way of executing agreements between strangers in a trustless network. Blockchains have been the best example of something resembling trustless networks we ever had.The term smart contracts is inevitably connected to Nick Szabo, a computer scientist and cryptographer we mentioned in the book a couple of times already as he came up with the idea of Bitgold. However, he had come up with the idea of smart contracts even before Bitgold, in 1997. Szabo used a famous above-mentioned analogy of a vending machine to explain what he means by the term in a paper he published that year. The paper was called “Formalizing and Securing Relationships on Public Networks” and he proposed the concept of smart contracts as a way of executing agreements between strangers in a trustless network. Blockchains have been the best example of something resembling trustless networks we ever had.Therefore, it was natural that the concept of smart contracts would occur sooner or later. The way we usually understand smart contracts today is very similar to simple computer programs that automatically execute themselves. Compared to regular programs, smart contracts run on a massively distributed network that is hard to censor, and thus they are nearly impossible to stop. Around the same time the term emerged a similar concept was invented by Ian Grigg — Ricardian contracts. The idea behind Ricardian contracts was to record documents and link them to other systems such as accounting. As Ricardian contracts may be linked to legal prose they may be perceived more similar to traditional legal contracts.

BowTie Diagram of Ricardian contract elements
BowTie Diagram of Ricardian contract elements

Smart contracts are often not legally binding. At least for now. Bridging pieces of software with legal framework in a way that results into a legally binding contract is one of the great challenges ahead of smart contract applications. To sum it up, it is possible to implement Ricardian contracts as smart contracts, but not all of them are implemented in such a way. Likewise, not all smart contracts are Ricardian contracts.

Smart contracts as a concept spiked in popularity with the introduction of Ethereum. Interestingly enough, Ethereum was not the first so-called Turing-complete cryptocurrency that supported smart contracts. This title goes to QixCoin built in 2013 by Sergio Lerner who later created and has been working on the RSK protocol. The protocol did not receive much attention, though.By the end of 2013, Vitalik Buterin started to distribute the white paper he wrote to get feedback from the community. Buterin was well known to the Bitcoin community as a writer and co-founder of Bitcoin Magazine. He spent a decent amount of time covering different projects and ideas from the Bitcoin space in his 267 articles written for the magazine.Buterin initially suggested a bunch of proposals and features to the Mastercoin team that were implementing the second layer on top of Bitcoin, expanding the functionality of its scripting language. Buterin’s proposals aimed to make the Mastercoin protocol more generalized to support more types of contracts. According to his own words, the Mastercoin team was impressed by the suggestions he had made, but they were not willing to pursue the implementation as they went a different direction. Buterin decided to pursue his ideas and worked on expanding the architecture of a new network during the fall 2013. The idea of Ethereum was getting increasingly more attention from different people like Gavin Wood or Jeffrey Wilcke who eventually joined Buterin to work on the Ethereum protocol and its client respectively. Buterin credited Wood also for navigating Ethereum from its initial vision of a platform for programmable money towards a general-purpose computing platform. This was reflected by the terminology too as the contours of the “Web 3” protocol suite started to appear. In this early vision the Ethereum protocol was complemented by two others — the file storage system Swarm and the messaging platform Whisper.

Ethereum was officially announced on January 2014 at the North America Bitcoin Conference. Around the same time the group was joined by Charles Hoskinson, Anthony Di Iorio and Joseph Lubin. While Buterin had written the Ethereum White paper, Gavin Wood later authored the Yellow paper which served as the base for technical specifications of Ethereum Virtual Machine (EVM) as well as its implementations in different programming languages such as C++, Go, Python, Java, javaScript, Haskell, and Rust. Over the years, more EVM implementations were added in C#, Ruby, Erlang and WebAssembly. Buterin laid out the key design principles behind Ethereum in the White Paper as followed:

Simplicity: the Ethereum protocol should be as simple as possible, even at the cost of some data storage or time inefficiency.fn. 3 An average programmer should ideally be able to follow and implement the entire specification,fn. 4 so as to fully realize the unprecedented democratizing potential that cryptocurrency brings and further the vision of Ethereum as a protocol that is open to all. Any optimization which adds complexity should not be included unless that optimization provides very substantial benefit.
Universality: a fundamental part of Ethereum's design philosophy is that Ethereum does not have "features".fn. 5 Instead, Ethereum provides an internal Turing-complete scripting language, which a programmer can use to construct any smart contract or transaction type that can be mathematically defined. Want to invent your own financial derivative? With Ethereum, you can. Want to make your own currency? Set it up as an Ethereum contract. Want to set up a full-scale Daemon or Skynet? You may need to have a few thousand interlocking contracts, and be sure to feed them generously, to do that, but nothing is stopping you with Ethereum at your fingertips.
Modularity: the parts of the Ethereum protocol should be designed to be as modular and separable as possible. Over the course of development, our goal is to create a program where if one was to make a small protocol modification in one place, the application stack would continue to function without any further modification. Innovations such as Ethash (see the Yellow Paper Appendix or wiki article), modified Patricia trees (Yellow Paper, wiki) and RLP (YP, wiki) should be, and are, implemented as separate, feature-complete libraries. This is so that even though they are used in Ethereum, even if Ethereum does not require certain features, such features are still usable in other protocols as well. Ethereum development should be maximally done so as to benefit the entire cryptocurrency ecosystem, not just itself.
Agility: details of the Ethereum protocol are not set in stone. Although we will be extremely judicious about making modifications to high-level constructs, for instance with the sharding roadmap, abstracting execution, with only data availability enshrined in consensus. Computational tests later on in the development process may lead us to discover that certain modifications, e.g. to the protocol architecture or to the Ethereum Virtual Machine (EVM), will substantially improve scalability or security. If any such opportunities are found, we will exploit them.Agility: details of the Ethereum protocol are not set in stone. Although we will be extremely judicious about making modifications to high-level constructs, for instance with the sharding roadmap, abstracting execution, with only data availability enshrined in consensus. Computational tests later on in the development process may lead us to discover that certain modifications, e.g. to the protocol architecture or to the Ethereum Virtual Machine (EVM), will substantially improve scalability or security. If any such opportunities are found, we will exploit them.
Non-discrimination and non-censorship: the protocol should not attempt to actively restrict or prevent specific categories of usage. All regulatory mechanisms in the protocol should be designed to directly regulate the harm and not attempt to oppose specific undesirable applications. A programmer can even run an infinite loop script on top of Ethereum for as long as they are willing to keep paying the per-computational-step transaction fee.

A few months after the announcement, the protocol had become more stable, and the group met in Zug, Switzerland where an important decision was made. Buterin insisted that the project shall procede as a non-profit endeavour. This resulted later in creation of the Ethereum Foundation, and Charles Hoskinson leaving the project.Buterin, then a twenty years old prodigy won the 2014 Thiel Fellowship which granted him $100,000 to work full time on Ethereum, after which he dropped out of college. By July 2014 everything was ready to start the token sale — or an Initial Coin Offering — to fund the development efforts. The token sale started in July and lasted until August. Over the course of 42 days more than 60 million ethers were distributed to thousands of investors who committed over 31 500 bitcoins which was equivalent to roughly $18.4 million at the time.At that point, the Ethereum community started to grow exponentially with dozens of meetups and hackathons popping up around the world. The following fall also kicked off an annual gathering of the Ethereum ecosystem — Devcon 0 — which was held in Berlin in November 2014 with a modest audience of a few dozens of people. The evolution and expansion of the Ethereum ecosystem throughout the past years manifested at Devcon 5 in October 2019, held in Osaka, bringing together thousands of developers, activists, scholars and blockchain enthusiasts.As the ecosystem grew and was getting more mature, most of the founders have decided to leave the non-profit part of the Ethereum ecosystem — Ethereum Foundation — to pursue new ventures. Joseph Lubin went to found Consensys, Anthony Di Iorio started the Jaxx wallet, Charles Hoskinson would begin with the development of Cardano while also supporting Ethereum Classic, and Gavin Wood pursued his ideas of the perfect blockchain design with Polkadot.

Bitcoin vs. Ethereum — Conceptual Differenceslink

The purpose of the following paragraphs is to lay out the main conceptual differences between Bitcoin and Ethereum. Many of these conceptual differences may be applied to the comparison of cryptocurrencies vs. smart contract platforms in general. This is true mainly because most of the cryptocurrencies utilize the original Bitcoin codebase and while they tweak certain parameters in different ways, conceptually the build upon a similar framework. Likewise, most of the smart contract platforms, sometimes also called Blockchains 2.0 or even 3.0 (depends on the marketing “department”) get inspiration from Ethereum and in some instances even completely copy the Ethereum Virtual Machine. Therefore, even though these paragraphs are focused on differences between Bitcoin and Ethereum, they may be applied to a larger set of cryptocurrencies and smart contract platforms.

Turing Completenesslink

The first and most frequently purported difference between the two is Turing-completeness. As mentioned in the chapter six, Bitcoin uses is stack-based scripting system inspired by a programming language called Forth. Forth was intentionally made non Turing-complete, and so is the Bitcoin Script. This means it has a limited functionality to some extent as it does not support creation of endless loops for safety reasons. This significantly reduces the potential attack surface on the Bitcoin network.On the other hand, Ethereum uses Solidity a Turing-complete programming language used for smart contracts and applications on EVM. This allows to create, upload, and run basically any program on Ethereum, given enough computational power. Given the statefulness of EVM these programs may reside on their own address whereas in Bitcoin they live only within a transaction. Running programs and storing data on Ethereum is quite costly, though. Designing smart contracts and decentralized applications on Ethereum has its own caveats on which we will elaborate further below. It is Worth noting that Ethereum also supports other languages such as Serpent, LLL, Mutan or Vyper, even though Solidity is by far the most utilized one.

UTXO vs. Accountslink

Bitcoin utilizes what we call an UTXO-based ledger. UTXO stands for unspent transaction output. These transaction outputs are the fundamental building blocks of a bitcoin transaction. Every single transaction in Bitcoin consists of one or more inputs, and one or more outputs, as shown below.

Common transaction
Common transaction

When sending a bitcoin transaction, a user, say Alice, actually refers to transaction outputs from the previous transactions that she had received. From Alice’s perspective, these outputs have not been spent yet (hence unspent transaction output), and thus may be used to be sent to another user, let’s call him Bob. Therefore, reference to these outputs is used as a transaction input. The (set of) inputs is transferred through a script to Bob whose address is specified in the transaction output. After validation of this transaction, Bob can spend bitcoins — or transactions outputs — sent from Alice, by referring to the transaction she had sent him. In simple words, transactions are created by consuming existing UTXOs and spitting out new UTXOs. This way, bitcoin transactions are essentially about ever-changing ownership of UTXOs as they move from owner to owner in a chain of transactions.For the full picture it is important to note that UTXO represents a chunk of bitcoins, and transaction specifies conditions upon which these bitcoins may be redeemed by another user. Multiple UTXOs can be combined to create denominations needed, but any given UTXO must be spent completely in a transaction. Say, Alice sent to Bob 1 BTC. Bob wants to later on send BTC to Charlie. But he wants to send him just 0,2 BTC. Assuming Bob did not receive any other transactions from anybody, in a transaction he will refer to the transaction he had received from Alice and uses UTXO worth 1 BTC as the input for the transaction to Charlie. Since he does not want to consume the whole UTXO as he intends to send merely a fraction of it, in his transaction he specifies two transaction outputs — the first one of size 0,2 BTC that goes to the Charlie’s address, and second of size 0,8 BTC that goes to his own address. For simplicity, we abstract from transaction fees involved.Such a stateless model comes with a number of advantages with the main one being simplicity as transactions can be trivially verified. On the other hand it comes with certain trade-offs and challenges especially in UX. Strictly speaking, in Bitcoin, there is concept of accounts with balances on the protocol level. Every wallet needs to scan the blockchain and aggregate the value of all UTXOs assigned to the user’s addresses in order to calculate the “balance”.

Ethereum takes a diffrent approach. Its network maintains a state of accounts and their balances in the EVM. Therefore, we call such a system account based and we say that the system is stateful. There are in principle two kinds of accounts on the Ethereum network. The first one is what we call externally owned accounts (EOAs) which are regular accounts created by users that typically are controlled via private key. The second category are contract accounts. These accounts usually contain some smart contract code, and they do not have private keys as they are controlled through the logic embedded into them. In some cases they may be controlled by external accounts. They are represented by addresses, and can send or receive ether just like regular EOAs. When a transaction with the contract address as a destination occurs, it triggers the execution of the contract within the EVM using the transaction’s data as an input.Account-based model allows for more flexible transactions as well as including external inputs that influence the resulting state of a transaction. This comes at costs of increasing complexity of the system and the attack surface for potential adversaries. Also, it encourages users to reuse their addresses, unlike UTXO-based model, which is detrimental to the user’s privacy.

Monetary modellink

There is a lot of discussion going on whether Bitcoin may be money or not. Regardless of the answer to this question, its monetary design aims to resemble something that use to be money in the past — gold. Decreasing coin emission that results eventually into a fixed supply tends to be the reason for which Bitcoin is labeled “hard money”. While many altcoins mimic the monetary model, Ethereum does not.Ethereum has been designed from beginning as the world computer on which decentralized applications run in contrast with bitcoin which original idea was te become “digital cash”. This is reflected also in its monetary policy which counts with inflation. While it is not clear yet what exactly will be the inflation rate for the years to come, chances are it will be similar to the inflationary rates targeted by the central banks of dollar or euro. Yet, with the advent of Decentralized Finance (DeFi) movement, Ethereum fans tend to assign properties of money to Ether as well. Whether these assumptions are right remains to be seen.

Transaction fees vs. Gaslink

Naturally, both networks Bitcoin and Ethereum “charge” for their usage. Users are free to bid how much of a fee they are willing to pay to the miners to confirm their transactions.In Bitcoin, average transaction fee is determined mostly by the size of transaction in bytes. The more inputs or outputs transaction has the more data it contains. The price per byte of data depends on the demand for space in the Bitcoin blocks at a given moment. Historically, it has been a volatile parameter as it ranges usually from just a few satoshis per byte to a few dozens, and in extreme cases a few hundreds.Ethereum uses a slightly different concept based on gas. Gas is a unit used to measure computational and storage resources required to perform actions on Ethereum network. This means that every operation executed in the EVM has associated certain gas cost. For instance, adding two numbers costs 3 gas while calculating a hash is ten times more expensive as it costs 30 gas. The base cost for any regular transaction is 21 000 units of gas. At the same time, gas is priced in ether, or most commonly in “gwei” which is a smaller denomination of ether. More precisely 1 gwei equals to 0.000000001 ether. Similarly like in Bitcoin, users sending transaction on Ethereum can bid for the maximum gas price they are willing to pay. It si important to differentiate between gas cost and gas price. While gas cost parameter depends on the number of steps the EVM needs to execute and is relatively stable , gas price is created dynamically as an equilibrium forming up from the supply (of miners) and demand (of users). Eventual “transaction costs” are a function of these two parameters (gas price) * (gas cost).

Therefore, while in Bitcoin transaction costs are determined by the size of a transaction in bytes, in Ethereum they are determined by the computational steps required to perform the transaction. This makes sense as in Ethereum, even a relatively small transaction may trigger various smart contract interactions that result in consuming larger computational resources.

Ethereum Yellow paper - Gas cost per operation
Ethereum Yellow paper - Gas cost per operation

Block Size vs Gas Limitlink

We have already discussed how contentious the block size topic in Bitcoin is, and how various groups of developers have been fighting over which number should be hardcoded into the source code. Ethereum works differently and provides much more flexibility in this regard. In Ethereum blocks are capped by the maximal amount of gas in a block. The reason why Ethereum provides more flexibility is that the miners can collectively decide what the block gas limit will be. They can vote whether the gas limit of a subsequent block should be increased or decreased by a factor of 1/1024 (roughly 0,1%). This effectively allows for adjustable block size. As seen on the graph below the block gas limit has been ever-increasing and since September 2019 it oscillates at the level slightly below 10 million gas per block. At the time of writing this chapter, Ethereum miners are in the process of increasing the network's gas limit to 12 500 000 gas units per block.

Evolution of average block gas limit
Evolution of average block gas limit

Uncles vs Orphanslink

There are, of course, many differences in values of different parameters within both networks, but another interesting trait in which both systems differ is related to the way they treat valid block that do not make it into the main blockchain. This can be the case when the network latency is too high and some blocks simply get outpaced, or when two different miners generate a valid block at the same time, and the network needs to choose just one. The miners do so by choosing on which block they build their subsequent blocks. In Bitcoin, the block they do not choose is called orphan. In Ethereum such blocks are called uncles. The naming suggests relation these blocks have to the main blockchain. While in Bitcoin, miners do not get reward for generating orphan blocks which are left alone thereafter, Ethereum incentivizes creation of uncle blocks by rewarding their miners, even though they do not get a full reward. Such blocks also remain stored by the full nodes. This should, in theory, encourage solo mining, and thus foster decentralization of the network. In general, uncle blocks serve also as an indicator of network latency which has declined over the past years.

Scaling and Privacy in Ethereumlink

Scaling has been for long the most debated issue in the cryptocurrency and blockchain space. The very nature of the blockchain design that makes every single node in the network execute every transaction makes it rather difficult. Generally, in computer science, there are two main approaches to scaling — vertically and horizontally. Vertical scaling means making the nodes more powerful in terms of computation. On the other hand, horizontal scaling is achieved by adding more nodes in the network. As the main purpose of the blockchain networks is decentralization, they need to scale horizontally. Horizontal scaling in blockchain means the assumption of the software that may be easily run on consumer hardware. Ethereum operates with the notion that should the network scale in the future it needs to get rid of the paradigm where every single node in the network executes all transactions. Therefore, sharding is one of the technical solutions aiding Ethereum to scale by partitioning the network into multiple “shards”. In Ethereum, each shard has its own set of validators, and these are dynamically and randomly changing for every single block so it is mathematically improbable that fraudulent nodes could take over a single shard.The Ethereum 2.0 phase or, Serenity, should start with 64 of such shards, and this number may increase in the future. Sharding is not the only on-chain technique used to scale the Ethereum blockchain. Transition to Proof-of-Stake and implementation of zk-STARKS are important in this quest. Removing the computationally intensive mining process in Ethereum and replacing it with validators is one of the most expected network upgrades in the whole cryptocurrency history. Validators, or virtual miners, may initially stake exactly 32 ETH to secure the network, and they will be penalized (slashed) if behaving maliciously. Over time, the PoW chain will deprecate and Ethereum will consist of the PoS chain called Beacon chain and shard chains while the old chain (ETH1) shall merge with them and become part of the shard 0. The launch of Beacon chain is expected to happen in 2020 during phase 0. Phase 1, possibly some time in 2021, should introduce shards but only for data storage, not execution nor state changes. Phase 2, estimated in late 2021, should complete the merge of the old PoW chain with the new Beacon blockchain as well as launch state execution on the shard chains and allow for cross shard transactions.Furthermore, implementing zk-STARKS promises to improve not only scalability but also privacy of the Ethereum network as it will allow to move some computation work off the main chain. Moreover, this zero-knowledge protocol does not require a trusted set-up. At the time of writing this chapter it seems we are still quite some time from having it implemented on the main Ethereum chain.Another mean to increase scalability of Ethereum is related to planned replacement of its EVM by eWASM. WASM stands for WebAssembly which is a new, portable and efficient execution environment used for compiling code for the Web. WASM was optimized for execution and load times, and as the name suggests it is the foundation for eWASM. This should result in a faster pace at which the coding logic is translated and the data is added to each block, compared to the EVM. But eWASM should not only be faster but also more secure since it is standardised, and it alsosupports more languages.Overall, the endeavour to scale Ethereum is an exciting one, and there are multiple teams from different companies working on it. These include Parity Technologies, PegaSys, Prysmatic Labs, Status, Harmony, Nethermind, ChainSafe Systems, Sigma Prime, Yeeth or Trinity. Its worth noting that over years the role of Vitalik Buterin has decreased as many other developers and researchers have been contributing to the crucial components of Ethereum’s infrastructure. Even though the Ethereum community has grown to thousands of contributors, some of the key researchers and programmers include Vlad Zamfir, Justin Drake, Karl Floersch, Danny Ryan, Terence Tsao, and Hsiao-Wei Wang


As far as privacy is concerned Ethereum, as many other blockchains, too “suffers” from absolute transparency and thus provides complete records of all transactions that happen on the network. This constitutes both a great power and weakness at the same time — depending on the usecase. There have been multiple teams pursuing various cryptographic techniques to address this issue and offer certain level of privacy on the Ethereum blockchain. Most of these solutions deploy variations of zero-knowledge schemes such as zk-SNARKS or zk-STARKS. While the former is more widely studied and used it comes with one big disadvantage — a trusted setup. This was the reason why projects deploying it such as Zcash or Aztec protocol had to undergo a public process of creating the polynomial, or in other words initial parameters crucial for privacy properties of a protocol. While zk-STARKs do not require the trusted setup and are even resistant against quantum computers, they are, however, much more space-demanding as they require a lot of data for generating proofs.There are already a couple of applications available on the Ethereum main net allowing anonymization of transactions. The aforementioned Aztec protocol is one of them. It deploys zk-SNARKS and homomorphic encryption to encrypt the inputs and outputs of a transaction. This way, one may still perform logical checks on encrypted values without revealing them on the blockchain. The protocol launched on the mainnet in February 2020 with initial support only for private transaction with Dai.Another popular zk-SNARKS option is a mixer called Tornado Cash that operates on the Ethereum network as a smart contract that accepts deposits of ETH and allows them to be withdrawn by different address while making impossible to link the two.It launched in August 2019, and by May 2020 it evolved into a completely decentralized application as its operators gave away their power to modify the protocol. As the website may be accessible from certain countries, the project also uses IPFS to deploy its UI to make it truly uncensorable. Tornado Cash supports Dai, ETH, USDC and USDT in predetermined denominations.Another interesting privacy dapp, Umbra, was deployed in May 2020. Umbra enables stealth payments where the identity of the receiver is known only to the sender and receiver. Unlike Tornado Cash that breaks the link between sending and receiving addresses, Umbra makes the link “meaningless” as the address to which funds are sent is known, but no one knows who controls the address. This is achieved by supporting Ethereum Name System. Moreover, compared to Tornado Cash it offers some additional benefits such as sending arbitrary amounts or neither requiring waiting time before withdrawal nor anonymity set which significantly boosts the ease of use.

Ethereum Hard Forkslink

The roadmap of Ethereum was initially divided into four phases and published ahead of the main net release, while running a test net named Olympic. The Ethereum’s first main net block was mined on July 30, 2015. This event kicked off the first stage of the network called — Frontier. During this highly experimental stage network users could mine ethers, and thus participate in the network consensus as well as build and upload smart contracts. Soon after the launch, a fork named Ice Age, introducing a mining difficulty adjustment scheme, was scheduled in order to ease the planned transition to PoS.

The second stage was named Homestead, and it represented the first “stable” release. Homestead was implemented via a hard fork in March 2016, and contained a few network upgrades. The year 2016 also brought events that resulted in three other hard forks that were not initially planned. One was related to the infamous hack of The DAO, and resulted to the chain split while the legacy chain got named Ethereum Classic. We will talk more about this event in the next chapter. The other two forks went under the names Tangerine Whistle and Spurious Dragon, and they occurred in October and November of the same year, respectively. Their main purpose was to increase the costs, and thus deter Denial of Service Attacks. This resulted in increasing the gas (the unit used to measure the amount of computational effort) prices of certain operations, and removing empty accounts from the state of the Ethereum Virtual Machine.The third phase got named Metropolis and it was initially broken into two parts — Byzantium and Constantinople. Byzantium occurred in October 2017 and introduced a handful of new features from which zkSNARKs were the most notable one. It also delayed the difficulty “time bomb” that was designed to make the mining very hard once the network is ready to transition to proof-of-stake. The Constantinople hard fork, also known as St. Petersburg, happened in February 2019. This third phase of Ethereum’s roadmap eventually added more important network updates. One named Istanbul that rolled out more privacy and scaling capabilities as well as gas pricing adjustments and was implemented in December 2019. An emergency hard fork named Muir Glacier occurred right after in early January of 2020.The third phase got named Metropolis and it was initially broken into two parts — Byzantium and Constantinople. Byzantium occurred in October 2017 and introduced a handful of new features from which zkSNARKs were the most notable one. It also delayed the difficulty “time bomb” that was designed to make the mining very hard once the network is ready to transition to proof-of-stake. The Constantinople hard fork, also known as St. Petersburg, happened in February 2019.In May 2020, more forks are awaited, namely Berlin and London, are in the pipeline for the year. They should replace the current PoW mining algorithm, Ethash, with a new one algorithm called Programmatic Proof-of-Work (ProgPoW). The proposal to replace PoW mechanism just before migrating the network to PoS has been quite controversial. Its proponents argue that doing so will reduce the power of ASIC miners in the network, hence making mining more friendly towards GPUs and smaller miners. The Berlin and London forks should also mark the advent of the upcoming fourth phase — Serenity.Serenity is a long-awaited final epoch in the Ethereum’s chronicles that shall bring several new features including transition to Proof-of-Stake on a new “Beacon” blockchain , a new Ethereum Virtual Machine, reward mechanisms and other things. One of the most crucial improvement coming up in Serenity or also Ethereum 2.0 is “sharding”. The Serenity stage will be divided into multiple parts again, and it is expected that the Ethereum’s PoW chain shall continue operate alongside the new Beacon chain for quite some time.

The Evolution of Layer Two Solutionslink

While in the past years a significant amount of resources have been invested into scaling Ethereum blockchain, even more have been channeled into exploring the off-chain techniques within the realm of the second layer. The ecosystem of layer two solutions in Ethereum is quite robust and there are multiple teams working individually on their solutions, yet in this paragraph I aim to provide a short anamnesis of the layer two techniques. In blockchain, semantics may be confusing at times but in principle there are two main approaches to Ethereum off-chain scaling — state channels and sidechains. State channels as a broad term contain the subcategory of payment channels that are specifically designed to record payment transactions, and do not store the state. State channels are therefore more generalized version of payment channels. Similarly, the sidechain category includes various design techniques that sometimes go under different names such as e.g. Plasma.Payment channels are equivalent of the Bitcoin Lightning Network where two users create bidirectional channel between them so they can instantly update the balances that are stored locally on their nodes. More nodes with channels allow for creation of a mesh network. While payment channels are limited to value transfers, state channels allow for storing states for instance in games such as chess. One of the earliest implementations of payment channels is Raiden which has been under development since 2015. Its simplified version — µRaiden — launched on the mainnet in late 2017 and allowed for one-directional payment channels for token transfers to predetermined destinations. The Raiden Network’s first iteration was launched a year later in December 2018 and second update of the feature complete version came out in May 2020. While Raiden Network has its own token, another notable project in the area of state channels Connext provides the functionality without a native token. Connect initially launched as a non-custodial but trusted centralized hub, but its second version fixed this upon its launch in September 2019. One of the more prominent implementations include Celer Network that came out of stealth in the late 2018 and brought a sophisticated layered technology with a set of useful features such as provably optimal state routing algorithm with high transaction throughput.

The spectrum of sidechain solutions is similarly wide, and includes some projects that use a set of certain design principles that go by common term Plasma. In simple words, sidechain is a separate chain attached to the main chain typically using a two way peg. This allows to lock up value on the root chain and credit it on the sidechain. Perhaps the most notable “simple” sidechain implementations are POA Network and SKALE. These sidechains are typically secured by their own consensus mechanism which is weaker than the one of the main Ethereum chain. In return, they provide much higher throughput and modularity.The Plasma white paper was published in 2017 by Vitalik Buterin and Joseph Poon and caused a lot of excitement in the scientifically oriented Ethereum community. Since then Plasma has been used as an umbrella term for a broad category of solutions. Since its inception there have been a number of improvement proposals to its design. The main underlying trait of Plasma sidechains is that the root of their blocks is published to the main Ethereum blockchain, and thus they are more secure.A few months after the original Plasma design, a new improvement emerged in the form of Plasma MVP (Minimal Viable Plasma) which stripped down the original concept and made it fit for UTXO-based implementations for simple transactions where one operator run the entire plasma chain. Its design, however, came with certain limitations and trade-offs such as the issue known as Mass Exit Problem made unfeasible for many users to withdraw their funds all at once from the plasma chain. Moreover, after submitting the “exit” transaction users would need to wait for a couple of days during the so-called challenge period. This inherently limited transactional capacity of plasma chains. Moreover, the users had ot monitor all their transactions which was not really practical.Another iteration, co-authored again by Buterin, emerged in 2018 and got named Plasma Cash. It used a different data model and fixed the aforementioned mass exit problem. Quite curiously, it used an interesting concept of non-fungible tokens (NFTs) as user’s deposit of, say 10 ETH would be credit as a single token worth 10 ethers. This, however, resulted in difficulties with divisibility of tokens. Apart from that, Plasma Cash introduced a new set of problems the analyses of which is beyond the scope of this chapter. The concept was improved again in the form of Plasma Debit which was different in having each token as a payment channel between user and the chain operator.In 2020, the most notable sidechain implementations using aspects of Plasma design are Loom Network, OMG Network, and Matic Network that allow to create plasma chains optimized for specific usecases on top of Ethereum. They all come with their own variations, for instance Matic utilizes an account-based model unlike the original Plasma MVP. So far they have been used mostly in gaming, VR and DeFi applications.

From 2019 the term “Plasma” has been used less frequently as another plasma-like solution emerged — zk-Rollups. As the name suggests, it uses novel cryptography based on zero-knowledge proofs that allows to prove and attest correctness of data by on-chain proofs, instead of relying on trusted plasma chain operators. This cryptographic magic helped to solve many dilemas Plasma faced and could not cope with. The post announcing zk-Rollups on Ethereum research forum ( had soon become the most viewed one on the entire forum.Zk-Rollups, though, introduced again certain trade-offs especially because validity proofs were quite expensive to generate, and the framework did not initially support smart contracts. The concept has been worked on for instance by Matter Labs in the form of ZK Sync Network, and by StarkWare who launched their non-custodial settlement engine for exchanges StarkEx that has been implemented in the exchange DeversiFi or even the popular NFT game Gods Unchained. Naming of these concepts may be still confusing even for insiders, and combination of Plasma-like designs with off-chain data validation based on zk-SNARKs has been proposed to be called Validium. Another solution based on similar technology is for instance a payment protocol Loopring.

In 2019, after zk-Rollups release, a new design named “Merged Consensus” was introduced that allow for off-chain consensus systems that were completely verifiable on the Ethereum main blockchain even without using very powerful, yet to be battle-tested, cryptography behind zk-Rollups. Soon its concept was extended by the Plasma working group, an informal group supported by a number of entities from the Ethereum ecosystem. With advent of the new concept, named Optimistic Rollup, some went even so far to claim Plasma was dead. The Plasma working group started to work on the concept of the Optimistic Virtual Machine that would represent a conceptual framework within a single piece of software that could run multiple layer two constructions. The group even renamed to “Optimism” which symbolically marked the general shift from the Plasma-like designs towards Optimistic Rollups.

Potential Risks and Concernslink

Ethereum has been since its beginning an extremely ambitious project. While its goals are bold and noble, it has been often mistakenly referred to as “Bitcoin on steroids” but the true is that it can not be compared with Bitcoin as it is ultimately designed to do different things. The whole ecosystem moves faster and has larger risk appetite which means things sometimes may get broken. This has been manifested many times throughout Ethereum's history burdened by bugs in the code with the DAO hack and Parity bug being the most notable and expensive instances.

One of the concerns with Ethereum has always been the pace at which its blockchain grows. There has been a lot of misconception around this topic as Ethereum clients allow for different pruning modes in which a node retains a different amount of data. While in June 2020 the archive nodes contained almost 4,5 TB of data while the “ordinary” Geth full nodes were roughly 380 GB in size. This type of client is the most popular in the Ethereum network (roughly 75%) followed by Parity clients (17%) that contained 100 GB less. In simple terms, these full nodes discard the old data that are not essential for maintaining the network’s integrity. While archive nodes are painful to sync as it may take a couple of weeks, one can do so using only a regular full node. In the future with Ethereum 2.0 and sharding there will be, too, different kinds of nodes:

  • Top-level nodes — processing the beacon chain
  • Single-shard nodes — processing the beacon chain + data related to a specific shard
  • Super-full nodes — fully verifying everything including the beacon chain and all the shards
  • Light nodes — verifying only the block headers from the beacon chain

Nonetheless, the fact is that Ethereum’s blockchain grows faster than the one of Bitcoin and this has been also reflected by the decreasing number of full nodes in the network. In May 2017 Ethereum had three times more nodes than the number of listening nodes in Bitcoin — 25 000 vs 7200 — three years later the situation was rather different. In May 2020 the Ethereum network consisted of roughly 7700 nodes while Bitcoin had almost 10 500 nodes. When taking into account data from one of the Bitcoin Core developers Luke Dash Jr. who also includes the non-listening Bitcoin nodes, the number gets almost to 49 000. The rising difficulties of running a full node in Ethereum may be a serious threat for its decentralization in the future. The situation looks even less favorable when we look at infrastructure providers such as Infura that run quite a bunch of these nodes on behalf of their clients.

While sharding may help, it brings its own set of issues, especially when it comes to cross-shard communication which may distort composability of certain dapps. Even though the code has been heavily tested, audited and debugged there is a good chance that things will break at some point once again. In fact, it would be rather surprising if the whole process of transition to PoS goes flawlessly. Despite all the risks and potential vulnerabilities Ethereum is one huge experiment worthwhile to follow.

Web 3.0link

The utility of Ethereum and other smart contract platforms needs to be assessed in the context of Web 3.0. — yet another buzzword in the blockchain space. Nonetheless, its impact may bring quite some benefits for the web users. So what does Web 3.0 actually mean? There is no general agreed upon definition of the term, similarly as for Web 1.0 and 2.0, but most of them overlap in certain aspects. While Web 1.0 was serving the users mostly with static websites that did not allow much interaction, the Web 2.0 has been much more dynamic and one of its main characteristics is user-generated content with data being sent and shared quite easily. The Web 2.0 design , however, accumulated users’ data in the centralized services such as Facebook, Google, Amazon, etc.Unfortunately for the users, under this paradigm they do not own the data they produced, and all the value generated from the data is accrued by the centralized services that grew into molochs in the past two or three decades. Web 2.0 is not socially scalable as even though anyone can join these services, just a few can steer the ship, and make decisions.But that is not the only negative consequences of the current web architecture. Centralization of data created valuable silos that tend to get hacked or to be shared inappropriately. Users need to rely on the trusted third parties, and hope that they will manage their data as they declare. Which is often not the case as we witnessed in countless of data breaches, advertising and surveillance scandals in the past years.

Web 3.0 is going to be shaped mostly by open blockchains that create an underlying and communication protocols for the entire Web. This will be done in a much more decentralized way, creating more flat structure resembling the original vision for the Internet. The new web is going to be much more user-centric and resistant against censorship. Users will be in control of their own data which will become more portable as they will be decoupled from the applications. The shift towards decentralized applications, or dapps, will offer new possibilities, but more importantly it will make data more safe and users’s privacy protected as data honeypots will be removed.Web 3.0 has been also called the Internet of value as money will become the native feature of the web. This is definitely one of the most crucial aspects which future impact we can hardly fully comprehend yet. But it’s not only about transfer of value and money, it creates a shared “state”, or data layer, that is governed in a transparent fashion by open-source code and the rule of math, not a man. This shared state will encompass not only payment and value transfers, but also data storage as well as identity system.


Some the foundational tooling has been already developed in the past years and are slowly gaining more and more traction amongst the users. Metamask has been on the most used tool when dealing with the Web 3.0 infrastructure as it provides a gateaway to Ethereum-based dapps. In April 2019, the browser-based wallet reached 250 000 monthly active users that executed more than one and a half million transactions the same month. 63% of those happened on the Ethereum mainnet, while the rest were broadcasted on the testnets, and a small part on other chains.Crypto-native web browser Brave has become another essential tool within the Web 3.0. By native support of cryptocurrencies through an embedded wallet it removed the hustle of installing tool such as Metamask in users’ browser. In addition to that, it offers a set of privacy-protecting features that protect the user’s data and increase the speed of browsing while saving their battery life and data plan. With its own and quite unique token model that helps not only to incentivize the users to use the browser but also introduces a new and disruptive advertisement model that has been driving the browser adoption significantly. In June 2020, Brave passed the mark of 15 million monthly active users with a roughly third of them using it daily. At the same time, the number of new addresses created on Ethereum passed 100 million. Taking into consideration that Ethereum was created just five years ago, and that its account-based model does not encourage creation of new addresses as much as the UTXO-based model in Bitcoin — this is quite a jaw-dropping number even if the number of users is likely much lower.Another tool significantly reducing the onboarding friction for Web 3.0 users is Torus. Released in early 2020, Torus allows users to login to dapps using their social media accounts, eliminating the need to manage their private keys. More importantly, it does so in an open-source and non-custodial manner, and thus offers reasonable security.

While there has been a great progress made in tooling for users to interact with Ethereum smart contracts and dapps, at least equally important has been development of tools for developers creating these smart contracts. Tools like Truffle and Remix have become over the years widely popular and aided to thousands of programmers to create, test, debug and deploy code for their dapps. Infura, the company providing suite of tools for connecting apps with the Ethereum network has become som popular that overly reliance from quite a sizeable chunk of the industry on its services even sparked discussion on how decentralized and uncensorable those dapps really are. The team behind Open Zeppelin created an amazing library of reusable smart contracts that too has been used by a plethora of projects in the space.One of the biggest obstacles when onboarding dapp users unfamiliar with the mechanism of blockchain networks is related to transaction fees. As every interaction with a smart contract requires an on-chain transaction, and thus incurs fees, for a long time it was impossible to onboard new dapp users without them having purchased ETH beforehand. However, tools such as Gas Station Network (GSN), launched in mid 2019, stepped in and helped to eliminate this kind of friction. GSN offers a way where dapp developers to pay transaction fees for their users which significantly boosts the ease of onboarding.


Undoubtedly, one of the most crucial pieces of the Web 3.0 infrastructure are oracles. Without them smart contracts would not really be smart at all, because any smart contract is only as good as the data it is fed with. Oracles are, therefore, bridging the blockchain networks with the outside world and source them with data. This is not an easy thing to do as there is no point in having decentralized applications if the sources of data are centralized and easy to manipulate. Oracles indeed introduce new trust assumptions and potential attack vectors in the blockchain realm. Sybil attacks, data tampering, or node collusion are just a few of the conceivable threats. To make smart contracts really useful for the world, having trust-minimizing oracles is an essential prerequisite. Aspiring middleware services need to be designed, of course, in a distributed fashion, with a reputation and penalty system in place, means for secure aggregation of data, and most importantly with the game theory principles in mind. Areas with the most pressing need for quality oracles include finance, insurance, prediction markets or identity usecases.By 2020, the most widely adopted provider of off-chain data for blockchain networks has emerged in the company called Chainlink. Chainlink has its own token LINK that is used as collateral to maintain the network security, and the network of node operators have been securing hundreds of million of dollars in DeFi space used mainly for the price reference. The middleware service has further integrations with the biggest tech companies in the space and recently introduced interesting features such as on-chain verifiable random functions to generate (VRF) randomness. The planned milestones for the future include private off-chain computation using trusted execution environment (TEE), and implementation of Threshold Signatures (TS) which should allow for saving data when sending data on-chain.Some major competitors that are in progress include Band Protocol or Tellor. Band migrated in the past from Ethereum to Cosmos while focusing on providing cross-chain oracles, higher scalability and lower costs. Tellor has been backed by strong players such as MakerDao, Consensys and Binance and came with interesting twist of combining a staking token with PoW security. During the first half of 2020 its hashrate has been growing quite significantly which signalizes increased adoption from the mining pools and potential for widespread adoption in the future.

Some of the projects have opted for creating their own implementations of oracle services. One of the earliest dapps on Ethereum — Augur is one of them. As Augur requires often subjective and unique data the team decided to internalize the oracles on their protocol embodied in the form of “Reporters” that stake the protocol’s native token REP. Some of the DeFi projects such as Maker or Uniswap came with their own approaches to the oracles problem as well. Recently, Coinbase announced their price oracle service as well, nad it is likely that other centralized exchanges will follow the suit. Events such as “Black Thursday”, which we cover further in the eleventh chapter, demonstrated that oracles are still the weak spot of the whole DeFi space and there is still a lot of space for improvement in terms of their security and stability.

Decentralized Storagelink

Decentralized Storage Networks (DSNs) are another essential piece of the Web 3.0 stack and something that has been worked on by multiple teams. IPFS, StorJ, Sia or MaidSafe are just a few examples of projects in this space with the first one being the most widely utilized. This piece of infrastructure is essential as it may allow to bypass censorship activities that are, sadly, present in many countries. This was most notably manifested in April 2017 when Turkish government permanently restricted access to Wikipedia for the whole country. Within a few days, the whole content of Turkish Wikipedia was uploaded and distributed via IPFS, rendering the government’s efforts futile. As one IPFS gateaway gets blocked, users may easily use a different one. All the content is cryptographically verified, and accessible also through Tor. Moreover, IPFS does not rely on DNS, and content may be found based on its hash.

Digital Identitylink

Digital identity is yet another crucial area with multiple teams researching and implementing different protocols. Making digital identity usable in a decentralized fashion has been quite a challenge. Some of the project pursuing this idea in the crypto space include uPort, Civic, or Blockstack. To surprise of many in the space, Microsoft announced in 2019 their plans to build an identity system on top of the Bitcoin blockchain. The project was named ION and it too makes use of IPFS where it stores transaction data. In paralel to these projects, the European Union too makes efforts to create blockchain-based identity solution as this is amongst the first four use-cases selected for deployment in the upcoming launch of EBSI European Blockchain Service Infrastructure (EBSI). The first nodes of EBSI launched in early 2020, and over time each EU country should host a few of them. EBSI’s protocol of choice — Besu — is one of the recent additions to the family of Hyperledger protocols. Even though EBSI is intended to be a permissioned network, Besu, as a fork of Ethereum, is likely to be easily interoperable with the public Ethereum network which might be very useful for the future.

The Web 3 Stack - A modular Framework by Coinbase
The Web 3 Stack - A modular Framework by Coinbase

Overall, Web 3.0 aims to empower the users and protect their data and privacy. To large extent, it substitutes the trust placed in the intermediary institutions with open-source code and mathematics. This should result in a more open and free web that will benefit the people, not the corporations. Moreover, Web 3.0 will be blockchain-agnostic and allow communication between different blockchain network in a trustless manner thanks to projects such as Polkadot, Cosmos, Ava and other protocol focusing on cross-chain data exchange and interoperability. Gavin Wood, the founder of Ethereum and Polkadot summed up the vision of the new web accurately:

Web 3.0 is an inclusive set of protocols to provide building blocks for application makers. These building blocks take the place of traditional web technologies like HTTP, AJAX and MySQL, but present a whole new way of creating applications. These technologies give the user strong and verifiable guarantees about the information they are receiving, what information they are giving away, and what they are paying and what they are receiving in return. By empowering users to act for themselves within low-barrier markets, we can ensure censorship and monopolization have fewer places to hide. Consider Web 3.0 to be an executable Magna Carta — “the foundation of the freedom of the individual against the arbitrary authority of the despot.

Ethereum Challengerslink

While the Ethereum fans have been for long waiting for the "flippening" moment when Ethereum would surpass Bitcoin in the market capitalization and take the throne, the fact is that it’s Ethereum that must face the competition, not really Bitcoin. Over the years quite a few platforms entered the arena of smart contracts and attempted to overtake Ethereum’s primacy in the field. The next paragraphs aim to briefly summarize the most notable ones.Admittedly, aficionados of the respective platforms could argue that these lines do not do justice by dedicating so little space of this book to these technologies. Yet, the fact is that Ethereum still largely dominates this market and these platforms below have a great challenge ahead in proving themselves useful. It could be argued that some other smart contract platforms should be listed here and in general there are two main reasons why some may be missing. Either they are too recent to be evaluated, or they are too old and inactive and I found them irrelevant from today’ s perspective (no offense).The main purpose of this part is to provide overview of the major players on the smart contract market, and to capture their main distinctive features, not to cover their technology in depth. Naturally, all of them aim to scale better than Ethereum, and higher TPS is used so often when pitching these technologies that it can hardly be considered an USP (unique selling proposition). At the time of writing, some of the platforms have been in operation for very short time and some of them have not even launched their mainnet yet. Also, I do not discuss here private blockchain frameworks such as Hyperledger protocols or Corda even though they are indeed relevant in the enterprise blockchain world. Not so much for the cryptocurrency world, though.


Polkadot has been definitely one of the most serious Ethereum challengers even though its not a single blockchain itself, but rather a network that connects multiple heterogenous blockchains. But its focus on interoperability is where its strengths are. It has been founded by the team around Gavin Wood, one of the founding fathers of Ethereum. Wood was initial CTO of Etheruem, wrote the its formal specification and invented Solidity. Together with his fellows he founded also Web3 Foundation to support research of decentralized protocols.Even though Polkadot’s mainnet was launched only in summer of 2020, there are already dozens of projects built on top of it. All these projects use a powerful open-source framework dubbed Substrate which massively simplifies the process of creating and modifying application-specific blockchains. Its stack supports swappable consensus layer, fast and efficient database, as well as P2P networking module. The core of Polka Dots architecture is built around a central relay chain that connects multiple parachains. The relay chain is secured via staking mechanism dubbed Nominated Proof-of-Stake (NPoS). This overarching consensus mechanism boils down to two other mechanisms, each with its own responsibility. The first one — Blind Assignment for Blockchain Extension (BABE) ensures block production, and the other one dubbed GHOST-based Recursive Ancestor Deriving Prefix Agreement (GRANDPA) is in charge of finality of old blocks. BABE’s design is inspired by Ourobros Praos found In Cardano.Interestingly enough, Polkadot does not support smart contracts itself, but its parachains do. The first of such platforms was Edgeware that supported WASM-based smart contracts. Over time Polkadot team has been joined by researchers from other smart contract platforms such as Dfinity, Ziiliqa, and of course Ethereum. Polkadot launched its earlier unaudited version on the form of the Kusama network which started as PoA-based system that has been progressively opening up. As time progressed it appears that Kusama may be an Ethereum challenger on its own. Polkadot has its native currency DOT, and Kusama features KSM token.


Cosmos has been, similarly to Polkadot, one of the most serious challengers in the scaling wars of smart contract platforms. Design-wise there are quite a few similarities between the two as they both feature modular frameworks for application-specific blockchains as well as perpetual inflation which is subjected to retargeting based on various protocol parameters. Cosmos does however deploy a different consensus mechanism — Byzantine Fault-Tolerant (BFT) developed by Tendermint. Cosmos is designed as a network of “zones” and “hubs'' that will be communicating between each other through the means of Inter Blockchain Communication protocol (IBC). Cosmos networks are secured by validators staking ATOM tokens. The protocol development is coordinated via Interchain foundation. Cosmos aims to make it easy to support Ethereum smart contracts via its EVM-compatible chain — Ethermint. At the time of writing, Cosmos features, right after Ethereum, probably the most developed DeFi ecosystem with dozens of projects utilizing its SDK to build application-specific chains. Some of such chains focused on privacy-centric execution of smart contracts are Oasis Network and Secret Network.


Avalanche is built upon a novel consensus protocol family by the pseudonymous cryptographic research group Team Rocket. The development is spearheaded by Cornell University professor and well-known name in the crypto space — Emin Gün Sirer and his PhD Students that formed Ava Labs. It features multiple chains where some perform certain core functionalities, and others , dubbed subnets, are application specific, similar to Cosmos. Avalanche consists of three separated core layers — P-chain, X-chain, and C-chain. The first one serves to coordinate validators and to create subnets. The second is used for asset creation and exchange, and third for EVM contracts execution. The network of subnets around these three chains relies on the same set of validators, and interoperability is to be addressed by atomic swaps. Avalanche introduced a novel and quite unconventional leaderless consensus mechanism. Unlike in Cosmos or Polkadot where a single validator is selected to sign off each block, Avalanche verifies transactions via random node communication until a large enough portion of nodes reaches an agreement. This allows Avalanche to maximize its total validators set, and waive the slashing penalties present in many of the modern PoS systems including ETH 2.0. Interestingly enough, unlike typical smart contract platforms Avalanche put a hard cap on its AVAX supply and an inflation rate that diminishes exponentially which could attribute it more quality monetary properties. The mainnet was launched in September 2020. Due to their architecture of intertwined application-specific blockchains, Avalanche, Cosmos, and Polkadot could be viewed as Layer Zero technologies.


Algorand is a blockchain network designed by the Turing award winner and MIT professor Silvio Micali who was a part of the team that described zero-knowledge proofs for the first time. At its core the network has a variation of PoS called Pure Proof-of-Stake (PPOS) system that does not feature slashing. Algorand also has a fixed supply of its ALGO tokens that has been minted upon the launch of the mainnet in June 2019. The coins are being released into circulation only gradually via staking. The network deploys on-chain governance where anyone can post code changes on the network and stakers can accept or reject it.


Solana is a blockchain heavily focused on horizontal scaling its base layer with sub-second settlement times, and low transaction cost that has been enabled through its new timestamp system called Proof-of-History (PoH) that automatically orders transactions. Solana is therefore a single chain network built in Rust where PoH functions as its internal clock. The team of former Qualcomm engineers lead by Anatoly Yakovenko has come up with a set of interesting innovations that Solana embodies.As for the consensus mechanism per sei, it deploys a PoS algorithm, specifically called Tower BFT. As the network nodes require rather demanding hardware specifications, SOL stakers will be able to delegate their tokens in order to participate in the network’s consensus. The network features also a new block propagation protocol called Turbine, a mempool-less transaction forwarding protocol named Gulfstream, as well as parallel smart contracts run-time dubbed Sealevel. The mainnet beta was launched in March 2020, and the full mainnet is expected in early 2021.


Near has launched its mainnet in May 2020 when it also deployed a sharding algorithm called Nightshade. It is one of a few blockchains that implemented sharding straight away upon the launch of the mainnet. Similarly to Cosmos or Ethereum 2.0, Near too operates with asynchronous sharding. Yet, Near brings some interesting tweaks and innovation to many challenges sharding raises. The platform is to a large extent compatible with EVM, but has migrated from Solidity to Near Rust SDK. It has been acknowledged as one the serious Ethereum challengers even by Vitallik Buterin, and it has been attracting many projects from the DeFi arena.


Blockstack in a way extends the Bitcoin blockchain as anything recorded on its native blockchain can be verified on the Bitcoin. It deploys Proof-of-Transfer where miners compete in mining by sending Bitcoin to network participants. This way, the network is secured by Bitcoin’s PoW, but any data related to apps on Blockstack are kept off the Bitcoin chain. The platform introduced a new language for smart contracts called Clarity which is also supported by Algorand. Its code includes mathematical proofs and is not compiled, therefore, the code gets executed exactly as written by developers. Blockstack is interesting in that it builds a new DNS (Domain Name System) — dubbed the Blockstack Naming Service (BNS) — on top of its blockchain. It supports off-chain computation and it allows its users to use any storage backends like the ones from Amazon or Dropbox for storing signed data via system called Gaia. Only pointers to this data are stored on Blocktack. The mainnet is expected in Q1 2021.


Thunder is yet another EVM-compatible public blockchain network. It offers transaction confirmation within one second, low gas fees, and high throughput. It is backed by a top research team in the field of consensus algorithms. Thunder introduced a PoS consensus named PaLa that boasts with backing by rigorous mathematical proofs.

Binance Smart Chainlink

Binance has been for long one of the largest and most successfull exchanges in the crypto space. Moreover, it has managed to roll out innovations at incredible pace. After launching Binance Chain with its own token BNB, it entered the arena of smart contracts with introduction of Binance Smart Chain (BSC) that was built for cross-chain compatibility with Binance Chain. BSC is EVM-compatible, uses a PoS consensus, and offers high transaction throughput that has already attracted some of the DeFi players.


Kadena is one of a very few smart contracts platforms that deploy PoW consensus. It has introduced a novel algorithm named Chainweb that breaks down to multiple chains that are mined in parallel. This design should support higher transaction throughput already at the base layer. Kadena introduced also a new smart contract language called Pact which is Turing-incomplete and improves some of the imperfections of Solidity such as the lack of formal verification. Kadena team built also a private blockchain using a BFT mechanism optimized for enterprise-grade use cases. The mainnet launched in October 2019 in three phases where its third phase was deployed in January 2020.


RSK is Layer two technology on top of Bitcoin. It deploys its own sidechain that is pegged to and merge-mined with the Bitcoin blockchain. The security of the peg is enforced by a consortium of a group of reputable crypto companies. This allowed RSK to create a version of Bitcoin on the sidechain which is called Smart Bitcoin (RBTC). The sidechain supports EVM, and therefore is compatible with Solidity smart contracts. It uses also a novel consensus algo dubbed DECOR+ that is complemented by protocols such as FastBlock5 and GHOST. The team behind RSK consists of well-known Bitcoiners in the space led by Diego Gutierrez Zaldivar and Sergio Lerner.


EOS has been consistently in Top 10 cryptocurrencies based on the market capitalization, and it has been one of the most used smart contract platforms after Ethereum. Unlike Ethereum, EOS deployed DPoS consensus algorithm that has been boasting with tero fee transactions, much higher speed and throughput, but has also been criticized for its relative centralized nature. Similarly like the future version of Ethereum, EOS too supports WebAssembly. The protocol was designed by Dan Larimer who also founded BitShares and Steem, and it has been developed by Block.One company since 2017. The mainnet launched in mid 2018. EOS caught the attention of media mainly because of its year-long multi-billion ICO which happened to be the biggest one ever conducted. The network’s consensus was secured only by twenty one block elected producers which was subjected to criticism. The platform rebranded to EOSIO later on while leaving the name EOS only to its internal token. By 2020 the platform features roughly 550 dapps on its network.


Tron has been one of the most controversial smart contract platforms especially because of its founder Justin Sun known for his entrepreneurial and trolling activities. The project has been accused of plagiarism in their white paper upon its launch in 2017 in Singapore during a $70 million ICO, and its token is called Tronix (TRX). The mainnet launched in June 2018 and it supports Solidity as well sa other languages for smart contracts, and utilizes DPoS-based consensus with twenty seven block producers called Super Representatives. Tron famously acquired BitTorrent, Inc — the company developing the P2P file-sharing protocol BitTorrent, and developed BTT utility token for its ecosystem. In 2020, Tron took over also the Steem platform which resulted in a contentious fork of the platform. At the time of writing, the data from DappRadar featured roughly 600 dapps on the Tron Network and its blockchain explorer indicates presence of almost 1000 nodes in the network, distributed mainly in the United States, China and Germany.


Cardano has been considered one of the most serious challengers for Ethereum mainly because of its research-first principle and a scientific community. It was founded by Charles Hoskinson who left Ethereum early on to found a for-profit company IOHK to work in conjunction with researchers at multiple universities. The team raised over $60 million in its 2017 ADA token sale. Cardano is distinct in using purely functional language Haskell as a programming language of choice, and its deploying novel consensus mechanism — Ouroboros — which was proclaimed by the team to be the first provably secure PoS algorithm. It has been criticized by some other researchers, most notably Vlad Zamfir from Ethereum, for unrealistic assumptions that may not hold for permissionless blockchains. The protocol boasts a multi-layer structure of two main layers — Cardano Settlement Layer (CSL) and Cardano Control Layer (CCL). The network deploys on-chain governance in a hope to improve on informal governance processes in Ethereum and Bitcoin. Interestingly enough, Cardano announced its off-chain scalability protocol Hydra even ahead of the mainnet launch in July 2020.


Tezos was proposed for the first time in a paper released by Arthut Breitman in 2014. The protocol was designed to offer more inclusive governance process, and was one of the first to introduce on-chain governance built around its Proof-of-Stake consensus. The project raised over $230 million in Bitcoin in 2017 which made it one of the largest ICOs in the history. This large sum of money almost immediately resulted into internal politics and conflicts and caused a delay in the the mainnet launch. The network was eventually launched in September 2018. n Tezos, transactions and consensus protocol operate separately. The protocol features also an ability to conduct formal verification, and quite a unique programming language OCaml.


Stellar is a protocol co-founded by Jeb McCaleb, the well-known person in the crypto space that was behind eDonkey — a peer-to-peer fiel sharing system, Mt.Gox — at the time the world’s largest Bitcoine exchange, Opencoin — which evolved later into Ripple, finally Stellar. The protocol aimed to improve certain design features of XRP, and of course Bitcoin. It is not a typical challenger for Ethereum as its primary focus is on payments, but it allows for issuing assets similarly like Ethereum. The network is built upon its consensus algorithm called Stellar Consensus Protocol (SCP) which is an implementation of the Federated Byzantine Agreement (FBA). Interestingly, Stellar has managed to harvest quite some support in the enterprise environment, especially driven by IBM, because of its low network fees, much higher transaction throughput, and instant finality. Of course, this comes at the cost decreased decentralization. The network has also its own layer 2 technology called Starlight which is quite similar to other payment channels projects like Lightning Network.

Ethereum Classiclink

Ethereum Classic is the sister network of Ethereum that forked off after The DAO hack in 2016. Naturally, in terms of technology, it shares a lot of similarities with Ethereum even though over time it has accumulated certain different features and design trade-offs. The DAO hack showed the first and the most obvious one — determination to philosophical ideals of the motto “Code is Law”. Furthermore, its community refused to adopt Proof-of-Stake, and introduced a fixed supply to its monetary policy. One of the founders of Ethereum, Charles Hoskinson and his company IOHK, have been actively involved in the ecosystem until these days. The chain has been targeted for 51% attacks multiple times throughout 2019 and 2020, and transition to other PoW algorithms like Keccak-256 or SHA-3 has been considered.


NEO was originally named Antshares, upon it ICO in 2016. And for a long time it was dubbed as “Chinese Ethereum”. Its virtual machine — NeoVM — has been designed to support many widespread programming languages such as Java, C, C++, Python, Ruby, and Javascript. It natively features two tokens — NEO and GAS. While the first one represents governance rights over the network’s development, the second one serves as fuel for smart contracts executed in NeoVM. As for the consensus mechanism, it started of with a DPoS but in 2019 decided to redesign the whole network in the form of NEO 3.0. Which is built upon delegated byzantine Fault Tolerance (dBFT) that makes the network more resistent against chain forks, at the cost of increased centralization.


Waves launched in 2016 with, at the time, interesting features like on-chain governance, formal verification of smart contracts and a its own variation of PoS called Leased PoS. Unlike Ethereum, it features fixed transaction fees. Also, the platform introduced a new programming language, inspired by scala, created specifically for Dapp development, named Ride. Interestingly, the protocol adopted a flavor of the Bitcoin-NG protocol for scaling. Over time Waves had some cooperation with corporations such as Microsoft and Deloitte. In 2019 Waves introduced a change in the emission schedule from fixed to inflationary.


VeChain is another smart contract platform that started quite early, in 2015, as a fork of Ethereum. The crowdsale was conducted in 2017, and the network launched a year later. VeChain has been designed from beginning to provide supply chain management solutions and to integrate with IoT devices. Its blockchain, named Thor, utilizes Proof-of-Authority (PoA) mechanism relying on masternodes for transaction validation. It also deployed dual token model where the VET token serves as the primary medium of exchange for governance and payments, and the second token — VeThor (VTHO) is used for executing smart contracts, and lower transaction fees on the network.


NEM is one of the earlier smart contract networks that was released into production already in March 2015. It has been built as a open-source blockchain that features also a private, permissioned ledger optimized for enterprise-grade performance to serve different markets and industries. It deploys quite unusual and unique consensus algorithm named Proof-of-Importance (PoI) that blends staking with the concept of coin aging, and calculating the “importance” index for each node in the network. In early 2019, the NEM foundation, a community-funded non-profit behind the project, announced it was on the edge of going bankrupt which resulted in in a massive restructuralization of the whole organization.


Holochain is one of the platforms that aims to achieve similar goals as Ethereum and its challengers but does so through a different architecture. It does not deploy blockchain, but rather a distributed hash table system that is similar to BitTorrent. The team describes it as a “asset-backed mutual-credit crypto-accounting system”in which distributed network of hosts and users share computing power to host dapps. Interestingly, it does not feature a network-wide consensus. Instead, peeps use “gossiping” to share data, and reject them individually if rules are broken. Its token — HOLO — resides on Ethereum as an ERC20 unti migration.


Tomochain is one of many public blockchains that are compatible with Ethereum Virtual Machine. It features lower fees and faster transaction confirmation times. This comes at cost of decentralization as it relies on a system of 150 masternodes with Proof-of-Stake Voting (PoSV) consensus. The project raised $8 million in their 2018 ICO.


Founded in 2017, Ziliqa was one of the first platforms to implement a sharded architecture in the blockchain space. It used sharding for processing, but not for storage though. It is quite unique as it features its proprietary programming language Scilla which is not Turing-complete, and a hybrid Proof-of-Work-BFT consensu mechanism that since July 2020 also supports staking. Its team plans to focus on research and implementation of other new technologies such as state sharding, storage prunning, privacy-preserving computation as well as further security improvements to PoS.


Ontology is another smart contract platform but with a twist — focus on self-sovereign identity and data management. It features a dual token system — ONT and ONG. While the former is used for staking, and thus contributing to the network security and decision making, the latter pays the transaction fees. Its chain was launched in 2018, and it shares the founders with NEO as the two are part of the same ecosystem. The network has its own consensus mechanism — VBFT which is based on the verifiable random function engine. It support multiple virtual machines including WASM VM or NeoVM. Its blockchain stack further includes sharding as well standard protocol for cross-chain communication.


Celo has been one of the more recent projects that aims to bring blockchains to the mainstream as it uses phone numbers as public keys. It is also optimized for mobile users as its blockchain features block headers that can be synchronized on phones very fast. Interestingly, it features a native stablecoin - Celo Dollars (cUSD) which may be optionally used for paying the transaction fees. The network uses Proof-of-Stake consensus.


Qtum is a Proof-of-Stake chain that combines properties of Bitcoin and Ethereum. It takes the codebase of Bitcoin, and therefore utilizes a UTXO model, while it also supports the Ethereum Virtual Machine. It features also a middleware layer named the account abstraction layer (AAL). The team plans to add support for other virtual machines such as X86. While the network is focused on on-chain governance, it features also process for off-chain protocol changes.


Aeternity was founded by the “Godfather of Ethereum” Yanislav Malahov. Its niche is in natively integrating data oracles and state channels in its blockchain. It features a hybrid PoW consensus based on Cuckoo Cycle and Proof-of-Stake. Initially, the platform used Erlang as the programming language of choice as the language creators has overlap with the Aeternity’s team. It further features an EMV-compatible virtual machine called Aeternity Ethereum Virtual Machine (AEVM). The team later on developed a new programming language Sophia as well as a new virtual machine — Functional Typed Warded Virtual Machine (FTWVM). Aeternity is built around a design principle where smart contracts are executed on-chain but the data is stored off-chain.


Radix is a decentralized network focused on DeFi use cases. It features a novel PoS consensus algorithm named Cerberus, and its own smart contract execution environment named the Radix Engine. The protocol is built upon the previous work of its founder Dan Hughes who has been experimenting with different scaling solutions and data structures such as DAGs, Block Trees, or Channel Asynchronous State Trees. The particular data structure used in Radix is called Tempo. Its mainnet is anticipated some time in 2021.

Casper Labslink

Casper is one of the recent permissionless smart contract blockchains that aims to support application development and scalability. At its core it features CBC Casper-based Proof-of-Stake consensus protocol called Highway and a parallel execution engine. The consensus is built largely upon the work of Vlad Zamfir on correct-by-construction (CBC) mechanism researched initially for its potential implementation in Ethereum. The mainnet has been anticipated for Q1 2021.


Nervosa is another public permissionless blockchain that features a twisted PoW consensus algorithm dubbed NC-Max that can adjust mining difficulty in response to the network conditions. This means the netework can increase its throughput when nodes are well-connected, or reduce it if rate of orphan blocks increases.


Dfinity aims to compete mainly with traditional IT stack even though it features EVM compatibility and it labeled itself as “Ethereum’s crazy sister” and the Internet Computer. It aims to be powered by independent data centers rather than miners which resembles somewhat permissioned network model. It further features on-chain governance and its own new language called Motoko which is purportedly optimized for creating tamper-proof software, and was created by the same person — Andreas Rossberg — who co-created WebAssembly we mentioned earlier in this chapter. Dfinity’s team consists of many former big tech employees and is lead by Dominic Williams. The platform introduced also Threshold Relay that applies cryptography to create an almost incorruptible source of randomness, and that is part of its consensus mechanism. While Ethereum optimizes for availability of data, Dfinity aims to maximize scalability and speed as its architecture divides consensus, validation, and storage into separate layers. The company also raised hefty sums from VCs such as Polychain Capital and Andreessen Horowitz. The network launch is expected in December 2020.


Flow is one of the latest platforms launched in 2020 by Dappers Labs — the company known for creating Cryptokitties. Smart contracts on Flow are written in the new programming language Cadence that builds upon the concept of resource-oriented programming. The node software is written in Go, though. Its architecture is unique in that it features four different validator roles and each of them requires staking. Also, it allows developers to upload smart contracts in a “beta state” in which they can be upgraded incrementally, and users are informed about it. As for the consensus, Flow implements HotStuff.

Developers Activitylink

Hype cycles in the crypto space are present -- whatever lenses we use to look at it. Price, VC funding, media interest, or developers activity. An increase in the price of crypto assets naturally attracts more developers to join the ecosystem. As hype cycles perpetuate developers come and go, and the crypto ecosystems are born and perished. Nonetheless, crypto space grew significantly in the last years when it comes to the developer ecosystem. From around 1000 active developers in 2015 to almost 10 000 in 2020. In late 2020, there are around 900 active ecosystems (at least 1 commit per month in one of their repositories) within the crypto space.

An amazing glimpse of the evolution of the developers landscape in crypto offers a meticulous analysis conducted by Electric Capital that indexed over 27 000 code repositories to provide a clear overview which crypto ecosystems grow and how much. Their data for the first half of 2019 show that the number of full time developers in the crypto space increased roughly by 30-40% compared to the same period in 2018 with Ethereum and Bitcoin being by far the most robust developer ecosystems. According to the report, the Ethereum ecosystem counted approximately 1200 monthly active developers and Bitcoin over 300. During the researched period, the EOS ecosystem counted over 200 developers and protocols such sa Stellar or Cardano had been contributed by roughly hundred active developers every month. The total number of monthly active crypto developers has oscillated at around 8500. For illustration, there were around 1900 active developers for Linux Kernel at the same time.

The year 2020 too brought some interesting trends and patterns, according to their data. The count for the new developers that join the space every month grew by 15% in 2020. The strongest ecosystems include Bitcoin, Ethereum and some of its competitors as well as DeFi. Compared to 2017, the amount of Bitcoin monthly active developers increased 70% during 2020 and oscillates at around 350 since 2018. Out of those, something over 110 developers contribute frequently -- at least 10 days per month.

The growth of Ethereum monthly active developers was even more significant. In the last three years their count increased over 200% from 740 to more than 2300. Also, from all the new developers that join the crypto space, around 25% contributes to Ethereum. But many developers are active in other ecosystems too. One of the biggest gainers in 2020 was Polkadot which doubled their developers count in the past year. While Polkadot is the third biggest crypto ecosystem with hundreds of active developers we could see a spark in developer's activity in smaller ecosystems as well. Solid gains in developer count throughout 2020 were marked in the ecosystems of Chainlink, The Graph, Oasis, Near, Avalanche or Celo. On the other hand, some ecosystems lost developers, the biggest outflow experienced EOS, XRP, Steemit, and Waves. A similar story is told also by another research conducted by Outlier Ventures, analyzing the first part of 2020, that suggested some other ecosystems such as Bitcoin Cash and Tron suffered big losses too.

Change in developers activity on selected protocols in the period from June 2019 to May 2020.
Change in developers activity on selected protocols in the period from June 2019 to May 2020.
Source: Theo Turner & Outlier Ventures

Another research report from Embark Labs suggested that 94% of all blockchain developers work with Ethereum, while working with other platforms too, but roughly half of them work solely with Ethereum. Interestingly enough, the same report inquires about developers' motivation to work in the space, only a third of them stated sound money and censorship resistance properties as their primary reason. At the same time, most of them expressed that they care about decentralization even though they acknowledged that users may not.

From a total of 900 active crypto ecosystems the Top 200 were able to maintain a stable count of developers or increase it. The rest is slowly losing the edge. Nonetheless, these numbers just underline a tremendous potential for growth in the coming years, and if the crypto space will be able to sustain the pace of growth that we had witnessed since 2016, we could expect the number of developers in the space to reach 100 000 by 2025. server claims to record, in its annual report, 1455 new dapps in 2019 that were launched out of which supposedly almost 700 was deployed on Ethereum and over 400 on Tron. Perhaps more surprising is the number showing that EOS dapps generated a volume of $5 billion throughout the year, almost 50% of all the value generated by dapps, and almost double of the volume generated by Ethereum. These numbers seem a little odd especially because of the fact that Ethereum has three times more dapps as well as active dapp users compared to EOS. These fewer EOS users did, however, interacted with dapps through 2,8 billion transactions, compared to barely 25 million transactions on Ethereum dapps.

2019 Dapp Market Summary - by blockchain
2019 Dapp Market Summary - by blockchain
Source: 2019 Annual Dapp Market Report

While we can just guess why so relatively few dapps with relatively few active users generated so many transactions of such an aggregated value there are hints that whatever is the reason behind it may not be a sustainable trend.It is worth to mention that there are significant discrepancies between different data sources on dapps. A different reputable source — State of the Dapps — shows quite a different number of dapps for both Ethereum (2709) and EOS (316) at the end of 2019. Similar discrepancies may be found in multiple other dapp stats from various sources so they need to be approached with a grain of salt.

A little bit different, and perhaps more accurate story is told by the most recent data from London researchers showing that those blockchains that has been in operation for roughly two years have hard time getting traffic to their networks. The analysis of traffic in the period between October 2019 and April 2020 suggests that some of the most prominent networks such as Tezos, EOS or XRPL Ledger (XRPL) are barely used for any valuable transactions. For the researched period, 96% of transactions on EOS were triggered by the airdrop of a valueless token. Similarly with Ripple’s XRPL, 94% of all transactions carried no economic value. This could be explained though with the good start of 2019 for EOS that followed by the continuous decline in developers as well as users interest towards the end of the year as well as throughout Q1 of 2020. The paper shows slightly better numbers in the case of Tezos where 76% of its throughput was related to its consensus mechanism. Yet, the numbers just underlie the nascent stage smart contract platforms are in.

The 2020 overview report by DappRadar suggests that EOS and Tron are still playing catch up despite a decrease in some metrics. According to their data, Dapp transaction volume surpassed $270 billion in 2020 and most of it belongs to Ethereum DeFi apps. Interestingly enough, however, out of 1353 reported new dapps that were submitted to DappRadar during 2020, only 32% run on Ethereum. According to their data, Polkadot and Binance Smart Chain are amongst the top dapp contenders. Overall, the third decade of this millenia will certainly bring us interesting stories to watch. The proliferation of the global uncensorable networks that will eventually merge into a singular fabric that will become the major underlying infrastructure for any kind of assets.

Jesse Walden, partner at Andreessen Horowitz described the evolution of blockchain platforms analogously to the one of computing in the following four phases:1. Calculator Era — Application specific with limited composability (Bitcoin)2. Mainframe Era — Turing-complete with high composability (Ethereum)3. Server Era — application specific with punt on composability (Polkadot, Cosmos)4. Cloud Era — Turing-complete with scalable composability (Ethereum 2.0, Dfinity)

There are good reasons to believe that truly decentralized, highly scalable and composable blockchains will be the backbone of the new Internet. The Internet where users can take back control over their data and preserve their privacy. The Internet where they are free to transact without asking for permission and where there is no space for censorship. Such an Internet will foster the freedom of interaction amongst empowered individuals. At the same time, there are good reasons to believe that no single platform, at least at its core protocol, will be able to cope with the traffic needed to handle these interactions. Plurality of networks, and technological as well as philosophical approaches is desirable and ultimately what makes the new foundational infrastructure of Web 3.0 resilient and antifragile. Resistance from the entrenched incumbents is to be expected, but the power of openness will not succumb to them.

Chapter 09
00 — Intro