Submitted by Trust, also found by cccz
In GroupBuy module, users can call contribute to get a piece of the NFT pie. There are two stages in transforming the msg.value to holdings in the NFT.
The while loop in processBidsInQueue will keep removing existing bids with lower price and create new queue entries for currently processed bid. When it reached a bid with a higher price than msg.senders price, it will break:
The issue is that when _price == lowestBid.price, we dont break and current bid will kick out older bid, as can be seen here:
The described behavior goes against what the docs describe will happen when two equal priced bids collide.
Earlier bidders get cut out of future NFT holdings by bidders specifying the same price.
Change the < to <= in the if condition:
IllIllI (warden) commented:
Trust (warden) commented:
stevennevins (Tessera) confirmed and mitigated
