✖

Ethereum: smart contracts and proof of stake

Ethereum is the second-largest cryptocurrency network after Bitcoin. Like Bitcoin it has no bank: it records payments in batches called blocks in a shared ledger, a copy of which is held by thousands of computers, and rules determine who may add the next block. The currency of Ethereum is called ether (ETH). The main idea was set down by the programmer Vitalik Buterin as early as November 2013, and the network started running on 30 July 2015: the ledger does not have to contain only who sent money to whom, a program can also run in it, a so-called smart contract.

Ethereum belongs in the series on the maths of Bitcoin for two reasons. It is the only network of comparable size, and yet it secures itself in a completely different way. In Bitcoin a block is added by whoever wins a computing lottery, and that is called mining: computers try billions of numbers a second, and whoever finds a winning one first may add a block. Ethereum gave up mining in 2022 and bet on a lottery in which what decides is not electricity but staked ether. In one sentence: Ethereum is a shared ledger like Bitcoin, except that programs run in it too, and honesty is policed not by burnt electricity but by money that a fraudster would lose. That makes it a neat way to calculate what each approach costs and where its weaknesses lie. And because ether has no fixed cap like Bitcoin’s 21 million coins, we will also show how much of it is created and how much disappears.

Smart contracts and gas

Bára is raising money for a new guitar amplifier and wants to collect it on a blockchain. She does not have to trust anybody; she only has to write a program: “Whoever sends ether to this address, I will record it. If at least 10 ETH has come in altogether by 31 December, I will send all of it to Bára. If not, I will return to everybody what they sent.”

Such a program is called a smart contract. It is a piece of code stored directly in the ledger that runs by itself when somebody sends it a payment, and that nobody can change or stop, not even Bára. The money does not lie with her but in the contract. If there is a bug in the code, the contract behaves exactly according to it and nobody can fix it afterwards, which is why bugs in contracts tend to be expensive. In practice, the same principle underlies exchanges of one cryptocurrency for another, loans against collateral and fundraisers.

A contract as a machine. On the left three arrows with payments of 3, 5 and 4 ETH lead into a blue rectangle with the condition Σ ≥ 10 ETH. Two arrows lead out of the rectangle: a green one to B when the condition is met, a red one back to the donors when it is not. A contract as a machine. On the left three arrows with payments of 3, 5 and 4 ETH lead into a blue rectangle with the condition Σ ≥ 10 ETH. Two arrows lead out of the rectangle: a green one to B when the condition is met, a red one back to the donors when it is not.

The program is run by every computer in the network. So that nobody can flood the network with an endless loop, every step of the calculation, every instruction, is paid for separately. The work is measured in units called gas. Sending ether to an ordinary address always costs exactly 21,000 gas, running a more complex contract more. The price of one unit of gas is quoted in gwei, which is a billionth of an ether.

Accounts work as in Bitcoin. An account is an address derived from a public key, and you confirm a payment with a signature that only the owner of the secret private key can produce.

Proof of stake instead of mining

Until September 2022 Ethereum was secured in the same way as Bitcoin, by proof of work: a block was added by whoever first found a number that made the hash of the block small enough. For that they needed machines and electricity. Anyone who wanted to rewrite history needed a majority of the computing power. Such an attacker can rewrite recent blocks and spend the same money twice, as we discussed in the part on the 51% attack.

The turning point came on 15 September 2022 with an event called The Merge. Ethereum switched on the fly to proof of stake. According to ethereum.org, the network’s energy consumption fell by more than 99.9% as a result: from about 21 TWh a year to 0.0026 TWh. Instead of miners, blocks are now added by validators. A validator is a computer whose owner has staked ether in the network as a deposit: as long as it behaves honestly, it receives a reward for its work, according to ethereum.org about 2.5% a year as of December 2026. A validator that merely drops offline loses small rewards; only one that cheats loses its deposit. The minimum stake is 32 ETH. Since the Pectra upgrade (7 May 2025) one validator may hold up to 2,048 ETH; anything above that does not count in the lottery.

Time in Ethereum is measured out by slots, each exactly 12 seconds. In every slot the network draws one validator who may propose a block. The other validators then vote: each signs which block it considers valid. Votes are weighted by stake, and when validators holding two thirds of all the staked ether agree on a block, the block becomes final: in normal operation that takes just under 13 minutes, and from then on only someone willing to destroy an enormous sum of money could reverse it. Why exactly two thirds: two opposing groups, each with two thirds, always have at least a third in common. We will work that out two sections further on.

Two strips one under the other on the same ten-minute time axis. At the top one long orange rectangle BTC labelled 10 min, below it a row of fifty small blue squares ETH, each 12 s long. Two strips one under the other on the same ten-minute time axis. At the top one long orange rectangle BTC labelled 10 min, below it a row of fifty small blue squares ETH, each 12 s long.

In the ten minutes in which Bitcoin creates one block on average, Ethereum goes through

600s12s=50

