code-423n4 / 2021-09-bvecvx-findings

0 stars 0 forks source link

Functions not returning declared values #18

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function withdrawAll in BaseStrategy declares 'returns (uint256 balance)', however, no actual value is returned. function reinvest in MyStrategy declares to return 'uint256 reinvested', however, it also actually does not return anything so they always get assigned a default value of 0.

Recommended Mitigation Steps

Either remove the return declarations or return the intended values. Otherwise, it may confuse other protocols that later may want to integrate with you.

GalloDaSballo commented 3 years ago

We should remove the return values