Some tokens have higher than 18 decimals, these tokens block distributeAssets
function in LiquidationPool and can't be liquidated.
in the following line asset amount is scaled to 18 decimals before calculating its price, which will revert if token decimals are higher than 18, which leads to blocking the whole liquidation transaction.
uint256 costInEuros = _portion * 10 ** (18 - asset.token.dec) * uint256(assetPriceUsd) / uint256(priceEurUsd) * _hundredPC / _collateralRate;
Since the liquidation pool uses the balance of all accepted tokens to call distributeAssets
it blocks the liquidation of other collaterals as well.
admin should remove this collateral from the accepted tokens list for enabling liquidations again however removed token balance can't be accessible anymore, also liquidation is a crucial part of the protocol that shouldn't be paused, blocking liquidation harms the protocol in some situation even in short periods of time.
Denial of Service
Loss of some Collateral
Manual Review
Restrict tokens with more than 18 decimals or change decimal calculation by dividing asset amount / asset.token.dec - 18 in case of more than 18 decimals in the following line.
uint256 costInEuros = _portion * 10 ** (18 - asset.token.dec) * uint256(assetPriceUsd) / uint256(priceEurUsd) * _hundredPC / _collateralRate;
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.