# Overview

### Technical Overview

The protocol operates an onchain central limit order book (CLOB) for perpetual futures. Unlike hybrid architectures that rely on off-chain sequencers, Aftermath executes all matching logic directly in Move smart contracts. This guarantees verifiable execution and eliminates counterparty risk from centralized components.

Collateral is held in user-controlled accounts, not pooled custody, and can be used in all the markets with isolated margin mode. Liquidations are permissionless, meaning any participant can liquidate underwater positions and earn a fee.

### Key Features

The afLP Vault provides community-owned liquidity for market making. Depositors share in trading fees and the vault's PnL without needing active management or special access.

Prices are derived from an oracle aggregator that supports feeds from Pyth, Stork, and Switchboard. Mark price uses a median of book price, funding price, and TWAP to prevent manipulation from triggering liquidations.

The liquidation system uses a four-layer loss mitigation cascade: partial liquidations, insurance fund coverage, socialized losses, and auto-deleveraging. This protects healthy traders while ensuring the system remains solvent.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aftermath.finance/perpetuals/aftermath-perpetuals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
