{"eip":2780,"title":"Resource-based intrinsic transaction gas","description":"Decompose the flat intrinsic transaction cost into explicit primitives priced to match the resources a transaction actually consumes","authors":["Matt Garnett (@lightclient)","Uri Klarman (@uriklarman)","Ben Adams (@benaadams)","Maria Inês Silva (@misilva73)","Anders Elowsson (@anderselowsson)","Anthony Sassano (@sassal)","Dragan Rakita (@rakita)"],"status":"Last Call","type":"Standards Track","category":"Core","created":"2020-07-11","requires":[2718,2929,2930,6780,7623,7702,7708,7928,8037,8038],"discussionsTo":"https://ethereum-magicians.org/t/eip-2780-reduce-intrinsic-cost-of-transactions/4413","repo":"EIPs","label":"EIP-2780","officialUrl":"https://eips.ethereum.org/EIPS/eip-2780","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2780.md","url":"https://eips.huatuo.xyz/eip-2780/","tldr":{"en":"Breaks the flat 21,000-gas transaction base cost into priced parts (sender, recipient, value, account creation), so simple calls get cheaper and state-growing transfers pay for the state they add.","ja":"一律 21,000 ガスのトランザクション基本コストを、価格の付いた各部分（送信者、受信者、value、アカウント作成）に分解する。単純な呼び出しは安くなり、ステートを増やす送金は増やした分のコストを負担する。","ko":"일괄 21,000 가스인 트랜잭션 기본 비용을 가격이 매겨진 부분(발신자, 수신자, value, 계정 생성)으로 쪼갠다. 단순한 호출은 싸지고, 상태를 늘리는 전송은 늘어난 상태에 대한 비용을 낸다.","zh":"把固定的 21,000 gas 交易基础成本拆分为带价格的各个部分（发送者、接收者、转账金额、账户创建），使简单调用更便宜，而增加状态的转账需要为其新增的状态付费。"},"tags":["gas","transactions","intrinsic-gas","repricing","core"],"explainers":{"en":{"lang":"en","tldr":"Breaks the flat 21,000-gas transaction base cost into priced parts (sender, recipient, value, account creation), so simple calls get cheaper and state-growing transfers pay for the state they add.","tags":["gas","transactions","intrinsic-gas","repricing","core"],"related":[8037,8038,7702,2929,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2780/","markdown":"## What problem does it solve?\n\nEvery Ethereum transaction pays a flat 21,000 gas before any code runs. That single number ignores what the transaction actually does. A zero-value call to an existing account and an ETH transfer that creates a brand-new account both pay 21,000, even though the second writes an extra balance and permanently grows the state. Simple transactions overpay; state-creating ones underpay.\n\nEIP-2780 replaces the constant with a sum of named primitives, each priced from measured client run times, and charges state-dependent costs only when they actually happen.\n\n## How it works\n\n**Intrinsic gas** (computable from the transaction alone; the only input to validity):\n\n| Part | Gas | When |\n| --- | --- | --- |\n| `TX_BASE_COST` | 12,000 | Always: signature recovery, sender access/write, inclusion |\n| `COLD_ACCOUNT_ACCESS` | 3,000 | Recipient that is not the sender |\n| `TX_VALUE_COST` | 6,000 | Non-zero value to a different account (balance write + transfer log) |\n| `CREATE_ACCESS` | 12,000 | Contract-creation transactions, instead of the two above |\n\nSo a plain ETH transfer to an existing account still costs **21,000**, a zero-value call costs **15,000**, and a self-transfer costs **12,000**. Recipient access is always charged at the cold rate, even if an [EIP-2930](/eip-2930/) access list lists it.\n\n**Runtime gas** (state-dependent, charged just before the first call frame):\n\n- Sending value to a non-existent account, or deploying to a fresh address, pays a new-account **state gas** charge (`STATE_BYTES_PER_NEW_ACCOUNT × CPSB`, 183,600 at current parameters from [EIP-8037](/eip-8037/)).\n- Calling an [EIP-7702](/eip-7702/) delegated account pays for loading the delegation target (3,000 cold / 100 warm).\n- 7702 authorizations pay a fixed per-authorization base intrinsically, plus new-account, first-write and delegation-byte charges only when they apply.\n\nIf runtime gas runs out, the transaction is **not** invalid: it is included, the sender pays for gas used, the nonce increments, and pre-execution state changes (including delegations) are reverted — like an out-of-gas inside a call.\n\n## Sample code\n\nPseudocode for the intrinsic base (calldata, access-list and authorization charges are unchanged and omitted):\n\n```python\nTX_BASE_COST = 12_000\nCOLD_ACCOUNT_ACCESS = 3_000\nTX_VALUE_COST = 6_000\nCREATE_ACCESS = 12_000\n\ndef intrinsic_base(tx) -\u003e int:\n    gas = TX_BASE_COST\n    if tx.to is None:                 # contract creation\n        return gas + CREATE_ACCESS\n    if tx.to == tx.sender:            # self-transfer\n        return gas\n    gas += COLD_ACCOUNT_ACCESS\n    if tx.value \u003e 0:\n        gas += TX_VALUE_COST\n    return gas\n\nassert intrinsic_base(Tx(sender=A, to=B, value=1)) == 21_000\nassert intrinsic_base(Tx(sender=A, to=B, value=0)) == 15_000\n```\n\n## Things to know\n\n- Status is **Last Call**. It depends on several other proposals still in Last Call — notably [EIP-8037](/eip-8037/) (state gas) and [EIP-8038](/eip-8038/) (access costs) — and its numbers move if theirs do.\n- It is a consensus change that needs a network upgrade. Wallets and gas estimators that hard-code 21,000 must be updated, especially for transfers that create new accounts, which become far more expensive.\n- The [EIP-7623](/eip-7623/) calldata floor is rebased on the decomposed base instead of the fixed 21,000.\n- Calldata and access-list pricing are not changed.\n"},"ja":{"lang":"ja","tldr":"一律 21,000 ガスのトランザクション基本コストを、価格の付いた各部分（送信者、受信者、value、アカウント作成）に分解する。単純な呼び出しは安くなり、ステートを増やす送金は増やした分のコストを負担する。","tags":["gas","transactions","intrinsic-gas","repricing","core"],"related":[8037,8038,7702,2929,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2780/","markdown":"## 何を解決するのか\n\nEthereum のすべてのトランザクションは、コードが実行される前に一律 21,000 ガスを支払います。この 1 つの数字は、トランザクションが実際に何をするのかを無視しています。既存アカウントへの value がゼロの呼び出しと、まったく新しいアカウントを作る ETH 送金は、どちらも 21,000 を支払いますが、後者は残高を余分に書き込み、ステートを恒久的に増やします。単純なトランザクションは払いすぎで、ステートを作るものは払い足りていません。\n\nEIP-2780 は定数を、名前の付いたプリミティブの和に置き換えます。それぞれの価格はクライアントの実測の実行時間から決められ、ステートに依存するコストは実際に発生したときだけ課金されます。\n\n## 仕組み\n\n**Intrinsic gas**（トランザクションだけから計算でき、有効性の唯一の入力になる）:\n\n| 項目 | ガス | 条件 |\n| --- | --- | --- |\n| `TX_BASE_COST` | 12,000 | 常に: 署名の復元、送信者のアクセス／書き込み、取り込み |\n| `COLD_ACCOUNT_ACCESS` | 3,000 | 送信者以外の受信者 |\n| `TX_VALUE_COST` | 6,000 | 別のアカウントへの 0 でない value（残高の書き込み + 送金ログ） |\n| `CREATE_ACCESS` | 12,000 | コントラクト作成トランザクション。上の 2 つの代わりに課金 |\n\nそのため、既存アカウントへの通常の ETH 送金は引き続き **21,000**、value がゼロの呼び出しは **15,000**、自分宛ての送金は **12,000** です。受信者へのアクセスは、[EIP-2930](/eip-2930/) のアクセスリストに載っていても、常にコールドの料金で課金されます。\n\n**ランタイムガス**（ステートに依存し、最初のコールフレームの直前に課金）:\n\n- 存在しないアカウントへの value の送信、または新しいアドレスへのデプロイでは、新規アカウントの **state gas** が課金されます（`STATE_BYTES_PER_NEW_ACCOUNT × CPSB`、[EIP-8037](/eip-8037/) の現在のパラメータでは 183,600）。\n- [EIP-7702](/eip-7702/) で委任されたアカウントを呼び出すと、委任先の読み込み分（コールドで 3,000／ウォームで 100）を支払います。\n- 7702 の authorization は、authorization ごとの固定の基本額を intrinsic として支払い、加えて新規アカウント、初回書き込み、委任バイトの課金は該当する場合のみ発生します。\n\nランタイムガスが尽きても、トランザクションは無効では**ありません**。取り込まれ、送信者は使用したガスを支払い、nonce は増え、実行前のステート変更（委任を含む）は元に戻されます。コール内の out-of-gas と同じです。\n\n## サンプルコード\n\nintrinsic の基本額の疑似コード（calldata、アクセスリスト、authorization の課金は変更がないため省略）:\n\n```python\nTX_BASE_COST = 12_000\nCOLD_ACCOUNT_ACCESS = 3_000\nTX_VALUE_COST = 6_000\nCREATE_ACCESS = 12_000\n\ndef intrinsic_base(tx) -\u003e int:\n    gas = TX_BASE_COST\n    if tx.to is None:                 # contract creation\n        return gas + CREATE_ACCESS\n    if tx.to == tx.sender:            # self-transfer\n        return gas\n    gas += COLD_ACCOUNT_ACCESS\n    if tx.value \u003e 0:\n        gas += TX_VALUE_COST\n    return gas\n\nassert intrinsic_base(Tx(sender=A, to=B, value=1)) == 21_000\nassert intrinsic_base(Tx(sender=A, to=B, value=0)) == 15_000\n```\n\n## 知っておくべきこと\n\n- ステータスは **Last Call** です。同じく Last Call にある複数の他の提案、特に [EIP-8037](/eip-8037/)（state gas）と [EIP-8038](/eip-8038/)（アクセスコスト）に依存しており、それらの数値が動けばこの提案の数値も動きます。\n- コンセンサスの変更であり、ネットワークアップグレードが必要です。21,000 をハードコードしているウォレットやガス見積もりは更新が必要で、特に新しいアカウントを作る送金は大幅に高くなります。\n- [EIP-7623](/eip-7623/) の calldata の下限（floor）は、固定の 21,000 ではなく、分解された基本額を基準に再設定されます。\n- calldata とアクセスリストの価格は変わりません。\n"},"ko":{"lang":"ko","tldr":"일괄 21,000 가스인 트랜잭션 기본 비용을 가격이 매겨진 부분(발신자, 수신자, value, 계정 생성)으로 쪼갠다. 단순한 호출은 싸지고, 상태를 늘리는 전송은 늘어난 상태에 대한 비용을 낸다.","tags":["gas","transactions","intrinsic-gas","repricing","core"],"related":[8037,8038,7702,2929,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2780/","markdown":"## 어떤 문제를 해결하나요?\n\n이더리움의 모든 트랜잭션은 코드가 실행되기 전에 일괄 21,000 가스를 냅니다. 이 숫자 하나는 트랜잭션이 실제로 무엇을 하는지를 무시합니다. 기존 계정에 대한 value 0 호출과 완전히 새로운 계정을 만드는 ETH 전송은 둘 다 21,000을 내지만, 후자는 잔액을 추가로 기록하고 상태를 영구히 키웁니다. 단순한 트랜잭션은 과하게 내고, 상태를 만드는 트랜잭션은 덜 냅니다.\n\nEIP-2780은 이 상수를 이름이 붙은 기본 요소들의 합으로 바꿉니다. 각 요소의 가격은 클라이언트 실측 실행 시간에 따라 정해지고, 상태에 의존하는 비용은 실제로 발생할 때만 부과됩니다.\n\n## 어떻게 동작하나요?\n\n**Intrinsic gas**(트랜잭션만으로 계산할 수 있으며, 유효성의 유일한 입력):\n\n| 항목 | 가스 | 언제 |\n| --- | --- | --- |\n| `TX_BASE_COST` | 12,000 | 항상: 서명 복구, 발신자 접근/쓰기, 포함 |\n| `COLD_ACCOUNT_ACCESS` | 3,000 | 발신자가 아닌 수신자 |\n| `TX_VALUE_COST` | 6,000 | 다른 계정으로 0이 아닌 value 전송(잔액 쓰기 + 전송 로그) |\n| `CREATE_ACCESS` | 12,000 | 컨트랙트 생성 트랜잭션, 위 두 항목 대신 부과 |\n\n따라서 기존 계정으로의 일반 ETH 전송은 여전히 **21,000**, value 0 호출은 **15,000**, 자기 자신에게 보내는 전송은 **12,000**입니다. 수신자 접근은 [EIP-2930](/eip-2930/) 접근 목록에 있더라도 항상 cold 요율로 부과됩니다.\n\n**런타임 가스**(상태에 의존하며 첫 번째 호출 프레임 직전에 부과):\n\n- 존재하지 않는 계정에 value를 보내거나 새 주소에 배포하면 새 계정 **state gas**를 냅니다(`STATE_BYTES_PER_NEW_ACCOUNT × CPSB`, [EIP-8037](/eip-8037/)의 현재 파라미터로는 183,600).\n- [EIP-7702](/eip-7702/)로 위임된 계정을 호출하면 위임 대상을 로드하는 비용을 냅니다(cold 3,000 / warm 100).\n- 7702 authorization은 authorization마다 고정된 기본 금액을 intrinsic으로 내고, 새 계정, 첫 쓰기, 위임 바이트 비용은 해당될 때만 추가로 냅니다.\n\n런타임 가스가 바닥나도 트랜잭션은 유효하지 않게 되는 것이 **아닙니다**. 포함되고, 발신자는 사용한 가스에 대해 비용을 내며, nonce가 증가하고, 실행 전 상태 변경(위임 포함)은 되돌려집니다. 호출 내부의 out-of-gas와 같습니다.\n\n## 샘플 코드\n\nintrinsic 기본 부분의 의사 코드(calldata, 접근 목록, authorization 비용은 바뀌지 않아 생략):\n\n```python\nTX_BASE_COST = 12_000\nCOLD_ACCOUNT_ACCESS = 3_000\nTX_VALUE_COST = 6_000\nCREATE_ACCESS = 12_000\n\ndef intrinsic_base(tx) -\u003e int:\n    gas = TX_BASE_COST\n    if tx.to is None:                 # contract creation\n        return gas + CREATE_ACCESS\n    if tx.to == tx.sender:            # self-transfer\n        return gas\n    gas += COLD_ACCOUNT_ACCESS\n    if tx.value \u003e 0:\n        gas += TX_VALUE_COST\n    return gas\n\nassert intrinsic_base(Tx(sender=A, to=B, value=1)) == 21_000\nassert intrinsic_base(Tx(sender=A, to=B, value=0)) == 15_000\n```\n\n## 알아둘 점\n\n- 상태는 **Last Call**입니다. 마찬가지로 Last Call 상태인 다른 여러 제안, 특히 [EIP-8037](/eip-8037/)(state gas)과 [EIP-8038](/eip-8038/)(접근 비용)에 의존하며, 그쪽 수치가 바뀌면 이 제안의 수치도 바뀝니다.\n- 네트워크 업그레이드가 필요한 컨센서스 변경입니다. 21,000을 하드코딩한 지갑과 가스 추정기는 업데이트해야 하며, 특히 새 계정을 만드는 전송은 훨씬 비싸집니다.\n- [EIP-7623](/eip-7623/)의 calldata 하한(floor)은 고정된 21,000이 아니라 분해된 기본 비용을 기준으로 다시 설정됩니다.\n- calldata와 접근 목록 가격은 바뀌지 않습니다.\n"},"zh":{"lang":"zh","tldr":"把固定的 21,000 gas 交易基础成本拆分为带价格的各个部分（发送者、接收者、转账金额、账户创建），使简单调用更便宜，而增加状态的转账需要为其新增的状态付费。","tags":["gas","transactions","intrinsic-gas","repricing","core"],"related":[8037,8038,7702,2929,7623],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2780/","markdown":"## 它解决什么问题？\n\n每笔以太坊交易在任何代码运行之前都要支付固定的 21,000 gas。这个单一数字忽略了交易实际做了什么。对已有账户的零金额调用，和创建全新账户的 ETH 转账，都付 21,000，尽管后者多写入了一个余额，并永久地增加了状态。简单交易多付了，创建状态的交易却少付了。\n\nEIP-2780 把这个常数替换成若干命名基本项之和，每一项都根据实测的客户端运行时间定价，并且只在状态相关的成本实际发生时才收取。\n\n## 它如何运作\n\n**Intrinsic gas**（仅凭交易本身即可计算，是有效性判断的唯一输入）：\n\n| 部分 | Gas | 何时 |\n| --- | --- | --- |\n| `TX_BASE_COST` | 12,000 | 始终收取：签名恢复、发送者访问/写入、纳入区块 |\n| `COLD_ACCOUNT_ACCESS` | 3,000 | 接收者不是发送者 |\n| `TX_VALUE_COST` | 6,000 | 向另一个账户转非零金额（余额写入 + 转账日志） |\n| `CREATE_ACCESS` | 12,000 | 创建合约的交易，取代上面两项 |\n\n因此，向已有账户的普通 ETH 转账仍然是 **21,000**，零金额调用是 **15,000**，自己转给自己是 **12,000**。即使 [EIP-2930](/eip-2930/) 访问列表中列出了接收者，对接收者的访问也始终按冷访问费率收取。\n\n**运行时 gas**（与状态相关，在第一个调用帧之前收取）：\n\n- 向不存在的账户转账，或部署到全新的地址，要支付新账户的 **state gas**（`STATE_BYTES_PER_NEW_ACCOUNT × CPSB`，按 [EIP-8037](/eip-8037/) 当前参数为 183,600）。\n- 调用一个被 [EIP-7702](/eip-7702/) 委托的账户，需要为加载委托目标付费（冷访问 3,000 / 热访问 100）。\n- 7702 授权在 intrinsic 中为每个授权支付固定的基础费用，另外新账户、首次写入和委托字节的费用只在适用时才收取。\n\n如果运行时 gas 耗尽，交易**并不**无效：它会被纳入区块，发送者为已用的 gas 付费，nonce 递增，执行前的状态变更（包括委托）会被回滚，就像调用内部的 out-of-gas 一样。\n\n## 示例代码\n\nintrinsic 基础部分的伪代码（calldata、访问列表和授权的收费不变，已省略）：\n\n```python\nTX_BASE_COST = 12_000\nCOLD_ACCOUNT_ACCESS = 3_000\nTX_VALUE_COST = 6_000\nCREATE_ACCESS = 12_000\n\ndef intrinsic_base(tx) -\u003e int:\n    gas = TX_BASE_COST\n    if tx.to is None:                 # contract creation\n        return gas + CREATE_ACCESS\n    if tx.to == tx.sender:            # self-transfer\n        return gas\n    gas += COLD_ACCOUNT_ACCESS\n    if tx.value \u003e 0:\n        gas += TX_VALUE_COST\n    return gas\n\nassert intrinsic_base(Tx(sender=A, to=B, value=1)) == 21_000\nassert intrinsic_base(Tx(sender=A, to=B, value=0)) == 15_000\n```\n\n## 需要注意\n\n- 状态为 **Last Call**。它依赖其他几项同样处于 Last Call 的提案，尤其是 [EIP-8037](/eip-8037/)（state gas）和 [EIP-8038](/eip-8038/)（访问成本），它们的数值变动时，这项提案的数值也会变。\n- 这是需要网络升级的共识变更。把 21,000 硬编码的钱包和 gas 估算器必须更新，尤其是创建新账户的转账，其费用会高得多。\n- [EIP-7623](/eip-7623/) 的 calldata 下限（floor）改为以拆分后的基础成本为基准，而不是固定的 21,000。\n- calldata 和访问列表的定价不变。\n"}},"requiredBy":[3298,8007,8037,8141,8202,8358]}
