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

[Certora] Liquidate buffer, with executable code #708

Merged
merged 30 commits into from
Mar 3, 2025

Conversation

QGarchery
Copy link
Contributor

@QGarchery QGarchery commented Dec 9, 2024

This verification is meant to show that if liquidation happen with LTV < 1 / LIF (note that 1 / LIF > LLTV by design), then this liquidation is healthy in the following sense: the position's health factor increases. This means that liquidation happening in the buffer [LLTV, 1/LIF] always lead to healthy positions, if liquidating multiple times, and don't lead to bad debt

@QGarchery QGarchery self-assigned this Dec 9, 2024
@QGarchery QGarchery changed the base branch from main to certora/liquidate-buffer January 16, 2025 13:09
@QGarchery QGarchery changed the base branch from certora/liquidate-buffer to main January 16, 2025 13:09
@QGarchery
Copy link
Contributor Author

It seems very difficult to make this verification go though. Here is an example of such run, but deviating a little bit from it seems to cause a timeout. Also this run requires some heavy modifications:

  • passing the LIF to the liquidate function
  • munging to not update the value of repaidAssets
  • munging to comment out _accrueInterest (even though it should be skipped given the assumptions)
  • munging to require that no bad debt is realized (even though it should be provable by the assumptions)

For these reasons, it seems prefereable to do #710

@QGarchery QGarchery closed this Jan 29, 2025
@QGarchery QGarchery reopened this Feb 16, 2025
@QGarchery
Copy link
Contributor Author

QGarchery commented Feb 27, 2025

A new trick (see 9ee0ccf) is making the verification much faster for the prover. So now this PR is considered over #710

@QGarchery QGarchery mentioned this pull request Feb 27, 2025
32 tasks
@QGarchery QGarchery marked this pull request as ready for review February 27, 2025 15:55
colin-morpho
colin-morpho previously approved these changes Feb 28, 2025
Copy link
Contributor

@colin-morpho colin-morpho left a comment

Choose a reason for hiding this comment

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

Blazing fast, hard to believe it could ever timeout.

Co-authored-by: Colin | Morpho 🦋 <[email protected]>
Signed-off-by: Quentin Garchery <[email protected]>
@QGarchery QGarchery merged commit 9e2b075 into main Mar 3, 2025
18 checks passed
@QGarchery QGarchery deleted the certora/exec-liquidate-buffer branch March 3, 2025 09:41
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.

5 participants