Oracle dependency
MAOB is anchored to an oracle midpoint via IOracleAdapter.getPrice(address orderBook).
Risks:
- Staleness: If oracle updates stop, taker/maker actions that require price can revert (staleness is enforced inside the OracleAdapter per leg).
- Out-of-range: MAOB performs overflow safety checks and can revert with
MAOB__OracleOutOfRange()for extreme values. - Incorrect pricing: If the oracle midpoint is manipulated or incorrect, rung pricing and fills will reflect that.
Mitigations:
- Use a robust oracle and configure appropriate per-leg staleness thresholds in the OracleAdapter.
Pausing controls
MAOB uses a market state machine:
setMarketState(MarketState, reason)sets one ofActive,Halted(makers + takers paused), orUnwindOnly(makers paused, takers active).UnwindOnlyis time-bound and auto-expires back to effectiveActive.
Operationally, this provides an explicit emergency mode while preventing unsafe asymmetric states.
Rounding and dust
MAOB uses:
- token scaling (
baseScale,quoteScale) - significant-figure rounding for internal price values
- remainder-carrying arithmetic for fair distribution across many fills
Queue and fill accounting assumptions
MAOB’s order accounting uses per-rung “generations” and a Fenwick-tree based queue model. This is designed to:
- preserve fairness for makers within a rung
- allow efficient partial fills and claims
Assumptions:
- Makers are responsible for claiming; output does not automatically stream to wallets.
CLP operational risk
CLP is a vault that depends on an operator. Risks include:
- Strategy risk: poor rung placement can lead to adverse selection or inventory imbalance.
- Operational delays: if the operator does not regularly claim/cancel/redeploy, the vault may hold more capital in less-liquid states.
Mitigations:
- Establish operator procedures and monitoring.
- Use conservative withdrawal cooldown/fees if needed.