# 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="https://1612816559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAwZPif0JPGBztvL7lDZL%2Fuploads%2FYkbsLMUdEiMVXghLvsQz%2Fhybrid%202.drawio.svg?alt=media&#x26;token=e598bfd1-27ed-4165-b0bf-496a8f3abe5e" 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
