Skip to main content
A referral code is your unique identifier when integrating with deBridge. Beyond tracking points and affiliate fees, it enables analytics, feature toggles, and improved user experience.

DLN Referral Codes

For deBridge Liquidity Network (DLN) integrations, referral codes are generated on-chain and enable additional features like auto-cancellation.

What Referral Codes Enable

CapabilityDescription
Order TrackingSee all orders created through your integration
AnalyticsMonitor volume, fees, and user activity
Feature TogglesEnable DLN features like auto-cancellation per integration
Custom SupportFaster debugging with order attribution

Getting a Referral Code

1

Visit the Referral Page

2

Connect Your Wallet

Connect the wallet you want associated with your code
3

Select Network

Choose Polygon for the cheapest generation fee. The code works across all supported chains including Solana.
4

Generate

Click generate and save your code (e.g., 7895)

Using Your Code

API Integration

Include referralCode in your create-tx requests. More details are available in the API documentation.

Widget Integration

Set the r parameter in your widget configuration.

Tracking Orders

Query all orders associated with your referral code using the tracking API: See the full order tracking documentation for available filters and response fields.

Code Example

A complete working example is available on GitHub: get-orders-by-referral-code.ts

Auto-Cancellation Feature

For DLN integrations, referral codes unlock auto-cancellation—automatic cancellation of unfulfilled orders after a timeout, improving user experience.

How It Works

  • Unprofitable orders: Cancelled after 5 minutes
  • Other issues: Cancelled after 15 minutes
  • Cost: Subsidized by deBridge
  • Result: Users don’t need to manually cancel failed orders

Enabling Auto-Cancellation

This feature requires approval from deBridge:
  1. Contact deBridge to request the feature
  2. Configure required parameters (srcAllowedCancelBeneficiary)
  3. deBridge reviews your integration
  4. Feature is enabled for your referral code
When auto-cancellation is enabled, the dstChainOrderAuthorityAddress is overridden to a deBridge-controlled address. Ensure srcAllowedCancelBeneficiary is set to the user’s wallet to receive refunds.
See the full auto-cancellation documentation for technical details.

Technical References

API Parameters

Full referralCode parameter specification

Order Tracking

Query orders by referral code

Auto-Cancellation

Automatic order cancellation setup

Widget Reference

Widget configuration options