patcha
xgithub
wallet
warming up the rack

6/6 hooks · 24/24 tests · Orca + Raydium · Anchor 0.31 · Solana mainnet

solana clmm hooks

Patch your
liquidity.

Compose hooks like patching modules. Then deploy on Solana CLMMs — Orca Whirlpools and Raydium CLMM.

01

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 and Raydium CLMM: small, composable modules patched into the pool, not bolted onto a fork.

02

standard library

Six modules, ready to patch.

dyn-feefees

Dynamic Fee

Adjust the pool fee in real time based on volatility or volume bands.

beforeSwapafterSwap
tlocktiming

TimeLock

Gate liquidity actions until a timestamp or after a cooldown window.

beforeAddLiquiditybeforeRemoveLiquidity
gategating

WhitelistGate

Restrict swaps or LP actions to an allowlist of addresses.

beforeSwapbeforeAddLiquidity
range-ordrange

RangeOrder

Execute one-sided range orders that convert as price crosses a tick.

afterSwap
anti-mevmev

AntiMEV

Dampen sandwich/MEV extraction via per-block caps and dynamic slippage.

beforeSwapafterSwap
kyckyc

KYCGate

Require a verified-credential attestation before permitting actions.

beforeSwapbeforeAddLiquidity
03

the designer

Compose visually. Patch like a synth.

The Hook Designer is a modular rack. Drag a module onto the board, wire its signal with a patch cable, turn the knobs that map to its on-chain parameters, and run a backtest against real Orca and Raydium pools — before a single transaction.

dyn-feetlockgaterange-ordanti-mevkyc
Patcha modular hook designer board with patch cables
04

integration

Plug into Orca and Raydium.

orca whirlpools

Hooks trigger on whirlpool swap and liquidity CPIs. Dynamic fees and gating apply per position without touching the core program.

raydium clmm

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

05

on-chain

Anchor mainnet 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.

coming with the phase 2 hook executor

06

devtools

Ship from your IDE.

Scaffold, simulate, and deploy hooks from a terminal or VS Code — the same hook library, driven from where you already work.