malicious user can remove all EUROs in LiquidationPool.
The arguments of distributeAssets
are important to calculate the price at which the user will buy the distributed assets.
Therefore, each argument must be provided correctly to ensure that the user purchases the assets at the right price.
However, since distributeAssets is an external function that can be called by anyone, the arguments can be modified arbitrarily.
There are several possible attack points here, the first being manipulation of the assets.
The price is obtained by referencing the clAddr
of the asset. However, the actual token transfer is based on the value of addr
, so if you set clAddr
to an expensive asset like WBTC and addr
to an asset like USDC, the user will buy USDC at the price of WBTC.
An easier way is to manipulate _collateralRate
or _hundredPC
. These are used to calculate costInEuros
.
Since costInEuros
is inversely proportional to _collateralRate
and proportional to _hundredPC
, a large value for _hundredPC
or a small value for _collateralRate
will result in a very large costInEuros
and the user will spend all their EUROs to buy 1 wei of tokens.
Therefore, the following scenario can be used to remove the EURO from all users in the pool.
POC:
malicious user can remove all EUROs in LiquidationPool.
VS Code
Only the LiquidationPoolManager should call distributeAssets.
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.