The Helpers
library is used to validate the inputs when creating a stream. The problem is that two functions from this library doesn't check for the segment/tranches amount(which should be done when creating a stream):
Specifically _checkTranches
and _checkSegments
.
By creating several segments or tranches with 0 amount and then only one with a fractional value (such as 1 wei), attackers can bypass checks that ensure the total amount is not zero. This can result in the system processing and accepting streams that should otherwise be invalid.
Attackers can in a cheap way overload the smart contract with thousands of entries using a fractional value for deposit as zero amount is accepted. As long as there is one entry with a minimum value, stream creation will succeed.
System will be flooded with thousands/millions of invalid segments/tranches.
The smart contract may run out of gas while processing entries, further exacerbating the DoS condition. This can be particularly problematic in scenarios where the contract needs to handle large volumes of transactions, as it will be unable to do so efficiently.
Manual Review
Do not accept segments/tranches with zero value.
_checkSegments:
_checkTranches:
(Additional) Consider adding a minimum value for deposit.
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.