-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential Tick Duplication In extract_pool_events_and_positions
module
#15
Comments
Hey @steegecs, so we actually removed the We found that the contract emits a initialize storage change on the contract for a given pool: https://github.com/Uniswap/v3-core/blob/main/contracts/libraries/Tick.sol#L36 But interestingly, a pool has their ticks which will move a little bit depending on the added and removed liquidity in it. So this makes it that we would sometimes miss some ticks as their had already been initialized. So the if |
Was this resolved? Can we close this? |
@steegecs Do you need any more clarification? |
In viewing the
extract_pool_events_and_positions
function in the filtering.rs file used by theextract_pool_events_and_positions
module, it looks like you might end up creating the same tick more than once. This is because of theor
logic for creating both ticks. From my understanding, it is possible that only one of the ticks already exists, so you should run separate conditions for each tick to trigger the new tick creation.The scenario I am thinking of is there is a new pool, and the first two deposits are as follows:
When the user makes two deposits, tick 10 already exists, but tick 20 does not. So you would only acknowledge that a new tick was created for tick 20.
The text was updated successfully, but these errors were encountered: