Technical Documentation

USDT/USDC Price Discovery Mechanism

The USDT/USDC exchange on Open Mandi operates as a free market with no administered or pegged rate. The exchange rate is determined entirely by the interaction of buy and sell orders on the order book.

Free Market Principle

Unlike centralized stablecoin swaps that enforce a 1:1 rate (or apply a fixed spread), Open Mandi treats USDT and USDC as two distinct assets with independent valuations on the platform. The exchange rate emerges from the collective decisions of participants.

This design serves an educational purpose: it demonstrates that even assets with near-identical external valuations can exhibit price divergence in a closed market with limited liquidity.

Order Book Structure

The USDT/USDC pair uses the same order book architecture as the futures markets. The base currency is USDT and the quote currency is USDC:

  • Bid side — buy orders for USDT, priced in USDC. A bid of 1.001 means "I will pay 1.001 USDC per 1 USDT."
  • Ask side — sell orders for USDT, priced in USDC. An ask of 1.003 means "I will sell 1 USDT for 1.003 USDC."

Mid-Market Price Calculation

The mid-market price is calculated as the arithmetic mean of the best bid and best ask:

midPrice = (bestBid + bestAsk) / 2

Example:
  bestBid = 0.999 USDC
  bestAsk = 1.001 USDC
  midPrice = (0.999 + 1.001) / 2 = 1.000 USDC

The mid-market price is used as the reference rate for display purposes on the Transparency Dashboard and for cross-currency valuation (e.g., calculating total portfolio value in USD terms).

Spread Dynamics and Liquidity

The spread is the difference between the best ask and the best bid:

spread = bestAsk - bestBid
spreadPercent = (spread / midPrice) * 100

Key dynamics on the Open Mandi USDT/USDC market:

  • Thin liquidity — with strict deposit limits and a small user base, the order book will typically be thin, leading to wider spreads than external markets
  • Spread as opportunity — wide spreads create arbitrage incentives for participants to place tighter limit orders, which in turn improves liquidity
  • Maker fee incentive — the lower maker fee (0.01% vs. 0.03% taker) encourages limit order placement, which builds order book depth

Edge Cases

Empty Order Book

When one or both sides of the order book are empty, the mid-market price is undefined. Market orders on the empty side will be rejected. Limit orders can still be placed and will rest until a counterparty arrives.

Extreme Imbalance

If the bid-ask spread exceeds a configurable threshold (e.g., 5%), the system may display a warning to users that the market is illiquid. Trading remains permitted — the warning is informational only.

Self-Trading Prevention

A user's buy order cannot match against their own sell order. The matching engine skips self-matches and continues to the next order in the queue.

Comparison to External Markets

On major centralized exchanges, the USDT/USDC rate typically remains within 0.01-0.05% of 1:1. On Open Mandi, deviations may be larger due to:

  • Smaller participant pool
  • No market makers or automated liquidity providers
  • Deposit limits constraining available capital
  • No external arbitrage bots maintaining the peg

These deviations are a feature, not a bug — they provide real examples of market microstructure phenomena for study.