Bitcoin and Ethereum Miner Revenue Explained
Grab a cup of tea or a coffee, the world of miner revenue takes a bit of explaining …
☕ ☕ ☕
Bitcoin
Bitcoin is nice and simple; for every block the successful miner gets 6.25 newly created bitcoin and collects all transaction fees from the transaction in the block.
Or at least they do for 210,000 blocks before the block reward will halve again and then they get 3.125 BTC. Oh, and initially they got 50 BTC per block successfully mined. But in the year 2140 they won’t get any new bitcoins because the reward will have kept halving and run out of the decimal places to halve any more.
Okay maybe Bitcoin isn’t so simple.
(Read the article linked below for the complex to become simple)
https://www.linkedin.com/pulse/why-only-ever-21m-bitcoins-tara-annison
However what is easier to understand is that the amount of money a miner can earn per Bitcoin block is:
block reward + transaction fees
The block reward varies deterministically (as noted above and fully outlined here) and the transaction fees fluctuate on network capacity vs demand.
Bitcoin Transaction Fees
One block on the Bitcoin blockchain is processed every c10 mins. This typically has around 2,000 to 2,500 transactions within (with the variability due to transactions being different byte sizes and a block limit of 1MB). As such if there are lots of transactions in the mempool (the waiting room for transactions) then they can’t all be processed in the next block then transaction initiator must include a sizeable fee to entice the miners to select their transaction over others in the mempool.
https://tara-annison.medium.com/what-is-a-mempool-f6a403d4871e
Let’s break this down with an analogy.
Imagine you are at a bus stop. There are 30 people waiting and only 20 seats on the next bus. When the bus arrives, instead of filing on in order of who was in the queue first, the bus driver has gone rogue and is letting those on first who are willing to pay her a tip. Those who pay the most will secure the 20 seats on the bus and those who don’t will have to wait for the next bus. If there are 200 people at the bus stop and you’re faced with waiting up to 10 buses then you are more likely to tip even higher than if the prospect of waiting is just two buses.
This is why the transaction fees will increase as the number of transactions in the mempool increases.
Average Bitcoin Transaction Fee
Bitcoin Mempool Size
The miner of a successful bitcoin block therefore claims the total of the block reward and transaction fees:
A healthy income of over $100k for 10 minutes work! Although it’s worth noting that for every successful block a miner finds, they will have expended energy trying to find many more unsuccessfully.
So how does miner revenue work on the Ethereum blockchain? Spoiler: It’s MUCH more complicated!
Ethereum
The total revenue per block which a miner can earn is:
Static block reward + transaction fees + uncle inclusion — burn fees
Let’s break this down….
Static Block Reward
This is a fixed amount of new Ether generated per block and is currently 2 ETH. Initially this was 5 ETH however in the late 2017 Byzantium hard fork this was reduced to 3, and then further decreased in the Feb 2019 Constantinople hard fork to 2 ETH. This last event was referred to as a “Thirdening” as a hat tip to the term “Halving” used to describe the regular block reward reductions on Bitcoin mentioned above.
Uncle Inclusion
When a miner successfully finds a block they relay it to the rest of the network to verify that they have correctly done so. However it’s possible that two miners solve the cryptographic puzzle at the same time, but only one block can ‘win’ to be part of the main chain. In the Bitcoin world when this happens one block is included on the main chain and the other is orphaned — with any transactions in it and not the successful block being returned to the mempool. In the Ethereum world this runner up block is referred to as an uncle block and can be referred in later blocks for the miner to pick up a reward. However just as in Bitcoin’s orphaned blocks, these transactions have not been processed and so do not result in a change of blockchain state.
The uncle inclusion value within the total fee therefore represents where a miner has included reference to an uncle block. They get 0.0625 ETH per uncle block with a maximum of two per mined block. In the above example we can see that the uncle inclusion value was 0.0625 which means the miner included reference to one uncle block. Which was: https://etherscan.io/uncle/0x75efa1f4dd901a913af49552b5d7d118a272d496b1ff0f73ae32216e350172dd
Uncle Reward
The uncle reward is then paid to the miner of the uncle block when it is referenced within a mined block. The miner receives an amount depending how soon after the block becomes a runner up it is included in a mined block.
Let’s consider this with another analogy….
Peter wins the 100m race and Amy comes second.
Steph then wins the next race which is the 200m and Joanne takes silver. If Amy is given her runner’s up medal now she will also get 1.75 ETH.
Thomas grabs gold in the 800m and Susan comes a close second. If we forgot to give Amy her medal up until this point then we’d give her only 1.50 ETH.
As such, with every race that Amy is delayed in collecting her medal the uncle reward reduces from 1.75 ETH down by 0.25 ETH.
In the example above we can see that the uncle reward is 0.75 ETH at position 0, so the uncle block was found in the previous mining race and then included straight away in this next block.
The concept of uncle blocks and their inclusion within mining fees may seem overly complex however the purpose is to encourage participation, since it’s not a one winner takes all race, and to improve security since the proof of work to mine even unsuccessful blocks is reflected, even in reference, within the main chain.
Transaction Fees
Like in Bitcoin, users must pay a transaction fee to the miners for them to include their transaction in a block. However where Bitcoin’s capacity is based on a block size of 1MB and each transaction has a byte size, blocks in Ethereum are limited based on how much computational they can do. Transactions then each have a computational intensity which is based on what operations it’s achieving. [Note: before the London hard fork, Ethereum blocks has a fixed max computational size but now it’s variable]
The term ‘gas’ is therefore a measure of how computational complex a transaction is to process.
Each transaction therefore contains a gas limit which is how much computational power you’re willing to expend on the transaction and a gas price which is how much you’re willing to pay for it.
Gas is priced in gwei (giga-wei) which is a denomination of Ether (10 ^ -9). Therefore instead of saying the gas price is 0.00000001 ether, you would say it is 1 gwei.
Fun Fact
The smallest unit of Ether, 0.000000000000000001 is called a ‘Wei’ as inspired by Wei Dai who created the early pre-bitcoin digital money ‘b-money’.
A simple transaction which is looking to send some Ether from one account to another will be 21,000 gwei
However a more complex transaction which is initiating token transfer will guzzle significantly more gas
In this second example you can see that the gas limit for the transaction was initially set at 199,216 but when the transaction was executed only 142,050 was required. The gas limit is therefore a maximum and any headroom is returned to the user.
Calculating the transaction fees in Ethereum used to be relatively simple since, like Bitcoin, they were based on network demand vs capacity. As such it was gas price * gas limit.
Easy peasy.
However in the Aug 2021 London hard fork (including the controversial EIP-1559), a re-vamped fee structure was put in place with the aim of making the fee rate more stable:
Gas price * (base fee + tip)
- The tip is given to the miner to entice them to include the transaction over others in the mempool 💰
- The base fee is calculated by comparing the size of the previous block with the target size and then the fee is adjusted by a maximum of 12.5% between blocks. Notably this fee is burned rather then paid to the miner 🔥
This is the final part of our miner revenue calculation, ‘burn fees’.
Therefore in our example:
The miner who successfully mined the block will receive
- 2 ETH for the static block reward
- 3.45697259715122459 ETH in transaction fees [Gas price * (base fee + tip)]
- 0.0625 ETH for the uncle inclusion
MINUS the 2.90528163211271942 for the burned ETH.
As a bonus, the miner of the uncle block gets 1.75 ETH.
🤑 🤑 🤑 strong revenue all round 🤑 🤑 🤑
However not you’ve got to grips with this, it’s probably a good time to mention that it will be all change when Ethereum upgrades to Proof of Stake …
https://www.linkedin.com/pulse/ethereum-merge-explained-tara-annison
Originally published at https://www.linkedin.com.