Skip to main content

Overview

Dymension hosts an embedded AMM that acts a concentrated layer of liquidity for the RollApp ecosystem. This AMM enables features such as cross-RollApp swaps, efficient token bootstrapping, and provides access to protocol incentives.

Dymension's embedded AMM is designed for exchanging ICS-20 transferred tokens. Tokens are translated from their origin format to the IBC standard for fungibility across ecosystem tokens.

Bonding Curve

Dymension's AMM employs X×Y=KX \times Y = K constant product model for two token liquidity pools. In this formula, X and Y denote the quantities of two different tokens in the liquidity pool, and K is a constant value. This mechanism allows for automatic pricing and liquidity provision, as the ratio of X to Y determines the price of each asset and adjusts with every trade.

Liquidity providers contribute assets to the pool and earn fees, but they also face risks like impermanent loss, especially when the prices of pooled tokens significantly diverge. To compensate for liquidity provisioning liquidity providers earn swap fees and are eligible for potential protocol incentives.

Base Denom

Liquidity pool creation requires at least one Dymension governance approved token (i.e. base denom). This can be added by enabling a pool_creation_fee in a specified denom.

Example:

"pool_creation_fee": [
{
"denom": "adym",
"amount": "100000000000000000000"
}
],

This onchain governance parameter sets the liquidty pool creation fee, in which one of the two liquidity pool tokens must be denominated in. The limitation of base denoms creates a natural limit to the amount of pools in Dymension's AMM.

Most liquidity pools are denominated in the base denom of DYM (native protocol token of Dymension). To facilitate swaps across different denoms in one transaction Dymension's AMM facilitates multi-hop swaps.

Slippage

Slippage refers to the potential change in price that can happen while a transaction is in process. Users set a slippage tolerance which is the acceptable price variation beyond the initial impact.

If the final price at execution falls within this set slippage range, such as 1%, the transaction will proceed. However, if the execution price is outside this accepted range, the transaction will not be successful, and the exchange will not take place.