-
Notifications
You must be signed in to change notification settings - Fork 48
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
Make sure that liquidity is isolated from a market to another #92
Comments
It's already the case now, thanks to the liquidity check. What do you want to add exactly ? Tests ? Proofs ? |
Proof would be great. I fear that integrators could fear that |
I suggest that we open an issue with invariants idea for when we will formal prove the contract, to gather everything together (and avoid having too much issues). wdyt ? @MerlinEgalite @QGarchery |
Done here: #96 Closing this one |
Lol I thought of the same thing, and opened #96 Thinking a little bit about it, this invariant does not seem to be verified because of the liquidate function which can reduce the total supply. This seems to be a big issue |
Reopening because this particular issue is not solved I think (see comment above) |
I was closing not because it's solved but because you listed it on the things to verify. But I'm fine keeping it since we should fix it (it seems). |
The liquidation doesn't touch the totalSupply right ? |
It does when bad debt is realized |
I don't think that there is an issue. Worst case scenario the withdraw reverts because there are not any assets (div by zero) but it seems ok. |
Yes but the issue is that we can have |
How ? the totalBorrow is also reduced when realizing bad debt |
Oh yes you are right, this is beautiful ! Closing this because it will be verified in #96 |
We want to avoid that because of a bad IRM or oracle, someone is able to steal money from different markets using the same asset
The text was updated successfully, but these errors were encountered: