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.
If integrators prefer to manage the swap path manually, they can perform the conversion to reserve assets
themselves before calling the
create-tx
endpoint — ensuring complete control over the swap route.If the order is cancelled, the locked reserve assets are returned to the user.
It is important to note that the user will receive reserve assets back — not the original non-reserve assets used at the start of the process.