Skip to main content
There are several sections to a create-tx response. You can see a full, real-world API response example here. They are:

USD Value Fields

The response contains several fields that provide estimated USD values for the assets involved in the trade. These fields are for informational purposes only and are not intended for real-time trading decisions.

usdPriceImpact

Estimated price impact of the trade, expressed as a input amount USD value percentage. Can be both postive and negative, depending on the direction of the USD price movement caused by the trade.
When the value is high, it is strongly advised to let the user know about the potential price impact of their trade. The exact threshold for what constitutes a “high” value may vary depending on the specific use case and user preferences.

protocolFee

Estimated fee charged by the DLN protocol for facilitating the trade. Equal to costDetails entry with type DlnProtocolFee payload.feeAmount value.

protocolFeeApproximateUsdValue

Estimated USD value of the protocolFee. For informative purposes only – not for real-time trading.

estimation

This field contains gas and fee-related estimates used in the transaction planning process.

srcChainTokenIn

This field is always present. Represents the structure of what the user wants to sell on the source chain.
Field NameTypeDescription
addressstringSource chain input asset address – what the user is trying to sell on the source chain.
chainIdintegerSource chain ID.
decimalsintegerSource chain input asset decimals.
namestringSource chain input asset name.
symbolstringSource chain input asset symbol.
amountstringSource chain input asset amount, taking the decimals into account. May differ from srcChainTokenInAmount if operating expenses were prepended.
approximateOperatingExpensestringSolver’s operating expense for this swap.
mutatedWithOperatingExpensebooleanSignifies if the request had prepended operating expenses.
approximateUsdValueintegerApproximate USD value of the source chain input assets. For informative purposes only – not for real-time trading.
originApproximateUsdValueintegerApproximate USD value before operating expenses were prepended. Only present if the input asset was not a reserve asset.

srcChainTokenOut (optional)

This field is only present if the input asset was not a reserve asset and had to be pre-swapped.
Field NameTypeDescription
addressstringSource chain output asset address – what the input asset was swapped for during the pre-order-swap.
chainIdintegerSource chain ID.
decimalsintegerSource chain output asset decimals.
namestringSource chain output asset name.
symbolstringSource chain output asset symbol.
amountstringSource chain output asset amount, taking the decimals into account.
maxRefundAmountstringSolver’s maximum refundable operating expense.
approximateUsdValueintegerApproximate USD value of the output asset. For informative purposes only – not for real-time trading.

dstChainTokenOut

This field is always present. Represents the structure of what the user wants to receive on the destination chain.
Field NameTypeDescription
addressstringDestination chain output asset address – what the user wants to receive when the order is fulfilled.
chainIdintegerDestination chain ID.
decimalsintegerDestination chain output asset decimals.
namestringDestination chain output asset name.
symbolstringDestination chain output asset symbol.
amountstringDestination chain output asset amount, taking the decimals into account.
approximateUsdValueintegerApproximate USD value of the output asset amount. Informative only.
recommendedAmountstringRecommended output asset amount, considering fees and taker margin.
recommendedApproximateUsdValueintegerApproximate USD value of recommendedAmount. Informative only.
maxTheoreticalAmountstringThe maximum theoretical output amount that users can receive.
maxTheoreticalApproximateUsdValueintegerApproximate USD value of maxTheoreticalAmount. Informative only.

costDetails

An array describing the cost components associated with the trade. Each entry has a type field. Possible cost types include:
  • PreSwap
  • PreSwapEstimatedSlippage
  • DlnProtocolFee
  • TakerMargin
  • EstimatedOperatingExpenses
  • AfterSwap
  • AfterSwapEstimatedSlippage
Each of the fields in the costDetails entries, aside from PreSwap and AfterSwap, has the payload.feeAmount field, which is a string representing the fee amount, specified in the base (smallest) units of the asset (e.g., wei for Ethereum). All the costDetails entries have chainId, tokenIn, tokenOut, amountIn, amountOut.
Cost details can be used to break down the various fees and costs associated with the trade, providing transparency and insights into how the final amounts are calculated. This can be particularly useful for users and integrators to understand the fee structure and make informed decisions about their trades.

tx

Only data field is present for Solana, while all the fields are present for EVM-based chains.
  • data: The data that must be signed and submitted. It contains all necessary information to initiate a cross-chain order, including cases involving non-reserve assets. It is either a calldata (for EVM-based chains) or a serialized transaction (for Solana).
  • to: Destination address for the transaction. Acts as the spender in the approve call for ERC-20 tokens. Applicable to EVM source chains only.
  • value: Flat fee in the source chain’s native currency charged by the DLN protocol. Applicable to EVM source chains only.
  • gasLimit: Simulated, estimated gas limit for the transaction for EVM chains. Present if enableEstimate flag was set to true in the request.

prependedOperatingExpenseCost

Estimated operating cost added to the transaction, adjusted for token decimals. Present only if the request was made with prependOperatingExpenses enabled.

order

An object containing details required to facilitate the cross-chain trade.
  • approximateFulfillmentDelay
    Estimated delay, in seconds, for the order to be fulfilled.
  • salt
    Randomized value used to ensure uniqueness in the order hash.
  • metadata
    Additional contextual information about the order.

orderId

A deterministic identifier for the order. The same ID is used on both source and destination chains and can be used to track order status.

fixFee

Flat fee charged in the source chain’s native currency. This matches tx.value for EVM-based chains.

userPoints

The number of deBridge points that the user will get for this trade.

integratorPoints

The number of deBridge points that the integrator will get for this trade.

estimatedTransactionFee

Estimated transaction fee for the source chain, expressed in the source chain’s native currency. This is an estimate of the gas cost for executing the transaction. For both Solana and EVM-based chains, the estimatedTransactionFee field contains a total – in wei for EVM-chains or lamports for Solana, and a breakdown of the fee components in the details object.

Solana

For Solana, estimatedTransactionFee.details fields are:
FieldValue (lamports)CommentSolScan Link
nonceMaster1002240Unique for each user - only paid once, the first time users create a deBridge order.Link.
giveOrderState17115840Give order state account rent and fixedFeeLink.
giveOrderWallet2039280Give order wallet rent.Link.
txFee5000Transaction fee for the Solana network.
priorityFee4000000Can be updated by partners. Example. Update function.
total24162360Total costs, without updating the priority fee.

EVM

For EVM-based chains, estimatedTransactionFee.details fields are:
  • gasLimit
  • baseFee
  • maxFeePerGas
  • maxPriorityFeePerGas
Unlike for Solana, EVM fixedFee is not included in the estimatedTransactionFee.total value, as it is placed separately as tx.value in the transaction.