If one of the assets in the protocol has a decimals value that is greater than 18, the distributeAssets
function in LiquidationPool
will revert.
In LiquidationPool::distributeAssets()
, the costInEuros
is calculated like this
(18 - asset.token.dec)
can therefore underflow when asset.token.dec
is greater than 18.
As the protocol wishes to extend the capabilities to account for a lot more tokens on a variety of different chains in the future. If this function underflows, this means the assets won't be distributed into the liquidation pool ready for users to claim their rewards. This essentially means depositing a token that has a decimal greater than 18 will stop all assets from being distributed.
Manual Review
Add a require statement to check for the decimals to be greater than 18.
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.