Collateral Yield Algorithm

To maintain a highly liquid and efficient Central Limit Order Book (CLOB), dreamDEX utilizes an algorithmic distribution of yield to reward market makers for providing order book depth.

Overview

Unlike traditional "rebate" models that pay per fill, dreamDEX rewards Open Interest (resting orders). This mechanism ensures that liquidity providers are compensated for their capital commitment and the risk of being filled.

The yield is generated from the underlying collateral strategies: initially native stablecoin yield, and later expanded to include native token staking and lending vaults.

Yield Distribution Principles

The algorithm distributes yield based on three primary factors:

  1. Notional Value: The size of the resting order.
  2. Time in Book: How long the order has been active and resting.
  3. Proximity to Mid-price: How close the order's limit price is to the current market mid-price.

Proximity Weighting

The core of the algorithm is the Proximity Weighting. Liquidity is most valuable to the exchange when it is near the mid-price, as this results in tighter spreads for takers.

The weighting follows a Gaussian distribution centered at the mid-price:

$$W = e^{-\frac{(P_{order} - P_{mid})^2}{2\sigma^2}}$$

Where:

  • $W$: Yield Weight (1 at the mid, decaying toward 0 with distance)
  • $P_{order}$: Limit price of the maker order
  • $P_{mid}$: Mid-price
  • $\sigma$: Standard deviation (spread) of the weighting - how quickly reward drops off as orders move away from the mid.

The mid here is the instantaneous best-bid/best-ask mid (bestBid + bestAsk) / 2, not the EMA-smoothed mark price used for stop-order triggers. The two can differ; yield proximity is always measured against the simple book mid at each moment. If either side of the book is empty there is no mid, and no order accrues until a two-sided book exists again.

Impact of Proximity

  • At the Mid-price: W = 1 - the maximum weight.
  • One σ away: W = e^{-1/2} ≈ 0.607.
  • Two σ away: W = e^{-2} ≈ 0.135. Reward decays fast, so non-competitive depth earns little.

The σ parameter

σ is set per market, in that market's raw on-chain integer price units - the same representation as P_{order} and P_{mid}, not basis points or a fraction of the mid. A larger σ rewards a wider band around the mid; a smaller σ concentrates reward tightly at the touch. Converting a σ value into a human "distance from mid" (bps or price) uses that market's raw-price representation (decimals / tick convention).

How Yield Is Distributed

Each resting order accrues a proximity-weighted score for every second it stays on the book:

$$\text{score} = \text{quantity} \times W \times \text{seconds}$$

Scores are accumulated per market maker (separately for the bid and ask side). A fixed reward pool is then split across all market makers in proportion to their accumulated score, so each maker receives:

$$\text{payout} = \text{total pool} \times \frac{\text{maker score}}{\text{total score of all makers}}$$

The pool is a fixed budget the operator funds and distributes per run (any ERC-20; ultimately sourced from the protocol's collateral strategies) - not a floating per-block yield rate. Your payout is therefore a share of that run's pool, determined by your score relative to everyone else's.

What qualifies

  • The order must rest on the book. Orders that never rest - Immediate-or-Cancel / Fill-or-Kill residuals and fully-filled aggressors - earn nothing.
  • A market mid must exist. You do not have to quote both sides yourself; if anyone provides the opposite side so a mid exists, every resting order on both sides accrues.
  • No minimum size and no minimum resting time. Score accrues per second from the instant an order rests; there is no size floor and no anti-flicker dwell requirement.
  • No early-cancel penalty. Score already accrued is kept in full up to the moment the order is cancelled, filled to zero, or expires. Cancelling early forfeits only future accrual, never what you have banked.

Yield Accrual and Settlement

  • Time-Weighted Accrual: Score accrues on elapsed seconds (from on-chain block timestamps), not block count, so reward is unaffected by block-time variation.
  • Operator-scheduled settlement: Distribution is a batch job run over an explicit block range, paying scored makers via direct on-chain ERC-20 transfers. It is idempotent (already-paid ranges/receivers are skipped). The interval is an operational schedule, not a fixed protocol constant - use the settlement cadence published by ops to annualize.
  • Transparency: Market makers can view their historical yield via the Developer API or Trade Interface.

Worked example (relative weighting)

Two makers, equal notional and equal time on the book. Maker A rests at the mid (W = 1); Maker B rests 2σ away (W ≈ 0.135). Their scores are in ratio 1 : 0.135, so of a given run's pool they receive roughly 88% and 12% respectively. Resting twice as long, or twice the size, scales your score linearly (score = quantity × W × seconds).

To model an absolute APR you additionally need three operator/tokenomics inputs that are not part of this algorithm and not on-chain: (1) the pool size and token funded per run, (2) the settlement interval, and (3) the market's raw-price representation to translate σ into a price/bps distance. With those, APR ≈ (your run payout ÷ your capital at risk) × (runs per year).