All articles
Solana·June 16, 2026·7 min read

Squads Multisig for Solana Bot Treasuries: Security vs Speed

A practical guide to Squads multisig Solana bot treasuries: keep a fast hot signer for trades while a v4 multisig custodies profits without adding latency.

A trading bot that holds its own profits is a single leaked private key away from being drained. The wallet that signs 400 transactions a minute is, by design, hot: its key sits in memory on a box you SSH into, gets copied into .env files, and shows up in stack traces when something crashes at 3am. That's the wallet you want fast and disposable. It's the last wallet you want holding six figures of accumulated SOL.

The usual answer — a multisig on the treasury — runs straight into a latency problem. A 2-of-3 multisig that needs two humans to approve a transfer is fine for a DAO treasury and useless for a bot that needs to top up its gas wallet before the next block. So the real question isn't "multisig or not." It's how to split the wallet topology so the slow, secure custody layer and the fast, expendable signing layer never fight each other.

Squads v4 is the tool most Solana teams reach for here, and it's worth understanding why the v4 architecture specifically makes this split clean.

The two-wallet split

The model that actually works in production looks like this:

  • Hot signer: a plain keypair the bot controls end to end. Holds only working capital — enough SOL for priority fees, Jito tips, and a few positions. If it's compromised, you lose the float, not the vault.
  • Treasury: a Squads v4 multisig vault. Profits sweep into it. Getting funds out requires a threshold of signers and, optionally, a time lock.

Sweeps are one-directional and don't need approval, because depositing into a multisig is just a transfer — no multisig signature involved. The bot sweeps profit up to the vault continuously and automatically. Only withdrawals down from the vault hit the slow path, and withdrawals are rare and human-initiated. You get custody-grade security on the balance that matters and zero added latency on the path that's hot. This is the same discipline you'd apply to gas-wallet rotation on any high-frequency system, and it pairs naturally with the wallet-management patterns in a Solana wallet tracker setup.

Why Squads v4 and not a raw SPL multisig

Solana has a native multisig via the SPL Token program, but it's the wrong tool. It's a static M-of-N over a fixed signer set, it doesn't do arbitrary instructions cleanly, and rotating a signer means moving every asset to a new account. Squads v4 fixed the parts that matter for a bot treasury:

  • Vault PDAs, not the config account. In v4 your funds live in a program-derived vault address derived from the multisig config, so you can rotate signers, change the threshold, or add a time lock without moving a single lamport. Deposit address stays constant. That alone is worth the migration from v3.
  • Arbitrary instructions. A vault transaction can carry any instruction set — a plain SOL transfer, an SPL transfer, a Jupiter swap to consolidate dust into USDC. You're not limited to token moves.
  • Spending limits. v4 lets a member spend up to X per period against a specific mint without a full multisig approval. This is the escape hatch that makes the whole design ergonomic (more below).
  • Time locks. Optional delay between approval and execution. For a treasury that only pays out weekly, a 24-hour lock turns a stolen signer into a problem you have time to react to.

The deposit side: sweeping profit up

Sweeping is the easy half. Derive the vault address once and treat it as a constant deposit target. A minimal sweep after a position closes:

import { getVaultPda } from "@sqds/multisig";
import {
  SystemProgram, Transaction, PublicKey, LAMPORTS_PER_SOL,
} from "@solana/web3.js";

const [treasury] = getVaultPda({
  multisigPda: new PublicKey(MULTISIG_ADDRESS),
  index: 0,
});

// keep ~2 SOL working float in the hot signer, sweep the rest
const KEEP = 2 * LAMPORTS_PER_SOL;
const bal = await connection.getBalance(hotSigner.publicKey);

if (bal > KEEP + 0.05 * LAMPORTS_PER_SOL) {
  const tx = new Transaction().add(
    SystemProgram.transfer({
      fromPubkey: hotSigner.publicKey,
      toPubkey: treasury,
      lamports: bal - KEEP,
    }),
  );
  await connection.sendTransaction(tx, [hotSigner]);
}

No multisig signatures, no approval flow, no added round trips. It's a bare SystemProgram.transfer. Run it on a timer or trigger it on each realized PnL event. Leave a buffer above KEEP so you're not sweeping and immediately re-funding on rent and fees.

One gotcha: don't sweep so aggressively that the hot signer dips below what it needs for the next burst. If your strategy occasionally fires 50 transactions in two seconds, each with a 0.001 SOL priority fee plus a Jito tip, size KEEP for the worst-case burst, not the average. This is the same fee-budgeting math that determines whether your transactions land under contention — the mechanics of which are covered in the piece on stake-weighted QoS and transaction priority.

The withdrawal side: where speed goes to die (on purpose)

Withdrawals should be slow. That's the point. But "slow" doesn't have to mean "the bot can never touch it." Squads v4 spending limits give you a graduated model:

  • Routine operational top-ups — moving 5 SOL back to the hot signer because the float ran low — go through a spending limit the bot's key is authorized against. One signature, no quorum, capped per period. If the key leaks, the blast radius is the remaining limit, not the vault.
  • Real withdrawals — paying out to team members, moving to cold storage, rebalancing into stables — go through the full multisig flow: propose, reach threshold, execute after the time lock.

Concretely, a spending-limit config might authorize the hot signer to pull up to 10 SOL per 24 hours. The bot self-heals its float within that budget. Anything above it needs two humans. An attacker who owns the hot key gets, at most, one day's limit before the alarms go off — assuming you're watching, which you should be, ideally with the same transaction-monitoring plumbing you'd build for MEV and arbitrage strategies.

A worked threshold

For a two-person team running an automated strategy, I'd set up:

  • Multisig: 2-of-3 (two founders + one cold recovery key held offline).
  • Spending limit: hot signer, 10 SOL / 24h, SOL mint only.
  • Time lock: 12 hours on full vault transactions.
  • Sweep threshold: keep 2 SOL float, sweep the excess every 60 seconds.

That configuration lets the bot run for weeks untouched, self-funds its gas, and caps a total key compromise at ~10 SOL plus whatever float was sitting in the hot wallet. The bulk of the treasury sits behind a 2-of-3 with a half-day delay.

Gotchas that bite in production

Execution isn't approval. In v4, reaching threshold on a vault transaction doesn't execute it — someone still has to send the execute instruction. Automate that or a withdrawal sits pending indefinitely.

Compute limits on batched instructions. A vault transaction bundling several instructions (say, swap dust then transfer) can blow the compute budget. Set a compute-unit limit explicitly and simulate before proposing.

RPC lag on the config account. Right after you change the threshold or add a signer, cached RPC responses can serve you a stale config, and your next transaction builds against the wrong state. Confirm config changes before firing dependent transactions — the same class of staleness and connection issues that shows up under QUIC throttling and dropped transactions.

The recovery key is not optional. A 2-of-2 with both keys online is a 1-of-1 waiting to become a 0-of-0 when one machine dies. Always keep one signer fully offline. That's the whole reason the multisig exists.

The infrastructure lift here is modest — a Squads program the bot already knows how to call plus a sweep loop — but getting the topology and limits right is the difference between a treasury that survives a leaked key and one that doesn't. If you're wiring custody into an automated strategy and want the split done properly, that's the kind of thing our Solana bot infrastructure work is built around.

Need a bot like this built?

We design, build and run trading bots on Solana, Hyperliquid and Polymarket.

Start a project
#Solana#Squads v4#treasury security#multisig#bot infrastructure