# SparkDEX Eternal Perps Exchange

## How does SparkDEX's Perpetual Aggregator work?

SparkDEX's perpetual aggregator operates using a **multi-level risk management system**, designed to be both **smart and self-regulating.**&#x20;

At its core, the system tries to resolve risks internally—maintaining a balance between long and short positions—until certain thresholds are reached, for instance, when 50% of the pool's balance is hit. Beyond this threshold, the system is designed to address excesses through cross-perpetual solutions on the Aggregator.&#x20;

### The Flow behind the Aggregator model

To go more into detail, the operation starts at layer 0 with an autonomous entry vault for each chain. Layer 1 then assesses the situation across other owned chains, and if necessary, Layer 2 involves the aggregator.&#x20;

During a transaction, if aggregation is required for the user, the system seamlessly performs this in the background, ensuring efficient and secure management of trading positions. This multilayered approach enables the aggregator to handle varying levels of risk effectively, thereby optimizing the trading experience and safeguarding the assets within the ecosystem.


---

# 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.sparkdex.ai/sparkdex-defi-ecosystem/sparkdex-eternal-perps-exchange.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.
