Up to 8 approved destination token accounts per mint. Any other destination causes an immediate revert. The agent cannot route funds anywhere else.
How it works
Policy lives in the token, not the wallet.
Solana's Token-2022 transfer-hook extension lets a mint specify a program that runs on every transfer — including CPIs from DEXes and vaults. Onleash is that program. Six checks run atomically — any failure reverts the entire transaction.
execution flow
Every transfer runs this path.
AI agent constructs a Token-2022 transfer and signs with its keypair.
Solana's Token-2022 program invokes the Onleash hook on every transfer.
Allowlist · per-tx cap · daily cap · pause · cooldown · count. All six must pass atomically.
Pass → transfer clears. Fail → entire transaction reverts. No partials.
the six checks
All six must pass. Any failure reverts.
Hard ceiling on a single transfer amount. Prevents a single oversized exfiltration even if the daily cap has headroom.
Cumulative spend limit per rolling 24h window. Auto-resets on the first transfer after the window expires — no admin action needed.
Authority sets paused=true and all transfers halt immediately. One on-chain flag, effective on the next block. No multisig, no off-chain coordination.
Minimum seconds between transfers. Throttles rapid-fire drain attempts — even if each is under the per-tx cap and daily limit.
Max number of transfers per 24h window. Blocks micro-drain patterns where many small transfers individually pass value caps but collectively exfiltrate the wallet.
the thesis
Signer-gates verify the agent didn't get jailbroken.
Asset-gates work even if it did.
- ✗Hand-rolled middleware — agents can ignore it
- ✗Squads multisig — kills agent autonomy
- ✗Privy / Turnkey custody — off-chain, revocable by issuer
- ✗Stripe / Brex — opaque, fiat-only, no Solana
- ✗All bypass-able via OWASP LLM01 prompt injection
- ✓Policy is sealed inside the mint — not in the agent
- ✓Enforced by Solana's Token-2022 program, not your code
- ✓Fires on every transfer including CPI (DEXes, vaults)
- ✓Jailbroken agent can sign — the chain still refuses
- ✓Atomic revert — no partial transfers, no race conditions
why solana
The primitive only exists here.
The only chain with a native hook that fires atomically on every token transfer — unbypassable at the protocol level, not your application code.
On Ethereum, a policy check per transfer would cost $5+ in gas — making it economically unviable. On Solana it costs $0.001. That's the difference between a protocol primitive and a theoretical idea.
Draft PR #565 open to sendaifun/solana-agent-kit — the main Solana AI agent framework. ElizaOS and Griffain both build on it. 5-line drop-in for any existing agent.
honest scope
What v1 covers — and what it doesn't.
The hook fires on Transfer, TransferChecked, and TransferCheckedWithFee — including all CPI calls. It does not fire on MintTo, Burn, Approve, or CloseAccount. Those are companion-guard territory (v2 roadmap).
- Transfer
- TransferChecked
- TransferCheckedWithFee
- CPI transfers (DEX, vaults, programs)
- Delegate-initiated transfers
- MintTo, Burn
- Approve, Revoke
- CloseAccount, FreezeAccount
- Native SOL transfers
- Legacy SPL-Token mints
Run a real on-chain attack rejection on devnet — takes 5 seconds.