🖥️For Market Makers

Good to know: depending on the product you're building, it can be useful to explicitly document use cases. Got a product that can be used by a bunch of people in different ways? Maybe consider splitting it out!

Programatic Trading Integrations

Fermi’s “promised-capital” primitive decouples inventory from liquidity provision. Lock any Solana SPL asset (or a basket) in a vault once; mint transferable vouchers that count as margin for any number of open orders. A single USDC can therefore back bids across twenty markets while it is simultaneously earning yield elsewhere—capital efficiency you normally only get on centralized prime brokers.

Makers earn a rebate schedule that scales with posted depth and time-at-best, paid in the taker’s quote asset; they also collect a share of Continuum’s sequencing fees for each block their liquidity helps settle. Because execution is provably FIFO, you can quote tighter spreads with lower adverse-selection risk, and you never need to over-pay gas to “guard” your position against sniping.

Using the Rust Client Crate in Custom Rust Scripts

You can use the Fermi sequencer client crate to write your own Rust scripts:

use sequencer_client::market;
use sequencer_client::order_place;
use sequencer_client::order_cancel;
use sequencer_client::types::OrderSide;
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    // Create HTTP client
    let client = reqwest::Client::new();
    let server_url = "http://localhost:8082";
    
    // List markets
    let markets = market::list_markets(&client, server_url).await?;
    
    // Find a specific market
    let market = markets.iter()
        .find(|m| m.name == "SOL/USDC")
        .ok_or("SOL/USDC market not found")?;
    
    // Place a buy order
    order_place::place_order(
        &client,
        server_url,
        "./keypairs/your_keypair.json",
        OrderSide::Buy,
        100,  // Price
        1000, // Quantity
        &market.uuid,
        123   // Order ID
    ).await?;
    
    Ok(())
}

Key features for custom script development:

  • Market operations: list, create, view orderbooks

  • Order operations: place buy/sell orders, cancel orders

  • Automated workflows: market making, testing, simulation

Dependencies required:

  • reqwest for HTTP communication

  • tokio for async runtime

  • serde and serde_json for serialization

  • ed25519-dalek for cryptographic signing

Last updated