Skip to main content
deBridge enables cross-chain and same-chain swaps from a single integration — with unified liquidity and non-custodial execution. Depending on your product and UX needs, you can integrate swaps in two different ways:

deBridge Liquidity Network API

Full programmatic control over swaps using the proven DLN infrastructure. The deBridge Liquidity Network follows a familiar transaction-based model — users sign and submit transactions directly, paying gas on the source chain.
  • Same-chain swaps: Supported via Same-Chain Swaps API
  • Cross-chain swaps: Full support with PostHooks
  • User experience: Traditional — user pays gas on source chain
Best for: Integrations where users are comfortable with standard transaction flows DLN API Quickstart | API Documentation

Widget

The fastest way to add swap functionality. The Widget is a drop-in UI component that uses the deBridge Liquidity Network API under the hood.
  • Same-chain swaps: Supported
  • Cross-chain swaps: Supported
  • Customization: Theme, default chains/tokens, supported assets
Best for: Quick integration with pre-built UI Widget Documentation

Quick Comparison

AspectDLN APIWidget
Same-chain swapsYesYes
Cross-chain swapsYesYes
Fee structureFlat + %Flat + %
Custom UIFull controlLimited
Hooks supportYes (After-trade only)Yes (After-trade only)
Execution modelTransaction-basedTransaction-based

How Swaps Work (High-Level)

  1. Define a swap e.g. “Swap SOL on Solana to USDC on Base”
  2. deBridge finds routes & liquidity The protocol identifies the best path for the swap, whether same-chain or cross-chain.
  3. Execution & settlement The user signs and submits one transaction on the source chain, locking the input tokens.
  4. User receives tokens
    • Same-chain swaps execute atomically, within the same transaction they were created in.
    • Cross-chain swaps are fulfilled by supplying the requested tokens on the destination chain, typically within a few seconds.
deBridge protocol is comlpetely decentralized, and deBridge has no way of holding user funds. Should users choose to cancel a cross-chain order, they can do so before the order is filled on the destination chain.Partners can also request to enable auto-cancellations for their integrations.

Swap Use Cases

  • Wallets & portfolio apps — Add cross-chain and same-chain swaps directly into wallet interfaces, letting users trade any token across chains without leaving the app.
  • Trading platforms & DEX aggregators — Offer same-chain best-price execution via adaptive slippage alongside cross-chain swaps, all through a single API.
  • DeFi protocols routing liquidity — Move or rebalance protocol-owned liquidity across chains programmatically, with guaranteed rates and zero slippage regardless of order size.
  • Cross-chain onboarding & workflows — Combine a swap with follow-up actions using Hooks: buy a token on a new chain, top up native gas, and deposit into a protocol, all in a single transaction.

Next Steps

Yes — both options support same-chain and cross-chain swaps.
Yes. deBridge never takes custody of user funds. Assets are delivered directly to the destination wallet.
  • DLN API / Widget: Flat fee + percentage fee
  • DLN API: Full control - Widget: Limited customization