Knockout Positions

Knockout LP positions provides an analogous facility for AMMs to reversible limit orders in CLOBs. At a high level, users can think of knockout LP positions as a way for patient traders to get cheap directional execution. Users can either place bids below the current price, which commit base tokens that convert to quote tokens. Or they can place asks above the current price, which commit ask tokens that convert to base tokens.

Knockout LP positions behave different than traditional concentrated LP positions, once they're fully filled the position has locked in the position at a fixed price. Traditional LP positions are not practical for directional execution, because if/when the price moves back up the tokens the user bought get sold back to the pool.

Versus Limit Orders

From a high level perspective, users familiar with limit orders can mostly think of knockout LP positions as equivalent. First, unlike limit orders which occupy a single price, knockout LP positions occupy a small range. This range is typically on the order of 0.64% for volatile pairs and 0.01% for stable pairs. Traders with very precise execution targets should be aware.

Second a knockout order only locks in the position if/when the curve price moves fully through the range order. Once the price moves through the end of the range, the order will be filled and all the base tokens posted to the knockout bid will have fully traded into quote tokens. And vice versa for knockout asks. That makes it possible for a knockout order to be "partially filled" if the price is currently in the middle of the range. If the user removes the knockout LP position, they'll receive back both a proportional mixture of the converted tokens and and the remaining unconverted tokens.

The user should be aware that unlike a true limit order, partial fills in a knockout LP position are reversible. The converted tokens only become non reversible at the point when the order has fully filled, i.e. when the curve price touches the end of the range.

Third, unlike most limit order books, knockout LP positions are not based on a first-in-first-out (FIFO) queue. All in-range liquidity, both knockout and classical, participates equally relative to its pro-rata contribution to aggregate active liquidity. Therefore there is no advantage to "low-latency" or layering the book to try to gain preferential execution relative to other.

Fourth, while in range knockout LP positions earn the liquidity fee paid by swappers. This can be thought of as analogous to "maker rebates" in a LOB. Like a "maker rebate", this earned fee is at least proportional to the notional size of the order times the liquidity fee of the pool. Unlike limit orders, knockout LP positions can earn multiples more than this, depending how lone the curve price stays in range.

Post-Fill

After a knockout position has been filled, the converted tokens are locked in and the liquidity is no longer active in the curve. To retrieve the token the user must claim the position, which returns the converted tokens and the accumulated liquidity fees. In the protocol this is done by posting a Merkle proof related to the underlying transaction, but the Ambient frontend handles that complexity under the hood.

Last updated