Underflow can occur and corrupt the aggregateBalance[token]
or always revert the transaction in the SablierFlowBase::collectProtocolRevenue
function.
In the SablierFlowBase::collectProtocolRevenue
function, we’re using unchecked
to decrement aggregateBalance[token] -= revenue
, which can lead to underflow if aggregateBalance[token]
is less than revenue
. This would wrap the balance, leading to an incorrect (often very large) balance, potentially impacting other functions relying on aggregateBalance.
Potentially Incorrect Balance Tracking : Without Underflow Protection, if the underflow wraps aggregateBalance[token]
to a large number, it could indicate that the contract has a high balance of tokens, which is incorrect.
Revenue Collection Disruptions or DOS : collectProtocolRevenue
is expected to reset the protocolRevenue
to zero after collection, but the underflow and revert can prevent the revenue from being collected. This means the revenue will remain in protocolRevenue, preventing access to these funds until the issue is resolved.
Manual review.
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.