← All Projects
ADVANCED Full-Stack5-6hMilan+Mattia

Gasless Meta-Tx Relayer

Build a meta-transaction relayer service: users sign EIP-712 typed data off-chain, the relayer validates and submits the transaction on-chain paying gas on behalf of the user. Includes a Solidity forwarder contract and Go relay service. This is how Gnosis Pay enables gasless card top-ups.

Tech Stack

GoSolidityEIP-712EIP-2771Foundrygo-ethereum

What You'll Learn

  • EIP-712 typed data signing and verification
  • EIP-2771 trusted forwarder pattern
  • Meta-transaction relay architecture
  • Gas estimation and nonce management
  • Relay fee economics and anti-spam measures

Milestones (0/4)

M1EIP-712 forwarder contract
M2Go relay service
M3Rate limiting & fee policy
M4EIP-2771 recipient contract & E2E test

Architecture Hints

Architecture
User (no gas)
    ├── Signs EIP-712 ForwardRequest off-chain
Relay Service (Go)
    ├── Validates signature off-chain (fail fast)
    ├── Checks nonce, rate limits, fee balance
    ├── Estimates gas
Forwarder Contract (on-chain)
    ├── Verifies EIP-712 signature on-chain
    ├── Increments nonce
    ├── Forwards call with sender appended (EIP-2771)
Target Contract (EIP-2771 compatible)
    └── _msgSender() returns original user, not forwarder
Maps to Gnosis Pay: - Users top up their card (Safe) without holding xDAI for gas - Gnosis Pay relayer pays gas, fees covered by card transaction fees - EIP-712 provides clear signing UX in wallets

Interview Talking Points