Skip to content

[Certora] remove liquidate buffer#780

Closed
QGarchery wants to merge 1 commit into
mainfrom
remove-liquidate-buffer
Closed

[Certora] remove liquidate buffer#780
QGarchery wants to merge 1 commit into
mainfrom
remove-liquidate-buffer

Conversation

@QGarchery

@QGarchery QGarchery commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Rationale is that it doesn't prove what it says it proves. What it actually proves is already proven in liquidateDecreasesBorrowExchangeRate.
See this run where the rule in liquidate buffer is simplified, so it looks more like liquidateDecreasesBorrowExchangeRate

@QGarchery QGarchery self-assigned this Jul 19, 2026
Comment on lines -62 to -67
// Hint for the prover to show that there is no bad debt realization.
assert newBorrowerCollateral != 0;
// Hint for the prover about the ratio used to close the position.
assert repaidShares * borrowerCollateral >= seizedAssets * borrowerShares;
// Prove that the ratio of shares of debt over collateral is smaller after the liquidation.
assert borrowerShares * newBorrowerCollateral >= newBorrowerShares * borrowerCollateral;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

curious that we were doing this complex things if it was as simple as liquidateDecreasesBorrowExchangeRate

@QGarchery QGarchery closed this Jul 22, 2026
@QGarchery

Copy link
Copy Markdown
Contributor Author

I confused the first step for a hint, so when I removed it becomes a redundant spec. The 2 steps are:

  • assert borrowerShares * newBorrowerCollateral >= newBorrowerShares * borrowerCollateral ← this is not a hint, it's the meat of the proof. You get a better shares/collat ratio
  • the "shares ratio improves", so you get a better debt/shares ratio ← this is similar to liquidateDecreasesBorrowExchangeRate but needed for the whole proof (better debt/collat ratio)

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.

2 participants