Re-checking the amount
in the SablierV2Lockup.sol
contract, in the withdrawMax
and withdraw
functions.
In the SablierV2Lockup.sol::withdrawMax
function, the amount
argument is passed through a call to the _withdrawableAmountOf(StreamID)
function.
Next, the function SablierV2Lockup.sol::withdraw()
is called, in which the passed amount
is checked:
There is no point in this check, since amount
and withdrawableAmount
will always be equal.
The logic of the contract is violated, while excessive gas consumption occurs during the operation of the smart contract.
Manual analysis
To refactor the code
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.