ImpactFeeV4
Uniswap V4 Hook for automated public goods
Created on 9th November 2025
•
ImpactFeeV4
Uniswap V4 Hook for automated public goods
The problem ImpactFeeV4 solves
Trading generates massive value, but profits rarely flow to public goods. Impact Fee Hook solves this by automatically converting 0.10% of every Uniswap V4 swap into yield-generating donations for social impact projects.
Benefits:
- For Traders: Minimal fee (0.10%) that goes directly to charity, not middlemen
- For Public Goods: Sustainable passive income from DeFi trading volume
- For Protocols: Easy integration - just attach the hook to any pool
- For Society: Transforms financial activity into automatic philanthropy
No user action required. Trade → donate. Simple.
Challenges I ran into
Problem: octant-v2-core v0.1.2 didn't include ITokenizedStrategy.sol interface that BaseStrategy imports. Build failed.
Solution: Created a shim interface with all 15+ required function signatures by iteratively compiling and adding missing methods. Also copied errors.sol from the core repo. Updated remappings.txt to resolve imports properly.
Problem: Initial design sent vault shares to the hook contract itself, making them inaccessible to the actual donation address.
Solution: Added donationReceiver immutable parameter to hook constructor. Modified unlockCallback to use feeSink.deposit(feeAmount, donationReceiver) instead of address(this). Now shares go directly to charity.
Problem: Uniswap V4 requires hooks to have addresses that match their permission flags. Can't just deploy and hope.
Solution: Used HookMiner with CREATE2 salt mining to generate deterministic addresses with correct flag bits (beforeSwap + beforeSwapReturnsDelta). Deployed successfully on first try.
Tracks Applied (5)
Best use of a Yield Donating Strategy
Most creative use of Octant v2 for public goods
Best public goods projects
Best team from dev3pack
Best Use of Uniswap v4 Hooks
Technologies used
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.
