How SOLbin Engineered Sends So Phantom Trusts Us — Zero High-Risk Warnings

How SOLbin Engineered Sends So Phantom Trusts Us
When you hit Send in SOLbin, your wallet (Phantom, MetaMask, whatever you connected) runs its own simulation before it lets you sign. If that simulation smells off — an unexpected fee drain, a balance that falls below rent-exempt, a destination that looks untrusted — it slaps a high-risk warning on the screen and scares you out of the transaction.
We didn't want that. A wallet that triggers warnings on its own sends is a wallet nobody trusts. So we engineered the entire send model so Phantom's simulation passes cleanly, every time. Here's how.
1. Server-Authoritative Pre-Flight Validation
Before the client is allowed to build a single instruction, the request goes to our validateTransaction backend function. The server — not the browser — is the source of truth for:
- The fee vault address (resolved from admin config, never from UI inputs or URL params)
- The fee percentage (server-resolved, with referral free-fee waivers applied)
- Balance re-verification (live RPC balance check covering transfer + fee + rent/gas)
- Value caps (batch size, per-transfer, batch-total, fee-percentage sanity ceilings)
- Kill-switch (a remote admin flag that freezes all outbound txs instantly)
- Cooldown (DB-backed 5-second per-user cooldown, authoritative across isolates)
The client never trusts its own vault or fee values. It builds the transaction using exactly what the server returned. That means what Phantom simulates is what the server already approved — no surprise fee routes, no injected destinations.
2. Replay-Protected With Cryptographic Nonces
Every signing request carries a single-use cryptographic nonce issued by issueTxNonce, verified server-side with a 30-second TTL. An intercepted or replayed validation call is voided instantly. Phantom sees a fresh, authorized transaction every time — never a stale or replayed payload that could trip its heuristics.
3. The MAX Send Fix — Rent-Exempt + Priority-Fee Buffer
This was the big one. Phantom injects its own ComputeBudget instructions (setComputeUnitPrice / setComputeUnitLimit) during signing — instructions our MAX estimate doesn't see. Without a buffer, a full-balance send lands the sender's remaining balance exactly at the Solana rent-exempt floor. Even 1 lamport of injected priority fee pushes it below — and Phantom's simulation fails with InsufficientFundsForRent, which it reports as a high-risk warning.
The fix: SOLbin's MAX send now reserves:
- The rent-exempt minimum (~0.00089 SOL)
- The network fee
- A 100,000-lamport priority-fee buffer to absorb Phantom's injected compute-budget instructions
The result: the simulation passes cleanly, the sender stays above the rent floor, and Phantom shows a green checkmark — not a red warning.
4. Net Fee Mode — No Double-Counting
SOLbin's platform fee is internal to the recipient amount (net mode), not added on top. The balance check matches the build's fee mode exactly, so it never double-counts the fee and rejects a valid MAX send. The recipient gets their share, the fee is taken from it, and the on-chain math lines up with what the simulation predicted.
5. Five-Layer Client-Side Guard
On top of the server gate, a client-side guard wraps every build+sign+send:
- Origin & destination allowlisting — fee vaults resolve only from admin config, never from URL params (we strip untrusted query params on every send)
- Rate limiting & cooldowns — a mandatory per-sender cooldown prevents rapid-fire spam
- Value caps & sanity checks — hardcoded ceilings on batch size, per-transfer, batch total, and fee %
- Re-entrancy & double-submit lock — a single global processing lock prevents overlapping transaction construction during network latency
- Global kill-switch — read fresh from admin config, instantly freezes all outbound txs
The Result
Clean simulations. Green checkmarks. No high-risk warnings. When you sign a SOLbin send in Phantom, you're signing a transaction that's already been verified server-side, balance-checked against live RPC, replay-protected, and buffered for the exact fees Phantom itself will inject.
That's what it takes for a wallet to trust you back.
SOLbin is a self-custody multi-chain wallet supporting Solana, BNB, Bitcoin, Ethereum, Avalanche, Tron, Dogecoin, and Robinhood Chain — one recovery phrase, auto network-switching, and a built-in DApp browser. Create your wallet →
