Closed code423n4 closed 2 years ago
In all these cases there is no mismatch between the named return and the actual return value. Maybe we can get a small gas optimization by assigning values to the named returns instead of calling return
, though.
The issue in itself is wrong (there is no mismatch), but there is value in hinting towards an inconsistency that leads to a gas saving. I suggest this is downgraded to G.
Duplicate of #60, which describes it better.
Because of the low effort submission, am marking invalid
Handle
robee
Vulnerability details
Users can mistakenly think that the return value is the named return, but it is actually the actualreturn statement that comes after. To know that the user needs to read the code and is confusing. Furthermore, removing either the actual return or the named return will save gas.