Closed tserg closed 8 months ago
For future reference, is there a rule of thumb we can apply when dealing with LTV comparisons? 🤔
Hmm, it's as simple as you've put it in the PR description, innit? "LTV > benchmark"
Hmm, it's as simple as you've put it in the PR description, innit? "LTV > benchmark"
Yes!
After some additional changes in #567, there will still be a few comparisons using >=
for LTV, but these are used in relation to numerical bounds regarding the calculation of liquidation penalty rather than a comparison with a benchmark, so I think it is ok?
https://github.com/lindy-labs/opus_contracts/blob/3ae520f7015c24c0d82dbfc7d0c1e15f7dbc77ad/src/core/purger.cairo#L451 https://github.com/lindy-labs/opus_contracts/blob/3ae520f7015c24c0d82dbfc7d0c1e15f7dbc77ad/src/core/purger.cairo#L554 https://github.com/lindy-labs/opus_contracts/blob/3ae520f7015c24c0d82dbfc7d0c1e15f7dbc77ad/src/core/purger.cairo#L564
Yeah, those comparisons are fine.
Good to go.
This PR aligns LTV comparisons in recovery mode to always take the form of LTV > benchmark being compared against.
Specifically: