shield
Composable transaction guards for Solana
sBPF assembly · @solana-asm/shield
The Problem
Every Solana transaction has
a "what if" behind it.
Agent runs late, executes at stale price.
Client misconfigures the priority fee.
Trust the destination, or skip the check. No shared primitive.
The Solution
Each "what if" becomes its own tiny program.
Prepend. Atomic abort.
slot_deadline
→
slippage
→
fee_ceiling
→
your action
Guard fails → tx aborts. Destination never runs.
slot_deadline
slippage
balance_floor
signer_allowlist
fee_ceiling
program_allowlist
compute_unit_floor
Seven guards. Devnet + mainnet. Same program IDs.
Why sBPF Assembly
Cheap enough to put on every transaction.
Shield, in assembly
slippage7 CU
balance_floor7 CU
slot_deadline152 CU
Same checks in Anchor
slippagethousands of CU
balance_floorthousands of CU
binary sizekilobytes vs ~400 bytes
Priority fees paid per CU. Cheap enough to ignore → cheap enough to compose.
Solana's missing safety primitive.
Devnet + mainnet. Same program IDs. Live.
Capstone · Solana Fellowship · Priyansh Patel