CollateralizationOracleWrapper - the deviation threshold check in update() always returns false
A call to `update()` returns a boolean flag indicating whether the update was performed on outdated data. This flag is being checked in `updateIfOutdated()` which is typically called by an incentivized keeper function.\\nThe `_isExceededDeviationThreshold` calls at the end of the `_update()` function always return `false` as they are comparing the same values (cachedProtocolControlledValue to the `_protocolControlledValue` value and `cachedProtocolControlledValue` has just been set to `_protocolControlledValue` a couple of lines before). `_isExceededDeviationThreshold` will, therefore, never detect a deviation and return `false´.\\nThere may currently be no incentive (e.g. from the keeper side) to call `update()` if the values are not outdated but they deviated too much from the target. However, anyone can force an update by calling the non-incentivized public `update()` method instead.\\n```\\n    require(\\_validityStatus, "CollateralizationOracleWrapper: CollateralizationOracle is invalid");\\n\\n    // set cache variables\\n    cachedProtocolControlledValue = \\_protocolControlledValue;\\n    cachedUserCirculatingFei = \\_userCirculatingFei;\\n    cachedProtocolEquity = \\_protocolEquity;\\n\\n    // reset time\\n    \\_initTimed();\\n\\n    // emit event\\n    emit CachedValueUpdate(\\n        msg.sender,\\n        cachedProtocolControlledValue,\\n        cachedUserCirculatingFei,\\n        cachedProtocolEquity\\n    );\\n\\n    return outdated\\n        || \\_isExceededDeviationThreshold(cachedProtocolControlledValue, \\_protocolControlledValue)\\n        || \\_isExceededDeviationThreshold(cachedUserCirculatingFei, \\_userCirculatingFei);\\n}\\n```\\n
Add unit tests to check for all three return conditions (timed, deviationA, deviationB)\\nMake sure to compare the current to the stored value before updating the cached values when calling `_isExceededDeviationThreshold`.
```\\n    require(\\_validityStatus, "CollateralizationOracleWrapper: CollateralizationOracle is invalid");\\n\\n    // set cache variables\\n    cachedProtocolControlledValue = \\_protocolControlledValue;\\n    cachedUserCirculatingFei = \\_userCirculatingFei;\\n    cachedProtocolEquity = \\_protocolEquity;\\n\\n    // reset time\\n    \\_initTimed();\\n\\n    // emit event\\n    emit CachedValueUpdate(\\n        msg.sender,\\n        cachedProtocolControlledValue,\\n        cachedUserCirculatingFei,\\n        cachedProtocolEquity\\n    );\\n\\n    return outdated\\n        || \\_isExceededDeviationThreshold(cachedProtocolControlledValue, \\_protocolControlledValue)\\n        || \\_isExceededDeviationThreshold(cachedUserCirculatingFei, \\_userCirculatingFei);\\n}\\n```\\n