Skip to content
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

Rounding liquidate fix #653

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

QGarchery
Copy link
Contributor

@QGarchery QGarchery commented Dec 18, 2023

Comes from #638 (comment)

When computing the repaid shares in the case where seizedAssets != 0, the Liquidation Incentive Factor is used. The change introduced by this PR is safe (safer even), because it corresponds to underestimating the LIF. This is similar to the else branch in the case where seizedAssets == 0, where it the rounding direction also corresponds to underestimating the LIF

@QGarchery QGarchery requested a review from a team December 18, 2023 17:55
@QGarchery QGarchery self-assigned this Dec 18, 2023
@QGarchery QGarchery requested review from adhusson, Rubilmax, MerlinEgalite, MathisGD and Jean-Grimal and removed request for a team December 18, 2023 17:55
@QGarchery QGarchery changed the base branch from main to post-cantina December 18, 2023 17:55
Copy link
Contributor

@adhusson adhusson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about repayIncentive but otherwise yes

@MerlinEgalite
Copy link
Contributor

Why is it a draft? Because of the certora test?

src/Morpho.sol Outdated Show resolved Hide resolved
@QGarchery QGarchery marked this pull request as ready for review December 20, 2023 09:43
@QGarchery QGarchery changed the title Rounding liquidate refactors Rounding liquidate fix Dec 20, 2023
@Rubilmax Rubilmax mentioned this pull request Dec 20, 2023
Copy link
Contributor

@Jean-Grimal Jean-Grimal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean

@MerlinEgalite MerlinEgalite merged commit 5afa588 into post-cantina Dec 20, 2023
15 checks passed
@MerlinEgalite MerlinEgalite deleted the refactor/improve-rounding-liquidate branch December 20, 2023 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants