Closed code423n4 closed 2 years ago
Desired Behaviour
This is not a vulnerability since anyone can see this before interacting with the vault and the valuation of tokens should reflect this. Setting a max in the contract requires selecting an arbitrary value and it may be more appropriate for the frontend to suggest a limit here. This is a fair concern and potential consideration for the documentation and any integrators. Lowering the severity and merging with the warden's QA report #297
Lines of code
https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L173-L202 https://github.com/code-423n4/2022-06-nibbl/blob/8c3dbd6adf350f35c58b31723d42117765644110/contracts/NibblVault.sol#L398-L399
Vulnerability details
Impact
minBuyoutTime
can be set to a value thatblock.timestamp
will never reach. This would prevent the functioninitiateBuyout()
from being called ever. Thus resulting in a forever fractionalized asset.Proof of Concept
NibblVault.sol::initialize()
NibblVault.sol::initiateBuyout()
Tools Used
Manual.
Recommended Mitigation Steps
Consider adding a maximum threshold when setting
minBuyoutTime
.