First swap in 5 minutes
Faucet, live quote, deposit and SUCCESS with real testnet transactions.
You need a NEAR testnet account. If you do not have one, create it in a testnet wallet or with near-cli-rs.
1. Get test tokens (30 seconds)
curl -X POST https://www.usetidepool.tech/v0/faucet -H 'content-type: application/json' \
-d '{"accountId":"alice.testnet","mode":"wallet"}'mode: "wallet" mints every test token to your account. mode: "intents" credits your balance inside the Tidepool verifier instead, so you can deposit with an in-verifier transfer. You can also use the faucet page.
2. Get a live quote
DEADLINE=$(date -u -d '+10 min' +%Y-%m-%dT%H:%M:%SZ)
curl -s -X POST https://www.usetidepool.tech/v0/quote -H 'content-type: application/json' -d '{
"dry": false, "swapType": "EXACT_INPUT", "slippageTolerance": 100,
"originAsset": "nep141:usdc.tidepool-sandbox.testnet", "depositType": "ORIGIN_CHAIN",
"destinationAsset": "nep141:wnear.tidepool-sandbox.testnet", "amount": "5000000",
"refundTo": "alice.testnet", "refundType": "ORIGIN_CHAIN",
"recipient": "alice.testnet", "recipientType": "DESTINATION_CHAIN",
"deadline": "'$DEADLINE'"}' | tee quote.jsonNote quote.depositAddress and quote.amountIn.
3. Deposit
With depositType: "ORIGIN_CHAIN", send the origin token straight to the deposit address. Register its storage first (it is a fresh account):
near contract call-function as-transaction usdc.tidepool-sandbox.testnet storage_deposit \
json-args '{"account_id":"<depositAddress>","registration_only":true}' \
prepaid-gas '30 Tgas' attached-deposit '0.00125 NEAR' sign-as alice.testnet network-config testnet sign-with-keychain send
near contract call-function as-transaction usdc.tidepool-sandbox.testnet ft_transfer \
json-args '{"receiver_id":"<depositAddress>","amount":"5000000"}' \
prepaid-gas '30 Tgas' attached-deposit '1 yoctoNEAR' sign-as alice.testnet network-config testnet sign-with-keychain sendOr, with depositType: "INTENTS", deposit into the verifier for the deposit address in one call, no storage step needed:
near contract call-function as-transaction usdc.tidepool-sandbox.testnet ft_transfer_call \
json-args '{"receiver_id":"verifier.tidepool-sandbox.testnet","amount":"5000000","msg":"<depositAddress>"}' \
prepaid-gas '100 Tgas' attached-deposit '1 yoctoNEAR' sign-as alice.testnet network-config testnet sign-with-keychain sendOptionally tell Tidepool about the tx:
curl -X POST https://www.usetidepool.tech/v0/deposit/submit -H 'content-type: application/json' \
-d '{"txHash":"<hash>","depositAddress":"<depositAddress>"}'4. Watch it settle
curl "https://www.usetidepool.tech/v0/status?depositAddress=<depositAddress>"You will see PENDING_DEPOSIT or KNOWN_DEPOSIT_TX, then PROCESSING, then SUCCESS with swapDetails.nearTxHashes. Open them on NearBlocks testnet.
What happens if it goes wrong
- Deposit too small or late: when the deadline passes, everything deposited goes back to
refundToand the status becomesREFUNDEDwithrefundReason: "PARTIAL_DEPOSIT". - Price moved past your slippage: refunded with
SLIPPAGE_EXCEEDED(Tidepool-specific reason). - More than
amountIndeposited: the swap usesamountInand the excess is refunded in the same transaction.
Real examples
These ran on the live deployment: