Skip to content
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

Implement spread-based concentrated liquidity pools #438

Open
alnoki opened this issue Aug 22, 2023 · 2 comments
Open

Implement spread-based concentrated liquidity pools #438

alnoki opened this issue Aug 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@alnoki
Copy link
Member

alnoki commented Aug 22, 2023

It is proposed that liquidity pools be connected to the Econia order book design, such that pools determine price range based on best bid/ask.

E.g. in uniswap v3, users select a price range in which to provide liquidity. But in this design, there could be a default range like +/- bps relative to best bid/ask.

Hence pool LPs, rather than selecting liquidity provisioning based on prices, and having to reshuffle their profile for market conditions, just select a sort of depth/slippage window that is relative to the order book reference price.

Per @elliottdehn:

If we imagine an order centered on the price such that 50 A is to the left and 50 B is to the right, and an order is placed that shifts liquidity right so that it's 55 A and 45 B, then you don't really have a way to easily rebalance this order especially if it's alone.

More specifically, you need a way to rebalance all of the liquidity affected by a trade which may have crossed multiple liquidity opens/closes so it would be really complicated.

Additionally, there may need to be some kind of hysteresis/DoS prevention that prevents people from stacking the book in a certain way that exploits the pool

Per @elliottdehn a TWAP oracle could be used to determine a price that is less sensitive to manipulation, and note that there is also the question of who pays for the rebalancing operation (this could potentially be implemented as a crank operation)

@alnoki alnoki added the enhancement New feature or request label Aug 22, 2023
@alnoki
Copy link
Member Author

alnoki commented Aug 22, 2023

Per @elliottdehn the CLMM could use as its price range endpoints the spread, such that pooled liquidity only applies between the best bid/ask

@alnoki
Copy link
Member Author

alnoki commented Aug 22, 2023

Here, there would be two regimes for the liquidity pool:

No limit orders: CP AMM (UniSwap v2)
Limit orders: CLMM (UniSwap v3) with the price range endpoints as the spread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant