Bonker is built on Uniswap v4's hook system. Every token deployment creates a full stack:
Factory (Bonker)
├── creates BonkerToken (ERC-20)
├── initializes Uniswap v4 pool via Hook
│ ├── DynamicHook or StaticHook
│ │ ├── initializePool — setup pool data and starting price
│ │ ├── beforeSwap — MEV module check, set dynamic fee
│ │ ├── afterSwap — handle fee distribution
│ │ └── beforeAddLiquidity — block during MEV module period
│ └── Pool Extension (optional)
├── locks LP in LpLocker
│ └── collects fees → FeeLocker → reward recipients
└── activates MevModule
├── Sniper Auction
├── Descending Fees
└── Block DelayHook permissions
Both hooks use these Uniswap v4 permission flags:
BEFORE_INITIALIZE— setup pool data, mint tokens, add initial liquidityBEFORE_ADD_LIQUIDITY— block liquidity adds during MEV module periodBEFORE_SWAP— run MEV module, set dynamic feeAFTER_SWAP— handle fee distributionBEFORE_SWAP_RETURNS_DELTA— MEV fee extractionAFTER_SWAP_RETURNS_DELTA— fee accounting as balance delta