Search projects, hackathons, sponsors and tech

    ← All projects

    Octant V2 Morpho YDS Tutorial

    Build Your First Public Goods Funding Protocol

    Demo

    About

    The problem it solves ## Problem Statement: What This Tutorial Solves ### **The Public Goods Funding Crisis in Web3** The decentralized ecosystem faces a critical sustainability problem: **how do we fund the infrastructure that makes DeFi possible?** Open-source protocols, developer tools, research, and community resources struggle with inconsistent funding while generating billions in value for users. ### **Current Broken Models:** **1. Grant Dependency** - Projects rely on sporadic grants that eventually run out - No predictable revenue streams for long-term planning - Creates feast-or-famine cycles that hurt innovation **2. Token Emission Schemes** - Inflationary rewards that dilute value over time - Unsustainable economics that collapse in bear markets - Creates mercenary capital that leaves when rewards stop **3. One-Time Donations** - Emotional, unpredictable funding based on market sentiment - Forces users to choose between personal profit and public good - Doesn't scale with ecosystem growth ### **The Developer Education Gap** **Learning DeFi development often means building "toy projects" with no real-world impact.** Most tutorials teach you to: - Build another DEX clone - Create meaningless token contracts - Implement features that already exist everywhere **Result:** Developers learn syntax but miss the bigger picture of how blockchain can solve real problems. ### **What This Tutorial Solves:** **1. Sustainable Funding Mechanism** - Learn to build systems where **user principal stays safe** while **yield funds public goods** - Create **predictable, recurring revenue streams** that scale with DeFi adoption - Implement **real yield generation** through institutional-grade protocols like Morpho **2. Purpose-Driven Development Education** - Master **ERC4626 vault standards** through meaningful implementation - Learn **real Morpho integration** with actual yield generation (~7% APY) - Build **production-ready smart contracts** that solve genuine problems **3. Bridge Theory and Impact** - Understand how **DeFi mechanics can serve social good** - Learn to create **positive-sum systems** where everyone benefits - Build technology that **aligns profit motives with public benefit** **4. Complete Full-Stack Implementation** - **Smart contracts** with comprehensive testing and mainnet fork validation - **Modern React frontend** with real-time Web3 integration - **End-to-end user experience** from deposit to donation ### **Why This Matters for Developers:** Instead of building another meaningless DeFi clone, you'll learn to create systems that: - **Generate real economic value** through legitimate yield strategies - **Solve actual problems** in public goods funding - **Scale sustainably** without relying on token inflation - **Demonstrate production-ready patterns** you can use in real projects ### **The Bigger Impact:** This tutorial teaches you to build the infrastructure for a **sustainable Web3 ecosystem** where: - Every DeFi user automatically contributes to public goods through their yield - Funding grows organically with ecosystem adoption - Public goods receive predictable, transparent funding streams - Users never sacrifice their financial security for social impact **You're not just learning to code—you're learning to build the economic foundation for a better decentralized future.**

    How it's made

    Challenges we ran into ## The Challenges I Ran Into ### **1. Morpho Integration Complexity** Morpho's share-based yield system was initially confusing. Understanding how to separate user principal from accrued yield required careful accounting and a clean adapter pattern to abstract the complexity. ### **2. Mainnet Fork Testing** Real Morpho yields fluctuate daily, making tests unpredictable. Solution: Used specific block numbers and time simulation with tolerance ranges instead of exact yield matches. ### **3. ERC4626 Watermark System** Implementing accurate profit tracking without double-counting during deposits/withdrawals was tricky. Built a share-weighted watermark that adjusts proportionally with vault operations. ### **4. Real vs. Mock Yield** Early versions used fake yield for simplicity, but I wanted authentic Morpho integration. The complexity was worth it for credibility and real learning value. ### **5. Frontend State Sync** Keeping React UI in sync with rapidly changing blockchain state during yield accrual. Solved with robust polling and optimistic updates using Wagmi hooks. ### **6. Gas vs. Readability Trade-offs** Balancing efficiency with educational clarity. Chose readability over micro-optimizations, keeping descriptive names and extensive comments for learning purposes. ### **7. Documentation Drift** Code evolved faster than docs. Implemented automated testing that validates documentation examples to keep everything in sync. ### **Key Takeaway:** The biggest challenge was **balancing educational value with real-world applicability**. Every decision had to serve both learning and practical needs. This tension made the final product stronger—teachable yet genuinely useful. **Most Valuable Lesson:** Real integration is messier than tutorials suggest, but that messiness is where actual learning happens.