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

0 stars 0 forks source link

Confusing return value #147

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

certora

Vulnerability details

Impact

In multiple functions you use named return values but still use the return statment. For example in _getTotalVariableDepositFee in BorrowerOperations in getPendingYUSDDebtReward in TroberManager and in many more...

This is very misleading (beside a waste of gas) and cause a confusing documantation

Tools Used

Manual code review

Recommended Mitigation Steps

remove the return statement or the named return value

kingyetifinance commented 2 years ago

@LilYeti: Should be severity 0 or Gas since it is readability / gas optimization.

0xtruco commented 2 years ago

Resolved gas issue in https://github.com/code-423n4/2021-12-yetifinance/pull/25

alcueca commented 2 years ago

Duplicate of #24