Skip to content

Price to tick calculation #58

Discussion options

You must be logged in to vote

GitHub wiped out my answer... Well, in short, you need to flip the price so it's the price of USDC in WETH (the price in a pool is the price of token 0 in terms of token 1):

math.floor(math.log(int(1e18 // 1900.79e6), 1.0001))
# 200820

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adradr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #57 on February 26, 2023 13:10.