Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1 KB

`_assertStakingPoolExists` never returns true.md

File metadata and controls

30 lines (24 loc) · 1 KB

The _assertStakingPoolExists should return a bool to determine if the staking pool exists or not; however, it only returns false or reverts.

The _assertStakingPoolExists function checks that a staking pool exists given a pool id parameter.

However, this function does not use a return statement and therefore, it will always return false or revert.

Recommendation:

Add a return statement or remove the return type.

Properly adjust the documentation, if needed.


Slide Screenshot

143.jpg


Slide Text

  • ToB Audit 0x Protocol Finding 20
  • Error Handling
  • No Function Return
  • Only False/Revert
  • Add/Remove Return
  • Document Otherwise

References


Tags