-
Notifications
You must be signed in to change notification settings - Fork 602
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
Price-filtered, sorted pools query #3554
Comments
@mattverse are you looking into this? if not i can take this issue |
@stackman27 yeah! Feel free to take the issue! |
The front-end does need to maintain at least the list of denoms it wants, right? (Since its the case that the front-end is going to have trim pools with assets not in in its assetlist) I suggest we notice that all main front-end pools have as a component:
So we first-pass just expect the front-end to provide min-liquidity in those three assets. (And the filter returns pools with sufficient liquidity in that asset AND all assets in front-end provided assetlist filter) |
@ValarDragon does that mean the prices for assetlist will be calculated in the frontend or should we still expose query for this? |
Is anyone working on this? |
I believe we've decided against this for now. Mainly for performance reasons, we'll need to use indexing services instead of processing data directly on the node. |
Background
We implemented a pools filter query for v23 (#3324), however it's somewhat naive in that it expects an exhaustive list of min liquidity amounts to be used to filter each respective pool. This forces frontend teams to maintain a list of min amounts that they'd like to use to filter, which may change as liquidity shifts. We get the performance benefits of less pools, but now must maintain more frontend config.
Suggested Design
Update the new
../filtered_pools
query to accept a singe min amount, as well as a sorting key (i.e. liquidity). Perhaps the query could maintain a cache of token prices, and we could admit that this cache is only periodically updated with new prices as filtering pools is a non-critical use of token prices and the prices of major assets shouldn't shift much in within the cache lifetime.Acceptance Criteria
The query...
The text was updated successfully, but these errors were encountered: