System design
Four pieces: a quote engine, a set of provider adapters, a contract that finishes routes on the destination chain where providers cannot, and services that complete what a user started.
┌──────────────┐ ┌──────────────────────────────┐
wallet ───► │ app (/app) │ ─────► │ api /v1/quote /v1/status │
│ EIP-1193 │ │ /v1/relay /v1/points/* │
│ Solana │ ◄───── │ │
└──────────────┘ └───────────┬──────────────────┘
│
┌───────────▼───────────┐
│ core: quoter │
│ ├ 10 provider adapters
│ ├ prices (net-USD) │
│ └ fees (routing, gates)
└───────────┬───────────┘
┌────────────────────┼────────────────────┐
▼ ▼ ▼
CCTP relayer points engine QubitGate.sol
(delivers to gate) (rules, store, indexer) (5 chains)
Quote engine
One request fans out to every adapter that supports the pair. Each adapter answers for itself: a route, an explicit unavailable reason that reaches the user as a note, or nothing at all. An adapter that throws is caught and reported; it never removes the other routes from the list.
Then two passes run over the results. The first values every route in dollars on one basis and subtracts the native-gas fee. The second sorts by that net value and stamps each route with its rank and the basis used. When even one route cannot be valued, the whole list falls back to sorting by output amount and says so in rankedBy, because a list sorted by two different rules is worse than a list sorted by the cruder one.
Adapters
Ten of them, all the same shape: quote() returns a normalised route with steps and calldata; status() reports delivery. What differs is how a route is settled.
- Settled by the provider — Intents, Relay, LI.FI, OKX DEX, KyberSwap, Jupiter. The provider executes and reports; the adapter normalises the result.
- Settled on chain — CCTP, LayerZero OFT, Gas.zip. QubitGate finishes the route inside the delivery transaction, holding nothing between blocks.
- Settled off chain — Houdini. Delivery is confirmed through their partner portal, so no per-route figure exists and the route earns no points until it is measured.
Symbols are resolved to contract addresses before any adapter sees them, because routers speak addresses and users speak symbols. Where a token was renamed on chain — Tether's USDT0 — the engine accepts both names and sends the one the catalogues know.
QubitGate
A per-chain contract that finishes an incoming transfer once and holds nothing afterwards. It is the mint recipient for CCTP, the compose target for LayerZero OFT, and the entry point for Gas.zip refuels. Its limits are fixed in the contract, so a hostile message cannot widen them, and a malformed message can always be rescued by the owner rather than freezing funds. Addresses are published on the site.
Services
CCTP relayer. A user who bridges USDC to a chain where they hold no gas cannot call receiveMessage themselves. The relayer watches the attestation, verifies that the mint recipient is our gate, simulates and submits. The user signs once, on the source chain.
Points engine. Rules are pure functions over a config file; the store is SQLite; the indexer confirms each registered transaction on chain before crediting anything. The sender in the receipt must be a wallet bound to the profile by signature, so a user cannot claim someone else's transaction.
Discipline
Every path that moves money is exercised twice before users see it: on a mainnet fork against the live provider contracts, then with a live micro-transfer. Dry runs do not count, because they stop before the signature and never see a revert. On-chain amounts stay BigInt strings from end to end; dollars exist only for ranking and points.