Section 10 of 18
Build
+20 LynxVault: creditAvailable and debtOutstanding
What You Are Building
Two view functions that drive the vault's dynamic capital allocation. creditAvailable(strategy) answers "how much new underlying can this strategy draw on its next harvest?" debtOutstanding(strategy) answers "how much of this strategy's current debt should be returned on its next harvest?"
These are pure-view functions called by the strategy's harvest() (section 15). The strategy reads them, decides how much to send back and how much new capital to deploy, then calls vault.report() (section 11) to settle.
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