This page outlines the various states an order can go through during the swap process, helping you manage integration logic effectively.

Order states

The tables below classify all the order statuses, providing descriptions and the corresponding actions.

Order creation and matching

StatusDescriptionAction
CreatedThe order is created and waiting for a solver to match.
MatchedA solver has matched the order.The user has to initiate the transaction on their source chain.

Settlement: User and solver execution

StatusDescriptionAction
InitiateDetectedThe user’s initiation transaction is detected on-chain but not confirmed yet.
InitiatedThe user’s initiation is confirmed. The solver must now initiate the transaction on the destination chain.Wait for the solver to initiate.
CounterPartyInitiateDetectedThe solver’s initiation transaction is detected on-chain but not confirmed.
CounterPartyInitiatedThe solver’s initiation is confirmed, and the user must redeem their funds on the destination chain.The user has to redeem their funds.

Redemption and completion

StatusDescriptionAction
RedeemDetectedThe user’s redeem transaction is detected on-chain but not confirmed yet.
RedeemedThe user has redeemed their funds. The solver will now redeem their funds on the source chain.
CounterPartyRedeemDetectedThe solver’s redeem transaction is detected on-chain but not confirmed.
CounterPartyRedeemed / CompletedThe solver has redeemed their funds, marking the entire order as completed.

Exceptional and failure states

StatusDescriptionAction
CounterPartySwapExpiredThe solver’s HTLC has expired.The user must wait for their HTLC to expire to claim a refund.
ExpiredThe user’s HTLC has expired.The user has to refund their funds.
RefundDetectedThe user’s refund transaction is detected on-chain but not confirmed.
RefundedThe user’s refund is confirmed, and they have reclaimed their funds.
DeadLineExceeded1. Initiate transaction is not detected within 1 hour. 2. Initiate transaction is not confirmed within 12 hours.

Swap states

Each swap (user or solver side) transitions through the following states:

StatusDescription
IdleThe swap is not yet initiated.
InitiateDetectedInitiation transaction is detected but not confirmed.
InitiatedThe initiation transaction is confirmed.
RedeemDetectedRedemption transaction is detected but not confirmed.
RedeemedRedemption transaction is confirmed.
RefundDetectedRefund transaction is detected but not confirmed.
RefundedRefund transaction is confirmed.
ExpiredThe swap expired, and a refund is required.

The order progresses through these states sequentially, with some states allowing for parallel execution between user and solver actions.