← Back to home

Case study · Oct–Nov 2026

One USDC payment, end to end

A US shopper pays a Singapore store 120 USD in USDC. On testnet the buyer saw “Payment successful” a median of 3.4 seconds after the transaction was mined, every normal payment matched its order with no manual step, and the merchant's funds became available a median of 92 seconds after mining.

Everything on-chain ran on Base Sepolia, a public testnet, with real transactions you can open below. FX and bank payouts are simulated. No real money is involved.

median, block to buyer success
3.4 s
median, block to buyer success
measured, n = 5
median, block to merchant funds available
92 s
median, block to merchant funds available
measured, n = 5
needed by the buyer (gasless checkout)
0 ETH
needed by the buyer (gasless checkout)
verified on testnet
numbered requirements, traced to code
19
numbered requirements, traced to code
PRD R1–R19

The problem

Small cross-border merchants find card acquiring expensive, slow to settle, and exposed to chargebacks.

Stablecoins fix the cost and the speed, but create two new problems, and they are the real product work: buyers make irreversible mistakes (wrong chain, wrong amount, no gas token), and the flow needs compliance (screening, travel-rule data, buyer-location limits).

Design principle: the buyer does two things, pick USDC and sign. Everything else is ours.

Walk through it

  1. 01

    The merchant-facing product

    Quayline pitches one promise to Singapore merchants: get paid in USDC, bank it in SGD.

    The merchant-facing product
  2. 02

    Checkout

    “Pay with USDC” appears only for allowed buyer regions. Travel-rule fields scale with the amount.

    Checkout
  3. 03

    Payment page

    A unique deposit address per order, a 15-minute quote, and the network name in large type, the cheapest fix for wrong-chain sends.

    Payment page
  4. 04

    On mobile

    Scan an EIP-681 QR code; the wallet opens with chain, token, amount and address pre-filled.

    On mobile
  5. 05

    Success

    The buyer sees success after 10 blocks, with the order number and an explorer link.

    Success
  6. 06

    Merchant dashboard

    Pending finality and available balance are separate numbers: the buyer can see success before the merchant can spend the money.

    Merchant dashboard
  7. 07

    Order detail

    Tx hash, confirmations, fee, travel-rule record and a full timeline for every order.

    Order detail
  8. 08

    Webhooks

    Signed status webhooks with automatic retries and a delivery log.

    Webhooks
  9. 09

    Exception queue

    Underpaid, overpaid, late, wrong token, flagged wallet: each has a default action and a one-click path.

    Exception queue
  10. 10

    Reconciliation

    Chain ↔ FX ↔ bank, matched three ways. Breaks turn red; export to CSV.

    Reconciliation
  11. 11

    Metrics

    Completion rate, exception rate, time to success and time to funds, computed live from the prototype's own records.

    Metrics

Verified with real testnet transactions

Amounts are scaled to 1/100 because the testnet faucet gives 20 USDC every two hours.

Key trade-offs

Two finality states over one threshold

The buyer sees success in seconds; the merchant's money is released only once the block is posted to Ethereum L1, with a fresh reorg check.

Refund only to the original address over any address the buyer gives

“Send it somewhere else” is the classic fraud and laundering path. The cost: buyers who paid from an exchange may not get the refund.

Convert to SGD daily by default over holding USDC

Target merchants pay rent and salaries in SGD. Holding USDC is one switch away.

Three chains shown, one live over every chain with USDC

Each chain adds a watcher, confirmation rules, an off-ramp, and one more way to send on the wrong network.

Sponsor the buyer's gas over requiring ETH

A buyer holding only USDC is exactly the customer. Sponsorship is limited to exact-amount, exact-address authorisations, once per 30 s.

A unique address per payment over one address plus a memo

Matching becomes fully automatic. The key-management and gas cost is absorbed by EIP-3009 refunds.

What building it taught me

  • My finality rule was wrong by 10×. I had assumed 2-second blocks; measuring the real chain (0.2 s) showed “15 confirmations” meant about 3 seconds. The rule is now tied to L1 posting, not a block count.
  • Running it surfaced two requirements the PRD missed: gasless checkout, and a checkout funnel that records why buyers drop off.
  • An independent AI review, given only the code, found 11 edge-case defects that happy-path testing missed, including double-refund and stranded-funds paths. Each became a regression test.

What's real and what's simulated

Payments, confirmations, matching, refunds, gasless flowsReal, on Base Sepolia
Webhooks with signing and retriesReal, to a local mock merchant
Address screening, region gating, travel-rule tiersWired into the flow, using demo lists
USDC → SGD conversion, bank payoutSimulated and labelled

Go deeper