Quote API: enforce memoless eligibility and reject non-gas source assets
Closing this Issue because it's invalid - based on the incorrect assumption that "memoless ONLY supports gas assets, not ERC-20s".
Context (Incident Follow-up)
This issue is created in reaction to the recent memoless / direct-Asgard deposit incident discussed in THORChain Discord (InstaSwap user case, Feb 25–27, 2026): https://discord.com/channels/838986635756044328/1476157453736476703
Related follow-up issues from the same incident:
- #2776 - Memo preflight: validate memoless asset eligibility
- #2777 - EVM direct Asgard ERC20 deposits: add safe auto-refund
Problem
/thorchain/quote/swap can return a valid-looking quote for swaps that are not valid in memoless mode (ERC20 source asset like ETH.USDT).
This allows integrators to misroute users into deposits that cannot execute memoless.
Proposal
- Add an explicit quote mode flag, e.g.
mode=memoless. - If
mode=memolessand source asset is not memoless-eligible (currently gas asset only), return a clear error. - Add explicit response metadata for integrators:
memoless_supported: bool-
memoless_reason: string(optional but useful for UX/messages)
- Keep backward compatibility when mode is omitted.
Acceptance Criteria
-
ETH.USDT -> SOL.SOLwithmode=memolessis rejected with clear error. -
ETH.ETH -> SOL.SOLwithmode=memolesssucceeds. - API docs updated with memoless eligibility semantics.
Edited by ZlyDevMaya