-
Notifications
You must be signed in to change notification settings - Fork 589
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
[QUESTION] Could not create a position for a pool with 1:1 ratio when token0.decimals != token1.decimals #8679
Comments
Hello, after giving the pool a look, it seems like there were some transactions on the pool which moved the tick to -108000001? Also a 1:1 price ratio would not necessarily mean that the tick should be always at 0, as it represents a price range and is based on logarithmic scale |
@mattverse the problem that as a tick on |
Just for clarity, tick is at 0 upon initialization of a concentrated liquidity pool, https://github.com/osmosis-labs/osmosis/blob/main/x/concentrated-liquidity/model/pool.go#L47. By looking at the pool you have created, it seems that the reason that the tick is at -108000001 is because there were some swaps in the pool. But regardless, if you guys want to resolve the issue of achieving a specific ratio, you guys should calculate and increase tick spacing of the pool, this should allow the price to move faster across ticks and help achieve higher stos ratio as you have mentioned |
so before I did the swap, the tick is at -108000000 at very beginning when I created the first position. you can see that when I created the position, https://www.mintscan.io/osmosis/tx/51DA6BA5BD25C8E93B5804A3AACD9BA576F3045D0321D27314D21CB673145FF0?height=20409100, the tx log shows that no osmo token was sent to the position at all, which only takes in 100stos token. At this time, the price of wei:uosmo is already 10^12. so I swap osmo token in 2 times with total of 46.7*2 osmo. that swapped out 47stos in total. then I swap in 60stos which make the tick to -108000001 and drained the osmo in the pool. You suggest that changing spacing will solve the problem, but I don't understand how? Do you mind to explain a bit more? Given that the tick spacing only changes the price changes speed instead enlarge the tick maximum range. Given that the current problem is the minimum tick of -108000001 only leads to a maximum price of 10^12. Do you have any example of other pool that the token have different decimals? |
@mattverse please take a look as we could not finish integration |
Hi! I have used instructions https://docs.osmosis.zone/overview/integrate/pool-setup#join-pool for pool creation and created a supercharged liquidity pool with Osmosis token (6 decimals) and my ibc token (18 decimals) for the full range (-108000000 : 342000000) for 1:1 price ( I have expected that it will be 1:1):
https://www.mintscan.io/osmosis/address/osmo1yfuqh7z885u4jaj7su4a7qdd7psn3a420jy835
But pool showing current_tick is -108000001 (expected to be 0 as I wanted to 1:1)
So how to make it 1:1 ratio if there is a difference of the decimals?
Is this related to a decimals and I could only use a IBC token with 6 decimals as uosmo?
The text was updated successfully, but these errors were encountered: