If any of the assets have tokens with decimals greater than 18, distributeAssets will revert.
Since distributeAssets is called from runLiquidation, liquidation cannot be performed.
distributeAssets has the following calculation.
18 - asset.token.dec`
If the decimals of asset is greater than 18, the above calculation will cause an underflow and revert.
Therefore, distributeAssets cannot be performed and runLiquidation, which calls distributeAssets, also cannot be performed.
If any of the assets have tokens with decimals greater than 18, liquidation cannot be performed, resulting in bad debt.
VS Code
Change _portion * 10 ** (18 - asset.token.dec) to _portion * (10 ** 18) / (10 ** 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.