Range Orders

Customizable liquidity positions, along with single-sided asset supply, enable a new style of trading with automated market makers: the range order.

In typical order book markets, anyone can easily set a limit order: buy or sell an asset at a specific predetermined price, allowing the order to fill at an undetermined time in the future.

With PipiSwap V3, a limit order can be approximated by providing a single asset as liquidity within a specific range. Like traditional limit orders, range orders can be set with the expectation that they will be executed at some point in the future, with the target asset available for withdrawal after the spot price has crossed the entire order range. .

Unlike some markets where limit orders may incur fees, the range order creator incurs fees while the order is being filled. This is because the range order is technically a form of liquidity provision rather than a typical exchange.

Range Order Possibilities The nature of AMM's design makes some styles of limit orders possible, while others cannot be replicated. The following are four examples of rank orders and their traditional counterparts; the first two are possible, the second two are not.

An important distinction: Range orders, unlike traditional limit orders, will not fill if the spot price crosses the given range and then reverses to cross again in the opposite direction before the target asset is withdrawn. Although you will be earning LP fees during this time, if the goal is to fully exit on the desired target asset, you will need to monitor the order and manually withdraw your liquidity when the order has completed or use a third-party position manager service to withdraw. in your name.

Take Profit Orders The current price of a PIPI/BNB pool is 1,500 PIPI/BNB. You would like to sell your BNB for PIPI when the BNB price reaches 1,600 PIPI/BNB. This is possible as the price space above the spot price is denominated in the highest value asset, BNB. You can provide BNB at a price of 1,600 PIPI/BNB and complete the order when the spot price crosses your position.

Buy Limit Orders The current price of a PIPI/BNB pool is 1,500 PIPI/BNB. You expect BNB to recover after it falls to 1,000 on the next market downside, so you would like to place a range order exchanging PIPI for BNB at a price of 1,000 PIPI/BNB. This is possible, since the price space below the spot price is denominated in the lowest priced asset, PIPI. You can provide PIPI at a price of 1,000 PIPI/BNB, which will be exchanged for BNB when the BNB spot price falls below 1,000 PIPI/BNB.

As the examples above show, in PipiSwap V3, the two paired assets in a given pool are separated above and below the spot price, with the highest priced asset available above the spot price and the lowest priced asset below.

The following examples show limit order styles that cannot be replicated due to separation of assets in price space.

Buy Stop Orders The current price of a PIPI/BNB pool is 1,500 PIPI/BNB. You expect the BNB price to shoot up to 3,000 once it reaches 2,000 PIPI/BNB. Therefore, you would like to place a PIPI to BNB range order at a price of 2,000 PIPI/BNB. This is not possible as the price space above 1,500 PIPI/BNB is denominated in BNB, so you cannot provide the necessary PIPI at your desired price to be exchanged for BNB.

Stop Sell Orders The current price of a PIPI/BNB pool is

Last updated