Malicious user can easily DoS Liquidation Pool by increasing unique holders by increasePosition
with dust amount resulting distributeFees
, distributeAssets
dos-ed.
There are several occasions this for (uint256 i = 0; i < holders.length; i++)
is being used in core function, like distributeFees
, distributeAssets
. As gas factor is an important factor in evm, there is a limitation on looping of the holders.
Attacker can flooded this holders
easily by sending a dust amount of TST
or EUROs
via calling increasePosition
from many unique addresses. This will resulting a drastic increases of unique holders var.
Attacker can very easily generate 1000 address, and distribute 1 WEI of TST
or EUROs
into those addresses, and programatically call increasePosition
(assuming there were gases to exec trx on those addresses)
If we look at distributeFees
it will loop into holders
length, which will be out of gas when the size is big.
DoS of LiquidationPool, affecting distributeFees
, distributeAssets
availability
Manual Analysis
Consider to add a constraint like minimum position size, or redesign the logic to replace the for
loop.
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.