# How Mace Works

**Liquidity Aggregation**

Mace employs advanced off-chain computation to scan the Monad network and identify the most efficient liquidity pools for each trade. Unlike traditional DEX aggregators, Mace performs the heavy computation off-chain, significantly reducing on-chain gas fees for users.

* **Optimized Routing:** When a trade is placed, Mace’s backend calculates the best possible execution path, splitting the order across multiple liquidity pools to minimize slippage and maximize price efficiency.
* **Capital Efficiency:** By integrating off-chain liquidity from centralized exchange (CEX) market makers via an RFQ system, Mace enhances liquidity depth and ensures tighter spreads, especially for large trades involving blue-chip assets.

#### **Parallelized Execution**

Leveraging **Monad’s parallelized EVM**, Mace processes multiple transactions simultaneously, ensuring lightning-fast execution with minimal delays. This parallelization unlocks a new level of efficiency, allowing Mace to deliver superior performance even during periods of high network activity.

#### **Smart Contract Architecture**

**High-Level Overview**

Mace operates through a sophisticated system of smart contracts that:

* Execute the final optimized trade routes computed by the off-chain backend.
* Manage interactions with liquidity pools and external market makers.
* Enable advanced trading features such as limit orders and DCA trades.
* Integrate seamlessly with governance mechanisms to empower community participation.

**Security**

Security is a cornerstone of Mace’s design:

* **Audits:** All smart contracts undergo rigorous third-party audits to safeguard user funds and maintain platform integrity.
* **Modular Design:** The architecture is built with modularity in mind, allowing for seamless upgrades and adaptation to evolving user needs and market conditions.


---

# 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.mace.ag/how-mace-works.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.
