YieldChain
Double-impact public goods funding
Created on 9th November 2025
•
YieldChain
Double-impact public goods funding
The problem YieldChain solves
Traditional yield-generating strategies for public goods funding miss a key revenue stream: the fees generated during portfolio optimization.
The Problem:
- Existing strategies donate lending yield (Aave, Compound)
- When strategies rebalance for better APY, swap fees are lost
- This is wasted funding potential
Our Solution:
YieldChain captures BOTH revenue streams:
- Aave lending yield - automatically donated via Octant's yield-donating mechanism
- Rebalancing swap fees - captured via custom Uniswap V4 hook and donated
Result: Every time the strategy optimizes itself, it generates additional public goods funding. We've proven this works - our tests show the hook capturing 598 billion wei per swap.
Who benefits:
- DAOs with treasuries seeking sustainable funding
- Public goods projects receiving more consistent funding
- DeFi users who want their capital to do good while staying productive
Challenges I ran into
Challenge 1: ERC-4626 Integration with Aave V3
Aave doesn't provide official mainnet-deployed ERC-4626 vaults. We needed to build our own
ATokenVault
wrapper that properly handles Aave's aToken accounting while maintaining standard ERC-4626 compliance.Solution: Created a simplified but production-ready wrapper based on Aave's official vault design, focusing on core deposit/withdraw flows without unnecessary complexity.
Challenge 2: Uniswap V4 Hook Delta Handling
V4's new delta-based accounting required careful handling of the
afterSwapReturnDelta
flag. Initial attempts to calculate swap outputs directly from BalanceDelta failed due to type mismatches.Solution: Used balance tracking after swaps instead of parsing deltas directly. This simplified the code while maintaining correctness.
Challenge 3: Currency Ordering in V4 Pools
Uniswap V4 requires currency0 < currency1 by address. Our initial USDC/DAI pool failed because addresses were in wrong order.
Solution: Properly sorted currencies before pool initialization and adjusted swap direction accordingly.
Challenge 4: Whale Addresses for Fork Testing
Mainnet fork tests failed when whale addresses didn't have sufficient balances.
Solution: Used Foundry's
deal()
cheatcode to mint tokens directly for testing, avoiding whale dependency.Key Learnings:
- Start with working components separately before integration
- Use proper test helpers (Deployers, deal()) for fork testing
- Manual rebalancing is actually better than automated for production safety
Tracks Applied (5)
Best use of a Yield Donating Strategy
Most creative use of Octant v2 for public goods
Best public goods projects
Best use of Aave v3 (Aave Vaults)
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.