hackquest logo

Swiftrail

SwiftRail is a gasless USDC checkout stack for Arbitrum Sepolia. Customers sign once with USDC permit and do not pay ETH gas. A relayer sponsors gas, takes a small fee, and settles net USDC to the me

Videos

Tech Stack

Rust
Web3
Ethers

Description

SwiftRail is a gasless USDC checkout stack for Arbitrum Sepolia.

Customers sign once with USDC permit and do not pay ETH gas. A relayer sponsors gas, takes a small fee, and settles net USDC to the merchant.

How everything fits together

Think of this as 5 parts working together:

  1. frontend: the shop UI where user clicks buy.

  2. sdk: helps connect wallet and enforce Arbitrum Sepolia network.

  3. relayer: backend service that sends on-chain transactions and pays gas.

  4. payment contract: verifies permit and pulls USDC from customer.

  5. USDC token: where permit nonce/balance and token transfers happen.

Payment sequence:

  1. User clicks buy in frontend.

  2. Frontend asks relayer for fee quote (POST /quote).

  3. Frontend calls sdk.checkout(...).

  4. SDK prompts user to sign USDC permit typed-data in wallet.

  5. SDK submits permit payload to relayer (POST /submit-payment).

  6. Relayer calls contract processPayment(...) (tx #1).

  7. Contract does permit + transferFrom(user -> fee_collector).

  8. Relayer waits for tx #1 confirmation.

  9. Relayer transfers net USDC to merchant (tx #2).

  10. Relayer waits for tx #2 confirmation.

  11. Frontend refreshes dashboard (GET /dashboard/:merchant).

This is exactly why the logs show:

  1. Payment transaction submitted

  2. Payment transaction confirmed

  3. Merchant settlement tx submitted

  4. Merchant settlement tx confirmed

Team Leader
PPeter June
Project Link
Sector
DeFiOther