Abstract
Ethereum Improvement Proposal 1559 (EIP-1559) introduced a major transformation in the blockchain’s fee mechanism. Designed by Vitalik Buterin and the Ethereum research team, this update moved Ethereum away from a pure auction-based gas model to a hybrid system with a dynamically adjusting base fee, improving transaction predictability, network efficiency, and user experience.
For developers, understanding EIP-1559 is critical — it affects transaction construction, wallet design, and miner economics. This article deconstructs the mechanism mathematically and provides code-level insights for accurate implementation.

Conceptual Background
Before EIP-1559, Ethereum relied on a first-price auction model: users bid gas prices, and miners picked the highest-paying transactions. This caused fee volatility and poor UX.
EIP-1559 replaced this with:
A base fee: burned automatically, adjusting per block based on demand.
A priority fee (tip): paid directly to miners/validators.
Block elasticity: temporary gas expansion to manage bursts.
Core Equation
newBaseFee=parentBaseFee×(1+targetGasUsed(gasUsed−targetGasUsed)÷BaseFeeChangeDenominator) targetGasUsed = blockGasLimit / 2BaseFeeChangeDenominator = 8Base fee adjusts by up to ±12.5% per block.
System Overview

Step-by-Step Walkthrough
1. Transaction Fields
EIP-1559 introduced a new transaction type (type 0x02) with the following fields:
{
"type": "0x02",
"chainId": 1,
"nonce": 42,
"maxPriorityFeePerGas": "0x59682f00",
"maxFeePerGas": "0x2540be400",
"gasLimit": "0x5208",
"to": "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
"value": "0x9184e72a",
"data": "0x",
"accessList": [],
"v": "0x0",
"r": "0x0",
"s": "0x0"
}Developers must ensure maxFeePerGas ≥ baseFeePerGas + priorityFee.
EffectiveGasPrice:
effectiveGasPrice=min(maxFeePerGas,baseFee+priorityFee)2. Base Fee Adjustment
def calculate_next_base_fee(parent_base_fee, gas_used, gas_limit):
target_gas = gas_limit // 2
if gas_used == target_gas:
return parent_base_fee
delta = parent_base_fee * (gas_used - target_gas) // target_gas // 8
return parent_base_fee + deltaIf blocks are >50% full, base fee increases; if underused, it decreases.
3. Gas Burn
Each block burns the base fee in ETH:
burned = base_fee * gas_used
eth_supply -= burnedThis creates deflationary pressure when network usage is high.
4. Miner/Validator Rewards
Only the tip (priorityFee) goes to miners. The base fee is burned.
miner_reward = priority_fee * gas_used + block_reward
Join the conversation! Your thoughts help the community grow.