Skip to content

On-Chain Auto-Donate Yield Feature #151

@edehvictor

Description

@edehvictor

📝 Description

Allow users to easily support public goods. We want a feature where users can toggle a setting to automatically route a percentage of their generated yield to a whitelisted charity address.

🎯 Acceptance Criteria

  • Update the Vault smart contract to support a yield_split parameter per user.
  • Modify the harvest/withdrawal logic to route the specified percentage to the designated charity address.
  • Build a frontend UI component ("Yield for Good") allowing the user to select the percentage and the charity.
  • Add a public dashboard showing total protocol-wide donations generated.

🛠 Technical Details

  • Stack: Rust (Soroban), React, Node.js.
  • Location: /contracts/yield_vault/src/donations.rs
  • Security: Ensure the donation logic cannot underflow or trap user principal funds.

⏱ Complexity & Scope

  • Estimated Time: 2-3 weeks.
  • Drips Complexity: High (200 points) - Smart contract state updates and full-stack integration.

📋 Guidelines for Submission

  • Minimum 90 percent test coverage required.
  • Clear NatSpec-style documentation must be added to public contract functions.
  • Timeframe for completion: 2 Wave cycles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions