Skip to main content

How EulerSwap Works

Lending Vault Integration

In order to create an EulerSwap pool, you are expected to provide liquidity into Euler’s vaults. Because of this design, your liquidity isn’t idly sitting in a pool; it remains active within the lending market. The same capital simultaneously:

  • facilitates swaps for traders
  • serves as collateral that you can borrow against
  • earns lending interest and any protocol reward tokens

This avoids fragmenting liquidity between separate protocols. In practice, EulerSwap treats the Euler lending protocol as a shared liquidity layer: any assets in your vault can be tapped for swaps without removing them from the lending pool. For example, USDC deposits can earn interest and also backstop trades in EulerSwap pools (like USDC/DAI, USDC/WETH, etc.). This is a key efficiency gain over conventional AMMs where liquidity is not also active in a lending market.

Just-in-Time (JIT) Liquidity

EulerSwap can dynamically increase effective liquidity by borrowing assets on the fly from Euler’s lending reserves. If a swap trade requires more of the output token than the LP currently holds in their LP position, EulerSwap will automatically borrow the shortfall using the input token as collateral. In other words, the protocol can “flash borrow” the needed amount of token B against token A that the trader is selling, to fulfill the swap. This just-in-time liquidity means an LP does not need large quantities of static liquidity for a swap. The result is dramatically amplified capital efficiency: in optimal conditions (especially for low-volatility pairs like stablecoins), EulerSwap can simulate up to 50× the liquidity depth of a traditional AMM with the same amount of liquidity. This deep liquidity on demand reduces slippage for traders and makes small pools perform like much larger ones.

Leverage and Collateral Reuse

Because liquidity lives inside a lending vault, LPs can optionally borrow against their liquidity to either amplify their position or hedge risks. EulerSwap supports natively leveraged market-making strategies: for example, an LP could deposit $250K of asset A, then borrow $650K of asset B (using A as collateral), and swap ~$400K of B into A to end up providing a balanced $650K/$650K liquidity position – effectively using borrowed funds to increase pool size. This allows market makers to provide much larger liquidity with a given capital by looping deposits and borrows, all within Euler’s risk management framework.

Since the reserves are in a vault, an LP could, for instance, supply USDC and borrow WETH to provide a USDC/WETH pool while remaining hedged: if ETH’s price moves, the borrowed WETH position offsets impermanent loss on the provided WETH liquidity. Such dynamic hedging can be done manually or via automated operator contracts, and it allows LPs to greatly mitigate impermanent loss at the cost of paying borrow interest. Simply put, EulerSwap inherits Euler’s rehypothecation ability – collateral can be reused – letting LPs open leveraged LP positions or protection strategies within the same platform.

Custom AMM Curve Parameters

  • Equilibrium Price: the price point where liquidity is most concentrated, offering minimal price impact for trades near this level.
  • Concentration (Curve Shape): a percentage parameter from 0% to 100% that adjusts how liquidity is distributed around the equilibrium. A higher concentration means liquidity is densely packed near the anchor price, similarly to a concentrated liquidity range or a Uniswap v3 style curve focused tightly around a price. A lower concentration distributes liquidity more evenly, behaving more like a constant-product or wide-range pool. This allows pools to be tailored to the volatility profile of the pair: stablecoin pairs can use extremely high concentration for minimal slippage, whereas volatile pairs might use a broader distribution to reduce rebalancing needs. For further information and customization please refer to Maglev creator docs.
  • Swap Fee: a configurable fee that traders pay on each swap. This can be set low to attract volume or higher to maximize fee income, depending on strategy.

All these parameters are immutable once set (each EulerSwap pool is a deployed smart contract with fixed settings), but you have full freedom to choose them at deployment to fit your use case. This level of customization enables use cases ranging from symmetric pools to highly asymmetric or one-sided liquidity setups for specialized purposes. Notably, EulerSwap can even support single-sided liquidity (one asset concentrated at a fixed price) which can be useful for things like initial price discovery or launch pools.

Single-LP Pools (Curated Liquidity)

EulerSwap uses a unique pool model: each liquidity pool is owned and controlled by a single LP (or entity) by default. There is no combining of many users’ funds in one pool contract. Instead, when you install an EulerSwap operator on your lending position (i.e. create a pool), that pool uses your position's assets as you are the sole LP for that pool. As the sole pool operator, you have full control over the pool’s operation, including withdrawing liquidity or uninstalling the operator entirely.

Uniswap v4 Compatibility and UX

Though EulerSwap operates under the hood with lending logic, it’s built to be user-friendly and integrable with existing DeFi trading infrastructure. EulerSwap is fully compatible with the Uniswap v4 hook architecture. This means EulerSwap pools can register as liquidity sources in Uniswap’s ecosystem and other aggregators: traders can route through EulerSwap pools via standard swap interfaces often without even realizing it. For the end-user swapping tokens, using EulerSwap should feel no different than any other DEX. Under the hood, when a trade hits an EulerSwap pool, the protocol may perform complex steps (borrow, swap, repay) to execute the trade, but this is abstracted away from the user. In essence, EulerSwap is designed to plug into the broader DeFi liquidity network rather than exist in isolation.