---
eip: 2711
label: EIP-2711
title: Sponsored, expiring and batch transactions.
status: Withdrawn
type: Standards Track
category: Core
created: 2020-06-11
requires: 2718
official: https://eips.ethereum.org/EIPS/eip-2711
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2711.md
canonical: https://eips.huatuo.xyz/eip-2711/
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]
---

# EIP-2711: Sponsored, expiring and batch transactions.

> 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).

**TL;DR:** 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).

## What problem does it solve?

Three recurring pain points motivated this proposal:

- **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.
- **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.
- **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.

## How it works

It 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).

| Subtype | Who sets `gasLimit` | Who sets `gasPrice` | Gas payer signature |
| --- | --- | --- | --- |
| 1 | sender | sender | none (sender pays) |
| 2 | sender | sender | yes |
| 3 | sender | gas payer | yes |
| 4 | gas payer | gas payer | yes |

- The **sender** signs `keccak256(rlp([2, SenderPayload]))`. That address is `msg.sender` and `tx.origin`, its nonce is used, and it pays any `value`.
- The **gas payer** (subtypes 2–4) signs over the sender payload, the sender's signature and its own fields. Its balance pays for gas.
- Child transactions run in order, and the receipt contains one result per child.

## Sample code

Payload layout for subtype 3 (sender fixes the gas limit, sponsor picks the price), as RLP pseudocode:

```python
TYPE = 2
children = [[to1, value1, data1], [to2, value2, data2]]

sender_payload = [3, children, nonce, chain_id, valid_until, gas_limit]
sender_sig = sign(sender_key, keccak256(rlp([TYPE, sender_payload])))      # [yParity, r, s]

gas_payer_payload = [gas_price]
gas_payer_sig = sign(payer_key,
                     keccak256(rlp([sender_payload, sender_sig, gas_payer_payload])))

tx = bytes([TYPE]) + rlp([*sender_payload, *sender_sig, *gas_payer_payload, *gas_payer_sig])
```

## Things to know

- 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.
- 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.
- The spec left the base gas constants (`TRANSACTION_TYPE_2_BASE_GAS_PRICE`, per-child cost) undefined.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2711
