Welcome to G’s takes! If you’re reading this, but you’re not subscribed, sign up and have new articles sent straight to your inbox
Hello friends,
This is Part 2 of the Crypto Basics series, where I’ll explain the core components of crypto and blockchains.
On August 5th, 2021, Ethereum implemented one of the most critical updates in the network’s history called EIP1559. To understand the significance of the update, we first need to explore the basics of blockspace and transaction fees.
*This guide is based on Ethereum, but the majority of blockchains share similar dynamics*
Blockspace
The ultimate purpose of the entire mining industry is to serve as a decentralized, transparent clearinghouse for a single commodity: the blockspace.
Paradigm Research
Ethereum is a network of computers (nodes) that elect to run the Ethereum software to validate transactions. These transactions are batched into blocks to ensure that all participants on the Ethereum network maintain a synchronized state and agree on the precise history of transactions.
Ethereum limits the size of each block so that standard computer hardware can run an Ethereum node and validate transactions. One of the core principles behind blockchains is decentralization. Less stringent computer hardware requirements > more people can run Ethereum nodes > a more decentralized network. Today, more than 8,900 nodes operate the Ethereum network.
Ethereum utilizes a unit called ‘gas’ to limit the size of each block. Gas is the unit that measures the amount of computational complexity of a transaction. Complicated transactions involving smart contracts require more computational work than a simple payment. For example, posting collateral and borrowing USDC on Compound (a money-market protocol) consumes more gas than transferring Ether (ETH) to a friend.
Transaction Fees
Every transaction on the Ethereum network requires a transaction fee. Why are transaction fees required? Transaction fees:
Reduce spam and serve as a filtering mechanism to allocate resources to the highest value transactions
Compensate network participants for the resources they commit to the network (e.g. compute, electricity, storage)
Ethereum’s transaction fees are calculated by multiplying the gas price by the gas units required to execute the transaction.
The gas price is dynamic and changes based on supply/demand. The busier the Ethereum network, the higher the gas price. Before EIP1559, the fee market was determined by a dutch auction where users submit the gas price they are willing to pay to have their transaction processed. Miners process transactions ranked by the highest bid price because they keep 100% of the transaction fees paid in a successfully mined block. Remember, blocks have a gas limit, so miners are incentivized to include the highest value transactions.
The higher the bid, the faster the transaction will be processed.
Note: EIP1559 replaces this auction with an algorithmically determined price and introduces a “burn” mechanism similar to a stock buyback (see my follow-up post for details).
As mentioned, the complexity of the transaction determines the gas units required. Users set a ‘gas limit’ to indicate the maximum amount of gas they will spend on a transaction. This limit serves as a safety mechanism to protect you from depleting your funds due to buggy code (e.g. a circular loop) or a smart contract error.
A standard ETH transfer requires a gas limit of 21,000 units. If you set a gas limit below 21,000 units (e.g. 15,000 units), the transaction will fail. The gas limit is like the gas in your car. The miners will begin to execute your transaction, but they stop once you run out of gas. The transfer is canceled, and miners keep the 15,000 gas for the calculations performed.
Fortunately, crypto wallets automatically set the gas limit for you based on the transaction type.
Technical Note: Gas fees are denoted in gwei, which is a denomination of ETH. Each gwei is equal to 0.000000001 ETH (10-9 ETH). Instead of saying that your gas costs 0.000000001 ether, you’d say gas costs 1 gwei.
Fees & Scalability
Ethereum can only process ~30 transactions per second (TPS). For comparison, Visa processes over 1,700 transactions per second on average.
Ethereum’s low TPS can result in extremely high gas prices during times of excess demand for Ethereum’s limited blockspace. Demand spikes can result from a massive sell-off, a buying frenzy, a new product or token launch, etc. High gas prices make it economically infeasible for smaller transactions.
Coinbase and other centralized exchanges charge transaction fees based on the dollar value of the transaction; Ethereum charges on transaction complexity.
Buying ten tokens on Uniswap will cost the same amount of gas as buying one hundred tokens. The complexity is the same; the only difference is adding an extra zero. Coinbase charges ~10x the amount for the extra digit in their database 💰.
Ethereum developers are working on multiple solutions to enable a higher TPS without compromising Ethereum’s decentralization. These solutions should lower gas prices by increasing Ethereum’s capacity and transaction density.
Scalability solutions are vital to ensure users do not flock to cheaper, often more centralized, platforms like Binance Smart Chain (BSC).
Props if you made it this far! Discussing blockspace and fees are NOT the most exciting topics in crypto, but they’re fundamental.
Don’t miss the follow-up post on EIP1559 that will discuss Ethereum’s improved fee design and new “stock-buyback” policy. It’s bullish 🔥
See you next time!
Garrett
Hey man, is there a way to use electricity instead of gas?