Skip to main content
The grid engine is the part of Perps Agent that actually trades. It turns a committed strategy config into a stream of orders on a venue and tracks the live state.
Image

What a grid is

A grid strategy places laddered buy and sell orders at fixed intervals around a price range. When price oscillates inside the range, the engine harvests the spread between fills. The grid wins on volatility and pays for it during trends.

How it works

A ladder of resting buy & sell limit orders that profits from ordinary price swings — no forecast needed.
1

Set range & grid

Split a price band into evenly spaced levels.
2

Buy below price

Resting BUY limits sit on every level under the mark.
3

Sell one level up

Each filled buy auto-places a take-profit SELL one level higher.
4

Repeat 24/7

Sideways chop = continuous round-trip profits.
Buy limit (below price) — opens long, closes short. Sell limit (above price) — opens short, closes long. Best in ranging / volatile markets · pre-committed on Mantle, executed on Bybit · fully automated.

What the engine does

  • Generates the ladder from the committed config: range, step size, order count, and notional per level.
  • Places and refills orders through the exchange adapter as fills arrive.
  • Tracks live state: inventory, realized PnL, unrealized PnL, drawdown, and risk metrics.
  • Enforces caps: hard stops on max drawdown, max leverage, and max position size.
  • Reports outcomes to the proof layer at the end of every run.

What it does not do

  • It does not invent its own parameters — those come from the AI loop and are committed on-chain.
  • It does not move funds — capital stays on the venue under user keys.
  • It does not edit the track record — only the proof layer writes history.
The grid engine is deliberately boring. All the “smart” decisions live in the AI agent loop, and all the trust lives in the Mantle proofs.