The _readTwap() function was not performing the proper scaling on the values it received from Uniswap. Aggor uses 8 decimals, and all sources, Chronicles, Chainlink, and Uniswap must conform from their defaults (which all vary) to match. Scaling is a pretty simple and normal pattern in Solidity, and we are employing it elsewhere in Aggor. It simply got missed/lost on the _readTwap() function.
The
_readTwap()
function was not performing the proper scaling on the values it received from Uniswap.Aggor
uses 8 decimals, and all sources, Chronicles, Chainlink, and Uniswap must conform from their defaults (which all vary) to match. Scaling is a pretty simple and normal pattern in Solidity, and we are employing it elsewhere in Aggor. It simply got missed/lost on the_readTwap()
function.