Fermi DEX- Docs
  • ๐Ÿ‘‹Intro to Fermi
  • Overview
    • ๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธVision
    • ๐Ÿ’กWhat we do
    • โœจFermi DEX: Features
    • ๐Ÿˆโ€โฌ›Background
  • Fermi DEX Usage Guide
    • Fermi DEX: How it works
      • ๐Ÿ“ชPosting a Limit Order
      • โœ…Finalizing Orders
      • ๐Ÿ”„Withdrawing Funds
    • ๐Ÿ› ๏ธGetting set up
      • ๐Ÿ“Getting tokens
      • ๐Ÿ”ซTrobleshooting
    • ๐ŸชTransfer Hooks Redefined
    • Custom settlement periods
  • Technical Overview
    • Overview v0.2 (DEPRECATED)
    • Technical Overview v1
      • Market Addresses (Devnet)
      • Key Structs
      • Instructions
      • Events
      • SDK
    • ๐ŸšงArchitecture
      • ๐Ÿ‘ฝJust In Time Liquidity
      • ๐ŸคMatching Logic
      • ๐Ÿ›ธLiquidity Abstraction
      • ๐ŸŒŠLiquidity Management Programs
    • ๐ŸงชTesting Locally
    • ๐Ÿ•น๏ธDemo - Fermi v0.2
    • ๐Ÿ“ฝ๏ธDemo - Fermi v1
    • ๐Ÿ“‡Github, Devnet Programs and PDAs
    • ๐Ÿ‘ฉโ€๐ŸŽคActors and Incentives
  • Use cases & Benefits
    • ๐Ÿ–‡๏ธLower Slippage than traditional DEXes
    • โ›๏ธPortfolio Margining Strategies
    • ๐ŸMarket Making on Fermi DEX
  • About us
    • ๐Ÿ‘‹Meet the Team
    • ๐Ÿ›ฃ๏ธRoadmap
    • ๐Ÿš“Next Steps
Powered by GitBook
On this page
  1. Technical Overview
  2. Technical Overview v1

Events

Event Types stored in EventHeap


#[derive(
    Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable, AnchorSerialize, AnchorDeserialize,
)]
#[repr(C)]
pub struct FillEvent {
    pub event_type: u8,
    pub taker_side: u8, // Side, from the taker's POV
    pub maker_out: u8,  // 1 if maker order quantity == 0
    pub maker_slot: u8,
    pub padding: [u8; 4],
    pub timestamp: u64,
    pub seq_num: u64,

    pub maker: Pubkey,

    // Timestamp of when the maker order was placed; copied over from the LeafNode
    pub maker_timestamp: u64,

    pub taker: Pubkey,
    pub taker_client_order_id: u64,

    pub price: i64,
    pub peg_limit: i64,
    pub quantity: i64, // number of quote lots
    pub maker_client_order_id: u64,
    pub reserved: [u8; 8],
}
#[derive(
    Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable, AnchorSerialize, AnchorDeserialize,
)]
#[repr(C)]
pub struct OutEvent {
    pub event_type: u8,
    pub side: u8, // Side
    pub owner_slot: u8,
    padding0: [u8; 5],
    pub timestamp: u64,
    pub seq_num: u64,
    pub owner: Pubkey,
    pub quantity: i64,
    padding1: [u8; 80],
}
PreviousInstructionsNextSDK

Last updated 1 year ago