location : src/SablierFlow.sol
The contract maintains an aggregateBalance
mapping of token addresses to uint256 values, representing the total balance of each token held by the contract.
However, in some places, the aggregateBalance
is updated without corresponding checks, and relies on assumptions that may not always hold.
For example, in the _withdraw
function:
If the amount
to subtract exceeds the aggregateBalance[token]
, this could cause an underflow error.
Potential underflows in aggregateBalance
can lead to incorrect tracking of token balances, which can have downstream effects on contract logic that relies on this value.
Ensure Accurate Updates to aggregateBalance
: Before updating aggregateBalance
, verify that the amount to be subtracted does not exceed the current aggregateBalance
.
Add a check:
Verify that all updates to aggregateBalance
correctly reflect the actual token transfers.
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.