-
Notifications
You must be signed in to change notification settings - Fork 27
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
optimize _calcSurplusAndCap() in LiquidationLibrary #687
Conversation
@dapp-whisperer Very delicate change I added an assert so we can invariant test if that gets broken We assume partial can never close a CDP, the assert ensures that Same idea for full liquidation, do the math only when needed |
On error: SL-05: The CDPs should be sorted in descending order of new ICR (accrued) This is the issue we've already discussed plenty of times |
On broken Foundry Tests: |
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.
Sent tweak with Assert so we can let echidna cook
Waiting on @dapp-whisperer review before merging, we can differential fuzz if need be |
address #683