Block: 68

Author: AuditProfile

AuditProfile

Security blog

Pool matches oracle

#oracle

#uniswap

#sqrtpricex96

Hint

You should be familiar with sqrtPriceX96 to solve this challenge.

Answer

poolMatchesOracle is used to compare price calculated from uniswap v3 pool and chainlink oracle and decide whether rebalance should happened or not. priceX8 will be holding price information calculated using sqrtPriceX96 and when operations is performed, it will try to scale down using 2 ** 12. However, the scale down is not enough and overflow can still happened.For example, it can happen when token0 (WBTC) decimals is 8 and token1 (WETH) decimals is 18.

Регистрация прошла успешно! Спасибо за внимание!

loader