# StellaSwap V4

<figure><img src="/files/7YuKvmcpzS8hpbWc11PQ" alt=""><figcaption></figcaption></figure>

StellaSwap V4 is a next-gen, modular AMM powered by a concentrated liquidity engine **core** and reinforced with a custom **plugins** network for the ultimate DeFi experience.

Developed by Algebra, our V4 focuses on;

⭐️  Solidifying overall **security** via a focused & lean core\
⭐️  **Gas optimization** via the flexibility of plugins integration\
⭐️  **Adaptability** via upgrades that do not require any liquidity migration

### Plugins: Enhancing Your DeFi Experience

With Integral V4, we can radically add secure features via Plugins that'll make your DeFi experience better.

Examples of plugins include; \
⭐️ Dynamic & elastic fees \
⭐️ Limit Orders \
⭐️ Gas discount, or compensation mechanisms \
⭐️ Solutions for JIT liquidity issues \
⭐️ Impermanent Loss reduction

Unlike UniV4 Hooks, Integral’s Plugins can be updated or changed within an existing pool, eliminating the need to create new pools and reducing unnecessary liquidity migration.

### StellaSwap V4 Better than UniSwap V4?

The Algebra team has conducted multiple gas efficiency tests comparing Integral vs. Uniswap V4 across various swap scenarios on Arbitrum. Let’s take a look at how Integral outperforms in different swap operations:

<figure><img src="/files/7Nf3rylguMDdVjp7QuOT" alt=""><figcaption></figcaption></figure>

While Uniswap V4 may be more gas-efficient in double swaps, Integral offers lower gas costs in large swaps, tick-crossing swaps, and high-volume transactions. Additionally, Integral’s modular architecture provides ongoing optimizations without requiring liquidity migration.

With **modular architecture, customizable fee structures, and enhanced security**, our V4 is a major step forward for DeFi. While Integral might not match UniV4 in multihop swaps, overall, it outperforms Uniswap in single swaps — **especially for large trades.** The ability to **tailor functionality through plugins** makes Integral a **more adaptable and future-proof solution** compared to Uniswap V4.

<br>


---

# 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.stellaswap.com/dex-core/stellaswap-v4.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.
