Vessel
  • ⚓Introducing Vessel
    • Why Vessel Is The Exchange Crypto Needs?
    • Vessel's Roadmap for the Future of DeFi
  • ⚙️Technical Deep Dive
    • Sequencer
    • Prover
    • Contract
    • Data Availability
  • 💰VAELOB
    • Terminology
    • Order Book and AMM: Can We Have the Best of Both?
    • A Typical Trade in Vessel
    • Liquidity Pool Math
    • Concentrated Liquidity
    • Fee Calculation
    • Multi-Pool with Different Tick Spacing
  • 🎁Vessel Voyage
    • Vessel Mileage for Liquidity Providing
    • Vessel Coins for Referral
  • 🛳️Mainnet User Guide
    • Set up a Wallet
    • Deposit
    • Provide Liquidity to Vessel’s VAELOB
      • Access the Liquidity Pools
      • Add Liquidity
      • View Positions
      • Manage Positions
    • Trade
      • Order Types
      • Place Order
      • Cancel Order
      • Modify Order
      • Trading History
    • Internal Transfer - Send to Vessel's User
    • Withdraw Your Assets
    • Fees
      • Trading Fee
      • Gas Fee
      • AMM Fee
    • Trading Settings
  • 🛥️Testnet User Guide
    • Log in with Invitation Code
    • Setting up a Wallet
    • Switching Network
    • Funding Your Wallet
    • How to Deposit
    • How to Trade
    • How to Withdraw
    • Community Contribution
    • Vessel’s Referral Program
    • FAQs
  • 🗺️Smart Contract Deployments
  • 🐚Vessel Community Hub
    • Vessel Community Update: Q1 2024
    • Vessel Community Update: Q2 2024
    • Vessel Community Update: Q3 2024
  • 🎨Brand Kit
Powered by GitBook
On this page
  1. VAELOB

A Typical Trade in Vessel

PreviousOrder Book and AMM: Can We Have the Best of Both?NextLiquidity Pool Math

Last updated 10 months ago

Let’s start with: How is an order executed in Vessel’s VAELOB? Alice places a limit order to buy 1 ETH at a price of $3810. Vessel fulfills this order using 0.7 ETH at $3800 and 0.3 ETH at $3801. While this appears similar to traditional order matching, distinguishing between user-originated orders and AMM pool orders reveals Vessel’s unique execution method. First, Alice’s order is matched with sell orders at $3800, consisting of 0.4 ETH from the AMM and 0.3 ETH from other users. Once the 0.4 ETH from the AMM order is fulfilled, the AMM automatically places a new buy order of the same size at $3799. In contrast, the 0.3 ETH from user orders is removed from the order book upon fulfillment. Next, Alice’s order is matched with sell orders at $3801. The AMM contributes 0.5 ETH at this price, but Alice’s order only consumes 0.3 ETH of it. Afterward, the AMM places a buy order of 0.3 ETH at $3800 once its sell order is fulfilled. In summary, Alice’s order is filled by a combination of orders from other users and the AMM pool. When an AMM order is fulfilled, it automatically places another order of the same size in the opposite direction. Although not detailed in the above flow, it is important to note that the trading fees from AMM-generated orders are collected into the AMM pool and shared proportionally among the LPs.

💰