Tidepooltestnet

Refunds

When Tidepool refunds a deposit, where the funds go and how to verify it.

A refund always returns the origin token to refundTo, as a wallet balance (refundType: ORIGIN_CHAIN) or an intents balance (refundType: INTENTS). It is signed by the deposit address and executed on the verifier, so you can audit it on NearBlocks.

ReasonWhen
PARTIAL_DEPOSITDeadline passed with less than minAmountIn deposited.
DEADLINE_PASSEDFunds landed only after the deadline.
SLIPPAGE_EXCEEDEDAt settlement the re-priced output fell below minAmountOut.
PRICE_MOVEDEXACT_OUTPUT: the deposit no longer covers the requested output.
INSUFFICIENT_LIQUIDITYThe maker ran out of the destination token.
SWAP_FAILEDThe settlement transaction failed on chain.

Excess is not a refund

If you deposit more than amountIn (or more than an EXACT_OUTPUT swap needs), the swap still succeeds and the excess is returned in the same transaction. The status is SUCCESS and swapDetails.refundedAmount shows the excess.

Example

A real PARTIAL_DEPOSIT refund on testnet: deposit 452vagfg…, refund 4LaFRDyT….

Reproduce it with node examples/swap.mjs --refund.

On this page