Skip to content

Add yield source integration path#137

Open
SlaVKsVolks wants to merge 1 commit into
sorosave-protocol:mainfrom
SlaVKsVolks:codex/yield-source-integration
Open

Add yield source integration path#137
SlaVKsVolks wants to merge 1 commit into
sorosave-protocol:mainfrom
SlaVKsVolks:codex/yield-source-integration

Conversation

@SlaVKsVolks
Copy link
Copy Markdown

Summary

Implements the contract-side yield source integration path for #52.

  • Adds a YieldSource trait in contracts/sorosave/src/yield.rs.
  • Adds fixed-rate yield-source implementation/storage as the first integration target.
  • Adds per-group yield_rate_bps configuration through set_yield_rate.
  • Deposits idle funds into the yield source when a round becomes fully contributed.
  • Withdraws yield position before payout and adds earned yield to the payout amount.
  • Gracefully falls back to the normal contribution pot when no yield position exists.
  • Adds a test proving configured yield is added to the payout.

Verification

  • cargo fmt --all
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo build

Closes #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement interest/yield on held funds

1 participant