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

# Efficient

The liquidity unification layer: a DEX where pools can borrow what a trade needs from lending markets and lend out what they don't.

Onchain liquidity is siloed. DEXs hold the inventory that makes markets, while Morpho and Aave hold billions in deposits that nobody is borrowing. Every AMM, PropAMMs included, can only quote what it holds, so $1M of inventory makes a $1M market and earns nothing between trades.\
\
Efficient is a DEX where pools can quote more depth than inventory held. Pools can tap into money markets to borrow the liquidity required to fill a swap without needing to hold it permanently, and lend it back out when it isn't needed.\
\
For example, take an Efficient pool that trades BTC against USDC, where depositors have put in only BTC. When a trader sells BTC to the pool, the pool borrows USDC from a lending market and pays the trader, all inside the same swap. When a trader later buys BTC, the USDC they pay repays that loan first. Once the loan is repaid, the pool lends out any extra USDC to earn interest.\
\
Each pool is both an exchange and a vault. Traders swap against it, and depositors hold shares valued in one token, the pool asset. Hooks price every swap.\
\
The pool operator decides how the pool handles the other side of the pair. The pool can borrow that side from lending markets just in time, lend out what's spare, or both. It can also skip lending markets and trade only what it holds, like a standard two-sided pool. Every pool runs the same pool code, which checks every fill its hooks quote.

## Key features

* **Depth beyond deposits.** A pool can [borrow the other side of its pair](/how-pools-work/just-in-time-financing.md) from lending markets in the middle of a swap. So it can quote more depth than its depositors put in. As a guide, leverage runs up to about 10x on volatile pairs and 40x on stable pairs. A [credit check](/how-pools-work/credit-and-collateral.md) caps the pool's debt after every sell, whatever its hooks quote.
* **Yield on idle inventory.** Spare tokens on the borrowed side can earn interest between trades. Once buys have repaid the pool's debt, the pool can lend out anything above what it keeps on hand to settle trades. That interest offsets what the pool pays when it borrows.
* **Modular hooks.** Hooks decide how each pool prices and manages its market, and a pool operator can choose or write its own. The invariant hook can run a concentrated, amplified or laddered curve, or put a market maker's own pricing model onchain. The fee hook can move fees with volatility, inventory skew and trade direction. An optional controller hook can refinance the pool's debt and move its supply and collateral between lending markets, under conditions the pool operator sets. See [How Efficient works](/how-efficient-works.md#the-hooks) and [Build a hook](/run-a-pool/build-a-hook.md).
* **One financing router, built for any lending market.** A shared router connects every pool to its lending markets through one account interface. So depth on the borrowed side scales with the free liquidity across all of a pool's markets, up to its credit limit. Each market is a separate position, so a liquidation in one never reaches collateral posted in another. Morpho Blue is the only lending protocol implemented today, and Aave and Euler integrations are planned. See [How Efficient works](/how-efficient-works.md#the-financing-router).
* **Cheaper debt through loan-to-loan swaps.** A pool that can borrow two tokens can pay traders to move its debt into the cheaper one. Its loan-to-loan swap hook gives that debt its own price and fee. The pool code supports this and is in audit, and no pool runs it yet.
* **Tokenised strategies.** Each pool is a vault, so a pool operator can raise outside deposits into its strategy. Deposits can be open to anyone or limited to an allowlist. The pool's ERC-20 shares, with ERC-4626 views, are valued in the pool asset, net of debt. A [tranche controller](/use-efficient/provide-liquidity/tranches.md) can split those shares into a senior claim at a target rate and a junior claim that takes the first loss.
* **Exits without unwinding.** Through a pool's entry market, an exit can settle against a new deposit or a maker's own inventory. Either way, shares change hands and the pool's book stays as it is.
* **Permissionless.** Anyone can create and run a pool through the factory. A token issuer can bring only its own token. The pool borrows the other side from a lending market that lends against it.

## Products

Efficient pools are built for three products, and Everlong vaults already run on them. [Use cases](/use-cases.md) covers what else can be built.

### Infrastructure for propAMMs

A market maker can run its strategy as an Efficient pool and take outside deposits. A pool that borrows posts its pool asset as collateral and borrows the other side inside the sell. So it quotes deeper than the market maker's own capital, and spare tokens on the borrowed side earn supply interest between trades.

**Price onchain, or quote from offchain.** A market maker can put its pricing model onchain in its own hooks. Its fee hook sets the swap fee inside the pool's floor and cap, so fees track volatility or inventory skew only if the market maker wants them to. Or it can quote through the PropAMM venue and keep its model offchain.

**On PropAMM, the desk's model never goes onchain.** The desk runs its own quoting engine and signs its quotes, depth and limits. Takers read those signed quotes to fill, so they're public. The model behind them isn't. A desk needs one signing key and one WebSocket, and no builder keys or wallets. PropAMM pools fill from their own holdings, with borrowing off by default.

**On Ethereum, the newest quote lands right before the fill.** A desk signs new quotes every 50 to 400 ms. In the run-up to each block, a relay resends the newest ones to Titan, BuilderNet, Quasar and Bombora every 50 ms. The builder lands them once a block, right before the fill that reads them. So each fill reads the desk's newest quote from the same block. If the desk goes silent, its quotes stop landing. Those four builders build just over 80% of Ethereum blocks. In other blocks, fills fail rather than trade on an old quote, unless a solver brings the quotes in its own transaction.

On Base and other L2s, the relay posts quotes into the venue's storage instead. Use cases covers leverage by pair type, idle yield, tranches and exits.

### Passive market-making strategies

Everlong vaults are the first. They earn yield in their pool asset, starting with BTC, while depositors keep close to 1:1 exposure. The [Everlong](https://docs.foreverlong.io/everlong) section covers how they run.

### Liquidity bootstrapping for real-world assets

This product is in development and not yet live.

## Start here

| Reader                                                                               | Page                                                                                                                                      |
| ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Trader or arbitrageur                                                                | [Trade](/use-efficient/trade.md)                                                                                                          |
| Depositor                                                                            | [Provide liquidity](/use-efficient/provide-liquidity.md). For Everlong vaults, start at [Everlong](https://docs.foreverlong.io/everlong). |
| Senior or junior tranche holder                                                      | [Tranches](/use-efficient/provide-liquidity/tranches.md)                                                                                  |
| Market maker, token issuer or team that manages a lending market                     | [Use cases](/use-cases.md)                                                                                                                |
| Pool operator: market maker, liquidity manager or team that manages a lending market | [Getting started](/run-a-pool/getting-started.md)                                                                                         |
| Aggregator, solver or app                                                            | [Integrate](/integrate.md)                                                                                                                |
| Hook developer                                                                       | [Build a hook](/run-a-pool/build-a-hook.md)                                                                                               |

[How Efficient works](/how-efficient-works.md) explains the whole mechanism on one page. [Deployments](/reference/deployments.md) lists the chains, [Risks and safeguards](/use-efficient/risks-and-safeguards.md) covers the protections, and the [Glossary](/glossary.md) defines each term.
