{"eip":1285,"title":"Increase Gcallstipend gas in the CALL opcode","description":"Increase the Gcallstipend fee parameter in the CALL opcode from 2,300 to 3,500 gas units.","authors":["Ben Kaufman \u003cben@daostack.io\u003e","Adam Levi \u003cadam@daostack.io\u003e"],"status":"Stagnant","type":"Standards Track","category":"Core","created":"2018-08-01","discussionsTo":"https://ethereum-magicians.org/t/eip-1285-increase-gcallstipend-gas-in-the-call-opcode/941","repo":"EIPs","label":"EIP-1285","officialUrl":"https://eips.ethereum.org/EIPS/eip-1285","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1285.md","url":"https://eips.huatuo.xyz/eip-1285/","tldr":{"en":"Proposed raising the free 2,300-gas stipend given to a contract receiving ETH via CALL to 3,500, so proxy contracts could run a meaningful fallback.","ja":"CALL で ETH を受け取るコントラクトに与えられる無償の 2,300 gas のスタイペンドを 3,500 に引き上げ、プロキシコントラクトが意味のあるフォールバックを実行できるようにする提案。","ko":"CALL로 ETH를 받는 컨트랙트에 주어지는 무료 2,300 gas 스티펜드를 3,500으로 올려, 프록시 컨트랙트가 의미 있는 폴백을 실행할 수 있게 하자는 제안.","zh":"曾提议把通过 CALL 接收 ETH 的合约所获得的免费 2,300 gas 津贴提高到 3,500，让代理合约能运行有实际意义的 fallback。"},"tags":["evm","gas","call","proxy","stagnant"],"explainers":{"en":{"lang":"en","tldr":"Proposed raising the free 2,300-gas stipend given to a contract receiving ETH via CALL to 3,500, so proxy contracts could run a meaningful fallback.","tags":["evm","gas","call","proxy","stagnant"],"related":[1967,150,2929,1884],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1285/","markdown":"## What problem does it solve?\n\nWhen a contract sends ETH with a value-bearing `CALL`, the EVM adds a small free gas allowance, the **call stipend** (`Gcallstipend`, 2,300 gas), so the receiving contract's fallback can run. It is kept small on purpose: enough to emit a log, not enough to write storage or re-enter in dangerous ways. Solidity's `transfer()` and `send()` forward only this stipend.\n\nThe problem raised in 2018 was **proxy contracts**. A proxy forwards every call to a logic contract with `DELEGATECALL`, which the authors estimated costs about 1,000 gas on its own. That leaves roughly 1,300 gas for the real fallback logic, too little even for a typical `LOG`. In practice, ETH sent with `transfer()` to a proxy-based wallet could fail.\n\n## How it works\n\nThe change is a single constant:\n\n| Parameter | Before | Proposed |\n| --- | --- | --- |\n| `Gcallstipend` | 2,300 | 3,500 |\n\nThe extra 1,200 gas was chosen to cover a `DELEGATECALL` plus an `SLOAD` (to read the implementation address) with a small margin, while still staying too low to change state. Clients would simply update the constant they store; the authors linked a Geth branch doing exactly that.\n\nIt is a backwards-incompatible consensus change and would have needed a hard fork.\n\n## Sample code\n\nThe pattern that motivated the EIP: a contract paying out with the stipend-limited `transfer`, and a proxy whose fallback must fit inside it.\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Payer {\n    function pay(address payable to) external payable {\n        // Forwards only the 2,300 gas stipend to `to`.\n        // If `to` is a proxy, DELEGATECALL + logic must fit in that budget.\n        to.transfer(msg.value);\n    }\n\n    function paySafe(address payable to) external payable {\n        // Modern practice: forward all gas and check the result,\n        // guarding against reentrancy elsewhere.\n        (bool ok, ) = to.call{value: msg.value}(\"\");\n        require(ok, \"send failed\");\n    }\n}\n```\n\nPseudocode of the client change:\n\n```python\nCALL_STIPEND = 2300   # current\nCALL_STIPEND = 3500   # EIP-1285\n```\n\n## Things to know\n\n- **Status: Stagnant.** It was never scheduled for a hard fork; the stipend on Ethereum Mainnet is still 2,300 gas.\n- Later repricings went the other way: storage access got more expensive ([EIP-1884](/eip-1884/), [EIP-2929](/eip-2929/)), which made the fixed stipend even tighter for proxies.\n- The common workaround is to avoid `transfer()`/`send()` and use `call{value: ...}(\"\")` with a reentrancy guard, so the receiver gets enough gas.\n- Proxies usually read their implementation from a standard slot such as [ERC-1967](/eip-1967/); that `SLOAD` is part of why the stipend is too small.\n"},"ja":{"lang":"ja","tldr":"CALL で ETH を受け取るコントラクトに与えられる無償の 2,300 gas のスタイペンドを 3,500 に引き上げ、プロキシコントラクトが意味のあるフォールバックを実行できるようにする提案。","tags":["evm","gas","call","proxy","stagnant"],"related":[1967,150,2929,1884],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1285/","markdown":"## 何を解決するのか\n\nコントラクトが value 付きの `CALL` で ETH を送ると、EVM は受信側コントラクトのフォールバックが実行できるように、少量の無償の gas 枠、つまり**コールスタイペンド**（`Gcallstipend`、2,300 gas）を加えます。これは意図的に小さくしてあり、ログを出すには足りても、ストレージへの書き込みや危険な再入には足りません。Solidity の `transfer()` と `send()` は、このスタイペンドしか転送しません。\n\n2018 年に提起された問題は**プロキシコントラクト**でした。プロキシはすべての呼び出しを `DELEGATECALL` でロジックコントラクトに転送しますが、著者らはそれだけで約 1,000 gas かかると見積もりました。実際のフォールバックのロジックに残るのは約 1,300 gas で、一般的な `LOG` にすら足りません。実際に、プロキシベースのウォレットに `transfer()` で送った ETH が失敗することがありました。\n\n## 仕組み\n\n変更は定数 1 つです。\n\n| パラメーター | 変更前 | 提案 |\n| --- | --- | --- |\n| `Gcallstipend` | 2,300 | 3,500 |\n\n追加の 1,200 gas は、`DELEGATECALL` と `SLOAD`（実装アドレスの読み取り用）を少しの余裕を持って賄えるように選ばれました。それでも、状態を変更するには足りない低さです。クライアントは保持している定数を更新するだけで済み、著者らはまさにそれを行う Geth のブランチへリンクしていました。\n\nこれは後方互換性のないコンセンサスの変更で、ハードフォークが必要になります。\n\n## サンプルコード\n\nこの EIP の動機となったパターンです。スタイペンドが制限された `transfer` で支払うコントラクトと、そのスタイペンドに収まる必要があるフォールバックを持つプロキシです。\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Payer {\n    function pay(address payable to) external payable {\n        // Forwards only the 2,300 gas stipend to `to`.\n        // If `to` is a proxy, DELEGATECALL + logic must fit in that budget.\n        to.transfer(msg.value);\n    }\n\n    function paySafe(address payable to) external payable {\n        // Modern practice: forward all gas and check the result,\n        // guarding against reentrancy elsewhere.\n        (bool ok, ) = to.call{value: msg.value}(\"\");\n        require(ok, \"send failed\");\n    }\n}\n```\n\nクライアント側の変更を示す疑似コードです。\n\n```python\nCALL_STIPEND = 2300   # current\nCALL_STIPEND = 3500   # EIP-1285\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** ハードフォークに予定されたことはなく、Ethereum メインネットのスタイペンドは今も 2,300 gas です。\n- その後の価格改定は逆方向でした。ストレージアクセスが高くなり（[EIP-1884](/eip-1884/)、[EIP-2929](/eip-2929/)）、固定のスタイペンドはプロキシにとってさらに厳しくなりました。\n- 一般的な回避策は、`transfer()`/`send()` を避けて、リエントランシーガードを併用した `call{value: ...}(\"\")` を使い、受信側に十分な gas が渡るようにすることです。\n- プロキシは通常、[ERC-1967](/eip-1967/) のような標準スロットから実装を読み取ります。この `SLOAD` も、スタイペンドが小さすぎる理由の一部です。\n"},"ko":{"lang":"ko","tldr":"CALL로 ETH를 받는 컨트랙트에 주어지는 무료 2,300 gas 스티펜드를 3,500으로 올려, 프록시 컨트랙트가 의미 있는 폴백을 실행할 수 있게 하자는 제안.","tags":["evm","gas","call","proxy","stagnant"],"related":[1967,150,2929,1884],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1285/","markdown":"## 어떤 문제를 해결하나요?\n\n컨트랙트가 value가 있는 `CALL`로 ETH를 보내면, EVM은 받는 컨트랙트의 폴백이 실행될 수 있도록 약간의 무료 gas 한도인 **콜 스티펜드**(`Gcallstipend`, 2,300 gas)를 더해 줍니다. 이는 의도적으로 작게 유지됩니다. 로그를 남기기에는 충분하지만 스토리지에 쓰거나 위험한 방식으로 재진입하기에는 부족합니다. Solidity의 `transfer()`와 `send()`는 이 스티펜드만 전달합니다.\n\n2018년에 제기된 문제는 **프록시 컨트랙트**였습니다. 프록시는 모든 호출을 `DELEGATECALL`로 로직 컨트랙트에 전달하는데, 저자들은 이것만으로 약 1,000 gas가 든다고 추정했습니다. 그러면 실제 폴백 로직에는 약 1,300 gas가 남아, 일반적인 `LOG` 하나도 부족합니다. 실제로 `transfer()`로 프록시 기반 지갑에 보낸 ETH가 실패할 수 있었습니다.\n\n## 어떻게 동작하나요?\n\n변경은 상수 하나입니다.\n\n| 매개변수 | 변경 전 | 제안 |\n| --- | --- | --- |\n| `Gcallstipend` | 2,300 | 3,500 |\n\n추가된 1,200 gas는 `DELEGATECALL`과 `SLOAD`(구현 주소를 읽기 위한)를 약간의 여유와 함께 감당하면서도, 상태를 바꾸기에는 여전히 낮도록 정해졌습니다. 클라이언트는 저장하고 있는 상수를 갱신하기만 하면 되며, 저자들은 바로 그렇게 하는 Geth 브랜치를 링크했습니다.\n\n이는 하위 호환이 되지 않는 합의 변경이며 하드 포크가 필요했을 것입니다.\n\n## 샘플 코드\n\n이 EIP의 동기가 된 패턴입니다. 스티펜드가 제한된 `transfer`로 지급하는 컨트랙트와, 폴백이 그 안에 들어와야 하는 프록시입니다.\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Payer {\n    function pay(address payable to) external payable {\n        // Forwards only the 2,300 gas stipend to `to`.\n        // If `to` is a proxy, DELEGATECALL + logic must fit in that budget.\n        to.transfer(msg.value);\n    }\n\n    function paySafe(address payable to) external payable {\n        // Modern practice: forward all gas and check the result,\n        // guarding against reentrancy elsewhere.\n        (bool ok, ) = to.call{value: msg.value}(\"\");\n        require(ok, \"send failed\");\n    }\n}\n```\n\n클라이언트 변경을 나타내는 의사 코드입니다.\n\n```python\nCALL_STIPEND = 2300   # current\nCALL_STIPEND = 3500   # EIP-1285\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 하드 포크로 예정된 적이 없으며, 이더리움 메인넷의 스티펜드는 여전히 2,300 gas입니다.\n- 이후의 가격 재조정은 반대 방향이었습니다. 스토리지 접근이 더 비싸져([EIP-1884](/eip-1884/), [EIP-2929](/eip-2929/)) 고정 스티펜드는 프록시에 더욱 빠듯해졌습니다.\n- 흔한 우회책은 `transfer()`/`send()`를 피하고 재진입 가드와 함께 `call{value: ...}(\"\")`를 사용해 받는 쪽이 충분한 gas를 받게 하는 것입니다.\n- 프록시는 보통 [ERC-1967](/eip-1967/) 같은 표준 슬롯에서 구현 주소를 읽습니다. 이 `SLOAD`도 스티펜드가 너무 작은 이유의 일부입니다.\n"},"zh":{"lang":"zh","tldr":"曾提议把通过 CALL 接收 ETH 的合约所获得的免费 2,300 gas 津贴提高到 3,500，让代理合约能运行有实际意义的 fallback。","tags":["evm","gas","call","proxy","stagnant"],"related":[1967,150,2929,1884],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1285/","markdown":"## 它解决什么问题？\n\n当合约用带 value 的 `CALL` 发送 ETH 时，EVM 会额外给出一小笔免费 gas，即**调用津贴**（`Gcallstipend`，2,300 gas），使接收合约的 fallback 得以运行。它被有意设得很小：足够发出一条日志，却不足以写存储或以危险的方式重入。Solidity 的 `transfer()` 和 `send()` 只转发这笔津贴。\n\n2018 年提出的问题与**代理合约**有关。代理用 `DELEGATECALL` 把每次调用转发给逻辑合约，作者估计仅这一步就要消耗约 1,000 gas。这样留给真正的 fallback 逻辑的只有约 1,300 gas，连一条典型的 `LOG` 都不够。实际上，用 `transfer()` 向基于代理的钱包发送 ETH 可能会失败。\n\n## 它如何运作\n\n改动只是一个常量：\n\n| 参数 | 之前 | 提议 |\n| --- | --- | --- |\n| `Gcallstipend` | 2,300 | 3,500 |\n\n多出的 1,200 gas 是为了留出少量余量，覆盖一次 `DELEGATECALL` 加一次 `SLOAD`（读取实现地址），同时仍然低到无法修改状态。客户端只需更新自己保存的常量；作者附上了一个正是这样做的 Geth 分支链接。\n\n这是一项不向后兼容的共识改动，需要一次硬分叉。\n\n## 示例代码\n\n促成这份 EIP 的模式：一个用受津贴限制的 `transfer` 付款的合约，以及一个 fallback 必须在津贴范围内完成的代理。\n\n```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\ncontract Payer {\n    function pay(address payable to) external payable {\n        // Forwards only the 2,300 gas stipend to `to`.\n        // If `to` is a proxy, DELEGATECALL + logic must fit in that budget.\n        to.transfer(msg.value);\n    }\n\n    function paySafe(address payable to) external payable {\n        // Modern practice: forward all gas and check the result,\n        // guarding against reentrancy elsewhere.\n        (bool ok, ) = to.call{value: msg.value}(\"\");\n        require(ok, \"send failed\");\n    }\n}\n```\n\n客户端改动的伪代码：\n\n```python\nCALL_STIPEND = 2300   # current\nCALL_STIPEND = 3500   # EIP-1285\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 它从未被排入硬分叉；以太坊主网上的津贴仍然是 2,300 gas。\n- 之后的重新定价方向恰好相反：存储访问变得更贵（[EIP-1884](/eip-1884/)、[EIP-2929](/eip-2929/)），使固定津贴对代理来说更加紧张。\n- 常见的变通办法是避免使用 `transfer()`/`send()`，改用带重入保护的 `call{value: ...}(\"\")`，让接收方获得足够的 gas。\n- 代理通常从 [ERC-1967](/eip-1967/) 这样的标准槽位读取其实现地址；这次 `SLOAD` 也是津贴太小的原因之一。\n"}}}
