When does a swap get refunded?
When no driver takes the order before its deadline. The order can no longer be filled after that point, and the input goes back to the sender.What does the user get back?
On Swift, the input may be converted into the primary locked asset on the source chain before the order opens, typically USDC or ETH. If that order is later refunded, the user receives the converted asset rather than the token they started with. Surface this in your interface. A user who sent one token and got a different one back will otherwise open a support ticket.Where is the deadline?
Each quote carries adeadline64 value. That is the timestamp after which the order becomes refundable rather than fillable.
Does a refund cost anything?
Yes. A refund is an onchain action and carries its own relayer fee, which is returned in the quote before the user signs:refundRelayerFeeandrefundRelayerFee64: the fee itselfclientRelayerFeeRefund: the total dollar value of relayer fees in the refund scenario
How do I know a swap was refunded?
Poll the Explorer API with the source transaction hash and readclientStatus. A refunded order reports REFUNDED rather than COMPLETED.
See track transactions for handling terminal states in your interface.
Can a swap fill below the quoted minimum?
No. TheminAmountOut the user signs is part of the instruction. An order that cannot be filled at or above it is not filled at all, and is refunded instead.