🎓 Uniswap Hook Incubator — Cohort 8 Graduate · Graduating Project
StableGate
Mar 2026
Uniswap V4Reactive NetworkUnichainBaseKYCCSMM
// the problem
Institutional stablecoin trading today is stuck between two bad options. DeFi protocols offer efficient, transparent execution but can't enforce KYC, tiered access, or volume limits. CeFi platforms handle compliance but at the cost of composability and on-chain transparency. Bridging the two requires manual admin overhead — someone has to grant permissions, update tiers, and revoke access. That doesn't scale. StableGate makes the onboarding, tier assignment, and revocation lifecycle fully automated and cross-chain.
// the design decision
The system has three layers across three chains. MembershipNFTs (trading) and LPMembershipNFTs (liquidity) are non-transferable ERC721 credentials minted on Base. A Reactive Smart Contract on Reactive Network monitors 4 event streams — Transfer, TierUpdated, ExpirySet for trading NFTs, and Transfer for LP NFTs — and routes callbacks to the hook on Unichain. The PermissionedCSMMHook enforces everything on-chain: allowlist gates, tiered fees (Gold 0 bps, Silver 1 bps, Bronze 3 bps), membership expiry, daily volume caps, and LP whitelist. The hook uses the NoOp swap pattern for 1:1 CSMM pricing and splits fees 50/50 between LPs (via donate()) and the operator.
// key implementation detail
Three-chain architecture:
Base Sepolia: MembershipNFT (tiered, expiry) + LPMembershipNFT
Reactive Lasna: AllowlistReactiveContract (4 event subscriptions)
Unichain Sepolia: PermissionedCSMMHook (v4 hook, CSMM, fee split)
Cross-chain flow: Admin mints NFT on Base → Transfer + TierUpdated + ExpirySet events → RSC detects and emits callbacks → Hook on Unichain receives via Callback Proxy → institution can swap within 15-45 seconds.
Atomic revocation: burning an NFT triggers a single callback that clears allowlist, tier, expiry, daily volume, and reset block in one operation. Re-onboarding starts from a clean slate.
151 tests across 7 suites including 13 mainnet fork tests with real USDC/USDT0.
// what i learned
The Reactive Network's log._contract routing pattern is powerful — subscribing to the same Transfer topic from two different NFT contracts and routing to different callbacks based on origin. The hardest part was the Unichain hook deployment: CREATE2 with HookMiner for address-encoded permission flags is finicky, and the callback proxy funding model requires pre-funding the hook's reserves. The demo's snapshot/resume system proved essential — cross-chain flows fail in non-obvious ways.