Redundant require statements in Auction:purchaseArbitrageTokens
#108
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
loop
Vulnerability details
When invoking
purchaseArbitrageTokens()
is will first check whether the auction is active using:auctionActive()
checks for the following things:As a result the require statement will fail if either
!auction.active
ornow < auction.startingTime
.Later on in
purchaseArbitrageTokens()
two more require statements will check the same thing:These will always pass if
auctionActive(currentAuctionId)
istrue
and never be reached if it isfalse
, making them redundant.Proof of Concept
Recommended Mitigation Steps
Remove redundant require statements
The text was updated successfully, but these errors were encountered: