Closed SHAKOTN closed 1 year ago
Merging #106 (055eda2) into master (e1a67e0) will increase coverage by
3.10%
. The diff coverage is86.20%
.
@@ Coverage Diff @@
## master #106 +/- ##
==========================================
+ Coverage 71.80% 74.91% +3.10%
==========================================
Files 15 15
Lines 1199 1228 +29
Branches 268 272 +4
==========================================
+ Hits 861 920 +59
+ Misses 226 187 -39
- Partials 112 121 +9
Files Changed | Coverage Δ | |
---|---|---|
contracts/strategy/ConvexStrategy.sol | 76.61% <86.20%> (+11.13%) |
:arrow_up: |
... and 5 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Hey, @kitty-the-kat asked me to take a look at this PR.
Mostly LGTM, seems like main changes were to make the pool addresses variable and allow for manual reward sweeping/redemption in the case of an emergency.
Two things I noticed:
The withdraw() function attempts to sell all rewards unconditional of the emergency status. Is this intended, or should a gate on emergency mode be added here?
The set*Pool functions do not seem to set approvals to the new pools or revoke approvals to the old pools.
In the constructor this is done for the original pools:
Perhaps the tests should check that the strategy continues to function after setting pools? It seems like it might not. Some light fuzzing could be helpful.
Will continue looking at this tomorrow but I don't think I will find anything else notable. Let me know if I misunderstood the above though.
Hey, @kitty-the-kat asked me to take a look at this PR.
Mostly LGTM, seems like main changes were to make the pool addresses variable and allow for manual reward sweeping/redemption in the case of an emergency.
Two things I noticed:
The withdraw() function attempts to sell all rewards unconditional of the emergency status. Is this intended, or should a gate on emergency mode be added here?
The set*Pool functions do not seem to set approvals to the new pools or revoke approvals to the old pools.
In the constructor this is done for the original pools:
Perhaps the tests should check that the strategy continues to function after setting pools? It seems like it might not. Some light fuzzing could be helpful.
Will continue looking at this tomorrow but I don't think I will find anything else notable. Let me know if I misunderstood the above though.
Thanks for the review!
emergencyMode
flag check inside the sellAllRewards
function so now we won't sell rewards in case strategy is in emergency in all placesNew changes look good to me, previously mentioned issues are addressed. Left one nit regarding a comment.
Done:
emergencyMode
is set to truesetAdditionalRewards
is fixed and testedBy completing all from the above, we make sure that no matter the situation with Curve, we can keep strategies running and withdraw rewards without selling them