Building a Personal EIP-1559 Gas Baseline

A $500 wallet does not need much activity for gas to become noticeable. I want a rough reference for an approval, swap, or deposit so I can spot an unusually expensive quote before sending it.

Three receipts per action are a starting sample, not a forecast. I keep the chain and contract path beside each fee so I am comparing similar transactions.

Read the fee paid from the receipt

EIP-1559 splits the fee into two parts: the base fee that is burned and a priority fee (tip) that goes to the block fee recipient. The base fee updates every block based on how full the previous block was, and the adjustment is capped at 12.5% per block. (EIP-1559)

Receipts for post-1559 transactions include effectiveGasPrice, which is the actual gas price paid after the fee cap logic runs. This is the number I use to compute the real cost alongside gasUsed. (Ethereum JSON-RPC: eth_getTransactionReceipt)

For Ethereum execution gas, the receipt calculation is:

fee_paid = gas_used * effective_gas_price

If I want to sanity-check a transaction before sending it, I can estimate the effective gas price using the EIP-1559 rule:

effective_gas_price = base_fee + min(max_priority_fee, max_fee - base_fee)

This is not necessary for the baseline, but it helps explain why a transaction with a high maxFeePerGas still clears at a lower effective price when base fees are calm. (EIP-1559)

Baseline workflow: three real receipts and a simple table

I do not need a full data pipeline to understand gas for a small wallet. I take three receipts for each action (approve, swap, deposit) and compute the fee paid in ETH. That gives me a min/median/max range I can compare against future transactions.

Here is a small Python snippet that does the same calculation on a tiny sample list. The values are placeholders, but the math is identical to what I run on receipts pulled from eth_getTransactionReceipt.

from dataclasses import dataclass
from decimal import Decimal


@dataclass
class Receipt:
    tx_hash: str
    gas_used: int
    effective_gas_price_wei: int


def fee_paid_eth(receipt: Receipt) -> Decimal:
    """Return the fee paid in ETH using gasUsed * effectiveGasPrice."""
    fee_wei = Decimal(receipt.gas_used) * Decimal(receipt.effective_gas_price_wei)
    return fee_wei / Decimal("1e18")


sample_receipts = [
    Receipt(tx_hash="0xaaa", gas_used=51234, effective_gas_price_wei=18_000_000_000),
    Receipt(tx_hash="0xbbb", gas_used=48901, effective_gas_price_wei=22_000_000_000),
    Receipt(tx_hash="0xccc", gas_used=53012, effective_gas_price_wei=16_000_000_000),
]

fees = [fee_paid_eth(r) for r in sample_receipts]
print("min", min(fees), "median", sorted(fees)[len(fees) // 2], "max", max(fees))

When I run this against real receipts, the range can go in a short note beside the chain, block, and action. For a small wallet, this is enough to answer: “Is today’s approval fee normal or spiking?” If the fee is above the sample maximum, I pause and check the base fee trend before trying again.

Risk analysis: what can go wrong with gas baselines

  • Technical risk (incorrect receipt fields): Some third-party APIs omit effectiveGasPrice or provide gasPrice for legacy transactions. Use the price actually paid for that transaction type. Do not substitute a fee cap for the effective gas price. (Ethereum JSON-RPC: eth_getTransactionReceipt)
  • Economic risk (changing contract paths): A swap executed through a different router or pool can move the gas cost even if the UI looks the same. That can inflate the baseline and make you think the chain is expensive when it is just a more complex path.
  • Operational risk (base fee spikes): Base fees can jump quickly during congestion, and the 12.5% cap still compounds across multiple blocks. If you send transactions without checking the base fee, a routine approve can become disproportionate relative to a sub-$1k wallet. (EIP-1559)

When to rebuild the fee baseline

  • Pull three receipts per action and compute fee ranges using gasUsed * effectiveGasPrice.
  • Treat any fee above the personal max range as a reason to pause and re-check base fees.
  • Keep baselines per chain; L2s behave differently from mainnet and each other.
  • Rebuild the baseline whenever you change routers or upgrade the workflow.