{"eip":1559,"title":"Fee market change for ETH 1.0 chain","description":"A transaction pricing mechanism that includes fixed-per-block network fee that is burned and dynamically expands/contracts block sizes to deal with transient congestion.","authors":["Vitalik Buterin (@vbuterin)","Eric Conner (@econoar)","Rick Dudley (@AFDudley)","Matthew Slipper (@mslipper)","Ian Norden (@i-norden)","Abdelhamid Bakhta (@abdelhamidbakhta)"],"status":"Final","type":"Standards Track","category":"Core","created":"2019-04-13","requires":[2718,2930],"discussionsTo":"https://ethereum-magicians.org/t/eip-1559-fee-market-change-for-eth-1-0-chain/2783","repo":"EIPs","label":"EIP-1559","officialUrl":"https://eips.ethereum.org/EIPS/eip-1559","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md","url":"https://eips.huatuo.xyz/eip-1559/","tldr":{"en":"Replaced Ethereum's gas-price auction with a protocol-set base fee that is burned, plus an optional tip, making fees predictable and letting blocks flex in size.","ja":"ガス価格のオークションを、プロトコルが決めて焼却（burn）する base fee と任意のチップに置き換えた。手数料が予測しやすくなり、ブロックサイズも需要に応じて伸縮する。","ko":"가스 가격 경매를 프로토콜이 정하고 소각하는 base fee와 선택적 팁으로 대체했다. 수수료가 예측 가능해지고 블록 크기도 수요에 따라 유연하게 늘어난다.","zh":"用协议设定并销毁的基础费（base fee）加可选小费取代了以太坊的 gas 价格竞拍，让手续费可预测，并允许区块大小弹性伸缩。"},"tags":["gas","fees","transactions","core","london"],"explainers":{"en":{"lang":"en","tldr":"Replaced Ethereum's gas-price auction with a protocol-set base fee that is burned, plus an optional tip, making fees predictable and letting blocks flex in size.","tags":["gas","fees","transactions","core","london"],"related":[2718,2930,4844,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1559/","markdown":"## What problem does it solve?\n\nBefore August 2021 (the London upgrade), every transaction named a single `gasPrice`, and miners simply picked the highest bidders. This first-price auction was bad for users: you had to guess what others would bid, wallets routinely overpaid to be safe, and fees swung wildly from block to block. Blocks also had a hard fixed size, so a sudden burst of demand had nowhere to go but the fee.\n\nEIP-1559 makes the protocol itself compute the price of inclusion and lets block size stretch temporarily, so fees respond smoothly to demand and most users can just accept a wallet's estimate.\n\n## How it works\n\n- Every block carries a **base fee per gas**, set by the protocol from the previous block. If the parent block was more than 50 % full (above the *gas target* of 15M gas), the base fee rises by up to 12.5 %; if it was less full, it falls by up to 12.5 %. Blocks may use up to 2× the target (30M gas) during spikes.\n- The **base fee is burned**, not paid to the block producer. This removes any incentive to stuff blocks to inflate fees and makes ETH deflationary when demand is high.\n- Users add a **priority fee** (tip) that goes to the block producer, and set a **max fee** they are willing to pay in total. The effective price is `min(baseFee + maxPriorityFee, maxFee)`; the difference up to `maxFee` is refunded.\n- This introduced the type-2 transaction (`0x02`, via [EIP-2718](/eip-2718/)) with fields `maxFeePerGas` and `maxPriorityFeePerGas`. Legacy `gasPrice` transactions still work: their `gasPrice` is treated as both max and priority fee.\n\nPseudocode for the base fee update, from the spec:\n\n```python\nBASE_FEE_MAX_CHANGE_DENOMINATOR = 8   # ±12.5 % per block\nELASTICITY_MULTIPLIER = 2             # gas_limit = 2 × gas_target\n\ngas_target = parent.gas_limit // ELASTICITY_MULTIPLIER\nif parent.gas_used == gas_target:\n    base_fee = parent.base_fee\nelif parent.gas_used \u003e gas_target:\n    delta = parent.base_fee * (parent.gas_used - gas_target) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee + max(delta, 1)\nelse:\n    delta = parent.base_fee * (gas_target - parent.gas_used) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee - delta\n```\n\n## Sample code\n\nSending a type-2 transaction and reading the current base fee (ethers v6):\n\n```ts\nimport { JsonRpcProvider, Wallet, parseUnits, formatUnits } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst wallet = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst block = await provider.getBlock(\"latest\");\nconsole.log(\"base fee (gwei):\", formatUnits(block!.baseFeePerGas!, \"gwei\"));\n\nconst tx = await wallet.sendTransaction({\n  to: \"0x000000000000000000000000000000000000dEaD\",\n  value: parseUnits(\"0.01\", \"ether\"),\n  maxPriorityFeePerGas: parseUnits(\"1\", \"gwei\"),  // tip to the block producer\n  maxFeePerGas: parseUnits(\"40\", \"gwei\"),         // absolute ceiling incl. base fee\n});\nconst receipt = await tx.wait();\nconsole.log(\"paid (gwei):\", formatUnits(receipt!.gasPrice, \"gwei\")); // effective gas price\n```\n\nInside a contract, the current base fee is available as `block.basefee` (opcode `BASEFEE`, added by [EIP-3198](/eip-3198/)):\n\n```solidity\nuint256 fee = block.basefee; // wei per gas, this block\n```\n\n## Things to know\n\n- A transaction is only valid if `maxFeePerGas \u003e= baseFee` of the block it lands in. If the base fee rises past your max, the transaction waits in the mempool until it falls again.\n- Wallets usually set `maxFeePerGas ≈ 2 × baseFee + tip` so a pending transaction survives a few blocks of rising fees; you only pay the actual base fee plus tip.\n- The tip is what matters for ordering during congestion. In quiet periods 1 gwei or less is typical.\n- The same mechanism was reused for blob gas in [EIP-4844](/eip-4844/), which has its own independent base fee.\n"},"ja":{"lang":"ja","tldr":"ガス価格のオークションを、プロトコルが決めて焼却（burn）する base fee と任意のチップに置き換えた。手数料が予測しやすくなり、ブロックサイズも需要に応じて伸縮する。","tags":["gas","fees","transactions","core","london"],"related":[2718,2930,4844,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1559/","markdown":"## 何を解決するのか\n\n2021 年 8 月（London アップグレード）以前、すべてのトランザクションは単一の `gasPrice` を指定し、マイナーは高い入札から順に採用していました。この「第一価格オークション」はユーザーにとって不利でした。他人の入札額を推測しなければならず、ウォレットは安全側に倒して過剰に支払い、手数料はブロックごとに激しく変動しました。ブロックサイズも固定だったため、急な需要の増加は手数料に直撃しました。\n\nEIP-1559 は、採用に必要な価格をプロトコル自身が計算し、ブロックサイズを一時的に伸縮できるようにします。手数料は需要に対して滑らかに反応し、多くのユーザーはウォレットの見積もりをそのまま受け入れれば済むようになりました。\n\n## 仕組み\n\n- すべてのブロックは、直前のブロックからプロトコルが決める **base fee per gas** を持ちます。親ブロックが 50% 超埋まっていれば（*gas target* の 1,500 万ガスを超えていれば）base fee は最大 12.5% 上昇し、それ未満なら最大 12.5% 下落します。急増時にはブロックは target の 2 倍（3,000 万ガス）まで使えます。\n- **base fee は焼却**され、ブロック生成者には渡りません。これにより、手数料をつり上げるためにブロックを埋める動機がなくなり、需要が高いときには ETH がデフレ的になります。\n- ユーザーはブロック生成者に渡る **priority fee**（チップ）を加え、合計で支払ってよい **max fee** を設定します。実効価格は `min(baseFee + maxPriorityFee, maxFee)` で、`maxFee` との差額は返金されます。\n- これに伴い、[EIP-2718](/eip-2718/) によるタイプ 2 トランザクション（`0x02`）が導入され、`maxFeePerGas` と `maxPriorityFeePerGas` フィールドを持ちます。従来の `gasPrice` トランザクションも引き続き有効で、`gasPrice` が max fee と priority fee の両方として扱われます。\n\n仕様に基づく base fee 更新の疑似コード:\n\n```python\nBASE_FEE_MAX_CHANGE_DENOMINATOR = 8   # ブロックごとに ±12.5%\nELASTICITY_MULTIPLIER = 2             # gas_limit = 2 × gas_target\n\ngas_target = parent.gas_limit // ELASTICITY_MULTIPLIER\nif parent.gas_used == gas_target:\n    base_fee = parent.base_fee\nelif parent.gas_used \u003e gas_target:\n    delta = parent.base_fee * (parent.gas_used - gas_target) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee + max(delta, 1)\nelse:\n    delta = parent.base_fee * (gas_target - parent.gas_used) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee - delta\n```\n\n## サンプルコード\n\nタイプ 2 トランザクションの送信と現在の base fee の取得（ethers v6）:\n\n```ts\nimport { JsonRpcProvider, Wallet, parseUnits, formatUnits } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst wallet = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst block = await provider.getBlock(\"latest\");\nconsole.log(\"base fee (gwei):\", formatUnits(block!.baseFeePerGas!, \"gwei\"));\n\nconst tx = await wallet.sendTransaction({\n  to: \"0x000000000000000000000000000000000000dEaD\",\n  value: parseUnits(\"0.01\", \"ether\"),\n  maxPriorityFeePerGas: parseUnits(\"1\", \"gwei\"),  // ブロック生成者へのチップ\n  maxFeePerGas: parseUnits(\"40\", \"gwei\"),         // base fee 込みの上限\n});\nconst receipt = await tx.wait();\nconsole.log(\"paid (gwei):\", formatUnits(receipt!.gasPrice, \"gwei\")); // 実効ガス価格\n```\n\nコントラクト内では、現在の base fee を `block.basefee`（[EIP-3198](/eip-3198/) で追加された `BASEFEE` オペコード）で参照できます。\n\n```solidity\nuint256 fee = block.basefee; // このブロックの wei/gas\n```\n\n## 知っておくべきこと\n\n- トランザクションは、取り込まれるブロックの base fee に対して `maxFeePerGas \u003e= baseFee` の場合のみ有効です。base fee が上限を超えて上昇すると、下がるまで mempool で待機します。\n- ウォレットは通常 `maxFeePerGas ≈ 2 × baseFee + tip` に設定し、手数料が数ブロック上昇してもトランザクションが生き残るようにします。実際に支払うのは base fee とチップだけです。\n- 混雑時の順序を決めるのはチップです。空いている時間帯なら 1 gwei 以下が一般的です。\n- 同じ仕組みは [EIP-4844](/eip-4844/) の blob gas にも再利用されており、こちらは独立した base fee を持ちます。\n"},"ko":{"lang":"ko","tldr":"가스 가격 경매를 프로토콜이 정하고 소각하는 base fee와 선택적 팁으로 대체했다. 수수료가 예측 가능해지고 블록 크기도 수요에 따라 유연하게 늘어난다.","tags":["gas","fees","transactions","core","london"],"related":[2718,2930,4844,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1559/","markdown":"## 어떤 문제를 해결하나요?\n\n2021년 8월(London 업그레이드) 이전에는 모든 트랜잭션이 단일 `gasPrice`를 지정했고, 채굴자는 단순히 높은 입찰부터 골랐습니다. 이 \"1차 가격 경매\"는 사용자에게 불리했습니다. 남들이 얼마를 낼지 추측해야 했고, 지갑은 안전을 위해 습관적으로 과다 지불했으며, 수수료는 블록마다 크게 요동쳤습니다. 블록 크기도 고정이어서 갑작스러운 수요 급증은 수수료로 직결됐습니다.\n\nEIP-1559는 프로토콜이 직접 포함 가격을 계산하고 블록 크기가 일시적으로 늘어날 수 있게 합니다. 수수료가 수요에 부드럽게 반응하므로 대부분의 사용자는 지갑의 추정치를 그대로 받아들이면 됩니다.\n\n## 어떻게 동작하나요?\n\n- 모든 블록은 이전 블록을 기준으로 프로토콜이 정한 **base fee per gas**를 가집니다. 부모 블록이 50% 넘게 찼으면(*gas target*인 1,500만 가스 초과) base fee가 최대 12.5% 오르고, 덜 찼으면 최대 12.5% 내립니다. 급증 시 블록은 target의 2배(3,000만 가스)까지 쓸 수 있습니다.\n- **base fee는 소각**되며 블록 생성자에게 가지 않습니다. 수수료를 올리려고 블록을 채울 유인이 사라지고, 수요가 높을 때 ETH는 디플레이션 성격을 띱니다.\n- 사용자는 블록 생성자에게 가는 **priority fee**(팁)를 더하고, 총액으로 지불할 의향이 있는 **max fee**를 설정합니다. 실효 가격은 `min(baseFee + maxPriorityFee, maxFee)`이고, `maxFee`와의 차액은 환불됩니다.\n- 이에 따라 [EIP-2718](/eip-2718/) 기반의 type-2 트랜잭션(`0x02`)이 도입되어 `maxFeePerGas`와 `maxPriorityFeePerGas` 필드를 가집니다. 기존 `gasPrice` 트랜잭션도 여전히 동작하며, `gasPrice`가 max fee와 priority fee 둘 다로 취급됩니다.\n\n명세의 base fee 갱신 의사 코드:\n\n```python\nBASE_FEE_MAX_CHANGE_DENOMINATOR = 8   # 블록당 ±12.5%\nELASTICITY_MULTIPLIER = 2             # gas_limit = 2 × gas_target\n\ngas_target = parent.gas_limit // ELASTICITY_MULTIPLIER\nif parent.gas_used == gas_target:\n    base_fee = parent.base_fee\nelif parent.gas_used \u003e gas_target:\n    delta = parent.base_fee * (parent.gas_used - gas_target) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee + max(delta, 1)\nelse:\n    delta = parent.base_fee * (gas_target - parent.gas_used) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee - delta\n```\n\n## 샘플 코드\n\ntype-2 트랜잭션 전송과 현재 base fee 조회(ethers v6):\n\n```ts\nimport { JsonRpcProvider, Wallet, parseUnits, formatUnits } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst wallet = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst block = await provider.getBlock(\"latest\");\nconsole.log(\"base fee (gwei):\", formatUnits(block!.baseFeePerGas!, \"gwei\"));\n\nconst tx = await wallet.sendTransaction({\n  to: \"0x000000000000000000000000000000000000dEaD\",\n  value: parseUnits(\"0.01\", \"ether\"),\n  maxPriorityFeePerGas: parseUnits(\"1\", \"gwei\"),  // 블록 생성자에게 주는 팁\n  maxFeePerGas: parseUnits(\"40\", \"gwei\"),         // base fee 포함 절대 상한\n});\nconst receipt = await tx.wait();\nconsole.log(\"paid (gwei):\", formatUnits(receipt!.gasPrice, \"gwei\")); // 실효 가스 가격\n```\n\n컨트랙트 안에서는 `block.basefee`([EIP-3198](/eip-3198/)에서 추가된 `BASEFEE` 옵코드)로 현재 base fee를 읽을 수 있습니다.\n\n```solidity\nuint256 fee = block.basefee; // 이 블록의 wei/gas\n```\n\n## 알아둘 점\n\n- 트랜잭션은 포함되는 블록의 base fee에 대해 `maxFeePerGas \u003e= baseFee`일 때만 유효합니다. base fee가 상한을 넘어 오르면 다시 내릴 때까지 멤풀에서 대기합니다.\n- 지갑은 보통 `maxFeePerGas ≈ 2 × baseFee + tip`으로 설정해 수수료가 몇 블록 오르더라도 대기 중인 트랜잭션이 살아남게 합니다. 실제로는 base fee와 팁만 지불합니다.\n- 혼잡할 때 순서를 결정하는 것은 팁입니다. 한산한 시간대에는 1 gwei 이하가 일반적입니다.\n- 같은 메커니즘이 [EIP-4844](/eip-4844/)의 blob gas에도 재사용되며, 이쪽은 독립적인 base fee를 가집니다.\n"},"zh":{"lang":"zh","tldr":"用协议设定并销毁的基础费（base fee）加可选小费取代了以太坊的 gas 价格竞拍，让手续费可预测，并允许区块大小弹性伸缩。","tags":["gas","fees","transactions","core","london"],"related":[2718,2930,4844,7702],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1559/","markdown":"## 它解决什么问题？\n\n2021 年 8 月（London 升级）之前，每笔交易只指定一个 `gasPrice`，矿工按出价从高到低挑选。这种\"第一价格拍卖\"对用户很不友好：你得猜别人会出多少，钱包为了保险常常多付，手续费也在区块之间剧烈波动。区块大小还是固定的，需求突然激增时只能体现在费用上。\n\nEIP-1559 让协议自己计算上链价格，并允许区块大小临时伸缩，因此费用对需求的响应变得平滑，大多数用户只需接受钱包的估算即可。\n\n## 它如何运作\n\n- 每个区块携带一个由协议根据上一个区块计算的 **base fee per gas**。如果父区块填充超过 50%（超过 1500 万 gas 的 *gas target*），base fee 最多上涨 12.5%；若未达一半，则最多下降 12.5%。高峰期区块最多可用到 target 的 2 倍（3000 万 gas）。\n- **base fee 被销毁**，不付给出块者。这消除了通过填满区块抬高费用的动机，并在需求高时让 ETH 通缩。\n- 用户额外附加付给出块者的 **priority fee**（小费），并设定愿意支付的总 **max fee**。实际价格为 `min(baseFee + maxPriorityFee, maxFee)`，与 `maxFee` 的差额会退还。\n- 由此引入了 type-2 交易（`0x02`，基于 [EIP-2718](/eip-2718/)），包含 `maxFeePerGas` 和 `maxPriorityFeePerGas` 字段。旧式 `gasPrice` 交易仍然有效：其 `gasPrice` 同时被视为 max fee 和 priority fee。\n\n规范中 base fee 更新的伪代码：\n\n```python\nBASE_FEE_MAX_CHANGE_DENOMINATOR = 8   # 每个区块 ±12.5%\nELASTICITY_MULTIPLIER = 2             # gas_limit = 2 × gas_target\n\ngas_target = parent.gas_limit // ELASTICITY_MULTIPLIER\nif parent.gas_used == gas_target:\n    base_fee = parent.base_fee\nelif parent.gas_used \u003e gas_target:\n    delta = parent.base_fee * (parent.gas_used - gas_target) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee + max(delta, 1)\nelse:\n    delta = parent.base_fee * (gas_target - parent.gas_used) // gas_target // BASE_FEE_MAX_CHANGE_DENOMINATOR\n    base_fee = parent.base_fee - delta\n```\n\n## 示例代码\n\n发送 type-2 交易并读取当前 base fee（ethers v6）：\n\n```ts\nimport { JsonRpcProvider, Wallet, parseUnits, formatUnits } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst wallet = new Wallet(process.env.PRIVATE_KEY!, provider);\n\nconst block = await provider.getBlock(\"latest\");\nconsole.log(\"base fee (gwei):\", formatUnits(block!.baseFeePerGas!, \"gwei\"));\n\nconst tx = await wallet.sendTransaction({\n  to: \"0x000000000000000000000000000000000000dEaD\",\n  value: parseUnits(\"0.01\", \"ether\"),\n  maxPriorityFeePerGas: parseUnits(\"1\", \"gwei\"),  // 给出块者的小费\n  maxFeePerGas: parseUnits(\"40\", \"gwei\"),         // 含 base fee 的绝对上限\n});\nconst receipt = await tx.wait();\nconsole.log(\"paid (gwei):\", formatUnits(receipt!.gasPrice, \"gwei\")); // 实际 gas 价格\n```\n\n在合约内部，可通过 `block.basefee`（[EIP-3198](/eip-3198/) 新增的 `BASEFEE` 操作码）读取当前 base fee：\n\n```solidity\nuint256 fee = block.basefee; // 本区块的 wei/gas\n```\n\n## 需要注意\n\n- 只有当交易所在区块的 base fee 满足 `maxFeePerGas \u003e= baseFee` 时，交易才有效。如果 base fee 涨过你的上限，交易会在内存池中等待，直到费用回落。\n- 钱包通常把 `maxFeePerGas` 设为约 `2 × baseFee + tip`，使待处理交易能撑过几个费用上涨的区块；你实际只支付 base fee 加小费。\n- 拥堵时决定排序的是小费。空闲时段 1 gwei 或更低很常见。\n- 同样的机制被 [EIP-4844](/eip-4844/) 用于 blob gas，后者有自己独立的 base fee。\n"}},"requiredBy":[1418,3041,3044,3045,3046,3198,3709,4788,4844,5081,6404,7377,7706,7708,7886,7999,8011,8075,8115,8141,8175,8197,8202,8261,8282,8357,8369]}
