Scaffold-ETH starter kit for building custom pools and hooks on Balancer v3. Foundry scripts deploy example contracts to a local fork, a Next.js playground inspects and operates the pools, and companion videos teach the protocol.
Solidity · Foundry · TypeScript · Next.js · React · Scaffold-ETH 2 · Balancer SDK · Viem · Wagmi · TanStack Query · Permit2
Foundry deploy scripts for pools and hooks
Wrote Foundry scripts that deploy mock tokens, pool factories, custom pools and hooks contracts to a local fork in one command, each pool script setting its own registration and initialization config, with deployments hot-reloading into the frontend.
Pool operations playground
Built a Next.js playground that reads pool configuration, composition and hooks from the Vault and runs swaps, add liquidity and remove liquidity through the Balancer SDK, with Permit2 approvals and TanStack Query handling caching, pending and error states.
Example custom pools and hooks
Wrote constant sum, constant product and weighted pool examples, each paired with a hook (lottery, veBAL fee discount, exit fee), and Foundry tests for the factories, pools and hooks.
Tracked Balancer v3 to mainnet launch
Updated contracts and scripts through each v3 testnet deployment, then moved the scaffold from a Sepolia fork to a Mainnet fork with launch addresses once v3 went live.
Companion video tutorials
Produced video tutorials teaching protocol architecture, custom AMMs, pool hooks and routers, refining the scaffold's contracts and deploy scripts while recording them.