Range Orders

In FanX, range orders allow users to approximate traditional limit orders by strategically placing liquidity with only one side of a token pair—creating what effectively behaves like an automated limit order using FanX V3’s concentrated liquidity mechanics.

How Range Orders Work

A range order is created by depositing just one token within a specified price interval where the current market price is outside that range:

  • If you provide liquidity above the current market price, you deposit the higher-priced token.

  • If you place liquidity below the current price, you deposit the lower-priced token.

As the market price moves and crosses your specified range, liquidity becomes activated and gradually swaps into the opposite asset. Once the price fully exits the range, your position will consist entirely of the target token—effectively completing a limit-order-like swap.

Examples of Range Orders

  • Take-Profit Equivalence Suppose the price of Token A in Token B is rising. You expect to sell A once it hits a certain threshold. You can deposit only A in a range above the current price. When the market crosses that boundary, the liquidity automatically converts to B—executing your sale.

  • Buy-Limit Equivalence Conversely, if the price drops and you aim to buy A at a lower rate, you deposit B in a range below the current price. When the market dips into that range, liquidity converts to A—effectively performing a buy at your target price.

Key Considerations

  • Range orders are not set-and-forget If the market price crosses your range and then reverses before you manually remove liquidity, your position remains active in the new token—but you've missed the limit order trigger. Monitoring or using a position manager is essential to complete the process.

  • Fee Generation during Execution Unlike typical orders which may incur execution fees, range order creators earn liquidity provider fees during the swap because the process is a form of liquidity provisioning, not a standard trade.

Limitations — What Cannot Be Modeled

Not all limit order types are feasible with FanX range orders, due to how price space is segmented by asset:

  • Buy Stop Orders: Impossible if you cannot deposit the requisite token in the price band above the current price.

  • Stop-Loss Orders: Similarly unrepresentable if the asset you want to convert from cannot be deposited in the lower price zone.

Fees from Range Orders

Once execution begins as the price enters your range, your position accumulates fees in both tokens of the pair. These can be claimed when you withdraw liquidity.

One trade-off: selecting a wider range may garner more fees through increased trading activity but increases the chance of not capturing the full conversion—especially if the price moves and reverses outside your intended range.

Last updated