create-tx API automatically handles this swap step. It queries DeFi aggregators in the background to simulate the swap
and produce response.tx.calldata (see step 1a in the diagram). The API is optimized to select the best available rate.
Once a user signs and submits response.tx, the DLN smart contracts initiate the process by transferring the approved
non-reserve assets to themselves (step 3a). The actual Pre-Order-Swap is executed via an Automated Market Maker (AMM)
(step 3b). Given the potential for price slippage, the destination chain estimate is based on the minimum amount a user
would receive from the swap.
This design—basing estimates on the minimum outcome of the Pre-Order-Swap — helps shield users from market volatility and
reduces the likelihood of orders being ignored due to insufficient profitability from a solver’s perspective.
Once the swap completes, the reserve assets are locked within the protocol until the order
is either fulfilled or cancelled.