-
Notifications
You must be signed in to change notification settings - Fork 33
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
How to calculate routes for concentrated pools specifically? #70
Comments
@anilhelvaci did you figure this out? How did you get pools and prices that need to be pass here: |
Hey @roncan ✋
No, I haven't. I went with hard coding the route.
You can get all |
If you need to do liquidity providing, you can checkout the FE for the main site: https://github.com/osmosis-labs/osmosis-frontend/tree/stage/packages/math/src/pool/concentrated but it looks like it may be an issue with the actual routes? would the solution to be to make another method (or update |
I think this would be a sufficient approach 👍 @pyramation |
great, we're on it! |
Hi, I took a look into this. As my understanding, "pool.poolAssets.every(({ token }) => !token.denom.startsWith("gamm")) " makes all gamm out of the result, instead of "filtering the pools into gamm pools only." Please excuse me if there's misunderstanding. Could you please provide us more info on this issue like what's the input when unexpected output happened, then we can debug based on the input. Thank you very much! |
Context
I'm trying to build a program that trades on Osmosis. I want to use dynamic routes, meaning don't want to use hard coded routes for my trades.
Problem/Question
I haven't been able to find a method that calculate these routes for me yet. I'm aware of getRoutesForTrade which needs an array called
pairs
. Here's where the problem(or at least I think) arises because the arraypairs
is calculated from thepools
using the makePoolPairs method. As you can see here the methodmakePoolPairs
filters the pools intogamm
pools only.I'm also aware that we can fetch the
gamm
equivalents of theseconcentratedPools
. As application devs;gamm
pools, calculate routes using those and convert results toconcentrated
equivalent, if linked?The text was updated successfully, but these errors were encountered: