The protocol currently lacks support for ERC20 tokens with more than 18 decimals.
The euroCollateral
function in SmartVaultV3.sol
relies on calculator.tokenToEurAvg
, which may revert when used with tokens having decimals greater than 18. As a result, SmartVaultV3.sol
may not function correctly with such tokens.
This is because the calculator.tokenToEurAvg
uses getTokenScaleDiff
function which does not handle this case.
Similar issues can be found in the distributeAssets
function of LiquidationPool.sol
. Specifically, the calculation for costInEuros
may lead to errors if the token decimals exceed 18.
The protocol will encounter issues when dealing with ERC20 tokens having decimals higher than 18.
Manual review
Consider normalizing the asset's decimals precision differently: abs(18 - asset.token.dec)
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.