Skip to content

Latest commit

 

History

History
29 lines (15 loc) · 1.03 KB

045.md

File metadata and controls

29 lines (15 loc) · 1.03 KB

moneyversed

medium

Incorrect collateral value calculation

Summary

The collateral value calculation in the CollateralManager.sol file may result in incorrect ratios when dealing with tokens that have different decimal values, which could lead to under-collateralized loans.

Vulnerability Detail

In the CollateralManager.sol contract, the collateral value calculation may be inaccurate when handling tokens with different decimal values. This could potentially result in under-collateralized loans, putting the platform and its users at risk.

Impact

Potential under-collateralized loans, leading to increased risk for the platform and its users.

Code Snippet

https://github.com/sherlock-audit/2023-03-teller/blob/main/teller-protocol-v2/packages/contracts/contracts/CollateralManager.sol#L34

Tool used

Manual Review

Recommendation

Ensure that the collateral value calculation takes into account the decimal values of the tokens involved, and verify the accuracy of the calculations to prevent under-collateralized loans.