# Hybrid Liquidity Architecture

Liqui implements a modular hybrid liquidity architecture optimized for speed, efficiency, and transparency. Built on MegaETH, it combines AMM, AI-optimized CLMM, and on-chain CLOB with execution logic informed by AI agents and routed through verified oracles.

{% hint style="info" %}
This architecture ensures continuous liquidity, adaptive execution, and efficiency across all market conditions.
{% endhint %}

<figure><img src="/files/c0d2TorA8qkpI3311iP2" alt=""><figcaption></figcaption></figure>

## Core Layers

* **AMM (Base Layer)**                                                                                                                                                               At its foundation, Liqui operates an optimized (x\*y=k) AMM model to ensure seamless swap experiences and uninterrupted liquidity access.
* **CLMM Pools**                                                                                                                                                                                                                                                                                                                            LPs can define tight price ranges and optimize fee capture. Suggested ranges and rebalance triggers are powered by AI.
* **CLOB Engine**                                                                                                                                                                                                                                                                                                                            A full-featured on-chain orderbook supports limit, market, and stop orders - ideal for high-frequency and institutional traders.                                                                                                                                                    &#x20;

### AI Liquidity Orchestration

> All three layers are dynamically managed by AI agents.

**Autonomous AI agents continuously monitor:**

* Market volatility and slippage
* Pool utilization and liquidity gaps
* Execution paths and price impact

{% hint style="info" %}
Based on this, the protocol dynamically routes trades to the optimal layer, adjusts fees, and manages CLMM ranges - all via oracle-verified logic.
{% endhint %}

## Oracle Layer & On-Chain Execution

**AI decisions are routed through the Oracle Bridge:**

* Each decision is signed, timestamped, and hashed
* Smart contracts verify the oracle signatures
* No off-chain action is executed without on-chain validation

{% hint style="info" %}
In sensitive modules like liquidation or leverage adjustment, multi-oracle consensus or threshold signatures are required.
{% endhint %}

**Example:**

1. User requests a swap
2. AI analyzes market context + pool state
3. Oracle transmits AI’s signed recommendation
4. Liqui router contract chooses best route (AMM / CLMM / CLOB)
5. Transaction is executed on-chain, final and auditable

**Benefits:**

* Adaptive market-making based on real-time data
* Reduced slippage and price impact for users
* More efficient use of liquidity capital in CLMM and CLOB
* Automated fee and range adjustments without manual intervention
* Improved transparency via verifiable oracle-signed decisions
* Higher capital efficiency and sustainable LP returns


---

# 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.liqui.io/hybrid-liquidity-architecture.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.
