The Helpers::_checkSegments
and Helpers::_checkTranches
functions implement various check to ensure that any stream or Sablier operates correctly. However, they do not verify if a tranche or segment amount is zero. This oversight allows a malicious sender to create a large number of tranches or segments with minimal durations and zero amounts. Since any stream, tranche, or segment can start in the past, this attack could be even more deceptive by setting all of these to a time before the first withdrawable amount.
This type of attack is also feasible with small amounts of assets.
A malicious sender is restricted from setting more tranches than MAX_TRANCHE_COUNT, or segments than MAX_SEGMENT_COUNT.
This attack may not be easily detectable for an average user who simply wants to withdraw their assets. Furthermore, a typical user might conclude that the protocol is merely gas-intensive and not recognize this as a bug.
Likelyhood: Medium
Any sender can create a Sablier that unfairly consumes gas.
Impact: Medium
Recipients may be forced to pay excessive and unfair gas prices to withdraw their assets, without knowing it.
Ensure that the amounts in segments and tranches are not zero. To further prevent this issue with small amounts, a minimum amount per segment/tranche could be calculated from the total amount (calculation to be defined), and the creation function should revert if this condition is not met.
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.