> For the complete documentation index, see [llms.txt](https://docs.morfi.io/morfi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.morfi.io/morfi/the-protocol-amm-v3.md).

# The Protocol - AMM V3

MorFi implements [Algebra Integral](https://algebra.finance/) to enable a seamless integration of custom plugins, reduce gas costs, and provide a powerful solution to address the evolving needs of Morph’s DeFi ecosystem.

Algebra Integral is an innovative Concentrated Liquidity Automated Market Maker (AMM) that introduces a modular architecture to enhance the performance and flexibility of MorFi.

<figure><img src="/files/GpbVUBHWco4l9MSPzdcC" alt=""><figcaption><p>MorFi DEX Architecture Overview</p></figcaption></figure>

#### **Key Features of Algebra Integral**

1. **Modular Architecture** Algebra Integral's modular design allows MorFi to easily integrate, remove, or update plugins without requiring liquidity migration. This capability reduces operational disruptions and minimizes gas costs, ultimately providing a better user experience.
2. **Customizable Plugins** This modular approach supports a wide range of plugins, such as:
   * **Dynamic Fee Plugin:** Automatically adjusts fees based on market volatility, optimizing earnings for liquidity providers
   * **On-chain Farming Plugin:** Enables farming directly within MorFi, enhancing profit opportunities without relying on external platforms
   * **Limit Orders Plugin:** Facilitates limit orders that execute automatically when specified price conditions are met, providing users flexibility in their trading logic
   * **Oracles for TWAP and Volatility:** Provides tools for accessing historical data and calculating daily price volatility to support advanced trading strategies
3. **Single Pool per Pair Architecture:** Ensuring that each token pair has a single liquidity pool minimizes liquidity fragmentation, making it easier to find optimal swap routes and improving capital efficiency across MorFi.
4. **Security and Flexibility:** By moving secondary functionalities into plugins, Algebra Integral keeps the core of the protocol lightweight, enhancing its security and simplifying the audit process.

#### MorFi’s Edge

As a result, MorFi offers the following advantages:

* **Gas Cost Savings:** Improved gas efficiency by 7-22%, on average, compared to traditional models
* **Concentrated Liquidity**: Liquidity providers can concentrate their capital within specific price ranges, leading to increased liquidity at preferred prices
* **Enhanced Functionality:** Easy integration of new features and plugins to adapt to market conditions without major infrastructure changes
* **Greater Security:** A more secure trading environment that protects user assets while allowing for continuous development and updates

By leveraging the latest AMM architecture, MorFi offers a superior trading experience that is both user-friendly and flexible to changing market demands.
