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:Documentation Index
Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
Use this file to discover all available pages before exploring further.
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
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
Quick Comparison
How Swaps Work (High-Level)
- Define a swap e.g. “Swap SOL on Solana to USDC on Base”
- deBridge finds routes & liquidity The protocol identifies the best path for the swap, whether same-chain or cross-chain.
- Execution & settlement The user signs and submits one transaction on the source chain, locking the input tokens.
- 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
Do swaps work for both same-chain and cross-chain?
Do swaps work for both same-chain and cross-chain?
Yes — both options support same-chain and cross-chain swaps.
Are swaps non-custodial?
Are swaps non-custodial?
Yes. deBridge never takes custody of user funds. Assets are delivered directly to the destination wallet.
What fees do users pay?
What fees do users pay?
- DLN API / Widget: Flat fee + percentage fee
Can I customize the swap UI?
Can I customize the swap UI?
- DLN API: Full control - Widget: Limited customization