slots. The rhythm differs too: Bitcoin blocks arrive irregularly, depending on who is lucky in the lottery, whereas Ethereum’s slots tick like a clock.

A lottery by stake

How is the validator who proposes a block chosen? Before every slot an imaginary wheel of fortune is spun. Every validator has a segment on it that is bigger the more ether it has staked.

A wheel of fortune with three segments: the blue A with 32 ETH takes up an eighth of the circle, the green B with 96 ETH three eighths and the red E with 128 ETH a half. At the top an orange arrow points. A wheel of fortune with three segments: the blue A with 32 ETH takes up an eighth of the circle, the green B with 96 ETH three eighths and the red E with 128 ETH a half. At the top an orange arrow points.

The picture shows a small network with three validators. Adam has staked 32 ETH, Bára 96 ETH and Eva 128 ETH, 256 ETH altogether. The chance that the slot falls to Adam is his share of the whole:

32256=18.

Bára has 96256=38 and Eva 128256=12. The rule is the same as in mining, except that what decides is the share of the stake, not the share of the computing power.

Let’s move on to the real network. On 5 December 2026, according to the explorer validatorqueue.com, there were about 730 thousand active validators and about 44.6 million ETH staked. A validator with the minimum 32 ETH therefore proposes a block in a given slot with probability

3244,600,000≈11,394,000.

One in just under a million and a half per slot looks hopeless, but there are a great many slots. In a day there are 24⋅360012=7200 of them and in a year

7200⋅365=2,628,000.

The average number of blocks a year is the number of slots times the chance in one slot:

2,628,000⋅3244,600,000≈1.9.

A validator with 32 ETH therefore proposes just under two blocks a year on average. It can be unlucky, though: the chance that it gets no block in a given slot is 1−11,394,000, and for it to get none in a whole year, that has to happen 2,628,000 times in a row. Slots are independent of each other like rolls of a die, so the chances are multiplied and a calculator works out the result:

(1−11,394,000)2,628,000≈0.15.

Roughly one small validator in seven therefore does not propose a single block all year. That does not mean it earns nothing: besides proposing blocks it also earns a reward for voting, which comes round every 6.4 minutes. A validator with the full 2,048 ETH has a 64 times greater chance, which comes to about 121 blocks a year.

How the stake is divided does not matter, by the way. Someone with 64 ETH can run two validators of 32 ETH or one with 64 ETH, and in both cases expects 3.8 blocks a year on average. That is why validators have been allowed to merge since the Pectra upgrade, and the average validator today holds about 44,600,000730,000≈61 ETH, not 32.

What an attack would cost

A 51% attack on Bitcoin needs more computing power than the rest of the network has: as of December 2026 millions of machines and electricity from about six large nuclear power stations. An attacker on Ethereum looks for staked ether instead of machines. How much must they have?

The important threshold is not only two thirds but also one third. Whoever holds more than a third can stop finality: they simply do not vote, and nobody else can reach two thirds. Blocks keep being added, only none of them becomes irreversible. That will not last long, though: the network gradually drains the deposits of the validators that do not vote until the honest ones again have two thirds, so even this attack costs ether. With 44.6 million ETH staked, that is

44,600,0003≈14.9 million ETH.

For a majority in ordinary voting, the counterpart of the 51% attack, half is needed, 22.3 million ETH. And whoever wanted to finalise anything on their own, say their own version of history, needs two thirds:

23⋅44,600,000≈29.7 million ETH.

For comparison: that is a quarter of all the ether in the world.

The most interesting question is what happens when somebody tries to reverse a final block. Say that Eva is after a double spend: she wants to pay with the same ether twice, finalising first a block in which she pays Adam and then another block in which she pays herself. Both blocks need the votes of two thirds of the stake. But two groups, each with two thirds of the whole, must overlap:

23+23−1=13.

A strip divided into thirds. A blue bracket above it covers the left two thirds, a red bracket below it the right two thirds. The middle third, where the brackets overlap, is orange and labelled 1/3. A strip divided into thirds. A blue bracket above it covers the left two thirds, a red bracket below it the right two thirds. The middle third, where the brackets overlap, is orange and labelled 1/3.

At least a third of the stake must therefore have voted for both blocks at once, which the rules forbid. Two contradictory signatures by the same validator are irrefutable proof of fraud, and anyone can report it to the network. The network expels such a validator and as a punishment its deposit is forfeited (slashing). The forfeited ether is destroyed; nobody receives it. The more validators cheat at once, the more they forfeit, and for fraud on such a scale they lose their whole stake. Reversing a final block therefore costs at least a third of all the staked ether, about 14.9 million ETH, and that money does not come back.

This is where Ethereum differs from Bitcoin most. A miner who loses a 51% attack is left with the machines and can try again. An attacker in Ethereum forfeits the staked ether and has to pay again for a second attempt. What is more, the signatures show exactly which validators cheated. None of this changes what an attacker with a majority cannot do: steal other people’s ether without the private key, in Ethereum just as in Bitcoin.

