{"eip":2711,"title":"Sponsored, expiring and batch transactions.","description":"Creates a new transaction type that supports sponsored transactions (separate gas payer from sender), batch transactions (multiple transactions executed in sequence), and expiring transactions (transactions which are not valid after a certain timestamp).","authors":["Micah Zoltu (@MicahZoltu)"],"status":"Withdrawn","type":"Standards Track","category":"Core","created":"2020-06-11","requires":[2718],"discussionsTo":"https://ethereum-magicians.org/t/eip-2711-separate-gas-payer-from-msg-sender/4353","repo":"EIPs","label":"EIP-2711","officialUrl":"https://eips.ethereum.org/EIPS/eip-2711","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2711.md","url":"https://eips.huatuo.xyz/eip-2711/","tldr":{"en":"A withdrawn proposal for a typed transaction that bundled three features: a separate gas payer (sponsored transactions), several calls executed in sequence (batching) and a validUntil timestamp (expiry).","ja":"3 つの機能をまとめた型付きトランザクションの、取り下げられた提案。ガス支払者の分離（スポンサー付きトランザクション）、複数呼び出しの順次実行（バッチ処理）、validUntil タイムスタンプ（有効期限）を備える。","ko":"세 가지 기능을 묶은 타입 트랜잭션에 대한, 철회된 제안. 별도의 가스 지불자(후원 트랜잭션), 여러 호출의 순차 실행(배치), validUntil 타임스탬프(만료)를 갖춘다.","zh":"一项已撤回的提案：设计一种类型化交易，同时包含三个功能：独立的 gas 支付者（赞助交易）、按顺序执行多个调用（批处理）以及 validUntil 时间戳（有效期）。"},"tags":["transactions","core","sponsorship","batching","withdrawn"],"explainers":{"en":{"lang":"en","tldr":"A withdrawn proposal for a typed transaction that bundled three features: a separate gas payer (sponsored transactions), several calls executed in sequence (batching) and a validUntil timestamp (expiry).","tags":["transactions","core","sponsorship","batching","withdrawn"],"related":[2718,1559,4337,7702,3074],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2711/","markdown":"## What problem does it solve?\n\nThree recurring pain points motivated this proposal:\n\n- **Users without ETH.** Someone holding only stablecoins cannot move them, because gas must be paid in ETH from the same account. Contract-level workarounds need every contract to integrate them.\n- **No atomic multi-step actions for EOAs.** \"Send tokens, then call the contract that registers them\" takes two transactions, and anything can happen between them.\n- **Transactions that linger.** A transaction can sit in the mempool for days and execute long after it is useful. A built-in expiry would also give replay protection that does not depend on nonces.\n\n## How it works\n\nIt defined an [EIP-2718](/eip-2718/) transaction with type `2` and four subtypes. Each carries a list of child transactions `[to, value, data]`, plus `nonce`, `ChainId` (0 = any chain) and `ValidUntil` (0 = never expires; otherwise a block timestamp limit).\n\n| Subtype | Who sets `gasLimit` | Who sets `gasPrice` | Gas payer signature |\n| --- | --- | --- | --- |\n| 1 | sender | sender | none (sender pays) |\n| 2 | sender | sender | yes |\n| 3 | sender | gas payer | yes |\n| 4 | gas payer | gas payer | yes |\n\n- The **sender** signs `keccak256(rlp([2, SenderPayload]))`. That address is `msg.sender` and `tx.origin`, its nonce is used, and it pays any `value`.\n- The **gas payer** (subtypes 2–4) signs over the sender payload, the sender's signature and its own fields. Its balance pays for gas.\n- Child transactions run in order, and the receipt contains one result per child.\n\n## Sample code\n\nPayload layout for subtype 3 (sender fixes the gas limit, sponsor picks the price), as RLP pseudocode:\n\n```python\nTYPE = 2\nchildren = [[to1, value1, data1], [to2, value2, data2]]\n\nsender_payload = [3, children, nonce, chain_id, valid_until, gas_limit]\nsender_sig = sign(sender_key, keccak256(rlp([TYPE, sender_payload])))      # [yParity, r, s]\n\ngas_payer_payload = [gas_price]\ngas_payer_sig = sign(payer_key,\n                     keccak256(rlp([sender_payload, sender_sig, gas_payer_payload])))\n\ntx = bytes([TYPE]) + rlp([*sender_payload, *sender_sig, *gas_payer_payload, *gas_payer_sig])\n```\n\n## Things to know\n\n- Status: **Withdrawn**. It was never deployed. Transaction type `0x02` was later used by [EIP-1559](/eip-1559/) for fee-market transactions, so this layout does not exist on Ethereum.\n- The same goals were later pursued in other ways: [ERC-4337](/eip-4337/) brings sponsorship (paymasters) and batching through smart accounts, and [EIP-7702](/eip-7702/) lets EOAs delegate to contract code that can batch calls and accept sponsored execution. [EIP-3074](/eip-3074/) tried an opcode-based route and was also withdrawn.\n- The spec left the base gas constants (`TRANSACTION_TYPE_2_BASE_GAS_PRICE`, per-child cost) undefined.\n"},"ja":{"lang":"ja","tldr":"3 つの機能をまとめた型付きトランザクションの、取り下げられた提案。ガス支払者の分離（スポンサー付きトランザクション）、複数呼び出しの順次実行（バッチ処理）、validUntil タイムスタンプ（有効期限）を備える。","tags":["transactions","core","sponsorship","batching","withdrawn"],"related":[2718,1559,4337,7702,3074],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2711/","markdown":"## 何を解決するのか\n\nこの提案の動機になったのは、繰り返し起きる 3 つの課題です。\n\n- **ETH を持たないユーザー。** ステーブルコインしか持っていない人は、それを動かせません。ガス代を同じアカウントの ETH で支払う必要があるためです。コントラクトレベルの回避策は、すべてのコントラクトがそれに対応する必要があります。\n- **EOA にはアトミックな複数ステップの操作がない。** 「トークンを送り、そのトークンを登録するコントラクトを呼ぶ」には 2 つのトランザクションが必要で、その間には何が起きてもおかしくありません。\n- **滞留するトランザクション。** トランザクションは mempool に何日も留まり、役に立たなくなってからずっと後に実行されることがあります。組み込みの有効期限があれば、nonce に依存しないリプレイ保護も得られます。\n\n## 仕組み\n\n[EIP-2718](/eip-2718/) のトランザクションとして、タイプ `2` と 4 つのサブタイプを定義していました。各トランザクションは、子トランザクション `[to, value, data]` のリストに加えて、`nonce`、`ChainId`（0 = 任意のチェーン）、`ValidUntil`（0 = 期限なし。それ以外はブロックのタイムスタンプの上限）を持ちます。\n\n| サブタイプ | `gasLimit` を設定する者 | `gasPrice` を設定する者 | ガス支払者の署名 |\n| --- | --- | --- | --- |\n| 1 | 送信者 | 送信者 | なし（送信者が支払う） |\n| 2 | 送信者 | 送信者 | あり |\n| 3 | 送信者 | ガス支払者 | あり |\n| 4 | ガス支払者 | ガス支払者 | あり |\n\n- **送信者**は `keccak256(rlp([2, SenderPayload]))` に署名します。このアドレスが `msg.sender` と `tx.origin` になり、その nonce が使われ、`value` もこのアドレスが支払います。\n- **ガス支払者**（サブタイプ 2〜4）は、送信者のペイロード、送信者の署名、および自身のフィールドに対して署名します。ガス代はその残高から支払われます。\n- 子トランザクションは順番に実行され、レシートには子ごとに 1 つの結果が含まれます。\n\n## サンプルコード\n\nサブタイプ 3（送信者がガスリミットを固定し、スポンサーが価格を決める）のペイロードのレイアウトを、RLP の擬似コードで示します。\n\n```python\nTYPE = 2\nchildren = [[to1, value1, data1], [to2, value2, data2]]\n\nsender_payload = [3, children, nonce, chain_id, valid_until, gas_limit]\nsender_sig = sign(sender_key, keccak256(rlp([TYPE, sender_payload])))      # [yParity, r, s]\n\ngas_payer_payload = [gas_price]\ngas_payer_sig = sign(payer_key,\n                     keccak256(rlp([sender_payload, sender_sig, gas_payer_payload])))\n\ntx = bytes([TYPE]) + rlp([*sender_payload, *sender_sig, *gas_payer_payload, *gas_payer_sig])\n```\n\n## 知っておくべきこと\n\n- ステータス: **Withdrawn**。デプロイされたことはありません。トランザクションタイプ `0x02` は後に [EIP-1559](/eip-1559/) が手数料市場のトランザクション用に使ったため、このレイアウトは Ethereum には存在しません。\n- 同じ目標は、後に別の方法で追求されました。[ERC-4337](/eip-4337/) はスマートアカウントを通じてスポンサー（Paymaster）とバッチ処理を実現し、[EIP-7702](/eip-7702/) は EOA が、呼び出しのバッチ処理やスポンサー付き実行を受け付けられるコントラクトコードに委任できるようにします。[EIP-3074](/eip-3074/) はオペコードベースの方法を試みましたが、こちらも取り下げられました。\n- 仕様は、基本ガス定数（`TRANSACTION_TYPE_2_BASE_GAS_PRICE`、子ごとのコスト）を未定義のままにしていました。\n"},"ko":{"lang":"ko","tldr":"세 가지 기능을 묶은 타입 트랜잭션에 대한, 철회된 제안. 별도의 가스 지불자(후원 트랜잭션), 여러 호출의 순차 실행(배치), validUntil 타임스탬프(만료)를 갖춘다.","tags":["transactions","core","sponsorship","batching","withdrawn"],"related":[2718,1559,4337,7702,3074],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2711/","markdown":"## 어떤 문제를 해결하나요?\n\n반복되는 세 가지 불편이 이 제안의 동기가 되었습니다.\n\n- **ETH가 없는 사용자.** 스테이블코인만 가진 사람은 그것을 옮길 수 없습니다. 가스비를 같은 계정의 ETH로 내야 하기 때문입니다. 컨트랙트 차원의 우회책은 모든 컨트랙트가 이를 연동해야 합니다.\n- **EOA에는 원자적인 다단계 동작이 없음.** \"토큰을 보낸 다음 그 토큰을 등록하는 컨트랙트를 호출\"하려면 트랜잭션이 두 개 필요하고, 그 사이에는 무슨 일이든 일어날 수 있습니다.\n- **오래 머무는 트랜잭션.** 트랜잭션이 멤풀에 며칠씩 남아 있다가 쓸모가 없어진 한참 뒤에 실행될 수 있습니다. 내장 만료가 있으면 nonce에 의존하지 않는 리플레이 방지도 얻을 수 있습니다.\n\n## 어떻게 동작하나요?\n\n[EIP-2718](/eip-2718/) 트랜잭션으로, 타입 `2`와 네 가지 서브타입을 정의했습니다. 각 트랜잭션은 자식 트랜잭션 `[to, value, data]`의 목록과 `nonce`, `ChainId`(0 = 모든 체인), `ValidUntil`(0 = 만료 없음, 그 외에는 블록 타임스탬프 한도)을 담습니다.\n\n| 서브타입 | `gasLimit`을 정하는 쪽 | `gasPrice`를 정하는 쪽 | 가스 지불자 서명 |\n| --- | --- | --- | --- |\n| 1 | 발신자 | 발신자 | 없음(발신자가 지불) |\n| 2 | 발신자 | 발신자 | 있음 |\n| 3 | 발신자 | 가스 지불자 | 있음 |\n| 4 | 가스 지불자 | 가스 지불자 | 있음 |\n\n- **발신자**는 `keccak256(rlp([2, SenderPayload]))`에 서명합니다. 이 주소가 `msg.sender`와 `tx.origin`이 되고, 그 nonce가 사용되며, `value`도 이 주소가 지불합니다.\n- **가스 지불자**(서브타입 2–4)는 발신자의 페이로드, 발신자의 서명, 그리고 자신의 필드에 서명합니다. 가스비는 그 잔액에서 지불됩니다.\n- 자식 트랜잭션은 순서대로 실행되며, 영수증에는 자식마다 결과가 하나씩 들어 있습니다.\n\n## 샘플 코드\n\n서브타입 3(발신자가 가스 한도를 고정하고 후원자가 가격을 정함)의 페이로드 구조를 RLP 의사 코드로 나타냅니다.\n\n```python\nTYPE = 2\nchildren = [[to1, value1, data1], [to2, value2, data2]]\n\nsender_payload = [3, children, nonce, chain_id, valid_until, gas_limit]\nsender_sig = sign(sender_key, keccak256(rlp([TYPE, sender_payload])))      # [yParity, r, s]\n\ngas_payer_payload = [gas_price]\ngas_payer_sig = sign(payer_key,\n                     keccak256(rlp([sender_payload, sender_sig, gas_payer_payload])))\n\ntx = bytes([TYPE]) + rlp([*sender_payload, *sender_sig, *gas_payer_payload, *gas_payer_sig])\n```\n\n## 알아둘 점\n\n- 상태: **Withdrawn**. 배포된 적이 없습니다. 트랜잭션 타입 `0x02`는 나중에 [EIP-1559](/eip-1559/)가 수수료 시장 트랜잭션에 사용했으므로, 이 구조는 이더리움에 존재하지 않습니다.\n- 같은 목표는 나중에 다른 방식으로 추구되었습니다. [ERC-4337](/eip-4337/)은 스마트 계정을 통해 후원(paymaster)과 배치를 제공하고, [EIP-7702](/eip-7702/)는 EOA가 호출을 배치하고 후원 실행을 받을 수 있는 컨트랙트 코드에 위임하게 해 줍니다. [EIP-3074](/eip-3074/)는 오퍼코드 기반 방식을 시도했으나 역시 철회되었습니다.\n- 명세는 기본 가스 상수(`TRANSACTION_TYPE_2_BASE_GAS_PRICE`, 자식별 비용)를 정의하지 않은 채로 두었습니다.\n"},"zh":{"lang":"zh","tldr":"一项已撤回的提案：设计一种类型化交易，同时包含三个功能：独立的 gas 支付者（赞助交易）、按顺序执行多个调用（批处理）以及 validUntil 时间戳（有效期）。","tags":["transactions","core","sponsorship","batching","withdrawn"],"related":[2718,1559,4337,7702,3074],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2711/","markdown":"## 它解决什么问题？\n\n三个反复出现的痛点促成了这个提案：\n\n- **没有 ETH 的用户。** 只持有稳定币的人无法转移它们，因为 gas 必须用同一账户中的 ETH 支付。合约层面的变通办法要求每个合约都去集成。\n- **EOA 无法执行原子化的多步操作。** \"先转代币，再调用登记这些代币的合约\"需要两笔交易，而两者之间什么都可能发生。\n- **久拖不决的交易。** 一笔交易可能在内存池里停留数天，在早已失去意义之后才被执行。内置的有效期还能提供不依赖 nonce 的重放保护。\n\n## 它如何运作\n\n它定义了一种类型为 `2` 的 [EIP-2718](/eip-2718/) 交易，带有四个子类型。每笔交易携带一个子交易列表 `[to, value, data]`，外加 `nonce`、`ChainId`（0 = 任意链）和 `ValidUntil`（0 = 永不过期；否则为区块时间戳上限）。\n\n| 子类型 | 谁设置 `gasLimit` | 谁设置 `gasPrice` | gas 支付者签名 |\n| --- | --- | --- | --- |\n| 1 | 发送者 | 发送者 | 无（发送者支付） |\n| 2 | 发送者 | 发送者 | 有 |\n| 3 | 发送者 | gas 支付者 | 有 |\n| 4 | gas 支付者 | gas 支付者 | 有 |\n\n- **发送者**对 `keccak256(rlp([2, SenderPayload]))` 签名。该地址即 `msg.sender` 和 `tx.origin`，使用它的 nonce，并由它支付任何 `value`。\n- **gas 支付者**（子类型 2–4）对发送者的载荷、发送者的签名以及自己的字段签名。gas 费用从其余额中扣除。\n- 子交易按顺序执行，回执中每个子交易对应一个结果。\n\n## 示例代码\n\n子类型 3（发送者固定 gas 上限，赞助者决定价格）的载荷布局，以 RLP 伪代码表示：\n\n```python\nTYPE = 2\nchildren = [[to1, value1, data1], [to2, value2, data2]]\n\nsender_payload = [3, children, nonce, chain_id, valid_until, gas_limit]\nsender_sig = sign(sender_key, keccak256(rlp([TYPE, sender_payload])))      # [yParity, r, s]\n\ngas_payer_payload = [gas_price]\ngas_payer_sig = sign(payer_key,\n                     keccak256(rlp([sender_payload, sender_sig, gas_payer_payload])))\n\ntx = bytes([TYPE]) + rlp([*sender_payload, *sender_sig, *gas_payer_payload, *gas_payer_sig])\n```\n\n## 需要注意\n\n- 状态：**Withdrawn**。它从未部署。交易类型 `0x02` 后来被 [EIP-1559](/eip-1559/) 用于费用市场交易，因此这种布局在以太坊上并不存在。\n- 同样的目标后来通过其他方式实现：[ERC-4337](/eip-4337/) 通过智能账户带来赞助（paymaster）和批处理，[EIP-7702](/eip-7702/) 则让 EOA 可以委托给能批量调用并接受赞助执行的合约代码。[EIP-3074](/eip-3074/) 尝试过基于操作码的路线，同样被撤回。\n- 规范没有定义基础 gas 常量（`TRANSACTION_TYPE_2_BASE_GAS_PRICE`、每个子交易的成本）。\n"}}}
