Headless

Four ways to integrate: headless, bridge, the hosted widget, and the widget without a backend.

Token galaxy

Gateway: …

Idle. The galaxy is drifting.

ETH USDC

Classic 0 Fusion —

Route details

Illustration: the ships show how MEV works on swaps sent through the public mempool. They don't mean this quote is being attacked. Fusion is designed to protect against MEV through a resolver auction.

    Positions on the map are decorative. The tokens, route, and amounts come from the API. Source and destination tokens match the cached /catalog whitelist for the selected chain as you type. After a short pause, tokens that are not on that whitelist are looked up with /token/v1.7/{chain}/search through the DPoP session. Pasting an address checks the catalog first, then token details. This page creates the DPoP key and calls the gateway with createDpopSession on the first Get quote or token lookup. requestToken posts /session. Drag to look around, scroll to zoom, or pick a token to fill the form. A quote still comes from the swap and Fusion APIs. On one chain, Get quote asks for the classic quote and the Fusion quote together. A cross-chain quote stays Fusion+. The sky is up before a session exists.

    Result

    …

    Code snippet

    …

    Pros and cons

    Customer effort

    • Pro: full control of the look and feel, in any framework. No iframe and no postMessage.
    • Con: the customer builds all the UI, and handles quote, approve and swap calls, API versions, and errors.
    • Con: the customer owns the key and session code: key creation, proofs, refresh, and retries. @libs/widget-dpop covers this, but it then has to be published as a package for customers.
    • Con: the event log shows proof-of-work difficulty, solve time, and pow_required or pow_wait retries. A 429 from the widget share or the per-session limit shows a Retry-After countdown.

    Customer security

    • Pro: no third-party iframe or script on the page. A copied token still fails elsewhere, because it is DPoP-bound and short-lived.
    • Con: the DPoP key lives on the customer's origin. Any script on that page (an injected script, or a compromised third-party library) can use the key and session while the page is open, though it cannot export the key.
    • Con: the customer's own Content Security Policy and dependency hygiene are the only line of defense.

    Event log