Crypto checkout, self-custodial
How VidFlow takes BTC, ETH, BSC and TRON without a custodian — a unique address per order, then an automated sweep to cold storage.
You can buy VidFlow credits with crypto, and there is no custodian in the middle. No third party holds the funds between your wallet and ours. This post is how that works — per-order addresses, an automated sweep, and the one piece that isn't wired yet.
Self-custodial, literally
The payment gateway is our own code (src/services/crypto/), not a hosted processor. Funds derive to addresses we control via seed phrases held in environment config, and they move on-chain under our keys. There's no account on someone else's books holding your payment.
A unique address per order
When you start a crypto order, the gateway derives a fresh receiving address just for that order — BIP44/BIP84 derivation per chain for BTC, ETH, BSC and TRON, from a per-chain <chain>_SEED. One address, one order, so a payment is never ambiguous: we know exactly which order a given deposit belongs to without you pasting a memo or a reference.
Solana is the exception
SOL doesn't use a per-order address — it uses Solana Pay reference keys instead, which tag a normal payment with an order reference the gateway can match. Same goal (unambiguous attribution), different mechanism that fits how Solana payments are built.
Sweeping to cold storage
Money landing on hundreds of per-order addresses isn't where you want it to sit. When a payment confirms, the order is marked for sweep, and a cron at /api/crypto/run-sweeps consolidates funds to a single destination address per chain (<chain>_ADDRESS). For ERC-20 and TRC-20 tokens — which need native gas to move — dispenser hot wallets (<chain>_DISPENSER_PRIVKEY) front the gas so a token-only address can still sweep itself out.
It's live, not a diagram
The production RPC adapters — mempool.space for Bitcoin, ethers for the EVM chains, tronweb for TRON — are implemented and wired. Sweeping fires real on-chain transactions, gated per chain only on whether that chain's <chain>_SEED is set. There's an admin dashboard at /admin/sweeps to watch it.
What isn't wired yet
Solana consolidation. The code for moving SPL funds to cold storage exists (createSolanaConsolidator), but it isn't attached to a cron the way the other chains are. So SOL payments are received and attributed; the automated cold-storage sweep for them is the open item, and we'd rather say so than imply the whole board is green.
Why bother with self-custody at all
Fewer intermediaries holding your money, and pricing we control end to end. The cost is operational: keys, gas, sweeps, and the discipline to test each chain's adapter against the real network. We took that trade deliberately.

