EIP.tools

EIP.tools

⚠️ DraftStandards Track: ERC

ERC-8090: Relayer-Protected Gasless Swaps

Gasless swap pattern guaranteeing relayer profitability via mandatory stablecoin involvement and automatic fee burning

Authors
Created2025-11-23
Discussion Linkhttps://ethereum-magicians.org/t/erc-8090-gasless-minting-swap-standards-in-uniswap-v4/26711
Requires

Markdown

https://raw.githubusercontent.com/ethereum/ERCs/re...
Pull Request#1371PR open

EIP-GPT summary

Contents
AbstractMotivationSpecificationRationaleBackwards CompatibilitySecurity ConsiderationsCopyright

Abstract

EIP-8090 introduces a relayer-protected gasless swap pattern optimised for Uniswap V4 periphery contracts. The mechanism enforces that every gasless swap involves at least one stablecoin leg, automatically burns a configurable percentage fee (default 1%) of the stablecoin USD volume directly from the user's balance, and embeds the current fee rate in the EIP-712 signature to prevent replay attacks when parameters are updated. All operations execute atomically within the V4 unlockCallback, providing maximal security and MEV resistance while eliminating the risk of relayer loss.

TL;DR: A battle-tested periphery contract for Uniswap V4 that makes gasless swaps relayer-profitable by mandating stablecoin involvement and atomic fee burning, while enabling swap-only mining rewards.

Motivation

Gasless trading is required for mass adoption, yet all existing solutions expose relayers to sustained losses from spam and zero-fee transactions.

This ERC eliminates relayer risk while preserving atomic execution and requiring no trusted forwarder.

Specification

The periphery contract MUST implement:

uint256 public gaslessFeeRate; // denominator, 100 = 1%
mapping(address => bool) public isStableCoin;

EIP-712 ensures structured signing with replay protection via the embedded feeRate.

Swap(address caller,PoolKey key,SwapParams params,bytes hookData,uint256 feeRate,uint256 deadline)

The feeRate field must equal the contract's current gaslessFeeRate at the time of signing.

Rationale

This is the only known gasless swap design that is inherently profitable for relayers, maintains atomic execution, and requires no trusted forwarder.

Backwards Compatibility

Fully compatible with Uniswap V4 core and Permit2.

Security Considerations

  • Replay protection via embedded feeRate
  • Atomic execution in callback
  • Relayer zero-loss guarantee via callStatic simulation
  • No trusted forwarder
  • Battle-tested at scale

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth