MEDIUM severity: The vulnerability in the `MaxPriorityQueue` and `_claimBid` function can lead to a situation where b. The vulnerability in the `MaxPriorityQueue` and `_claimBid` function can lead to a situation where bidders' funds become locked due to an inconsistent price order check. The issue arises from the fact that certain bids may have a marginal price and a smaller bid ID than the marginal bid ID, which ar...

Vulnerable code:
```\nfunction _isLess(Queue storage self, uint256 i, uint256 j) private view returns (bool) {\n    uint64 iId = self.bidIdList[i];\n    uint64 jId = self.bidIdList[j];\n\n    Bid memory bidI = self.idToBidMap[iId];\n    Bid memory bidJ = self.idToBidMap[jId];\n\n    uint256 relI = uint256(bidI.amountIn) * uint256(bidJ.minAmountOut);\n    uint256 relJ = uint256(bidJ.amountIn) * uint256(bidI.minAmountOut);\n\n    if (relI == relJ) {\n        return iId > jId;\n    }\n    return relI < relJ;\n}\n```\n```\nfunction _claimBid(\n    uint96 lotId_,\n    uint64 bidId_\n) internal returns (BidClaim memory bidClaim, bytes memory auctionOutput_) {\n    uint96 price = uint96(\n        bidData.minAmountOut == 0\n           ? 0\n            : Math.mulDivUp(uint256(bidData.amount), baseScale, uint256(bidData.minAmountOut))\n    );\n    uint96 marginalPrice = auctionData[lotId_].marginalPrice;\n    if (price > marginalPrice || (price == marginalPrice && bidId_ <= auctionData[lotId_].marginalBidId)) {\n    }\n}\n```\n```\nq1 * b2 < q2 * b1, \nbut \nmulDivUp(q1, 10 ** baseDecimal, b1) = mulDivUp(q2, 10 ** baseDecimal, b2)\n```\n```\nmarginal price     ==>   2000000000000000001\nmarginal bid id    ==>   6\n\npaid to bid 1       ==>   4000000000000000001\npayout to bid 1     ==>   1999999999999999999\n*****\npaid to bid 2       ==>   4000000000000000002\npayout to bid 2     ==>   2000000000000000000\n*****\npaid to bid 3       ==>   4000000000000000002\npayout to bid 3     ==>   2000000000000000000\n*****\npaid to bid 4       ==>   4000000000000000002\npayout to bid 4     ==>   2000000000000000000\n*****\npaid to bid 5       ==>   4000000000000000002\npayout to bid 5     ==>   2000000000000000000\n*****\npaid to bid 6       ==>   4000000000000000002\npayout to bid 6     ==>   2000000000000000000\n```\n```\nfunction test_claim_nonClaimable_bid()\n    external\n{\n    givenLotIsCreated\n    givenLotHasStarted\n    givenBidIsCreated(4e18 + 1, 2e18)  // bidId = 1\n    givenBidIsCreated(4e18 + 2, 2e18)  // bidId = 2\n    givenBidIsCreated(4e18 + 2, 2e18)  // bidId = 3\n    givenBidIsCreated(4e18 + 2, 2e18)  // bidId = 4\n    givenBidIsCreated(4e18 + 2, 2e18)  // bidId = 5\n    givenBidIsCreated(4e18 + 2, 2e18)  // bidId = 6\n    givenLotHasConcluded\n    givenPrivateKeyIsSubmitted\n    givenLotIsDecrypted\n    givenLotIsSettled\n\n    {\n        EncryptedMarginalPriceAuctionModule.AuctionData memory auctionData = _getAuctionData(_lotId);\n\n        console2.log('marginal price     ==>  ', auctionData.marginalPrice);\n        console2.log('marginal bid id    ==>  ', auctionData.marginalBidId);\n        console2.log('');\n\n        for (uint64 i = 0; i < 6; i++) {\n            uint64[] memory bidIds = new uint64[](1);\n            bidIds[0] = i + 1;\n            vm.prank(address(_auctionHouse));\n            (Auction.BidClaim[] memory bidClaims,) = _module.claimBids(_lotId, bidIds);\n            Auction.BidClaim memory bidClaim = bidClaims[0];\n            if (i > 0) {\n                console2.log('*****');\n            }\n            console2.log('paid to bid ', i + 1,'     ==>  ', bidClaim.paid);\n            console2.log('payout to bid ', i + 1,'   ==>  ', bidClaim.payout);\n        }\n    }\n}\n```