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 relay.link 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 supported by relay.link, the buyer sees a "Fund from another chain" panel.
  2. They pick a source chain where they hold stablecoin (30+ EVM chains plus Solana).
  3. We fetch a quote from relay.link's /quote/v2 endpoint showing the exact fee, the resulting destination amount, the underlying route relay picked (Mayan, CCTP, Across, Stargate, Wormhole, whichever is cheapest and currently live), and the estimated fill time.
  4. The buyer's browser signs the source-chain deposit tx returned by relay. Allowances + cross-chain calls are bundled per step.
  5. The destination route fills automatically. Tab polls relay's status endpoint to detect arrival, typically 5-30 seconds on intent bridges (Mayan, deBridge) or 1-3 minutes for finality bridges (CCTP).
  6. Once filled, the regular Pay button on the checkout becomes available. The buyer settles the order from the destination chain as normal.

Bot-relayed bridges (gasless)

The Telegram and Discord bots run the same relay.link quote + deposit flow, but Tab's relayer wallet signs the deposit on the user's behalf. The user's USDC is pulled via their pre-approved TabBot allowance, the relayer pays source-chain gas, and the destination fills to the user's own wallet. From the user's perspective: no popup, no signing, no gas, three taps in chat.

Why an aggregator

Single-bridge integrations carry single-bridge risk: if Mayan 500s or Stargate has an outage, Tab's bridge UX is down for every user until the upstream recovers. relay.link routes through every major bridge and silently fails over. A Mayan outage degrades to a deBridge or Allbridge route without anyone noticing.

Same-asset USDC to USDC routes prefer Circle's native CCTP (zero protocol fee, ~15s Fast Transfer). Cross-asset routes (USDC to ETH, USDC to BNB) layer a DEX leg on the destination, executed in the same quote.

Coverage

Destination chains where buyers can use Fund From Anywhere:

  • Base
  • BNB Chain
  • Celo
  • Ink
  • Solana

relay.link indexes 30+ chains as source. If a destination isn't in the list above, buyers need to already hold stablecoin on that chain.

Fees

The buyer pays:

  • Source-chain gas to sign the deposit tx (skipped on the bot-relayed flow, where Tab's relayer pays).
  • relay.link's relayer fee, quoted up front in the panel, typically 0.05-0.3% of the bridged amount depending on the underlying route.
  • Tab's 1% protocol fee on the destination-chain payment (same as a single-chain pay flow).

Tab takes no cut of the relay fee. It goes entirely to the relayer that fills the deposit on the destination side.

Security

relay.link is a battle-tested cross-chain protocol; their architecture and audit history live at docs.relay.link. Tab doesn't hold custody during the bridge. The buyer is the depositor and the recipient. The worst-case outcome of a fill failure is relay.link refunding the source-chain deposit back to the buyer's wallet (their strict mode is enabled on all Tab quotes).

Implementation

Helper: lib/relay.ts exports quoteBridge, getBridgeStatus, and the chain registry. UI: components/dashboard/BridgeModal.tsx for the unified bridge ( any asset on any chain → any asset on any chain) and components/FundFromAnywhere.tsx for checkout. The bridge is implemented as Smart Pay to self: it reuses POST /api/pay/smart with the explicit-source branch (sourceChain + sourceAsset + sourceAmount) and recipient="self". Same endpoint works for both bridges and cross-asset payments. One execution path, one delegation flow.