8/8 hooks · 59/59 tests · Orca + Raydium + Meteora · Anchor 0.31 · Solana mainnet
the gap
CLMMs have no hooks. Yet.
Concentrated liquidity on Solana is fast and capital-efficient, but a pool is a fixed machine: one fee tier, one set of rules, no place to inject custom logic at swap or liquidity events. If you want a dynamic fee, a time lock, or MEV dampening, you fork the AMM.
Uniswap v4 solved this on the EVM with hooks — contracts called at ten points in a pool’s lifecycle. Patcha brings that model to Orca Whirlpools, Raydium CLMM, and Meteora DLMM: small, composable modules patched into the pool, not bolted onto a fork.
standard library
Eight modules, ready to patch.
Dynamic Fee
Adjust the pool fee in real time based on volatility or volume bands.
TimeLock
Gate liquidity actions until a timestamp or after a cooldown window.
WhitelistGate
Restrict swaps or LP actions to an allowlist of addresses.
RangeOrder
Execute one-sided range orders that convert as price crosses a tick.
AntiMEV
Dampen sandwich/MEV extraction via per-block caps and dynamic slippage.
KYCGate
Require a verified-credential attestation before permitting actions.
PriceImpactCap
Reject any swap whose estimated price impact exceeds a per-swap cap. LPs install it for a hard slippage ceiling on their own pool.
JIT-Defense
Block same-block add-swap-remove sandwiches. Rejects remove-liquidity from a wallet whose add-liquidity landed in the same block.
the designer
Compose visually. Patch like a synth.
integration
Plug into Orca, Raydium, and Meteora.
Hooks trigger on whirlpool swap and liquidity CPIs. Dynamic fees and gating apply per position without touching the core program.
The same hook definitions install against Raydium CLMM pools — one module, two venues, identical parameter schema.
dyn-fee → whirlpool swap CPI · dyn-fee → raydium clmm swap CPI
on-chain
Anchor on-chain executor.
Hooks are enforced by a single Anchor program. Each pool installs a hook via PDA-derived accounts; the executor is called on Orca and Raydium CPI entry points.
EPcW7e8RxBNPpQK2XKoKG9maWH6QvmU3ejxifoU5rNRaview on solana explorer (mainnet) →Deployed on mainnet. Mainnet deploy pending.