Burning fees

Back to gas. The price of one unit of gas in Ethereum is not decided just by who bids more. Since the London upgrade of 5 August 2021 (rule EIP-1559) every block has a base fee, which the network sets itself. The network aims for blocks that are half full, that is, 30 million gas out of a maximum of 60 million. When a block is fuller, the base fee rises in the next block; when it is emptier, it falls, by at most an eighth, that is, 12.5% per block.

But the validator does not receive the base fee. It is burnt: the ether that paid it simply disappears and belongs to nobody. The validator is left only with a voluntary tip on top.

For an ordinary transfer of 21,000 gas and a base fee of 10 gwei it comes to:

21,000⋅10 gwei=210,000 gwei,

210,000 gwei=0.00021 ETH.

That much ether vanishes from the world through that transfer. It is little, but there are 7,200 blocks a day and hundreds of payments in each. In the more than five years since burning was introduced, according to the Etherscan explorer about 4.65 million ETH has been burnt.

At the beginning of December 2026 the base fee averaged only 0.15–0.2 gwei, so a transfer burnt more like 0.000003–0.000004 ETH. Burning fluctuates strongly, though, and on busy days ten or more times as much is burnt as on ordinary ones. In the 365 days up to 5 December 2026, according to Etherscan, about 24,000 ETH was burnt. Most of the 4.65 million was therefore burnt in earlier years, when the network was overcrowded and fees much higher.

Why ether has no cap

The rules of Bitcoin say that there will be at most 21 million bitcoins and that the block reward is halved every four years. Ethereum has no such number. New ether is created as a reward for validators and will keep being created for as long as the network runs. As of 5 December 2026, according to Etherscan, there is about 122.3 million of it.

How much is added? The reward rules are built so that new issuance follows the square root of the total stake. From the specification it follows that when all the validators work without error, about

166⋅S ETH,

is created in a year, where S is the staked ether. The square root means that when the stake quadruples, the rewards only double and every validator earns half as much per ether. The network thus attracts validators while there are few of them and does not hand out too much when there are many.

We can check this against a figure from ethereum.org, according to which with a stake of about 14 million ETH around 1,700 ETH a day was created. Substituting:

166⋅14,000,000365≈166⋅3742365≈1700.

It agrees. And for today’s 44.6 million ETH:

166⋅44,600,000≈166⋅6678,

166⋅6678≈1.11 million ETH a year.

A graph of the annual issuance of ether depending on the staked ether S from 0 to 60 million. The blue square root curve rises from zero to about 1.3 million ETH a year. The orange point is at today’s 44.6 million and 1.11 million ETH a year. Near the bottom edge lies a red band of annual burning of around 24 thousand ETH. A graph of the annual issuance of ether depending on the staked ether S from 0 to 60 million. The blue square root curve rises from zero to about 1.3 million ETH a year. The orange point is at today’s 44.6 million and 1.11 million ETH a year. Near the bottom edge lies a red band of annual burning of around 24 thousand ETH.

The balance of ether is thus like a bath with the tap on and the plug out. Through the tap at most 1.11 million ETH a year flows in, through the plug about 24 thousand flows out. The outflow covers only about a fortieth of the inflow, and the amount of ether grows by about

1,110,000−24,000=1,086,000 ETH,

that is, by about 0.89% a year out of 122.3 million.

When would inflow and outflow balance? At the beginning of December 2026 blocks in Ethereum used about 30 million gas on average, so 7200 · 30,000,000 = 2.16 · 1011 gas a day. For as much to be burnt as is created, that is, about 3,040 ETH a day, the base fee would have to be

3040 ETH2.16⋅1011≈14⋅10−9 ETH=14 gwei.

At 14 gwei per gas the amount of ether would stay put; above that it would shrink. At fees below one gwei it grows. How much ether there will be in ten years, nobody knows: it depends on how many people use the network. With Bitcoin it can be calculated down to the satoshi.

Ethereum and quantum computers

Account signatures in Ethereum rest on elliptic curves just as in Bitcoin, and a sufficiently large quantum computer could handle them too. How Ethereum is preparing for that and how its plan differs from Bitcoin’s is described in the section How Ethereum handles it in the part on post-quantum Bitcoin. Validators also sign votes with a different kind of signature, and those would have to be replaced too.

See also

Chapters: Bitcoin: what it is and how it works, The Bitcoin halving: why there are only 21 million bitcoins, Bitcoin mining: how proof of work works, Blockchain and the Merkle tree: how it works and why history cannot be rewritten, The Bitcoin address, private key and signature, Seed phrase: why nobody can guess the 12 words of a wallet, Ethereum: smart contracts and proof of stake, Is Bitcoin secure? What its cryptography rests on, The 51% attack: can Bitcoin be spent twice?, Quantum computers and Bitcoin: what if elliptic curves fell, Bitcoin and SHA-256: what if the hash function fell, Post-quantum Bitcoin: how Bitcoin would defend itself against quantum computers