# FAQs

### Why does my allocated collateral appear higher than my filled position size?

Aftermath Perpetuals uses isolated margin markets. When you place limit orders, the protocol must reserve collateral to back those orders in case they get filled. This means your allocated collateral covers both your current filled position and all pending orders, not just the active position alone.

For example, if your first order fills at $6 but you also have several pending limit orders, your allocated collateral will reflect the total worst-case exposure, not just $6.

### Why isn't the allocated collateral equal to the sum of all my orders?

Because pending buy (bid) orders and pending sell (ask) orders offset each other. The protocol calculates your worst-case net exposure using the MaxNetBase formula rather than simply summing all orders.

This means if you have a $6 long position, 5 pending buy orders at $6.55 each, and 5 pending sell orders at $6.55 each, the required collateral is less than $6 + (10 x $6.55) = $71.50. The system only requires collateral for the worst-case direction.

### What is MaxNetBase and how does it determine my margin?

MaxNetBase is the key formula used to calculate position exposure. It takes the larger of two scenarios:

```
MaxNetBase(p) = max(|BaseAmount + PendingBids|, |BaseAmount - PendingAsks|)
```

Your current position plus all pending buys (worst case if all buys fill), or your current position minus all pending sells (worst case if all sells fill). Whichever is larger determines your margin requirement.

This prevents traders from artificially deepening the order book by placing matching buy and sell orders without sufficient collateral.

### Where can I learn more about the margin system?

See the full [Margin documentation](/perpetuals/architecture/margin.md) for the complete formulas including Margin Ratio, Initial Margin Ratio (IMR), and Maintenance Margin Ratio (MMR).


---

# 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/faqs.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.
