Page cover

Limit Orders (Coming Soon)

Limit Orders Plugin

The Limit Orders Plugin enables fully on-chain limit orders within Rooster’s concentrated liquidity pools. A limit order is represented as a one-sided liquidity position outside the current price range—executing automatically when the market crosses into that range. This approach ensures seamless integration with Rooster’s AMM, providing traders with more flexibility while maintaining the protocol’s core guarantees of efficiency, security, and transparency.

Key Features

  • Fully On-Chain Execution: Limit orders are embedded directly into Rooster’s liquidity pools, ensuring instant execution with no off-chain dependencies.

  • One-Sided Positions: A limit order is essentially a one-sided liquidity position above or below the current market price. Orders are executed as price moves into the selected tick range.

  • Partial Fills: Orders may execute partially if price movement is insufficient to fully cross the liquidity range.

  • Non-Expiring Orders: Limit orders have no built-in time restriction. Users can manually cancel orders at any time.

  • Fee Collection: Since limit orders are represented as liquidity positions, users also collect swap fees accrued during execution.

  • Gas-Efficient Design: Order checks add only moderate overhead, with predictable costs for batch closures.

Benefits

  • Advanced Trading Strategies: Enables traders to automate “Buy Low” and “Sell High” strategies without monitoring markets 24/7.

  • DeFi-Native Execution: Orders are executed transparently and trustlessly on-chain, without reliance on external keepers or order books.

  • Additional Yield: Limit orders generate swap fees in addition to trade execution, turning a trading strategy into an income-generating position.

  • Liquidity Efficiency: Concentrates liquidity exactly where users want exposure, reducing wasted capital.

Implementation

  1. Placing Orders: Users approve tokens for the LimitOrderManager contract and call the place function, specifying pool, tick range, and amount. Liquidity is added as a one-sided position represented by an ERC-721 token.

  2. Execution: As the pool price moves through the selected range, the position is burned and funds are credited to the LimitOrderManager contract.

  3. Withdrawal: Once executed, users call the withdraw method to claim swapped tokens

plus any accumulated fees.

  1. Cancellation: Orders can be cancelled manually at any time with the kill method. If cancellation occurs mid-range, the position may be partially executed and returned in two tokens.

Use Cases

  • Passive Trading: Traders set buy or sell targets and let the AMM execute automatically when market conditions are met.

  • Liquidity Recycling: LPs can reposition liquidity to capture additional gains by layering limit orders around active ranges.

  • RWA Integration: For real-world assets on Plume, limit orders enable more efficient entry and exit strategies in less liquid markets.

Last updated