You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
One of the intuition behind the current DEX design is that the total processing costs caused by a single position are limited by the fact that prices move around, which means that a position is only ever surfaced when its price and market price are within range of each other. However, this is not always the case like for trading pairs that have stable exchange rates (e.g. two IBC-equivalent assets with different canonical representations). In that scenario, a position close to the tip of the orderbook will be surfaced for consideration over-and-over again which could have adverse effect on the performance of routing execution.
Describe the solution you'd like
We should implement a forced ranking (aka. stack ranking) for position indices, limiting the total amount of chain state that can be persistently utilized, and evicting those positions that are least competitive (on price, inventory, and ultimately fees). This amendment to the DEX engine does not rely on special-casing stablekind pairs.
One way to do this is to scan the set of open positions at the end of each epoch. For each trading pair, we can compare the top of the order-book to the long tail of positions below it and use some criterion to close all of those that are below a certain threshold.
Describe alternatives you've considered
Instead of scanning the set of open positions every epoch, we could build an incremental index of positions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
One of the intuition behind the current DEX design is that the total processing costs caused by a single position are limited by the fact that prices move around, which means that a position is only ever surfaced when its price and market price are within range of each other. However, this is not always the case like for trading pairs that have stable exchange rates (e.g. two IBC-equivalent assets with different canonical representations). In that scenario, a position close to the tip of the orderbook will be surfaced for consideration over-and-over again which could have adverse effect on the performance of routing execution.
Describe the solution you'd like
We should implement a forced ranking (aka. stack ranking) for position indices, limiting the total amount of chain state that can be persistently utilized, and evicting those positions that are least competitive (on price, inventory, and ultimately fees). This amendment to the DEX engine does not rely on special-casing stablekind pairs.
One way to do this is to scan the set of open positions at the end of each epoch. For each trading pair, we can compare the top of the order-book to the long tail of positions below it and use some criterion to close all of those that are below a certain threshold.
Describe alternatives you've considered
Instead of scanning the set of open positions every epoch, we could build an incremental index of positions.
The text was updated successfully, but these errors were encountered: