-
Notifications
You must be signed in to change notification settings - Fork 294
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
Maintain indices of available liquidity for open positions #2378
Comments
xref #2569 |
|
At retro today, we decided this isn't going to land for 55. Demoting to Next. |
What does it mean to index things by liquidity: we want a metric that provides a rough proxy of which pairs have volume in order to compare the scores (available liquidity of routing candidates) of the different neighbors, the scores all have to be in the same unit, i.e. amount of asset A (source asset) you can buy with asset B (the candidate asset) this is not the direction the trade goes in, however liquidity is likely to be symmetric-ish, and indexing in the other direction would be easily manipulated. in rapidly descending market conditions the assumption of symmetric-ish liquidity is not likely to hold. the we should also add RPCs for things like "here are all trading pairs"/"here are all neighbor trading pairs" |
After discussion in Discord, we've coalesced around a design involving two different key types. Goal: Given Key/value types (
|
As part of #2332 we implemented functionality to query the chain state for open positions and find routing candidates based on available liquidity (#2377), however the current implementation relies on iterating every open position and bucketing/sorting the available liquidity, a strategy that will likely not be viable in the long-term.
Instead, indices of the available liquidity for other assets should be constructed as part of the logic for manipulating liquidity positions, and queried by
candidate_set
.We could then expose this via APIs as well.
The text was updated successfully, but these errors were encountered: