CORE CONCEPTS

Cross-chain routing

A buyer who holds stablecoin on a different chain than the merchant's order can still pay — Tab bridges the funds via Across Protocol and the buyer settles the order on the merchant's chain. This is the "Fund From Anywhere" flow.

How it works

  1. On a checkout page, if the order's destination chain is Across-supported, the buyer sees a "Fund from another chain" panel.
  2. They pick a source chain where they hold USDC (Ethereum, Arbitrum, Optimism, Polygon, Base, Ink, zkSync, Linea, Blast, Mode, Scroll, World Chain are all supported).
  3. We fetch a quote from https://app.across.to/api/suggested-fees showing the exact fee, the resulting outputAmount, and the estimated fill time.
  4. Buyer's browser approves the source-chain SpokePool for USDC (max-uint, so subsequent payments don't re-prompt), then calls depositV3 on the SpokePool.
  5. Across relayers fill the deposit on the destination chain — Tab polls the buyer's destination-chain USDC balance to detect arrival, typically 5-30 seconds.
  6. Once filled, the regular Pay button on the checkout becomes available — the buyer settles the order from the destination chain as normal.

Why bridge-then-pay, not bridge-and-execute

Across supports a message field on depositV3that triggers a destination-chain contract call after fill. We could bundle the order payment into that message — buyer signs one tx, the bridge fills, the payment completes in the same fill transaction. v0 doesn't do this.

The win is small (the buyer waits 5-30s either way), the cost is substantial (custom handler contract on every destination chain, careful revert handling so a doomed payment doesn't strand funds, an "execute-on-behalf" pattern on TabRouter that complicates the audit story). The bridge-then-pay path keeps the two operations independently observable on chain.

Coverage

Destination chains where buyers can use Fund From Anywhere:

  • Base
  • Ink
  • Base Sepolia (testnet)

Orders on chains Across doesn't support (currently BSC and Celo) don't show the panel. Buyers on those orders need to already hold stablecoin on the destination chain.

Fees

The buyer pays:

  • Source-chain gas to approve + deposit (one-time approve, then per-payment deposit).
  • The Across relay fee — quoted up front in the panel, typically ~0.05% of the bridged amount for popular routes.
  • Tab's 1% protocol fee on the destination-chain payment (same as a single-chain pay flow).

Tab takes no cut of the Across fee. The relay fee goes entirely to the Across relayer that fills the deposit.

Security

Across is a battle-tested cross-chain protocol; their architecture and audit history live at docs.across.to. Tab doesn't hold custody during the bridge — the buyer is the depositor and the recipient. The worst-case outcome of a bridge failure is the buyer's funds being held in the source SpokePool until the deposit deadline elapses, at which point the deposit becomes refundable. Tab's router never sees the bridge transaction.

Implementation

Helper: lib/across.ts exports fetchAcrossQuote, submitDeposit, and the chain registry. UI: components/FundFromAnywhere.tsx drops into any checkout shell. Server-side quote proxy: GET /api/across/quote.