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

0 stars 0 forks source link

Useless addition of _shares #90

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

This line is useless addition as _shares hasn't been assigned a value before so it starts with 0: _shares = _shares.add(_amount); and is essentially identical to: _shares = _amount;

Recommended Mitigation Steps

In this case you do not even need this separate value and can use _amount instead.

GalloDaSballo commented 2 years ago

Duplicate of #118