Liquidator will lose funds to precision if redeeming token amount is not a whole number.
Lets say a liquidator wishes to liquidate USD 5000 in wbtc. (at USD10,000/wbtc).
From calculations in liquidate()
, getTokenAmountFromUsd(wbtc,5000)
should return 0 instead of 0.5.
#Zero amount is then passed to the _redeemCollateral(/**/) private
and 0 transfered to the liquidator. This is a loss of liquidator funds as he gains nothing.
Liquidator will lose funds if redeeming token amount is in decimals (rounding down).
Foundry and Manual Review
Include precision in calculation.
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.