
Staking and Protocol Security: The Backbone of Blockchain Safety
7 min read
- Technology
Consensus mechanisms play a crucial role in blockchain technology given its decentralised nature. They validate transactions, ensure the entire network shares the same ledger and protect against attacks by incentivising responsible behaviour among participants.
One of the most commonly used consensus mechanisms is proof of stake (PoS). This article explores PoS through the lens of Ethereum, the second-largest protocol by market capitalisation, and explains how it secures the network.
Basics of Blockchain Security
Three principles underpin blockchain security:
Immutability: nobody can change or modify transactions processed and recorded on a blockchain. Each block contains a hash- a fixed-length string created by a cryptographic algorithm- representing all of its transactions and those stored in the previous block.
Decentralised: no single authority controls the network. Participants known as nodes are responsible for validating and keeping a record of transactions. Even if multiple nodes fail, the network can continue operating.
Consensus: the whole network must agree on the latest state of the ledger, achieved using a consensus mechanism.
A PoS consensus mechanism requires nodes called validators to ‘stake’ (lock up in a smart contract) a specific amount of a protocol’s native token for the chance to be randomly selected to process the next block of transactions. The higher the size of a validator’s stake, the greater its odds of getting selected. Other nodes called attesters confirm the validity of each block.
Ethereum switched from a proof of work (PoW) mechanism to PoS in September 2022. The main reason for the Merge, as the crypto community dubbed it, was to improve scalability and reduce the protocol’s energy consumption. The minimum stake for validators on Ethereum is 32 ether, and the network uses a random number generator algorithm to select a new validator every 12 seconds.
Security Mechanisms in Ethereum 2.0
Ethereum incentivises good behaviour by paying block rewards, which validators earn for participating in the consensus mechanism and securing the network. They’re paid in proportion to the balance of a validator’s stake and come in two forms:
The protocol pays consensus rewards to validators, attesters and ‘sync committees’ which ensure all nodes have the latest version of the ledger. These rewards are the primary source of newly issued ether.
Validators earn execution rewards through transaction fees, known as gas fees, tips paid by users to encourage validators to include their transaction in the next block, and for fulfilling maximal extractable value requests to include, exclude or reorder transactions in a block.
Learn about Ethereum staking yields.
The protocol also penalises validators to discourage misbehaviour. Nodes pay minor penalties for being offline but more severe offences can lead to ‘slashing’, where a portion of a validator’s stake, starting at one ether, is removed from circulation or ‘burned’. These penalties can ultimately cost a validator its entire stake.
Three offences warrant slashing:
Proposing and signing two different blocks in the same slot (the 12-second window during which a validator proposes a new block of transactions)
Attesting a block that contradicts the records held in an earlier block
Attesting two different blocks for one slot
To discourage collusion, the network may impose a further penalty if a number of validators commit the same offense within a few days.
Enhancing Security in Ethereum 2.0
Two metrics used to measure a PoS mechanism’s decentralisation, and therefore its security, are validator numbers and the percentage of its native token’s total circulating supply that is staked (networks with a higher percentage are harder to hack). According to data analyst Dune, Ethereum has 1,074,669 validators (as of 10th of September 2024) and the number has steadily risen since the Merge. Dune also estimates that 28,07% of the circulating supply of ether is staked (as of 10th of September 2024).
Compared with other PoS blockchains, Ethereum is highly decentralised in terms of validator numbers, although it ranks low based on the percentage of native tokens staked.
Another way Ethereum maintains security is by regularly updating the network. The latest upgrade, Dencun, which activated in March 2024, addressed scalability and efficiency. It implemented several Ethereum Improvement Proposals (EIPs), a key element of the protocol’s governance framework as community members submit, discuss and come to a consensus about their implementation. The most important of these proposals was EIP-4844, which introduced proto-danksharding, the first step in adding ‘blobs’ to blocks.
Ethereum also conducts regular audits to test the network’s security. It recently partnered with Web3 bug bounty platform Immunefi to offer a reward pool of over $500,000 to researchers who could detect weaknesses in the protocol.
Addressing Common Misconceptions
One criticism levelled at PoS is that a few well-resourced validators can dominate the consensus mechanism, increasing the network’s centralisation. However, 32 ether is both Ethereum’s minimum and maximum stake. As a result, even the biggest participants, such as Lido (a staking pool accounting for 28,37% of ether staked as of 10th of September 2024) must set up multiple validators, which promotes decentralisation.
This cap also ensures an even distribution of rewards over time. Unlike bitcoin’s PoW consensus mechanism, which requires costly computing power, Ethereum’s PoS protocol is more of a level playing field. The barriers to entry in terms of computing resources are low, and validators receive rewards proportional to the cap, regardless of the size of their overall holdings. Furthermore, the rewards are based on a standard of performance that’s relatively easy to achieve: behaving responsibly (unpenalised validators have a better chance of getting selected) and maintaining uptime.
Conclusion
Ethereum is the highest-profile PoS protocol, having transitioned from PoW in September 2022. Validators must stake 32 ether for the right to be randomly selected to process transactions. In return, they receive block rewards proportional to the value of their stake. The protocol also penalises bad behaviour.
Decentralisation is key to Ethereum’s security. Compared with rival PoS protocols, it ranks highly in the number of validators but relatively low in terms of the percentage of ether staked, two metrics for measuring decentralisation. Other ways Ethereum maintains security include regular network upgrades and audits.
One of the main criticisms levelled at Ethereum is the potential centralisation caused by a few dominant validators. But the 32 ether cap serves as a counterbalance, while also ensuring a fair distribution of rewards.