A refund returns the assets held by the origin escrow to the order’s user. It does not reverse an earlier input swap. For a swap into CTM, the escrow can return CTM instead of the original input token.

Eligibility

Read the source escrow’s current order state. Read its effective refund deadline. Use the source chain’s clock when evaluating the deadline. The effective deadline can exceed the signed expires value after a watcher extension. Passing the fill deadline alone does not make the deposit refundable. An application must also check observed fills and the freshness of negative evidence. These application checks do not describe every condition enforced by the contract. An unavailable observer does not prove that no fill occurred. A cannot-tell result must not enable automatic refund submission.

EVM

Obtain the complete escrow order tuple. Validate its order identity and escrow address. Check deposited state and current refund eligibility on chain. Submit the escrow’s refund(order) call through the wallet. The contract requires chain time to be strictly greater than max(expires, refundDeadline[orderId]). Anyone can submit this call, but the escrow returns the assets to the order’s user. The contract does not check destination fills before refunding. A filled order can therefore be refunded while origin finalisation remains incomplete. Finalisation can also succeed after the deadline if the refund has not executed. See solver finalisation for this race.

Solana

Request the unsigned refund transaction. Validate its program, accounts, and required signer. Sign with the order’s user account. Broadcast before its blockhash lifetime ends. An optional wrapped-SOL account closure affects the whole account balance. Obtain user approval before enabling that option.