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
    • Interacting with smart contracts
      • Introduction
      • Placing orders
      • Filling orders
      • Withdrawing Affiliate Fees
    • Interacting with the API
      • Authentication
      • Creating an Order
        • Quick Start
        • Reserve Assets
        • Bridging Reserve Assets
        • Bridging non-reserve assets
        • API Parameters
          • Estimation-Only
          • prependOperatingExpenses
        • API Response
          • JSON Example
        • Refreshing Estimates
        • Fees and operating expenses
        • Order Fulfillment
          • Detecting the Order
          • Fulfilling the Order
            • Pre-Fill-Swap
          • Claiming the Order
      • Tracking Order Status
        • Order States
      • Integrating deBridge hooks
        • Creating Hook data for Solana
      • Submitting an Order Creation Transaction
      • Cancelling the Order
      • Affiliate fees
    • Interacting with the deBridge App
      • Custom Linking
    • deBridge Widget
    • 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
  • Enabled (prependOperatingExpenses=true)
  • Disabled (prependOperatingExpenses=false)

Was this helpful?

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

prependOperatingExpenses

The end-user implications of `prependOperatingExpenses`.

PreviousEstimation-OnlyNextAPI Response

Last updated 11 hours ago

Was this helpful?

The prependOperatingExpenses setting is a boolean. It is recommended to enable this option:

prependOperatingExpenses = true

Enabled (prependOperatingExpenses=true)

When enabled, are calculated separately from the spread and added on top of the input token amount, making all fees fully transparent. This approach helps clarify exactly what is being paid in fees.

For example, swapping 100 USDC on Arbitrum for 100 USDC on Polygon in displays a small fee (just over $0.03), shown above the red line in the figure below. This represents the solver's operating expenses.

  • ERC20 Approval: The total amount (including operating expenses) must be approved using the approve function. This value is provided in response.estimation.srcChainTokenIn.amount.

  • Fulfillment Likelihood: When response.tx is signed and submitted within 30 seconds, the probability of successful execution is over 99.9%.

Disabled (prependOperatingExpenses=false)

Both modes produce the same execution outcome, but enabling prependOperatingExpenses typically provides a clearer breakdown of the fee structure for end users.

Buffer Recommendations: Estimates may need to be refreshed if there is a delay between generating the response and submitting response.tx. Updated operating expenses might require a new approval. Additional guidance is available .

When disabled, response.estimation.srcChainTokenIn.amount equals the srcChainTokenInAmount specified in the original create-tx request. In this case, are subtracted directly from the spread between the input value and response.estimation.dstChainTokenOut.

🔁
in this article
operating expenses
operating expenses
our application
DeBridge app trading view, demonstrating prependOperatingExpenses=true