Closed github-actions[bot] closed 1 year ago
refund_highest_bidder
is only here in case settle
would revert on some underlying issue on Alchemix, a winning bidder would never be refunded under normal operations since this would be unfair to all other bidders.
Closing based on Sponsor comment
seyni
medium
refund_highest_bidder
can be frontrun by a call tosettle
Summary
Anyone can frontrun the owner calling
refund_highest_bidder
by callingsettle
which leads for the owner to potentially not be able to call the function for anyhighest_bidder
of auctions.Vulnerability Detail
Anyone can call
settle
as soon as the current auction ends. As a consequence, any call torefund_highest_bidder
by the owner can be frontrun by a call tosettle
which will start the next auction and set_epoch_in_progress()
toTrue
and sethighest_bidder
toempty(address)
.Impact
The owner will potentially not be able to call
refund_highest_bidder
for anyhighest_bidder
of auctions.Code Snippet
AuctionHouse.vy#L315-L325
Tool used
Manual Review
Recommendation
I recommend making
settle
only callable by the owner or a permissionned role.