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)
M2Go relay service
M3Rate limiting & fee policy
M4EIP-2771 recipient contract & E2E test
Architecture Hints
Architecture
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
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 forwarderInterview Talking Points
- ▸Explain the EIP-712/2771 flow end-to-end and why it improves UX for card users
- ▸Discuss relay nonce management — why it's tricky with concurrent requests
- ▸Talk about relay economics: who pays gas, how costs are recovered
- ▸Compare to Gelato Relay (which Gnosis Pay uses) — architectural similarities and differences
- ▸Discuss security considerations: what if the relayer goes rogue?