Skip to main content
An EIP-3009 (transferWithAuthorization) relayer is an Externally Owned Account (EOA) that collects a user’s signed authorization and submits the USDC transfer to Arc. The relayer pays gas from its own USDC balance. Users never need a gas balance.

Prerequisites

Before you begin, ensure that you’ve:
  • Funded a relayer EOA with USDC on Arc testnet (USDC is the gas supply)
  • Obtained Arc testnet RPC access at https://rpc.testnet.arc.io (chain ID 5042002)
  • Installed ethers.js v6 (npm install ethers)

Steps

Step 1. Collect the user’s transferWithAuthorization signature

The user signs an EIP-712 typed data message offchain. Your application builds the message and asks the user’s wallet to sign it. The relayer submits the signed data; the user never sends a transaction. The USDC contract on Arc testnet uses the following EIP-712 domain: The nonce field is a random bytes32 value generated per authorization, not the user’s account nonce. It prevents replay attacks.

Step 2. Construct and submit the relay transaction

The relayer calls transferWithAuthorization on the USDC contract with the signed parameters. The relayer EOA pays gas from its USDC balance.
A transferWithAuthorization that fully drains a brand-new sender account (zero balance, zero nonce, no code) currently reverts on Arc. Before relaying, verify that message.from has either a non-zero nonce (using provider.getTransactionCount) or deployed code (using provider.getCode). Accounts that meet either condition drain normally. A fix is planned for a future release.

Step 3. Set gas parameters

Set gas parameters on each relay transaction. The minimum maxFeePerGas on Arc is 20 Gwei. Transactions priced under this minimum may remain pending. Set maxPriorityFeePerGas to 0 Gwei, or 1 Gwei when load is high. A typical transferWithAuthorization uses about 65,000 gas units. Estimate gas and read the current fee data before broadcasting:

Step 4. Record the gas cost for billing

To record how much USDC the relay cost for billing, convert the receipt values:
gasCostUsdc is the gas fee in USDC’s 6-decimal token units, suitable for logging or charging users for the relay service.

Operational notes

  • Maintain a minimum USDC balance in your relayer EOA. Your USDC balance is your gas supply. There is no separate gas wallet to manage.
  • Monitor pending transactions and track nonces to handle resubmissions at higher gas prices.
  • The relayer EOA’s USDC balance covers gas fees only. The transfer amount is debited from the authorized user’s account (the from address in the signed message). Size your minimum balance to cover expected gas across your transaction volume.
  • Transactions involving a blocklisted message.from or message.to address revert at runtime, consuming the relayer’s gas with no transfer. Check both addresses before submitting, or handle reverts in your monitoring layer.