Skip to content
ImpactFeeV4

ImpactFeeV4

Uniswap V4 Hook for automated public goods

Created on 9th November 2025

•

ImpactFeeV4

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

ImpactFeeYieldStrategy inherits from Octant V2's BaseStrategy and treats trading fees as yield. Swap happens -> hook ch...Read More

Most creative use of Octant v2 for public goods

Traditional strategies need user deposits. This creates passive funding by tapping existing DeFi trading. Fees come auto...Read More

Best public goods projects

Impact Fee Hook transforms everyday DeFi activity into a predictable funding stream for public goods by automatically co...Read More

Best team from dev3pack

Working hard and engaging with the Dev3pack community, delivered a working product under deadline with full responsibili...Read More

Best Use of Uniswap v4 Hooks

Implements a 0.10% fee on swaps using beforeSwap + beforeSwapReturnsDelta that automatically flows to charity. Uses Hook...Read More

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.

Discussion

Builders also viewed

See more projects on Devfolio