Buyout cannot be rejected when paused
The buyout mechanism allows a bidder to withdraw the NFT after a fixed duration even if the system is paused, because redeem and withdraw functions lack the whenNotPaused modifier. This means token holders cannot reject a buyout during a pause, as they cannot buy new tokens to increase the value.
Submitted by Lambda, also found by SmartSek
Impact
While buy() and sell() are only callable when the system is not paused, redeem() and withdrawERC721() are also callable when it is not. This means that the BUYOUT_DURATION is ignored in such cases and it is possible that users are not able to reject certain buyouts.
Proof of Concept
A user initiates a buyout via initiateBuyout(). Just afterwards, the system is stopped. The token holders now cannot buy new tokens to increase the value. However, after two days, the bidder can still withdraw the NFT, i.e. there was no way for the users to reject this buyout.
Recommended Mitigation Steps
It should be possible to reset the buyoutEndTime (to the current block.timestamp) when the system is paused such that the token holders always have the possibility to reject a buyout.
mundhrakeshav (Nibbl) disputed and commented:
Expected. When paused no operations should be available.
fatherGoose1 (warden) commented:
Strongly disagree with the sponsor’s comment. Given that redeem() and withdrawERC721() DO NOT contain the
whenNotPausedmodifier, this ensures that pauses that occur during a buyout process will ensure the success of the buyout. The buyout success occurs by time passing a certain block.timestamp and the functionality to claim the NFT and retrieve the underlying are left open even during the pause.Similar to issue #261
I would agree with the sponsor if all of the
withdraw()/redeem()functions contained thewhenNotPausedmodifier so that truly all functions were locked during a pause.
mundhrakeshav (Nibbl) commented:
Hmmm. Makes sense. We should pause redeem and Withdraw too.
HardlyDifficult (judge) commented:
The readme does include “Out of scope: Admin can pause and change certain parameters of the contract.” however this report is not strictly about the ability to pause.
It should be possible to reset the buyoutEndTime
In this scenario, an end time has already been defined. If
pauseis used at that time the window shortens or closes so when resumed the opportunity may have been missed already. The warden’s recommendation here, or some variation of it, would provide a way to effectively allow the system to resume from where it left off when originally paused.I suspect the alternative of also pausing redeem / withdraw is not sufficient, as the window to buy/sell will still potentially be passed by the time the system resumes.
I agree with the submitted Med risk for this issue since the “function of the protocol or its availability could be impacted”.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
Token holders may be unable to reject a buyout during a pause, potentially allowing the bidder to acquire the NFT without sufficient opposition.
What the attacker needed
A buyout is initiated; The system is paused
The fix
The buyout end time should be reset when the system is paused, or redeem and withdraw should also be paused, to ensure token holders can always reject a buyout.
How it was found
- A user initiates a buyout via initiateBuyout().
- The system is paused.
- Token holders cannot buy new tokens to increase the value.
- After two days, the bidder can still withdraw the NFT.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this NFT vault system, a buyout is a process where someone offers to buy all shares of an NFT. Normally, other users can reject the buyout by buying more shares to raise the price. But if the system is paused, those users cannot buy shares, yet the buyer can still complete the buyout after a set time. This means the pause unfairly helps the buyer.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.