-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: auto allocate #203
build: auto allocate #203
Conversation
@@ -1048,12 +1061,14 @@ def _update_debt(strategy: address, target_debt: uint256, max_loss: uint256) -> | |||
withdrawable: uint256 = IStrategy(strategy).convertToAssets( | |||
IStrategy(strategy).maxRedeem(self) | |||
) | |||
assert withdrawable != 0, "nothing to withdraw" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the asserts when increasing debt to not revert if it cant be done. So deposits wont revert if auto allocating.
So i also removed the assert with removing debt for continuity of how the function works both ways.
Not sure if it makes sense or not TBH.
6588568
to
1029901
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, just a few questions ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs and spec
|
461ddad
to
89ec23b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending all tests passing
acede00
to
dcf896a
Compare
* chore: updgrade ape * build: allow max uint (#204) * build: allow max uint * fix: lint version * forge install: openzeppelin-contracts v4.9.5 * chore: oz sub module * forge install: tokenized-strategy v3.0.2 * test: fix foundry tests * chore: bump version * fix: workflow (#207) * chore: update wf version * chore: add statemind report * feat: update name and symbol (#206) * feat: set name and symbol * chore: spech * test: fix emergency * fix: test workflow (#208) * fix: config override * chore: manual setup * fix: requirements * fix: ape version * chore: rebase * chore: dont double pull from storage (#212) * feat: report on self (#205) * feat: report on self * chore: comment * chore: add back * build: auto allocate (#203) * build: auto allocate * build: dont revert debt increase * chore: remove decrease revert * chore: update spech * chore: spech * chore: comments * fix: event * fix: comments Co-authored-by: spalen0 <[email protected]> * feat: pack pf config (#211) * feat: pack pf config * chore: remove event * chore: formatting * test: interface updates * chore: comments * fix: deposit flow (#209) * forge install: openzeppelin-contracts v4.9.5 * chore: oz sub module * test: fix foundry tests * fix: deposit flow * fix: zero total assets * fix: flow * test: full loss * chore: comment * test: add invariants * fix: comments * fix: user msg sender * fix: comments * fix: comment * chore: add to interfaces * fix: comments * chore: match gov abi (#213) * chore: deployment * chore: deployed --------- Co-authored-by: FP <[email protected]> Co-authored-by: spalen0 <[email protected]>
Description
auto_allocate
flag to the be set by the DEBT_MANAGER to automatically push all available debt to the first strategy in the queue during every deposit and mintChecklist