MMashDiv

Accountless Guest Swap (/swap)

How visitors swap crypto without creating an account using dedicated, never-reused deposit addresses, Fixed vs Float pricing, fail-closed captcha protection, non-leaking liquidity gating, and audited operator resolution.

2 min readUpdated 25 November 2026convert, guest-swap, accountless, fixed, float, deposit-address, captcha, refund

Guest Swap (/swap) gives your platform an accountless, Automated Exchange workflow (similar to FixedFloat or ChangeNOW): visitors pick a pair and network, choose Fixed or Float mode, paste their external recipient address (and an optional refund address), solve a fail-closed captcha (guest_swap), and receive a dedicated one-time deposit address with a lookup code (SWP-...).

No login is created or required for /swap or /swap/{code}.

Key guarantees

  • Strictly single-use, never-reused deposit addresses. Every swap allocates a brand-new keypair (EVM, UTXO, SOL, TRON) or an isolated Monero Account-0 subaddress (guest_swap:<id>) in convert_guest_deposit_address with a monotonic per-chain derivationIndex. Guest deposit rows are completely disjoint from customer wallet_data rows, checked against both guest and platform wallets for collisions, and EXPIRED_UNUSED addresses are never reassigned. TON deposits are refused explicitly.
  • Internal platform addresses rejected. Any address belonging to ecosystem_master_wallet, customer wallet, or convert_guest_deposit_address is rejected (400) as a recipient or refund address.
  • Fail-closed "guest_swap" captcha. Creating a swap enforces verifyCaptchaOrThrow(..., "guest_swap") before allocating any deposit address (503 if captcha service cannot validate).
  • Non-leaking liquidity gating. Destination payout capacity is verified against available house/pool liquidity before quoting or accepting a swap. Refusals return 409 with "This swap pair or amount is temporarily unavailable. Please try a smaller amount or check back shortly." — raw master, hot, or pool balances and shortfalls are never revealed.
  • Hash-before-broadcast payouts. Payouts record payoutTxHash and payoutFinality (onSigned) in the database before broadcasting, preventing blind duplicate sends across crashes or restarts.

Fixed vs Float execution

  • Fixed (FIXED) locks the quoted payout at convertGuestFixedSpreadBps (default 100 bps) for convertGuestQuoteTtlSec seconds. Confirmed deposits within ±1% settle automatically; underpayments or overpayments outside ±1% are never settled at a wrong rate and route to REFUND_REQUIRED (when a refundAddress is present) or NEEDS_REVIEW.
  • Float (FLOAT) quotes an indicative estimate and computes the final payout at confirmation time using live orderbook pricing plus convertGuestFloatSpreadBps (default 50 bps), enforcing [convertGuestMinUsd, convertGuestMaxUsd].

Late deposits, refunds & post-completion sweeps

  • Unused expiry: convertGuestExpiry runs every 2 minutes (including in drain mode) to transition unfunded past-deadline AWAITING_DEPOSIT swaps to EXPIRED and their address rows to EXPIRED_UNUSED.
  • Late deposits: If funds arrive on an already-expired address, convertGuestDepositPoll marks the address FUNDED and moves the swap to REFUND_REQUIRED (if refundAddress was provided) or NEEDS_REVIEW so funds are never silently swallowed.
  • Post-completion sweeps: Once payout confirms (COMPLETED), funded Monero subaddresses are immediately marked SWEPT (funds sit directly in master_wallet Account 0), while EVM native deposit keys sweep net funds to the chain's master wallet.
  • Operator console: Admins with view.convert.order can inspect all guest swaps and sweep states at Admin → Convert → Activity → Guest Swaps (/admin/convert/guest). Operators with manage.convert.send can run audited Retry Payout, Refund, or Mark Resolved actions with mandatory audit notes.