Function `_indexOf` will cause a settlement to revert if `auctionPrice > MAX_PRICE`
In ERC721 pools, when a settlement occurs and the borrower still have some fraction of collateral, that fraction is allocated in the bucket with a price closest to `auctionPrice` and the borrower is proportionally compensated with LPB in that bucket.\\nIn order to calculate the index of the bucket closest in price to `auctionPrice`, the `_indexOf` function is called. The first line of that function is outlined below:\\n```\\nif (price_ < MIN_PRICE || price_ > MAX_PRICE) revert BucketPriceOutOfBounds();\\n```\\n\\nThe `_indexOf` function will revert if `price_` (provided as an argument) is below `MIN_PRICE` or above `MAX_PRICE`. This function is called from `_settleAuction`, here is a snippet of that:\\n```\\nfunction _settleAuction(\\n    AuctionsState storage auctions_,\\n    mapping(uint256 => Bucket) storage buckets_,\\n    DepositsState storage deposits_,\\n    address borrowerAddress_,\\n    uint256 borrowerCollateral_,\\n    uint256 poolType_\\n) internal returns (uint256 remainingCollateral_, uint256 compensatedCollateral_) {\\n\\n    // // rest of code\\n\\n            uint256 auctionPrice = _auctionPrice(\\n                auctions_.liquidations[borrowerAddress_].referencePrice,\\n                auctions_.liquidations[borrowerAddress_].kickTime\\n            );\\n\\n            // determine the bucket index to compensate fractional collateral\\n>         bucketIndex = auctionPrice > MIN_PRICE ? _indexOf(auctionPrice) : MAX_FENWICK_INDEX;\\n\\n    // // rest of code\\n}\\n```\\n\\nThe `_settleAuction` function first calculates the `auctionPrice` and then it gets the index of the bucket with a price closest to `bucketPrice`. If `auctionPrice` results to be bigger than `MAX_PRICE`, then the `_indexOf` function will revert and the entire settlement will fail.\\nIn certain types of pools where one asset has an extremely low market price and the other is valued really high, the resulting prices at an auction can be so high that is not rare to see an `auctionPrice > MAX_PRICE`.\\nThe `auctionPrice` variable is computed from `referencePrice` and it goes lower through time until 72 hours have passed. Also, `referencePrice` can be much higher than `MAX_PRICE`, as outline in _kick:\\n```\\nvars.referencePrice = Maths.min(Maths.max(vars.htp, vars.neutralPrice), MAX_INFLATED_PRICE);\\n```\\n\\nThe value of `MAX_INFLATED_PRICE` is exactly 50 * `MAX_PRICE` so a `referencePrice` bigger than `MAX_PRICE` is totally possible.\\nIn auctions where `referencePrice` is bigger than `MAX_PRICE` and the auction is settled in a low time frame, `auctionPrice` will be also bigger than `MAX_PRICE` and that will cause the entire transaction to revert.
It's recommended to change the affected line of `_settleAuction` in the following way:\\n```\\n// Remove the line below\\n   bucketIndex = auctionPrice > MIN_PRICE ? _indexOf(auctionPrice) : MAX_FENWICK_INDEX;\\n// Add the line below\\n   if(auctionPrice < MIN_PRICE){\\n// Add the line below\\n       bucketIndex = MAX_FENWICK_INDEX;\\n// Add the line below\\n   } else if (auctionPrice > MAX_PRICE) {\\n// Add the line below\\n       bucketIndex = 1;\\n// Add the line below\\n   } else {\\n// Add the line below\\n       bucketIndex = _indexOf(auctionPrice);\\n// Add the line below\\n   }\\n```\\n
When the above conditions are met, the auction won't be able to settle until `auctionPrice` lowers below `MAX_PRICE`.\\nIn ERC721 pools with a high difference in assets valuation, there is no low-probability prerequisites and the impact will be a violation of the system design, as well as the potential losses for the kicker of that auction, so setting severity to be high
```\\nif (price_ < MIN_PRICE || price_ > MAX_PRICE) revert BucketPriceOutOfBounds();\\n```\\n