20,000 USDC
View results
Submission Details
Severity: high
Valid

Incompatibility with token pairs with high difference in value

Summary

Project is unable to work with token pairs with high difference in value

Vulnerability Details

In order to take a borrow, the user must provide collateral which is within a certain ratio with the borrow. The problem is that the loanRatio value being scaled up by 1e18 might not be sufficient in some cases such as token pair WBTC/ SHIB
Currently token pair WBTC : SHIB trades at ~1 : 3.4e9. However, WBTC has 8 decimals while SHIB has 18 decimals
This means 1e8 wei of WBTC is worth ~ 3.4e27 wei of SHIB. Even after scaling up the WBTC/SHIB ratio by 1e18, it will still round down to 0, making such token pairs impossible to be used within the protocol

Considering both tokens are some of the most widely used, I believe this should be of Medium severity.

Impact

Some token pairs cannot be used within the protocol

Tools Used

Manual review

Recommendations

Scale up loanRatio by 1e24 for example.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!