Swap types
EXACT_INPUT, EXACT_OUTPUT and FLEX_INPUT, with examples.
swapType decides which side of the trade amount fixes.
amount is what you send. amountIn = minAmountIn = amount. Output floats with price, floored by minAmountOut.
Send exactly 10 USDC, receive about 10 USDC worth of wNEAR:
{ "swapType": "EXACT_INPUT", "amount": "10000000", "slippageTolerance": 100 }A larger deposit swaps amountIn and refunds the excess in the same transaction.
Not supported
ANY_INPUT returns 400. It needs streaming deposits, which Tidepool v1 does not implement.
Recipient and refund types
| Field | Values | Meaning |
|---|---|---|
recipientType | DESTINATION_CHAIN | Output is withdrawn to recipient as a normal NEP-141 balance (ft_withdraw). Tidepool registers storage for you. |
INTENTS | Output stays in the verifier, credited to recipient's intents balance. | |
refundType | ORIGIN_CHAIN | Refunds and excess are withdrawn to refundTo's wallet. |
INTENTS | Refunds are credited inside the verifier. |