Section 15 of 18
Build
+20 LynxBaseStrategy: harvest, tend, and the Realize-Report-Reinvest Cycle
What You Are Building
The strategy-side counterpart to the vault's report(). StrategyHarvest extends BaseStrategy (section 8) and adds the periodic cycle that closes the loop between strategy state and vault accounting:
- Read what the vault wants back.
- Realize the strategy's P&L.
- Call
vault.report()to settle. - Reinvest whatever underlying is left in the strategy.
The keeper bot calls harvest() on a cadence picked by the strategist via harvestTrigger(). Yearn keepers across mainnet harvest strategies many times per day.
Your Code
Solution.sol
Loading editor...
Requirements
Write your implementation, then click Run Tests. Tests execute on the server.
Sign up free — keep reading + earn 20 Lynx
Zealynx Academy is free. Track your progress, earn Lynx, and climb the leaderboard.
Sign up free to continueAlready have an account? Log in