
OctantXYearn-strategy
The Kalani Octant Strategy
Demo
About
The problem it solves Problems Solved & Use Cases The Problem 1. Public goods funding gap Public goods projects struggle to get sustainable funding Traditional donations are one-time and not recurring Yield from DeFi is often kept by protocols or users, not directed to public goods 2. Friction in impact investing Users want to support causes but also need to preserve capital Existing solutions often charge fees or require choosing between yield and impact Manual donation processes are time-consuming and easy to forget 3. Fragmented DeFi infrastructure Building yield strategies from scratch is complex and expensive Integrating multiple protocols requires deep technical knowledge Each integration needs custom code and security audits 4. Trust and transparency Users want clarity on where their funds go Traditional donation mechanisms lack transparency Yield donation needs to be verifiable on-chain **What Problems It Solves** Problem 1: Sustainable public goods funding Solution: Automatic yield donation - 100% of generated yield is automatically donated to Octant's payment splitter - Funding is recurring and grows with TVL - No manual steps required — happens on every report() Problem 2: Capital preservation vs. impact Solution: Zero-fee yield donation Users keep their original deposits All yield goes to public goods No performance or management fees Problem 3: Complex DeFi integration Solution: Composable architecture Uses existing Kalani vaults (no need to build yield sources) Leverages Yearn V3's Tokenized Strategy framework ERC4626 standard for easy integration Problem 4: Trust and transparency Solution: On-chain verification All donations are on-chain and verifiable Smart contracts enforce the donation mechanism Users can verify their deposits are safe Public goods receive shares directly (no intermediaries) **Who Can Use It** 1. Impact investors Want to support public goods while preserving capital Prefer automated, recurring donations Value transparency and on-chain verification 2. DAOs and organizations Need sustainable funding mechanisms Want to align treasury management with values Prefer automated systems over manual processes 3. DeFi users Want yield exposure without fees Support public goods but don't want to sacrifice returns Prefer simple, composable solutions 4. Developers and builders Want to build impact-focused products Need composable infrastructure Want to leverage existing, battle-tested protocols **How It Makes Existing Tasks Easier/Safer** Easier: Automated donation process Before: - Manual yield harvesting - Manual donation transfers - Risk of forgetting or missing donations - Gas costs for each tr After: - Automatic yield donation on every report - No manual intervention needed - Gas-efficient share minting (no transfers) - Guaranteed donation Safer: Capital preservation Before: Risk of losing principal in donation-focused products Uncertainty about fund safety Complex fee structures After: Original deposits are always returned Loss protection via optional share burning Zero fees — no hidden costs Transparent on-chain accounting Easier: Integration with existing infrastructure Before: Build yield sources from scratch Audit each integration Maintain complex codebases High development costs After: Compose with existing Kalani vaults Leverage Yearn V3's battle-tested framework Only 3 functions to implement Minimal code to maintain Safer: Smart contract security Before: Custom donation logic needs auditing Risk of bugs in manual processes Centralized points of failure After: Uses audited Yearn V3 and Octant contracts Automatic execution reduces human error Immutable donation mechanism Open source and verifiable Easier: Multi-protocol composability Before: Integrate each protocol separately Custom code for each integration Complex testing requirements After: Single ERC4626 interface Works with any Kalani vault Standard integration pattern Reusable across different assets **Specific Use Cases** Use Case 1: Individual impact investor Scenario: Alice wants to support public goods while preserving capital How it helps: Deposits 10,000 USDC into the strategy Strategy generates 5% APY (500 USDC/year) All 500 USDC yield is automatically donated to Octant Alice can withdraw her 10,000 USDC anytime Public goods receive sustainable, recurring funding Benefits: Capital preservation Automated impact Zero fees Full transparency Use Case 2: DAO treasury management Scenario: A DAO wants to align treasury management with values How it helps: - DAO deposits treasury funds into the strategy - Yield automatically funds public goods - Treasury principal remains intact - Demonstrates commitment to public goods - On-chain proof Benefits: - Aligned treasury management - Sustainable funding model - Transparent impact Use Case 3: Developer building impact products Scenario: Developer wants to build an impact-focused DeFi product How it helps: Use the strategy as a building block
How it's made
Challenges we ran into Challenge 1: Octant Integration - dragonRouter vs Payment Splitter The Problem Initial implementation used dragonRouter as the donation recipient, but the Octant team clarified: "There is no dragonRouter according to the team" "No We are not using This contract as it is just poc and its development is still ongoing" "For now we will use the payment splitter" Impact All code referenced dragonRouter Documentation mentioned dragonRouter Deployment script used DRAGON_ROUTER environment variable Comments and variable names needed updates The Solution Updated contract comments to reference "payment splitter" instead of "dragonRouter" Changed deployment script from DRAGON_ROUTER to PAYMENT_SPLITTER Updated all documentation files Modified factory and strategy contracts to use the correct terminology Files Changed: octant/src/strategies/kalani/KalaniOctantStrategy.sol octant/script/DeployKalaniStrategy.s.sol octant/src/strategies/yieldDonating/YieldDonatingStrategyFactory.sol All documentation files Lesson Learned: Always verify contract addresses and terminology with protocol teams, especially during active development. Challenge 2: Solidity Compilation Errors Problem 1: Unicode Character in Console Log Error: Error (8936): Invalid character in string. If you are trying to use Unicode characters, use a unicode"..." string literal. --> script/DeployKalaniStrategy.s.sol:73:22: |73 | console2.log("✓ Strategy verified successfully"); | ^^ Solution: Removed the Unicode checkmark character and used plain text: // Beforeconsole2.log("✓ Strategy verified successfully");// Afterconsole2.log("Strategy verified successfully"); Problem 2: Parameter Documentation Mismatch Error: Error (3881): Documented parameter "_owner" not found in the parameter list of the function. --> src/strategies/kalani/KalaniOctantStrateg Root Cause: The function parameter was commented out (address /*_owner*/) but the documentation still referenced it with @param _owner. Solution: Removed the @param documentation for commented-out parameters: // Before/** * @param _owner The address that owns the shares */function availableWithdrawLimit(address /*_owner*/) // After/** * @return The available amount that can be withdrawn */function availableWithdrawLimit(address /*_owner*/) Lesson Learned: When using commented-out parameters in Solidity, don't document them in NatSpec comments. Challenge 3: Environment Variables Not Loading on Windows The Problem Foundry wasn't reading the .env file on Windows (Git Bash), causing: Error: script failed: vm.envAddress: environment variable "MANAGEMENT" not found Root Cause Foundry auto-loads .env files, but this can be unreliable on Windows Git Bash may not handle .env parsing correctly The .env file had comments and special characters that caused parsing issues The Solution Option 1: Manual Export (What We Used) export PRIVATE_KEY=0x...export KALANI_VAULT_ADDRESS=0x...export ASSET_ADDRESS=0x...# ... etcforge script script/DeployKalaniStrategy.s.sol:DeployKalaniStrategy \ --rpc-url https://... --broadcast -vvv Option 2: Clean .env File Removed comments with special characters Ensured proper line endings Used simple key=value format Lesson Learned: On Windows, manually export environment variables or ensure .env files are properly formatted without special characters. Challenge 4: Network Mismatch - Mainnet Fork vs Base Network The Problem Deployment failed with: Error: script f Root Cause: Kalani vault address 0xf1AD8f58EfeE21265aDd954aa26A3F1160484FF5 is on Base network (Chain ID: 8453) Deployment was attempted on a mainnet Tenderly fork The vault doesn't exist on mainnet, only on Base The Solution Identified the network mismatch by checking the Kalani frontend URL: kalani.yearn.fi/vault/8453/... (8453 = Base) Switched to Base network RPC: --rpc-url https://mainnet.base.org Updated asset address to Base USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 (different from mainnet) Ensured payment splitter address was for Base network Key Insight: Always verify which network your target contracts are on Check contract addresses on blockchain explorers for the correct network Use network-specific RPC URLs and asset addresses Lesson Learned: Network verification is critical. Always check: Contract addresses on the correct network Asset addresses (USDC on Base ≠ USDC on Mainnet) RPC URLs matching the target network