This hook is built to solve the MEV problem for low-liquidity pools - a ready-to-use solution for creator coin pools, niche memecoins or launchpads. It uses a priority fee median to track unusual behavior and make MEV-patterned swaps less profitable.
🧬 No external off-chain modules or oracles. Runs entirely on-chain. No Partner Integrations.
Inspired by Uniswap v4 Truncated Oracle Hook and median-oracles by saucepoint
- Reads the priority fee - Checks the extra fee paid for faster transaction inclusion.
- Compares it to the norm - Measures it against the recent typical level.
- Normal swaps pay 0.1% - No extra fee when the bid is near the norm.
- Aggressive bids pay more - Higher-than-normal priority fees trigger a dynamic surcharge.
- The swap executes normally - The extra fee goes to the pool.
- Updates from meaningful swaps - Eligible trades can update the typical priority fee.
- Resists manipulation - Only eligible pools and meaningful price movements affect the shared reference.