Agentic MarketAgentic Market Docs
Protocol Architecture

Resolution, Disputes & TWAP Void

Chainlink 2-call historical bracketing, symmetric 1% bonds, single-round disputes, N-1 packed TWAP Void, and permissionless liveness timeouts.

Every market on Agentic Market has a deterministic settlement path and permissionless timeout backstops so user funds can never be permanently locked (INV-11).


BTC 1h and 4h markets settle without human or AI judgment after estimatedEndTime:

  1. Exact Bracketing Check: resolvePriceMarketAndSweep(key, endRoundId, isPhaseRollover) performs 2 historical Chainlink calls confirming:
updatedAt(r)≤estimatedEndTime<updatedAt(rnext)\text{updatedAt}(r) \le \text{estimatedEndTime} < \text{updatedAt}(r_{\text{next}})
  1. Phase Rollover Support: When endRoundId is the final round of a Chainlink aggregator phase, isPhaseRollover = true verifies the first round of the next phase ((phaseId + 1) << 64) | 1.
  2. Deterministic Tie Rule (OD-4): endPrice >= startPrice resolves UP (0); endPrice < startPrice resolves DOWN (1).
  3. Stale Feed Backstop: If Chainlink remains unavailable past sourceTimeout (24h), anyone can call voidIfStale() permissionlessly.

Trend Market Resolution & Single-Round Disputes

  1. Bonded Proposal: After cutoffTime, the Resolver submits propose(key, outcome, evidenceHash) posting a symmetric bond (OD-7):
bond=clamp ⁣(max⁡(1%×collateral, feeAcc), 10 USDT, 250 USDT)\text{bond} = \text{clamp}\!\left(\max(1\% \times \text{collateral},\ \text{feeAcc}),\ 10\ \text{USDT},\ 250\ \text{USDT}\right)
  1. Permissionless Fallback Proposer: If the primary Resolver fails to propose within FALLBACK_PROPOSE_DELAY (sourceTimeout / 2), any external address may propose and earn a solvency-capped reward paid strictly from feeAcc (never touching user collateral).
  2. Single-Round Dispute: Within disputeWindow (24h default; 6h for Rapid VOID on Paused markets), any third party (msg.sender != proposer) may post an equal bond to enter Disputed. A second dispute always reverts (AlreadyDisputed).
  3. Arbitration & Timeouts: The Arbiter resolves Disputed markets and slashes the losing bond. If the Arbiter stalls past ARBITER_TIMEOUT (7d), anyone can call voidIfArbiterTimeout() to refund bonds and settle at TWAP Void.

N−1N-1 Packed TWAP & Anti-Front-Run Void Settlement

When a market settles to Void, payouts use the frozen historical TWAP rather than last-second spot prices.

  • Virtual Stop Time (INV-3): TWAP accumulation halts strictly at:
tstop=min⁡(block.timestamp, key.cutoffTime, pauseTime)t_{\text{stop}} = \min(\text{block.timestamp},\ \text{key.cutoffTime},\ \text{pauseTime})
  • 64-Checkpoint Lazy Ring Buffer: Stores only N−1N-1 cumulative price accumulators (1 for binary, 4 for multi-5) at 120s minimum checkpoint intervals (32 slots binary / 64 slots multi-5).
  • Anti-Void Front-Running (INV-4): A trader who buys immediately prior to an emergency pause() cannot extract positive net arbitrage profit from TWAP Void redemption because payouts use the 30m–120m historical average price and are bounded cleanly.

Hard Liveness Timeouts Summary

TimeoutValuePermissionless Unlock
RAPID_VOID_WINDOW6hFast VOID finalization from Paused
disputeWindow (Trend)[6h, 72h] (24h default)finalizeAndSweep()
sourceTimeout24h (price) / 72h (trend)voidIfStale() / voidIfSourceTimeout()
PAUSE_EXPIRY72hvoidIfPauseExpired()
ARBITER_TIMEOUT7 daysvoidIfArbiterTimeout()