code-423n4 / 2021-12-yetifinance-findings

0 stars 0 forks source link

Missing return statements #301

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

There are functions that declare to return named variables but actually do not return anything. function _userUpdate declares to return pendingJoeSent, but actually does not return anything, so it always gets a default value of 0. function _sendCollateral should return a boolean value but does not return anything, so it also gets assigned a default value of false.

kingyetifinance commented 2 years ago

@LilYeti: This is actually the same issue as #1 where the value it would return should be the transfer success or not. Recommend that these are lumped together.

kingyetifinance commented 2 years ago

However it should be fixed. The actual exploit part of it should be lumped with #1 and related but by itself it could be seen as a level 0 bug.

kingyetifinance commented 2 years ago

Fixed

alcueca commented 2 years ago

Same kind of error as in #94, but not the same issue. Not a duplicate.