Protocol Parameters

All constants live in src/libraries/BazaarTypes.sol, src/libraries/RiskParamsLib.sol, and the contracts that use them. Values below are verified against the code.

Orders & matching

ParameterValue
MIN_ORDER_AMOUNT$5 notional (full closes exempt)
MAX_SLIPPAGE_BP500 (5%) — market/stop-loss slippage cap
MARKET_ORDER_LIFETIME_BLOCKS12 L2 blocks (~3 s)
MIN_ORDER_LIFETIME_BLOCKS / max12 blocks (~3 s) / ~1 year
MAX_ACTIVE_LIMIT_ORDERS_PER_USER100 (Limit + StopLimit)
Active market orders per user1 · TP/SL: 1 each per position
MAX_CANCELS_PER_CALL200
MAX_OBSERVATION_BLOCK_AGE12 L2 blocks
LIQ_MAX_SLIPPAGE_BP500 — cap on the Pass-A band; effective band is ±min(5%, current MMR)
Integrator fee0.25 bp maker + 0.25 bp taker — only on orders naming an integrator

Sequencers

ParameterValue
MIN_BOND$1,000
VOLUME_CAP_MULTIPLIER14× bond per rolling 30 min (NUM_BUCKETS × BUCKET_DURATION)
Challenge window29 min (SEQUENCER_WINDOW), strictly inside the 30-min volume window
OMISSION_PENALTY_BP700 (7%), min $20 — 1% challenger / 6% insurance
STALE_PENALTY_BP100 (1%), min $20 — 50/50 challenger / insurance
Maker sequencer fee0.25 bp
Taker sequencer fee0.75 bp (≤ 50% util) → 3.75 bp (≥ 90%)
SEQUENCER_FLAT_FEE_PER_SIDE$0.03 per side, on top of bps fees

Margin

ParameterValue
BASE_IMR_BP300 (3%)
Multipliersvolatility, liquidation-gap, insurance — each 1×→3×
Non-continuous multiplier1.5×
IMR clamp4% … 80% (25× … 1.25× leverage)
Warmup floor20% IMR (30% for non-continuously traded pairs) for 5 days and 50,000 price updates
MMRIMR / 2
MMR grace24 h lag, 25 hourly samples
STALE_MARGIN_MULTIPLIER2× on new fills under stale oracle
MAX_STALE_DEVIATION_BP1000 (±10% stale-fill band)
MIN_COLLATERAL_AMOUNT$5 minimum collateral deposit
Retained-collateral floora position-holding account must keep max(0.5% of notional, $5) in collateral (MIN_RETAINED_COLLATERAL_BP = 50). Proportional because fees are: it guarantees the fee that closes the position is always payable

Funding

ParameterValue
FUNDING_INTERVAL / cap1 h / ±0.5% per hour
Premium dampening÷ 8
Mark EMA alpha0 … 10% per batch, volume-scaled (no floor)
MAX_MARK_DEVIATION_BP500 — fills clamped to ±5% of index before entering the mark EMA
MARK_DECAY_PERIOD1 h to index with no trades
Oracle-gap guards≤ 30 min accrual on old ticks; > 12 h gap skips the dark period

Liquidation, ADL & insurance

ParameterValue
Liquidation keeper rewardmax($0.10, 2 bp of notional)
ADL trigger / cancelexpected loss > 80% / < 60% of fund
ADL auction25× score → ~0, quadratic, 10 min; ≤ 25 winners per call
ADL timeout24 h → settlement window opens at the live price
ADL executor reward0.1% of averted bad debt
Insurance target2% … 10% of OI (vol-scaled, ≥ 3× gap EMA)
Insurance LPmin $5 deposit; 20-day cooldown + 3-day window; rate limits 0.5% OI / 6 h (below target), max(1% OI, 10% fund) (above)
Maker insurance fee0.5 bp flat
Taker insurance feebase 0.5 bp … 2 bp (scales with target ratio); below target × (1 + 49·deficit²), 45 bp hard cap; discounted toward 0 above target
BUG_BOUNTY_TAX_BP100 (1% of all fee streams)

Oracle

ParameterValue
MAX_PRICE_STALENESS / user tier2 s / 10 s
MAX_CONFIDENCE_BP200 (2% confidence cap)

Meta-transactions

ParameterValue
MAX_RELAYER_FEE$1 per meta-transaction
MAX_DEADLINE_WINDOW30 s max signature deadline

Listing & termination

ParameterValue
Listing≥ $4,000 = $1,000 UMA bond + ≥ $3,000 seed (MIN_INSURANCE_SEED); 48 h liveness
UMA identifier upgrade$5,000 bond, 2-day liveness, then a 14-day activation timelock (IDENTIFIER_UPGRADE_TIMELOCK) after approval
DVM_DISPUTE_GRACE14 days on top of liveness before a disputed proposal may be discarded as unsettleable; shared by the deployment and identifier tracks (it bounds the DVM, not the claim)
Bond constantsfloors, not fixed amounts — requiredDeploymentBond() / requiredIdentifierUpgradeBond() / requiredTerminationBond() each return max(constant, UMA's live minimum)
Proposer free textlisting description ≤ 200 bytes; termination reason ≤ 1,000 and pairDescription ≤ 100 (MAX_REASON_LENGTH, MAX_PAIR_DESCRIPTION_LENGTH); restricted ASCII, no square brackets
Scheduled termination$1,000 bond, 12 h liveness, lastTradingTs ≥ 12 h out; 3 h precise-tick grace
Post-cessation termination$1,000 bond, 72 h liveness; cessation timestamp ≤ 7 days old (MAX_CESSATION_LOOKBACK)
Stale-oracle termination21 days
Terminal settlement window48 h between fixSettlementPrice and finalizeTermination (deposits + all withdrawals frozen)
Terminal settlement bountymax($0.10, 2 bp of notional) per position, debited from that position's own remaining collateral (insurance only when a position is wiped out by its own loss)
Insurer vote$500 bond; 60% of shares; 7-day vote + 7-day execution window; 14-day cooldown; 7-day share maturity
Balance-check tolerance0.1% (USDC_BALANCE_TOLERANCE_BP)
UMA proposer reward0.1% of fund, cap $100, once per pair