Open code423n4 opened 2 years ago
_twavObservationCurrent
_twavObservationPrev
_twav
buy
sell
redeem
redeemCuratorFee
withdraw*
_newCurator
updateCurator
BUYOUT_DURATION = 5 days
unchecked
_twavObservationCurrent
and_twavObservationPrev
cause of incorrect index . This could lead to the calculation for_twav
got underflowed as current cumulative valuation is greater than previous cumulative valuation and revertedbuy
,sell
,redeem
,redeemCuratorFee
,all thewithdraw*
functions and_newCurator
inupdateCurator
BUYOUT_DURATION = 5 days
but the docs mentioned 3 days,unchecked
at https://github.com/NibblNFT/nibbl-smartcontracts/blob/49bf364d9e81a554cfdf47ae5cfc3daf52a54ad6/contracts/NibblVault.sol#L319 , https://github.com/NibblNFT/nibbl-smartcontracts/blob/49bf364d9e81a554cfdf47ae5cfc3daf52a54ad6/contracts/NibblVault.sol#L378-L383, https://github.com/NibblNFT/nibbl-smartcontracts/blob/49bf364d9e81a554cfdf47ae5cfc3daf52a54ad6/contracts/NibblVault.sol#L415