The bug is from from the incorrect function call signature for the safeTransferFrom function provided by the SafeERC20
The function should be called with positional arguments, not named arguments.
Here is the Vulnerable Line:
The function call should be
For details the SafeERC20 provides wrappers around ERC20 operations that throw on failure when the token contract returns false.
And Tokens that return no value and instead revert or throw on failure are also supported, non-reverting calls are assumed to be successful.
And The incorrect use of the safeTransferFrom function with named arguments will cause a compilation error because in Solidity does not support the named arguments for function calls here is a scenario that show how the issue is arise and how affected the contract :
let’s say we have Alice wants to create a stream of 3,000 DAI to Bob for the month of January.
so the functions that gone be use is createWithDurations() and _create()
Here :
And here is :
The function call to safeTransferFrom with named arguments will fail to compile. This prevents the creation of the stream and the transfer of funds from Alice to the contract.
as result Alice cannot create a stream for Bob, and no tokens are transferred, leading to a failure in the primary functionality of the contract.
scenario can be used for attack :
let’s say Alice wants to stream funds to Bob
So Alice initiates the createWithDurations function to create a stream of 3,000 DAI for Bob for January.
so the function Execution proceeds to set timestamps and calls _create.
When _create function attempts to call safeTransferFrom with the incorrect argument format, it results in a compilation error
as result the contract cannot be deployed or executed, and this preventing any streams from being created or funds transferred.
The incorrect use of the safeTransferFrom function with named arguments causes a compilation error, And this means that the contract cannot be deployed or executed. As a result, none of the intended functionalities, as creating streams, transferring funds, or streaming payments, can be executed
Manual review
the correct function signature is as this
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.