> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# The engine

> The engine is the part of Muralis that does the work.

It runs your sessions on our servers, keeps reading the market, and places or moves your liquidity in the pool. This page explains how a session starts, runs and stops, and what protects your money along the way.

## Sessions

A session is one run of the engine on one pool, trading from one trading wallet. You can run sessions on several pools at once, each with its own wallet.

A session has a budget: how much SOL (or USDC) and how much of your token it may use. It never uses more than that. The split between the two at the start is the session's target, and it keeps that target for its whole life.

## Modes

You pick the mode at launch, and it never changes by itself. Range is the default and the right start for your own token.

| Mode | What it does | Best for |
| - | - | - |
| [Range](/docs/engine/range.md) | Lays a wide ladder of liquidity around the price, keeps a reserve outside the pool, buys on dips and sells into strength | Your own token. The default. |
| [Follow](/docs/engine/follow.md) | Keeps one band of liquidity that moves with the price, wider when the price is wild | Steady two-sided liquidity close to the price |
| [LP](/docs/engine/lp.md) | Keeps a narrow band near the price for fees, and steps aside when fees no longer cover the risk | Earning fees on a pool with enough volume |

A new pool created at launch always starts in range mode. Follow and LP need a pool that already exists.

## A session's life

### Start

When you launch, the engine:

1. Checks the plan, the wallet and the prices one more time.
2. Sets your budget aside in the trading wallet.
3. Places its first liquidity around the primary pool's price: SOL just below it, your token just above it.

If you created a new pool at launch, the first placement seeds it with your tokens.

### Running

At short, regular intervals the engine reads the price, the pool and your positions. Then it decides: hold what is there, add, move the liquidity to the new price (a recenter), or take it out (a pull). Every decision, with its reason, goes to the event feed on the Dashboard.

Trading fees build up in your positions. The engine collects them once a day by default, and whenever it closes a position.

### Phases

| Phase | What it means |
| - | - |
| seed | The first placement on a new pool. A couple of minutes, once. |
| active | Running normally. |
| defensive | Careful: holding what is there and adding nothing new for a while, usually because the price is too wild. |
| wind down | Stopping: closing positions. |
| emergency stop | A safety rail fired. Everything is closed and the session waits for you. |

### Stop

Press stop on the Dashboard or in Setup. The engine closes every position, collects the fees, and returns SOL and your token to the trading wallet. Stopping a running session needs no PIN.

Then withdraw from **Treasury**, or start a new session.

### Server restarts

Your PIN is never stored, so the engine cannot carry on by itself after our server restarts. Your session then shows as **interrupted**:

* Your positions stay in the pool.
* Nothing new happens until you act.
* You get an alert.

Open the app and **resume** it with your PIN. The session picks up its own positions and goes on.

Or stop it to close everything. If it still holds positions, stopping needs your PIN too, because the key has to be opened once more to close them.

## Safety rails

Rails sit above the modes and check the session at every step, before anything else. The equity floor, the volatility pause and the stop on repeated failures apply in every mode. The others apply only in the modes named below.

| Rail | What it watches | What happens |
| - | - | - |
| **Drawdown stop** | In LP mode: how far the session's value has fallen below its best | Past the limit, the session stops and closes everything. The limit has a default you can change in Advanced settings. Range mode uses its own rail instead, below. Follow runs without a drawdown stop. |
| **Range rail** | In range mode: whether the session is doing worse than simply holding, by more than the plan allowed | The session stops and closes everything |
| **Volatility pause** | How wild the price is | No new liquidity until the price calms down. The session enters the defensive phase. |
| **Equity floor** | The session's value against its budget | Below a set share of the budget, the session stops |
| **Hard drop** | In range mode: a sharp fall within a very short time | Everything is closed |
| **Trend break** | In range mode: the price stays below the band's floor for several hours | Everything is closed |
| **Repeated failures** | Three failed transactions in a row | The session stops |

When a rail stops a session, it closes every position at once, sends you a critical alert, and waits. It never restarts by itself.

Several limits can be changed in Advanced settings. Change them one at a time.

Advanced settings shows each limit and its default before you launch.

## The price it trusts

The engine trusts one outside price: your **primary pool**. It does not trust your own pool's price alone, because one trade can push it.

* When the primary pool's price cannot be read for more than a short while, the drawdown stop waits rather than act on a price it cannot trust. The equity floor still runs.
* At launch, if your pool's price is off from the primary's by more than a small gap, the app shows both prices and asks you to agree. If the gap is large, the launch is refused.

## What it costs

| Cost | When | Comes back? |
| - | - | - |
| Rent for a position | Each position opened | Yes, on close |
| Rent for a new price range in the pool | Only when no one used those prices before | No |
| Network fees | Every transaction | No |

Rent and fees are paid in SOL from the trading wallet, on top of the budget. The plan lists them before you launch. Keep some SOL in the wallet while a session runs, or new orders wait and you get an alert that says how much to send.

## Session report

Every session writes a report: what it did, every transaction it sent, and its results. You can open it in Sessions on the Dashboard or in Setup, and download all of a session's data with "Export JSON".

The engine writes the report itself, and each line links to its transaction on the blockchain, so anyone can check it.

## Good habits

* Name a primary pool before you launch.
* One trading wallet per session. Keep other tokens out of it.
* Do not trade from the session's wallet by hand while it runs.
* Keep extra SOL in the wallet for fees and rent.
* Watch the first minutes after launch. A session should hold SOL below the price and your token above it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.