The Router.getAnchorPrice sorts the arrayPrices array and always returns the third element _sortedAnchorFeed[2].
This only returns the median if _sortedAnchorFeed is of length 5, but it can be anything from 0 to anchorLimit.
If not enough anchors are listed initially, it might become out-of-bounds and break all contract functionality due to revert, or return a wrong median. If anchorLimit is set to a different value than 5, its also wrong.
recommend checking the length of _sortedAnchorFeed and return _sortedAnchorFeed[_sortedAnchorFeed.length / 2] if its odd, or the average of the two in the middle if its even.
strictly-scarce (vader) confirmed:
Mervyn853 commented:
