Debridge

Debridge limit orders require a solver to accept their cross-chain trade terms

Last updated:

Debridge limit orders specify which source tokens are offered and which destination tokens a solver must supply on the destination chain. Solvers assess the offer against execution costs, available liquidity, and chain risks. A valid order can remain unfilled when those terms don't justify committing capital. Its requested output defines the fulfillment requirement, without assuring a fill. Source tokens remain in the order contract until fulfillment enables an unlock or cancellation returns the funds.

Successful fulfillment closes whole-order cancellation, even when an attached non-atomic hook remains pending and its destination action hasn't completed.

Fixed offers and market quotes use the same order contracts

The deBridge Liquidity Network (DLN) records cross-chain offers with explicit token amounts, while its API can calculate terms intended to attract solvers under current conditions. A custom limit order specifies the maker's chosen input and output amounts at creation. A market-order request lets the API estimate a suitable output, including solver incentives and operating expenses. Reverse-market requests start with a required output and calculate the source input.

These choices change the offer's economics. They use the same underlying source and destination order contracts. Direct smart-contract integration also lets makers place fixed cross-chain offers. Same-chain swaps have a separate execution model and don't create an on-chain DLN order entity.

Which conditions make a limit order worth filling?

A solver needs accessible destination liquidity and an acceptable return after execution costs and the risks it assigns to the trade. Fulfillment, sending the unlock message, and claiming source funds all impose operating costs.

Market movements can make a previously attractive offer uneconomic. Rising gas costs can have the same effect, even when the requested destination amount hasn't changed. An unusually demanding output leaves less room for solver compensation. Chain-level incidents can also increase the premium that a solver requires before accepting source-side assets.

Solvers make their own acceptance decisions, including which input assets they'll handle. Improved market conditions may attract a fill, but profitability alone doesn't establish execution. The destination contract's fulfillment record establishes whether a solver actually supplied the required assets.

A fixed output requirement doesn't fix every swap cost

The order sets its destination fulfillment requirement, while token conversions around that settlement can introduce slippage and affect the quoted outcome. The destination contract enforces the full output amount required by the order's current terms. It doesn't promise that every open order will attract one, nor does it remove costs from a route that includes additional swaps.

Non-reserve inputs can require a source-chain conversion before order creation, and a requested non-reserve output can require a destination conversion. Those operations have their own liquidity and slippage constraints. In a create-tx response, dstChainTokenOut.amount describes the intended destination output. recommendedAmount accounts for fees and solver margin. maxTheoreticalAmount is a theoretical ceiling, not a completed trade. Comparing those fields exposes the difference between a chosen output and the API's market recommendation. Token addresses, chain identifiers, and decimals give each amount its meaning.

Source deposits and destination authority determine control

An open cross-chain order holds its source funds in DlnSource , while the designated destination authority controls cancellation before fulfillment. DLN's 0-TVL design avoids shared liquidity pools; individual orders still hold funds during settlement.

ERC-20 approval authorizes a contract to spend tokens. It doesn't create the order. The source transaction must successfully place it before solvers have an on-chain offer to fill. A failed creation leaves no order, although the source network can still charge transaction gas. Native fee requirements also affect whether that transaction can execute.

Visual outline: Debridge limit orders: Source deposits and destination authority determine control

View image file

The destination token recipient and cancellation authority perform different jobs. The recipient receives an ordinary fulfilled order's output. The dstChainOrderAuthorityAddress can initiate cancellation on the destination chain. A usable recipient address doesn't establish control of that authority, particularly when source and destination addresses follow different chain formats.

Cancellation also has a source-side beneficiary. In the API path, srcAllowedCancelBeneficiary specifies the refund address, with srcChainOrderAuthorityAddress as the fallback if it's omitted.

An ordinary fill separates recipient delivery from solver settlement

For a limit order without a hook and with user-controlled cancellation authority, the destination record determines whether delivery occurred. Before commitment, the offer needs usable token amounts and authority addresses. Signing transaction data expresses authorization; successful source-chain creation commits the order funds.

Debridge limit orders - Why solvers may not fill - diagram

Debridge limit orders - Why solvers may not fill

  • A fixed output requirement doesn't fix every swap cost
  • Source deposits and destination authority determine control
  • An ordinary fill separates recipient delivery from solver settlement
  • Quote freshness affects the terms before commitment

View image file

Stage in an ordinary limit-order fill Where funds sit and who controls the action
Specify the cross-chain offer The maker chooses token amounts, the destination recipient, and authorities. An API response alone doesn't deposit funds.
Create the source-chain order DlnSource receives the order funds and emits its creation event. The contract holds those funds under the order's settlement rules.
Evaluate the open order Solvers control their own destination liquidity and decide whether to use it to fulfill the offer.
Fulfill on the destination chain DlnDestination accepts the required tokens from a solver and transfers the ordinary order's output to its recipient.
Send the unlock message The solver initiates a destination-to-source message through the deBridge Messaging Protocol (DMP) to authorize release of the source funds.
Claim the source funds The solver receives the source assets when the unlock completes, and the order reaches ClaimedUnlock.
Cancellation rights The destination authority can cancel an unfilled order. Successful fulfillment ends this whole-order cancellation right.

A change from Created to Fulfilled records destination delivery for this ordinary order, allowing the recipient to use its tokens. SentUnlock and ClaimedUnlock concern the solver's subsequent recovery of source liquidity.

