EIPs Explained

EIP-2733 · Withdrawn · Core · 2020-06-16

EIP-2733: Transaction Package

A withdrawn proposal for a new transaction type that bundles several signed transactions into one package, executed in order, so a relayer could sponsor gas and each step could see the previous step's result.

What problem does it solve?

New users often cannot transact on Ethereum because they have no ETH for gas. The usual workaround is meta-transactions: a user signs a message, a relayer submits it to a relay contract, and the contract verifies the signature and forwards the call. This is brittle. Relay contracts must recover signatures themselves, track their own nonces, and pass only part of the gas to the inner call so they can still finish (for example to collect a fee) if it reverts.

EIP-2733 proposed solving this at the protocol level with a transaction package: a sponsor pays for gas for a sequence of transactions signed by other users, executed atomically in order.

How it works

The proposal defined a new EIP-2718 typed transaction (type 2 in the draft):

  • The outer TransactionPackage is signed by the sponsor and carries chain_id, nonce, gas_price and a list of children.
  • Each ChildPackage is signed by its own sender and contains that sender's nonce, a max_gas_price, and a list of ChildTransactions (to, value, data, gas_limit, plus reserved flags and extra fields).
  • A child type of 0x00 signs over everything including the gas limit; 0x01 leaves the gas limit out of the signature, delegating it to the sponsor.
  • Transactions execute one after another. Before each one runs, the result of the previous one (success, gas_used, cumulative gas, return data) is made available through RETURNDATACOPY in its first call frame, enabling conditional flows.
  • Each child produces its own receipt; the package receipt is the list of them.
  • The draft intrinsic cost was 17000 + 8000 × children + data cost.

Sample code

Illustrative structure of a package, as described in the draft:

TransactionPackage {            // signed by the sponsor (pays gas)
  chain_id, nonce, gas_price,
  children: [
    ChildPackage {              // signed by user A
      type: 0x00, nonce, max_gas_price,
      transactions: [
        { flags: 0, to: TokenA, value: 0, data: approve(...),  extra: 0x, gas_limit },
        { flags: 0, to: DEX,    value: 0, data: swap(...),     extra: 0x, gas_limit }
      ]
    }
  ],
  v, r, s
}

sig_hash = keccak256(rlp([2, chain_id, children, nonce, gas_price]))

Things to know

  • Status is Withdrawn. The author's stated reason was to pursue EIP-3074 (AUTH/AUTHCALL) instead.
  • EIP-3074 was itself later withdrawn. Sponsored and batched transactions on mainnet today come from EIP-7702 (EOAs delegating to contract code) and ERC-4337 (account abstraction via an alternative mempool).
  • The draft noted that contracts checking ORIGIN == CALLER with empty return data would behave differently inside a package, and that mempools would need careful handling to keep validation cheap.
  • Type 2 was later assigned to EIP-1559 fee-market transactions, so this draft's type number has no meaning today.

#transactions #core #meta-transactions #batching #withdrawn

Details

Authors
Matt Garnett (@lightclient)
Status
Withdrawn
Type
Standards Track / Core
Created
2020-06-16
Requires

Machine-readable: Markdown · JSON