Perpetual markets on are implemented with virtual automated market makers (vAMMs). This page describes how vAMMs work in general. Specifics about vAMMs on are in the pages that follow.

Trading on vAMMs

Like AMMs such as Uniswap, vAMMs are asset pools that use the constant product formula xy=kx * y = k, where xx and yy are the amounts of each asset in the pool. The price of the assets relative to each other is determined by the ratio of their amounts. In this documentation, we will refer to xx as the base asset and yy as the quote asset.

For example, in an ETH/USD pool with 100 ETH and 160000 USD, ETH is the base asset and USD is the quote asset, and the price of ETH relative to USD is 160000100=1600\frac{160000}{100} = 1600.

Trading on an AMM changes the ratio of assets in the pool, and therefore changes the price. One benefit of trading on an AMM is that it does not require two parties to trade; the AMM itself is always the counterparty to a trade.

In an ordinary AMM, traders put one asset into the pool and receive the other. In a vAMM, the assets in the pool are virtual, and instead of putting one asset into the pool to receive the other, traders maintain collateral in their accounts to take long or short positions.

Risks of vAMM Trading

Please make sure you understand how the market price moves when trading on a vAMM.

As in an AMM, the only way for the price to move is for users to make trades in the market. If there are not enough users making trades, the price may not converge to the price of the underlying.

Last updated