Skip to content

STATEMIND-177: Comparison of different units #591

@asardon

Description

@asardon

Description

The comparison at the lines BasicQuotePolicyManager.sol#L274-L277 can have different units in some scenarios:

If the quoteBounds.minLoanPerCollUnitOrLtv and quoteBounds.maxLoanPerCollUnitOrLtv have LTV value in terms of Constants.BASE, but an oracle is not required then quoteTuple.loanPerCollUnitOrLtv will be in terms of loanPerCollUnit.
If the quoteBounds.minLoanPerCollUnitOrLtv and quoteBounds.maxLoanPerCollUnitOrLtv are in terms of loanPerCollUnit, but the quote tuple has an oracle then quoteTuple.loanPerCollUnitOrLtv will be in terms of LTV.

Recommendation

We recommend to save separate max/min values of loanPerCollUnit and LTV in quoteBounds and compare with quoteTuple accordingly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions