sherlock-audit / 2023-02-fair-funding-judging

1 stars 0 forks source link

Bahurum - Anyone can start the auction #119

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

Bahurum

medium

Anyone can start the auction

Summary

Anyone can start the auction by calling AuctionHouse.settle() before the actual start time set. also, initial NFT will be minted to the fallback receiver. Fix:

Vulnerability Detail

If start_auction() has not been called yest or it has been called with _start_time in the future, then it is possible to call settle() and start the auction.

Impact

Deployer has no control over when auction goes live, and it can be started by anyone after the Auction House is deployed. This will throw off the timeline scheduled for the mint by the protocol team.

Code Snippet

https://github.com/sherlock-audit/2023-02-fair-funding/blob/main/fair-funding/contracts/AuctionHouse.vy#L185

Tool used

Manual Review

Recommendation

Add assert self.epoch_end > 0 as an additional check at the beginning of settle()

Duplicate of #39