From 8d8343b5dfbba2c71dd6c0c86174363799656de3 Mon Sep 17 00:00:00 2001 From: relay-docs-bot Date: Thu, 7 May 2026 08:27:28 +0000 Subject: [PATCH] docs(drift): draft from internal source Requested by @arcticfloyd1984 via /publish-docs-pr --- features/deposit-addresses.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/deposit-addresses.mdx b/features/deposit-addresses.mdx index b4070d3..5e367a9 100644 --- a/features/deposit-addresses.mdx +++ b/features/deposit-addresses.mdx @@ -23,7 +23,7 @@ This makes deposit addresses ideal for CEX withdrawals, fiat onramps, and headle | `useDepositAddress` | boolean | Set to `true` to receive a deposit address instead of transaction calldata. | | `user` | address | The recipient wallet on the destination chain. Can be any valid address, including the zero address. | | `recipient` | address | The address that receives funds on the destination chain. | -| `refundTo` | address | Address to send refunds if the transfer fails. Required for strict deposit addresses and for routes that include a destination-side swap. Omitting this on open addresses disables automatic refund. See [Refund Behavior](#refund-behavior). | +| `refundTo` | address | Address to send refunds if the transfer fails. Required for strict deposit addresses and for routes that include a destination-side swap. Set to the origin chain's native-currency address to opt into automatic refunds to the depositor — `0x0000000000000000000000000000000000000000` on Ethereum and other EVM chains, `bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8` on Bitcoin, and `11111111111111111111111111111111` on Solana. The request is rejected on other origin VMs. Omitting `refundTo` on open addresses disables automatic refund. See [Refund Behavior](#refund-behavior). | | `tradeType` | string | Must be `EXACT_INPUT`. Deposit addresses only support exact input trades — output varies based on market conditions at fill time. | | `amount` | string | The quoted amount in the origin token's smallest unit. Open-ended addresses support variable deposit amounts. Strict addresses should be treated as exact-payment instructions. | | `strict` | boolean | Set to `true` for a strict deposit address tied to a specific order. Omit or set to `false` for an open deposit address. | @@ -915,17 +915,19 @@ There are two distinct refund scenarios: |---|---| | User's address | Refund directly to the user | | App-controlled address | Refund to integrator's address — your support team handles returning funds to the user | +| Origin chain's native-currency address | Auto-refund to the depositor — the address that sent funds to the deposit address. Pass `0x0000000000000000000000000000000000000000` on Ethereum and other EVM chains, `bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8` on Bitcoin, or `11111111111111111111111111111111` on Solana. The request is rejected on other origin VMs. | | Not set (open) | Automatic refund is disabled — no internal fallback | | Not set (strict) | Not allowed — `refundTo` is required for strict deposit addresses | -If users may send from a centralized exchange, **do not use "refund to sender"** — the sender address will be the exchange's hot wallet, not the user's. Use an app-controlled address instead so your support team can handle the last mile. +If users may send from a centralized exchange, **do not use "refund to sender"** — neither an explicit user address you don't control nor the native-currency-address auto-refund opt-in — the sender address will be the exchange's hot wallet, not the user's. Use an app-controlled address instead so your support team can handle the last mile. ### Recommended Setup - **Open deposit addresses**: Set `refundTo` to the user's address for automatic refunds. - **Strict deposit addresses**: Always set `refundTo`. If the sender is unknown (e.g., CEX withdrawal), use an app-controlled address so your support team can manage refunds. +- **Auto-refund to depositor**: When users deposit from wallets they control, pass the origin chain's native-currency address as `refundTo` to refund to the depositor automatically. Use `0x0000000000000000000000000000000000000000` on Ethereum and other EVM chains, `bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8` on Bitcoin, and `11111111111111111111111111111111` on Solana. Avoid this option when deposits may originate from a centralized exchange. ## Tracking Transactions