LiquidationPoolManager::distributeFees()
is callable by anyone when it should only be callable from LiquidationPoolManager
and LiquidationPool
. This leads to any user being able to deprive it of its EUROs
balance at any time. There also seems to be a problem with the implementation, after a single distribution, fees are sent to the liquidation pool but the whole balance is sent to the protocol afterwards, leaving it without balance for subsequent calls.
LiquidationPoolManager::distributeFees()
is susceptible to the following problems:
It sends the whole balance to the protocol after a single run. This leads to the problem where it won't have enough balance to send to the liquidation pool and will have to be refilled after each call. While this doesn't lead to any malfunction of the liquidation pool, it seems like a badly designed implementation.
Callable by anyone - Anyone is able to execute it at any time when it is supposed to be only accessed by LiquidationPoolManager::runLiquidation()
, LiquidationPool::increasePosition()
, and LiquidationPool::decreasePosition()
,
POC (test/liquidationPool.js
, make sure to also destructure HUNDRED_PC
from ./common
):
LiquidationPoolManager
is left with no balance after a single call to LiquidationPoolManager::distributeAssets()
. Also, it is callable by anyone when it should be restricted to only LiquidationPoolManager
and LiquidationPool
.
Manual Analysis
Limit access control of this function to only LiquidationPoolManager
and LiquidationPool
Re-think the logic of the function. It doesn't make sense for it to send all of its balance to the protocol after a single call.
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.