Case Scenario
Scenario 1: Basic Buy Levels
Description: The market maker is buying the baseToken (ETH), and the trader is selling it. The market maker provides multiple buy levels with increasing quantities and prices.
Data Structure:
Result:
Trader sells 1.6 ETH.
Level 1: Fully filled (0.1 ETH at $1600.00).
Level 2: Fully filled (1 ETH at $1600.00).
Level 3: Partially filled (0.5 ETH at $1599.00).
Total traded: 1.6 ETH at an average price of $1599.375.
Scenario 2: Basic Sell Levels
Description: The market maker is selling the baseToken (ETH), and the trader is buying it. The market maker provides multiple sell levels with increasing quantities and prices.
Data Structure:
Result:
Trader buys 1.24906367 ETH.
Level 1: Fully filled (0 ETH at $1601.00).
Level 2: Fully filled (1 ETH at $1601.00).
Level 3: Partially filled (0.24906367 ETH at $1602.00).
Total traded: 1.24906367 ETH at an average price of $1601.30.
Scenario 3: Buy Levels with Arbitrarily Small Orders and Non-Zero First Level
Description: The market maker is buying the baseToken (ETH), allowing arbitrarily small orders with a non-zero first level quantity.
Data Structure:
Result:
Trader sells 7 ETH.
Level 1: Fully filled (1 ETH at $90.00).
Level 2: Fully filled (2 ETH at $91.00).
Level 3: Fully filled (3 ETH at $92.00).
Level 4: Partially filled (1 out of 4 ETH at $93.00).
Total traded: 7 ETH at an average price of $91.57.
Scenario 4: Sell Levels with Non-Zero First Level Quantity
Description: The market maker is selling the baseToken (ETH), and the trader is buying it. The first level has a non-zero quantity.
Data Structure:
Result:
Trader buys 60 ETH.
Level 1: Fully filled (10 ETH at $150.00).
Level 2: Fully filled (20 ETH at $151.00).
Level 3: Fully filled (30 ETH at $152.00).
Total traded: 60 ETH at an average price of $151.33.
Last updated