This hook is build to solve MEV problem for pools with low liquidity - perfect ready-to-use solution for creator coins 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.
inspired by Uniswap v4 Truncated Oracle Hook and median-oracles by saucepoint
- Reads the priority fee - Checks the extra fee paid for faster inclusion..
- Compares to the norm - Measures it against the recent typical level.
- Normal swaps pay 0.1% - No extra fee when bidding is near the norm.
- Aggressive bids pay more - Higher-than-normal priority fees trigger a dynamic surcharge.
- 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 moves affect the shared reference.