LiquidationPool::distributeAssets
can be called by any malicious user because of missing access control which will cause LiquidationPool to loss funds
A user is liquidated through runLiquidation
function in LiquidationPoolManager, which calculates which token user was holding along with amount, and calls the distributeAssets
function in LiquidationPool with assets
, collateralRate
, HUNDRED_PC
as parameters, but distributeAssets
is missing access control that onlyManager
should call this function
Here we can see distributeAssets
has no access control
How this will work (POC)
User will call this distributeAssets
with malicious parameters
distributeAssets is calculating _portion
based on _assets.amount
, this will be inflated to get more portion
costInEuros
of that portion can be reduced because it is calculated based on _collateralRate
& _hundredPC
EURO from position will be reduced and reward
will be set
Now, functions is transferring token from manager to LiquidationPool address, this will revert if manager has not enough tokens but there is no check for ETH which means if we pass only ETH in _asset
parameter then it will work because its only increasing nativePurchased
( ie will set reward and will take less euro for that )
Liquidation pool will loss funds as wrong rewards has been set by malicious user
Manual Review
Use onlyManager
access control in distributeAssets
like we've done in distributeFees
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.