Overview
EIP-1559 revolutionizes transaction fee mechanics by replacing the single gas price auction model with a dual-fee structure. This creates more predictable fees and improved network efficiency for EVM-compatible chains.Core Concepts
Dual-Fee Structure
Before EIP-1559, fees were simple:baseFee
: Protocol-determined minimum price per gas unitpriorityTip
: Optional fee for transaction prioritization
The Cosmos SDK uses different terminology than Ethereum. What Ethereum calls
gasLimit
is gasWanted
in Cosmos. You’ll encounter both terms in the Cosmos EVM as it bridges Ethereum and Cosmos SDK concepts.Base Fee Mechanism
The base fee is the minimum price per unit of gas required for transaction inclusion. It automatically adjusts each block based on network utilization.Adjustment Formula
- Increases when
gasUsed > gasTarget
(congested) - Decreases when
gasUsed < gasTarget
(underutilized) - Remains stable when
gasUsed == gasTarget
(optimal)
Example Calculation
With standard Ethereum parameters:- Current base fee: 1000 units
- Block capacity: 10M gas
- Target (50%): 5M gas
- Actual usage: 8M gas (80% full)
- Denominator: 8
Target Utilization
The target utilization determines the optimal block fullness:ElasticityMultiplier = 2
: 50% target (Ethereum standard)ElasticityMultiplier = 4
: 25% target (aggressive pricing)ElasticityMultiplier = 1
: 100% target (maximum throughput)
Priority Tips and MEV
Themax_priority_fee_per_gas
(tip) serves as an incentive for validators to include transactions faster. However, in Cosmos SDK implementations:
- Transaction prioritization is limited compared to Ethereum
- Tips may have minimal effect on inclusion order
- MEV opportunities are generally reduced
Effective Gas Price
For EIP-1559 transactions, users specify two limits:maxFeePerGas
: Maximum total they’re willing to paymaxPriorityFeePerGas
: Maximum tip for validators
Fee Calculation Examples
Low Activity Period
- Base fee: 100 gwei
- User sets: maxFeePerGas = 200 gwei, maxPriorityFeePerGas = 2 gwei
- Effective price: 100 + 2 = 102 gwei
- User pays: 102 gwei (well below their 200 gwei max)
High Congestion
- Base fee: 180 gwei
- User sets: maxFeePerGas = 200 gwei, maxPriorityFeePerGas = 30 gwei
- Effective price: min(180 + 30, 200) = 200 gwei
- User pays: 200 gwei (capped at their maximum)
Minimum Gas Prices
The fee market enforces multiple price floors:Local vs. Global Minimums
- Local minimum: Set by individual validators in node configuration
- Global minimum: Set as the
MinGasPrice
parameter via governance - Base fee: Current protocol-calculated minimum
Benefits of EIP-1559
For Users
- Predictable fees: Base fee is known before submitting
- Better UX: Wallets can reliably estimate costs
- Fair pricing: All users in a block pay similar rates
- Protection: MaxFeePerGas prevents overpayment
For Networks
- Automatic adjustment: No manual intervention needed
- Spam resistance: Dynamic fees deter attacks
- Optimal utilization: Targets efficient block usage
- Economic stability: Predictable fee revenue
For Developers
- Simplified estimation: Base fee is protocol-provided
- Better tools: Standard APIs for fee data
- Consistent behavior: Across EVM-compatible chains