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] Cannot lose position & can withdraw all #348

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

jhoenicke
Copy link
Contributor

  • user cannot lose supply shares or gain borrow shares by someone else (not authorized)
  • a user without borrow shares cannot lose collateral
  • a healthy user cannot lose collateral if no time passes and price doesn't change.
  • authorization can only be changed by user or setAuthorizationWithSig
  • lastUpdate is always smaller equal to block number.
  • it's possible to withdraw all shares if nobody else borrows.

@jhoenicke jhoenicke requested a review from QGarchery August 17, 2023 20:15
@jhoenicke jhoenicke changed the title A few more rules [Certora] A few more rules Aug 18, 2023
@QGarchery QGarchery added the verif Modifies the formal verification label Aug 18, 2023
function getVirtualTotalSupply(MorphoHarness.Id) external returns uint256 envfree;
function getVirtualTotalSupplyShares(MorphoHarness.Id) external returns uint256 envfree;
function supplyShares(MorphoHarness.Id, address user) external returns uint256 envfree;
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is duplicated at line 7

@jhoenicke jhoenicke merged commit d17bd5a into certora/dev Aug 18, 2023
@jhoenicke jhoenicke deleted the certora/morerules branch August 18, 2023 08:34
@jhoenicke jhoenicke restored the certora/morerules branch August 18, 2023 08:35
@QGarchery QGarchery changed the title [Certora] A few more rules [Certora] Cannot lose position & can withdraw all Aug 18, 2023
@QGarchery QGarchery mentioned this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verif Modifies the formal verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants