> For the complete documentation index, see [llms.txt](https://www.ankitavirani.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.ankitavirani.com/experience/protocols/ercs-and-eips/eip-1559.md).

# EIP-1559

## **EIP-1559: Ethereum's Fee Market Revolution**

### Introduction

EIP-1559 (Ethereum Improvement Proposal 1559) is a significant upgrade to Ethereum's fee mechanism, implemented in August 2021 as part of the London Hard Fork. It fundamentally changed how transaction fees are calculated and processed on the Ethereum network.

### Key Concepts

* **Base Fee:** A dynamically adjusted fee that all users must pay for their transactions
* **Priority Fee (Tip):** An optional tip to incentivize miners/validators to process transactions faster
* **Fee Burning:** The base fee is burned (destroyed) rather than paid to miners
* **Block Size Flexibility:** Blocks can be up to 2x the target size to handle demand spikes

### How EIP-1559 Works

<figure><img src="https://4222757721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8enmdGTQxxu7PPuvM80%2Fuploads%2Fnk90fFVBkx0Z5DwGgUbx%2FScreenshot%202025-01-20%20at%205.49.45%E2%80%AFPM.png?alt=media&amp;token=92c3be6d-f1f0-44f9-bace-cb9a37834d8c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4222757721-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8enmdGTQxxu7PPuvM80%2Fuploads%2FCQaNGB3cKjqs7lpIxH14%2Fhttps___bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com_public_images_679337a1-2b3c-44e4-b0a4-c67989afc0ee_877x694-768x608.png?alt=media&amp;token=e0c4c0d6-c044-4d75-98a3-4732f037096e" alt=""><figcaption></figcaption></figure>

### Technical Implementation

```solidity
// Example of sending a transaction with EIP-1559
const transaction = {
    to: receiverAddress,
    value: ethers.utils.parseEther("1.0"),
    maxFeePerGas: ethers.utils.parseUnits("50", "gwei"),     // Maximum fee willing to pay
    maxPriorityFeePerGas: ethers.utils.parseUnits("2", "gwei") // Tip for validators
};
```

### Benefits and Impact

* **Predictable Fees:** More reliable fee estimation and reduced price volatility
* **Improved User Experience:** Simpler fee market and reduced overpayment
* **Deflationary Mechanism:** Base fee burning reduces ETH supply over time
* **Network Security:** Better protection against spam attacks

### Before vs After EIP-1559

| **Aspect**         | **Before EIP-1559** | **After EIP-1559**                 |
| ------------------ | ------------------- | ---------------------------------- |
| Fee Structure      | Single gas price    | Base fee + priority fee            |
| Fee Recipient      | All to miners       | Base fee burned, tip to validators |
| Block Size         | Fixed               | Dynamic (up to 2x)                 |
| Fee Predictability | Highly volatile     | More predictable                   |

### Common Use Cases

* **DeFi Transactions:** More reliable fee estimation for DEX swaps and lending
* **NFT Minting:** Better handling of gas spikes during popular mints
* **Smart Contract Deployment:** More predictable deployment costs

### Best Practices

* Always set a reasonable maxFeePerGas to avoid excessive costs
* Monitor network conditions to optimize priority fees
* Implement proper error handling for fee-related issues
* Consider using EIP-1559-aware libraries and tools

### Challenges and Considerations

* **MEV Impact:** Relationship with Maximal Extractable Value
* **Network Congestion:** Handling of extreme network conditions
* **Validator Economics:** Changes to validator revenue model

This implementation has become a cornerstone of Ethereum's economic model, significantly improving the network's usability and efficiency while introducing a deflationary mechanism through fee burning.
