GlassPad is built on Uniswap v4's hook system. Every token deployment creates a full stack:
Factory (GlassPad)
├── creates GlasspadToken (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