Skip to content

feat: add harvest strategy yield accounting#237

Merged
Devsol-01 merged 2 commits intoDevsol-01:mainfrom
dinahmaccodes:issue227
Feb 26, 2026
Merged

feat: add harvest strategy yield accounting#237
Devsol-01 merged 2 commits intoDevsol-01:mainfrom
dinahmaccodes:issue227

Conversation

@dinahmaccodes
Copy link
Contributor

@dinahmaccodes dinahmaccodes commented Feb 26, 2026

Closes #227

PR Description

Add Harvest & Yield Accounting for Yield Strategies

Implements yield tracking and harvesting for external yield strategies in the Nestera protocol.

PR Checklist

  • harvest_strategy(strategy_id) implemented
  • Profit calculated as strategy_balance - principal
  • Yield allocation: portion to users, portion to protocol treasury
  • Accounting records updated (StrategyTotalPrincipal, StrategyYield, TotalBalance for treasury)
  • Yield calculated correctly (tests pass)
  • Treasury allocation correct (tests validate fee math)
  • No double-counting (no-profit guard short-circuits; harvest-twice test validates)
  • Tests validate accounting (16 new tests, 179 total passing)

@vercel
Copy link

vercel bot commented Feb 26, 2026

@dinahmaccodes is attempting to deploy a commit to the devsol-01's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Devsol-01 Devsol-01 merged commit 9cc83c2 into Devsol-01:main Feb 26, 2026
1 of 2 checks passed
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.

Harvest & Yield Accounting

2 participants