priceLiquidity() may not work if PriceFeed.aggregator() is updated
priceLiquidity() may not work if PriceFeed.aggregator() is updated\\nIn the constructor of the DepositReceipt_* contract, the value of minAnswer/maxAnswer in priceFeed.aggregator() is obtained and assigned to *MinPrice/*MaxPrice as the maximum/minimum price limit when calling the getOraclePrice function in priceLiquidity, and *MinPrice/*MaxPrice can not change.\\n```\\n        IAccessControlledOffchainAggregator  aggregator = IAccessControlledOffchainAggregator(priceFeed.aggregator());\\n        //fetch the pricefeeds hard limits so we can be aware if these have been reached.\\n        tokenMinPrice = aggregator.minAnswer();\\n        tokenMaxPrice = aggregator.maxAnswer();\\n// rest of code\\n            uint256 oraclePrice = getOraclePrice(priceFeed, tokenMaxPrice, tokenMinPrice);\\n// rest of code\\n    function getOraclePrice(IAggregatorV3 _priceFeed, int192 _maxPrice, int192 _minPrice) public view returns (uint256 ) {\\n        (\\n            /*uint80 roundID*/,\\n            int signedPrice,\\n            /*uint startedAt*/,\\n            uint timeStamp,\\n            /*uint80 answeredInRound*/\\n        ) = _priceFeed.latestRoundData();\\n        //check for Chainlink oracle deviancies, force a revert if any are present. Helps prevent a LUNA like issue\\n        require(signedPrice > 0, "Negative Oracle Price");\\n        require(timeStamp >= block.timestamp - HEARTBEAT_TIME , "Stale pricefeed");\\n        require(signedPrice < _maxPrice, "Upper price bound breached");\\n        require(signedPrice > _minPrice, "Lower price bound breached");\\n```\\n\\nBut in the priceFeed contract, the address of the aggregator can be changed by the owner, which may cause the value of minAnswer/maxAnswer to change, and the price limit in the DepositReceipt_* contract to be invalid, and priceLiquidity() can not work.\\n```\\n  function confirmAggregator(address _aggregator)\\n    external\\n    onlyOwner()\\n  {\\n    require(_aggregator == address(proposedAggregator), "Invalid proposed aggregator");\\n    delete proposedAggregator;\\n    setAggregator(_aggregator);\\n  }\\n\\n\\n  /*\\n   * Internal\\n   */\\n\\n  function setAggregator(address _aggregator)\\n    internal\\n  {\\n    uint16 id = currentPhase.id + 1;\\n    currentPhase = Phase(id, AggregatorV2V3Interface(_aggregator));\\n    phaseAggregators[id] = AggregatorV2V3Interface(_aggregator);\\n  }\\n  // rest of code\\n    function aggregator()\\n    external\\n    view\\n    returns (address)\\n  {\\n    return address(currentPhase.aggregator);\\n  }\\n```\\n
Consider getting latest priceFeed.aggregator().minAnswer()/maxAnswer() in priceLiquidity()
```\\n        IAccessControlledOffchainAggregator  aggregator = IAccessControlledOffchainAggregator(priceFeed.aggregator());\\n        //fetch the pricefeeds hard limits so we can be aware if these have been reached.\\n        tokenMinPrice = aggregator.minAnswer();\\n        tokenMaxPrice = aggregator.maxAnswer();\\n// rest of code\\n            uint256 oraclePrice = getOraclePrice(priceFeed, tokenMaxPrice, tokenMinPrice);\\n// rest of code\\n    function getOraclePrice(IAggregatorV3 _priceFeed, int192 _maxPrice, int192 _minPrice) public view returns (uint256 ) {\\n        (\\n            /*uint80 roundID*/,\\n            int signedPrice,\\n            /*uint startedAt*/,\\n            uint timeStamp,\\n            /*uint80 answeredInRound*/\\n        ) = _priceFeed.latestRoundData();\\n        //check for Chainlink oracle deviancies, force a revert if any are present. Helps prevent a LUNA like issue\\n        require(signedPrice > 0, "Negative Oracle Price");\\n        require(timeStamp >= block.timestamp - HEARTBEAT_TIME , "Stale pricefeed");\\n        require(signedPrice < _maxPrice, "Upper price bound breached");\\n        require(signedPrice > _minPrice, "Lower price bound breached");\\n```\\n