Butter.xyz Docs
  • Welcome
  • Butter Swap
    • Introduction
    • Getting Started
    • Swapping Tokens
    • Providing Liquidity
    • Fee Structure
    • Security Best Practices
    • Contract Addresses
    • Audits
  • Rewards
    • Overview
    • Points
    • Fishing
      • Fishing Staking
  • Bakery on Blast
    • The Bakery
    • Contract Addresses
  • Butter Perps
    • Introduction
    • Disclaimer
    • Getting Access
    • How To Trade
      • Deposit & Withdrawal
      • Perpetuals
        • Timed Perpetuals
          • Community Timed Perpetuals
      • Spot Trading
      • Liquidity Pool
    • Learn more
      • Cross-margin leverage
      • Security
    • Perpetuals Deep Dive
      • vAMM
      • Index price
      • Price limits
      • Fees
      • Funding
        • Timed Perps
      • Risk
        • Position limits
        • Margin and collateral
        • Liquidations
        • Auto deleveraging
      • AMM pool adjustments
      • Insurance fund
      • Collateral NFTs
  • Governance and Tokenomics
  • About Butter.xyz
  • API
    • Private Beta
  • Official links
    • Website
    • Twitter
    • Discord
    • Telegram
Powered by GitBook
On this page
  1. Butter Perps
  2. Perpetuals Deep Dive

vAMM

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

Trading on vAMMs

Like AMMs such as Uniswap, vAMMs are asset pools that use the constant product formula x∗y=kx * y = kx∗y=k, where xxx and yyy 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 xxx as the base asset and yyy 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} = 1600100160000​=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.

PreviousPerpetuals Deep DiveNextIndex price

Last updated 1 year ago