---
eip: 2770
label: ERC-2770
title: Meta-Transactions Forwarder Contract
status: Withdrawn
type: Standards Track
category: ERC
created: 2020-07-01
requires: 712, 2771
official: https://eips.ethereum.org/EIPS/eip-2770
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2770.md
canonical: https://eips.huatuo.xyz/eip-2770/
lang: en
tldr: Proposed a standard Forwarder contract that verifies EIP-712 signed requests and relays them to target contracts, so users without ETH could interact via meta-transactions.
tags: [meta-transactions, gasless, forwarder, eip-712]
---

# ERC-2770: Meta-Transactions Forwarder Contract

> Standardized contract interface for extensible meta-transaction forwarding.

**TL;DR:** Proposed a standard Forwarder contract that verifies EIP-712 signed requests and relays them to target contracts, so users without ETH could interact via meta-transactions.

## What problem does it solve?

To call a contract you normally need ETH for gas. That is a large hurdle for new users. **Meta-transactions** work around it: the user signs a request off-chain, and a relayer wraps it in a real transaction and pays the gas.

The contract being called then cannot trust `msg.sender` (it is the relayer), so something must check the user's signature. EIP-2770 proposes one shared, audited **Forwarder** contract to do that for every relayer and recipient, instead of each project reimplementing signature checks.

## How it works

1. The user signs a `ForwardRequest` with [EIP-712](/eip-712/) typed data:

```solidity
struct ForwardRequest {
    address from;       // signer
    address to;         // target contract
    uint256 value;      // wei to send
    uint256 gas;        // gas for the inner call
    uint256 nonce;      // replay protection, tracked by the Forwarder
    bytes   data;       // calldata
    uint256 validUntil; // last valid block number, 0 = no expiry
}
```

2. A relayer calls `execute(request, domainSeparator, requestTypeHash, suffixData, signature)` on the Forwarder.
3. The Forwarder verifies the signature and nonce, then calls `to` with `data` and **`from` appended as the last 20 bytes** of calldata.
4. The nonce is incremented whether or not the inner call succeeds, so the request cannot be replayed.

**Extensible types.** Projects can register extended request types with `registerRequestType(typeName, typeSuffix)`, adding fields after the standard ones. The extra fields are passed as `suffixData` so wallets can still show users readable EIP-712 data.

**Gas checks.** The Forwarder requires `gasleft() * 63/64 >= gas (+40000 if value != 0)` before calling, so a relayer cannot starve the inner call (see EIP-150's 63/64 rule).

## Sample code

A recipient that trusts one Forwarder and reads the real sender, following [ERC-2771](/eip-2771/):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract Recipient {
    address public immutable trustedForwarder;
    mapping(address => uint256) public counter;

    constructor(address forwarder) { trustedForwarder = forwarder; }

    function _msgSender() internal view returns (address signer) {
        if (msg.sender == trustedForwarder && msg.data.length >= 20) {
            // last 20 bytes of calldata = original signer
            assembly { signer := shr(96, calldataload(sub(calldatasize(), 20))) }
        } else {
            signer = msg.sender;
        }
    }

    function increment() external {
        counter[_msgSender()] += 1;
    }
}
```

## Things to know

- **Status: Withdrawn.** The stated reason: a singleton Forwarder implementation does not need to be standardized. The recipient side lives on as [ERC-2771](/eip-2771/), which is Final.
- Trusting a forwarder means trusting it with every account: if it is buggy or upgradable by someone, it can act as any user towards your contract.
- If the inner call sends ETH back to the Forwarder on a request that carried no value, that ETH stays stuck in the Forwarder.
- For gasless UX today, also look at account abstraction via [ERC-4337](/eip-4337/) paymasters.


---

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