Usage of `slot0` is extremely easy to manipulate
Usage of `slot0` is extremely easy to manipulate\\nReal Wagmi is using `slot0` to calculate several variables in their codebase:\\nslot0 is the most recent data point and is therefore extremely easy to manipulate.\\nMultipool directly uses the token values returned by `getAmountsForLiquidity`\\n```\\n (uint256 amount0, uint256 amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n                slots[i].currentSqrtRatioX96,\\n                TickMath.getSqrtRatioAtTick(position.lowerTick),\\n                TickMath.getSqrtRatioAtTick(position.upperTick),\\n                liquidity\\n            );\\n```\\n\\nto calculate the reserves.\\n```\\n reserve0 += amount0;\\n reserve1 += amount1;\\n```\\n
To make any calculation use a TWAP instead of slot0.
Pool lp value can be manipulated and cause other users to receive less lp tokens.
```\\n (uint256 amount0, uint256 amount1) = LiquidityAmounts.getAmountsForLiquidity(\\n                slots[i].currentSqrtRatioX96,\\n                TickMath.getSqrtRatioAtTick(position.lowerTick),\\n                TickMath.getSqrtRatioAtTick(position.upperTick),\\n                liquidity\\n            );\\n```\\n