unsafe substraction operation in L99 could cause distributeAssets execution to revert
The LiquidationPool::distributeAssets() function is called by the LiquidationPoolManager in the runLiquidation
function call, in this distributeAssets() there is a call to the LiquidationPool::returnUnpurchasedNative()
function passing in the total native portion accumulated for ALL holders. However, this total value is substracted from the _assets[i].amount of a NATIVE assset assuming _assets[i].amount will always be lesser than the total value of native portion accumulated for ALL holders.
This would cause distributeAssets to revert which also causes the overall LiquidationPoolManager::runLiquidation
to fail
Visual Studio Code
add check
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.