Layer 8 — Quote Construction & Arbitrage Validation
Direct Book Quote Construction
BID = Adjusted MID − ½ × Total Spread
ASK = Adjusted MID + ½ × Total Spread
Synthetic MYR-IDR Quote
Synthetic MYR/IDR = USD/IDR ÷ USD/MYR + cross spread add-on
Three-Layer Arbitrage Check
Every firm quote must pass all three checks before issuance. Any single failure escalates the corridor to RESTRICT.
| Check | Rule | Failure Meaning |
|---|---|---|
| 1. Internal Consistency | BID < Adjusted MID < ASK | Spread construction has a logic error; instant arb against the protocol possible |
| 2. Synthetic vs Direct Gap | Gap between synthetic MYR-IDR (always computed) and direct oracle rate ≤ 0.30% in NORMAL, 0.50% in PROTECT. Synthetic rate is always computed for this check regardless of whether a direct feed is the pricing source. | Counterparties can buy from Ratio synthetically and sell externally at a profit |
| 3. Triangular Loop Check | USD-IDR bid × MYR-IDR ask × (1 / USD-MYR ask) ≤ 1 | Circular arb path exists; counterparty can loop USD→IDR→MYR→USD and extract risk-free profit |
Quote Controls
| Control | Description |
|---|---|
expiry_timestamp | Hard timestamp after which the quote cannot be executed |
max_size | Maximum notional the quote covers |
allowed_direction | BUY or SELL — reflects current state and inventory constraints |
state_flag | Current system state: NORMAL, PROTECT, or RESTRICT |
tranche_id | Populated for split orders; identifies this quote as one tranche of a larger parent |
rate_source | MYR-IDR only. DIRECT or SYNTHETIC — always present for MYR-IDR quotes |