Recently I'm trying to build a simulator with my team based on Uniswap V3 CorePool maths model as well as contract implementation. My teammate found the repo and your help is greatly appreciated.
As fas as the test result I know, this error can result in less swap rounds under certain condition. Thus sqrtPriceX96 will be different and swap result like amount will be different from actual mainnet data bit by bit.
Recently I'm trying to build a simulator with my team based on Uniswap V3 CorePool maths model as well as contract implementation. My teammate found the repo and your help is greatly appreciated.
I know the
tickList.ts
do the same thing asTickBitmap.sol
do. It's wonderful work. However, I believe there is a small accident in https://github.com/Uniswap/v3-sdk/blob/b50b02238d4d4f04dbaa04d531e5ff8dd76d63d9/src/utils/tickList.ts#L122 and that will be correct if we adjust the subtraction to the proper position.As fas as the test result I know, this error can result in less swap rounds under certain condition. Thus
sqrtPriceX96
will be different and swap result like amount will be different from actual mainnet data bit by bit.Please check if it is right. Thank you.