Skip to main content

Flow

1. user_transfer_pending

Swap is created. Layerswap is waiting for the user to complete the transaction in the source network.
  • If no deposit arrives within 6 hoursexpired
  • Once the deposit is confirmed with enough confirmations → ls_transfer_pending

2. ls_transfer_pending

Layerswap is processing the swap. If something goes wrong during execution:
  • If deposited amount is below the minimumfailed
  • If the swap cannot be completed for any other reason (e.g. price moved beyond slippage tolerance) → Layerswap retries automatically.
    • With refund_address → if retries are exhausted, moves to refund_pending
    • Without refund_address → Layerswap keeps retrying. The swap remains in ls_transfer_pending until resolved.
  • If execution succeeds → completed

3. completed

Funds are delivered to the destination address.

4. refund_pendingrefunded

Refund is sent to refund_address on the source chain in the source token, minus gas fees. If the refund amount is less than the gas fee, no refund is issued. See the Refunds page for details.

What can go wrong

ScenarioWith refund_addressWithout refund_address
Deposited less than minimumfailedfailed
No liquidity or route available across providersRetries, then refundedRetries
Slippage tolerance cannot be metRetries, then refundedRetries
Blockchain issue across multiple RPCsRetries, then refundedRetries
DEX or DEX aggregator issueRetries, then refundedRetries