deBridge
  • Introduction
  • The deBridge Messaging Protocol
    • Protocol Overview
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Development Guides
      • Building an EVM-based dApp
        • EVM smart contract interfaces
          • Interfaces
            • ICallProxy
            • IDeBridgeGate
            • IDeBridgeToken
            • IDeBridgeTokenDeployer
            • IOraclesManager
            • ISignatureVerifier
            • IWethGate
          • Libraries
            • Flags
          • Periphery
            • CallProxy
            • DeBridgeToken
            • DeBridgeTokenProxy
            • SimpleFeeProxy
          • Transfers
            • DeBridgeGate
            • DeBridgeTokenDeployer
            • OraclesManager
            • SignatureVerifier
            • WethGate
      • Sending cross-chain messages from Solana
        • On-Chain external call preparation for Solana
        • Off-chain external call preparation for Solana
      • Lifecycle of a cross-chain call
      • Gathering data for the claim
    • Development Tools
    • Security
    • Slashing and Delegated Staking
  • 🔁DLN: The deBridge Liquidity Network Protocol
    • Introduction
    • Protocol Overview
    • deBridge Hooks
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Market and Limit Orders
    • Integration Guidelines
      • Interacting with the API
        • Authentication
        • Creating an Order
          • Quick Start
          • API Parameters
            • Estimation-Only
            • prependOperatingExpenses
          • API Response
            • JSON Example
          • Refreshing Estimates
          • Quoting Strategies
        • Monitoring Orders
          • Order States
        • Integrating deBridge hooks
          • Creating Hook data for Solana
        • Submitting an Order Creation Transaction
        • Cancelling the Order
      • deBridge Widget
      • Interacting with smart contracts
        • Placing orders
        • Filling orders
      • Under the Hood
        • Reserve Assets
        • Bridging Reserve Assets
        • Bridging Non-Reserve Assets
        • Order Fulfillment
          • Detecting the Order
          • Fulfilling the Order
            • Pre-Fill-Swap
          • Claiming the Order
      • Affiliate fees
        • Withdrawing Affiliate Fees
      • Fees and operating expenses
    • Interacting with the deBridge App
      • Custom Linking
    • Protocol specs
      • Deterministic order ID
      • Hook data
        • Anatomy of a Hook for the EVM-based chains
        • Anatomy of a Hook for Solana
  • 💸dePort
    • Getting started
    • Transfers Flow
  • ⚡deBridge Points
    • Referrers Overview
    • Integrators Overview
  • 🌐deBridge IaaS
    • Getting started
  • 🌐Legal
    • SDK & API License Agreement
  • External Links
    • deBridge Use Cases
      • 💡Examples
    • Talks, Videos, and Articles
    • Website
    • Github
    • Twitter
    • Social channels
      • Discord
      • Facebook
      • LinkedIn
      • Medium
      • Telegram
      • YouTube
Powered by GitBook
On this page
  • Market Order
  • Market Order with Full Balance Utilization
  • Reverse Market Order
  • Limit Order (Not Recommended)
  • Example: Order Input Structure
  • Choosing a Stratrgy

Was this helpful?

  1. DLN: The deBridge Liquidity Network Protocol
  2. Integration Guidelines
  3. Interacting with the API
  4. Creating an Order

Quoting Strategies

Quoting strategies supported by DLN, explaining how source and destination amounts are configured for each strategy, with guidance on when to use each.

DLN supports multiple quoting strategies that allow users to control how much is spent on the source chain and how much is received on the destination chain. Each strategy is expressed by how the srcChainTokenInAmount and dstChainTokenOutAmount fields are set in the order input.

Below is an overview of all currently supported quoting strategies.

Market Order

const orderInput: deBridgeOrderInput = {
    ...,
    srcChainTokenInAmount: "<fixed_amount>",
    dstChainTokenOutAmount: "auto",
    ...
}

This is the default and most commonly used quoting strategy. It specifies an exact source amount to be transferred, while allowing the protocol to calculate the best possible amount to be received on the destination chain based on current market conditions and solver competition.

  • Recommended for most standard transfers

  • srcChainTokenInAmount must be set to a concrete numeric value

  • dstChainTokenOutAmount must be set to "auto"

Market Order with Full Balance Utilization

const orderInput: deBridgeOrderInput = {
    ...,
    srcChainTokenInAmount: "max",
    dstChainTokenOutAmount: "auto",
    ...
}

This strategy attempts to spend the full wallet balance of the source token. It is useful when the intention is to "empty" the source wallet of a given asset, such as in account abstraction flows, automated batch processing, or non-custodial smart wallets.

  • srcChainTokenInAmount must be set to max

  • dstChainTokenOutAmount must be set to "auto"

Reverse Market Order

const orderInput: deBridgeOrderInput = {
    ...,
    srcChainTokenInAmount: "auto",
    dstChainTokenOutAmount: "<fixed_amount>",
    ...
}

This strategy specifies a desired amount to be received on the estination chain, and allows the protocol to determine how much must be spent on the source chain to fulfill the request. It is commonly used in cases where a precise destination amount is required, such as payments or on-chain contract interactions.

  • `srcChainTokenInAmount` must be set to "auto"

  • dstChainTokenOutAmount must be set to a concrete numeric value

Limit Order (Not Recommended)

const orderInput: deBridgeOrderInput = {
    ...,
    srcChainTokenInAmount: "<fixed_amount>",
    dstChainTokenOutAmount: "<fixed_amount>",
    ...
}

This strategy attempts to enforce both the source amount to be sent and the destination amount to be received. It effectively functions as a limit order, and will only be fulfilled if a solver is willing to match both values.

  • High likelihood of non-fulfillment if the order is unattractive to solvers

  • Not recommended for production usage

  • Both srcChainTokenInAmount and dstChainTokenOutAmount must be concrete values

Example: Order Input Structure

All quoting strategies use the same order input interface, with key fields adjusted per strategy:

  const arbUsdcAddress = "0xaf88d065e77c8cc2239327c5edb3a432268e5831";
  const bnbUsdcAddress = "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d";
  const usdcDecimals = 18; // BNB USDC has 6 decimals
  const amountToSend = "0.01"; // The amount of USDC to send

  const amountInAtomicUnit = ethers.parseUnits(amountToSend, usdcDecimals);

  const orderInput: deBridgeOrderInput = {
    srcChainId: '56', // BNB Chain Id
    srcChainTokenIn: bnbUsdcAddress,
    srcChainTokenInAmount: amountInAtomicUnit.toString(),
    dstChainTokenOutAmount: "auto",
    dstChainId: '42161', // Arbitrum Chain Id
    dstChainTokenOut: arbUsdcAddress,
    dstChainTokenOutRecipient: wallet.address,
    account: wallet.address,
    srcChainOrderAuthorityAddress: wallet.address,
    dstChainOrderAuthorityAddress: wallet.address,
    referralCode: 31805 // Optional
    // ... Other optional parameters
  };

Choosing a Stratrgy

Use Case
Recommended Strategy

Standard transfer with known input

Market Order

Full wallet balance transfer

Market Order with Full Balance

Target fixed destination output

Reverse Market Order

Exact 1-to-1 trade with specific terms

Limit Order (not recommended)

PreviousRefreshing EstimatesNextMonitoring Orders

Last updated 1 day ago

Was this helpful?

🔁