MuchFi
TradingPerpetuals

Order Types & Matching

Available order types and matching engine mechanics for perpetual trading

Order Types & Matching

MuchFi's perpetual trading system supports multiple order types and execution options to accommodate various trading strategies.

Order Types

Market Order

An order that executes immediately at the current mark price. Provides instant execution but price may vary from expectations.

Limit Order

An order that executes at the selected limit price or better. Guarantees price but may not execute if the market doesn't reach your price.

Stop Market Order

A market order that is only triggered when the price reaches the selected stop price. Useful for setting stop-losses or breakout entries.

Stop Limit Order

A limit order that is only triggered when the price reaches the selected stop price. Combines stop trigger with limit price control.

TWAP Order

An order that splits a large order into smaller orders executed over time. Reduces market impact for large positions.

Order Execution Options

Reduce Only

Constrains orders to position closure rather than opening new opposite positions. Prevents accidental position reversals.

Post Only (ALO)

Orders rest on the book without immediate execution. Guarantees maker status and associated fee benefits.

Immediate or Cancel (IOC)

Orders are cancelled if not instantly filled. No partial fills remain on the book.

Take Profit / Stop Loss

Automated position closing at predetermined price levels. Set your risk parameters in advance.

TWAP Implementation

The system uses a Merkle tree structure for TWAP orders:

  • Users specify execution duration and interval (default 30 seconds)
  • Suborder sizing is calculated automatically
  • Slippage caps (typically 3%) protect against adverse execution
  • Orders are stored in encrypted form onchain until execution
  • This protects against toxic flow hunting

Matching Engine

MuchFi employs a price-time priority system to match orders fully onchain:

  1. Best prices match first
  2. Oldest orders at same price have priority
  3. Execution continues sequentially until the taker's order fills or no crossing orders remain