Open code423n4 opened 2 years ago
_saleReturn variable reused. Would suggest using a more descriptive and different variable name each time it is used.
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L337-L339
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L349-L352
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L379-L383
The function _rejectBuyout should be renamed as it does not always reject the buyout. You could rename it to _shouldBuyoutBeRejected() for example.
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L424
Merging with https://github.com/code-423n4/2022-06-nibbl-findings/issues/301
Fair naming suggestions.
_saleReturn variable reused. Would suggest using a more descriptive and different variable name each time it is used.
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L337-L339
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L349-L352
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L379-L383
The function _rejectBuyout should be renamed as it does not always reject the buyout. You could rename it to _shouldBuyoutBeRejected() for example.
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L424