A non-atomic hook, which permits execution after fulfillment, changes what that same Fulfilled record proves. The solver supplied the output, but an intermediary can still hold it for the pending action. The hook's own execution record must show success before that action counts as complete. While the hook remains pending, the destination authority can cancel it to recover the destination outcome. Full-order cancellation is already closed, so this recovery doesn't return the original source deposit.

Quote freshness affects the terms before commitment

Delayed submission of the API-generated transaction can change the profitability of the proposed offer before it becomes an on-chain order. Quotes reflect market prices and estimated execution expenses when the API constructs them. Refreshing an estimate can therefore change the suggested output or the required source amount.

Once the order exists, changing market quotes don't automatically replace its requested output. Solvers evaluate the current on-chain terms. On an EVM source chain, the designated source authority can add input tokens to an unfilled order. On an EVM destination chain, the destination authority can reduce its required output. If those terms cease to cover execution costs, the order can remain unfilled. A quote refresh addresses an unsigned or unsubmitted transaction; it isn't proof that an existing order has changed or completed.

Hook flags change the fill condition

An atomic success-required hook makes successful destination execution a condition of filling a limit order on EVM chains. If the hook reverts, the fulfillment transaction reverts too, leaving the order unfilled. Optional-success configuration permits the order to complete despite hook failure and directs its output to the fallback address. That address is mandatory for optional-success hooks.

The order ID incorporates the hash of its hook data, binding the destination call to the signed offer. DlnDestination checks that correspondence during fulfillment. EVM contracts support both atomic and non-atomic execution, with configurable success requirements. Solana supports only non-atomic success-required hooks, so EVM failure options don't transfer unchanged to that environment.

Can an unfilled limit order use automatic cancellation?

The approved automatic-cancellation service excludes limit orders. It applies to market orders from integrations that have obtained approval and configured the required referral code and cancellation beneficiary. To recover its source funds, an unfilled limit offer needs manual cancellation by its destination authority. A market-order timeout doesn't establish a deadline or initiate recovery for that limit offer.

Can an unfilled limit order use automatic cancellation? (Debridge limit orders) - diagram

View image file

Manual cancellation ends with a source-chain refund

Manual cancellation starts through the designated destination authority and completes when the source contract releases funds to the cancellation beneficiary. Destination cancellation prevents a later fill once it takes effect. The associated cross-chain message then authorizes source-side recovery. A pending destination transaction hasn't crossed that boundary, so fulfillment can still remove the full-order cancellation option.

The cancellation transaction needs destination-chain gas and a positive native-currency value for messaging and source-side claim expenses. Recovery returns the funds held by the order, including its protocol and affiliate charges and fixed native fee. A prior source conversion can change the returned asset; cancellation doesn't reverse that conversion. The refund concerns source-chain order funds, not the destination tokens originally requested. A completed ClaimedOrderCancel record confirms that those source assets reached the configured beneficiary.

What readers ask about Debridge limit orders

Is a new contract deployed for every DLN limit order?

DLN uses source and destination contracts deployed on supported chains, with individual orders distinguished by their parameters and identifiers. DlnSource handles placement, and DlnDestination handles fulfillment and cancellation. An order's deterministic ID identifies the offer within that system; it isn't a newly deployed contract address.

Which minimum applies to a limit-order API request with SOL as its output?

The documented create-tx path requires a minimum destination output of 0.001 SOL, equal to 1 000 000 lamports, when Solana is the destination chain and SOL is the output asset. The required source input varies with market conditions, so that destination requirement doesn't establish one fixed minimum input across tokens or chains.

Must an ERC-20 approval for a limit order include prepended solver expenses?

An ERC-20 approval must cover the returned source input amount when prependOperatingExpenses is enabled. That amount includes the estimated operating expenses added to the request. Refreshing the quote can increase the required allowance; approving only the original requested amount can leave the transaction unable to execute.

Why can the API reject a small source amount before a limit order is created?

With prependOperatingExpenses disabled, create-tx takes solver operating expenses from the input-output spread. An input amount that can't cover those costs can trigger ERROR_LOW_GIVE_AMOUNT, preventing a reasonable output estimate. That quote-construction error doesn't create an on-chain order or record an attempted destination fill.

Can a limit-order hook trust the original sender just because DLN called it?

A DLN caller address doesn't authenticate the original sender of hook data. Open order creation allows arbitrary hook payloads. A target that needs signer authentication must verify an authenticated signature included in the hook; authenticating a source smart contract requires the Messaging Protocol.

Does sharing a limit order's ID give someone cancellation rights?

Knowing an order ID doesn't grant permission to initiate its cancellation. The destination cancellation transaction must come from the dstChainOrderAuthorityAddress set for that order. An ID supports tracking and identifying the offer, while the configured authority determines who can exercise cancellation control.

How can I preview limit-order amounts before connecting a wallet?

The cross-chain create-tx API can estimate amounts without authority or recipient addresses. Those missing wallet details prevent it from returning a signable transaction payload. Repeating the request with the necessary addresses enables transaction construction; the earlier estimate hasn't deposited tokens or created an on-chain order.

Are limit-order transactions returned by create-tx invalid after 30 seconds?

The create-tx transaction has no explicit time-to-live, although submission within 30 seconds is recommended to preserve the quote's economic assumptions. Delayed submission can affect solver profitability or a source conversion. That recommendation doesn't establish a fixed cancellation deadline for an order that already exists.