# Introduction to Ambient

Ambient (formerly CrocSwap) is a decentralized exchange (DEX) protocol that allows for two-sided AMMs combining concentrated and ambient constant-product liquidity on any arbitrary pair of blockchain assets. &#x20;

Ambient runs the entire DEX inside a single smart contract, where individual AMM pools are lightweight data structures instead of separate smart contracts. This and other design decisions makes Ambient the most efficient Ethereum-based DEX in existence.

A hosted version of the Ambient frontend is [available here](https://ambient.finance)

## Advantages

Ambient is developed as an entirely new codebase with best engineering practices and innovative smart contract architecture choices in mind. This gives it a number of core advantages over competing DEXs:

* Substantial gas savings compared to other leading DEXs
* Combines concentrated (i.e. "UniV3 style"), ambient (i.e. "UniV2 style"), and knockout liquidity (behaves like limit orders which atomically fill and lock in a position in a single direction) within the same pool all on a single liquidity curve.
* Dynamically adjusted pool fees, maximizing LP returns relative to market conditions and demand for liquidity.
* Fees accumulated by concentrated LP positions auto re-invest back into the pool as ambient liquidity. Users earn compounded even without manually harvesting positions.
* JIT (just-in-time) liquidity attacks are prevented through the use of minimum TTL parameters on concentrated liquidity positions. Ordinary LP positions therefore earn higher fees.
* Ability for users to pre-fund tokens at the DEX in the form of "surplus collateral". Much higher efficiency for active traders by deferring token transfers to net settlement.
* "Gasless" transactions, where the user pays in the swapped token instead gas, through EIP-712 off-chain standard.
* Unique support for "permissioned pool" primitive where the ability to govern and restrict a pool can be offloaded to general purpose smart contract oracles running inside or outside the protocol.


---

# 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.ambient.finance/introduction-to-ambient.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.
