Skip to content

predict: introduce expiry valuation boundary (DBU-557)#1120

Draft
0xaslan wants to merge 4 commits into
mainfrom
at/DBU-557-expiry-valuation
Draft

predict: introduce expiry valuation boundary (DBU-557)#1120
0xaslan wants to merge 4 commits into
mainfrom
at/DBU-557-expiry-valuation

Conversation

@0xaslan

@0xaslan 0xaslan commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Store an exact NavMark containing liability and computation timestamp on each expiry market.
  • Add an independent refresh_nav operation that performs the existing full exposure walk and replaces the stored mark.
  • Rewrite the hot-potato value_expiry step to read each expiry market immutably, preserve the existing per-market NAV floor, and reject marks older than three seconds or markets that reached expiry.

Why

  • Full-pool flushes currently walk every active market and perform settlement or cash maintenance in one transaction, coupling NAV availability to the pool-wide object budget.
  • Moving the exact liability walks into independent market transactions lets the flush retain its completeness proof while reading only compact market state.

Linear / Context

Key Decisions

  • Marks contain only exact liability and computed_at_ms. There is no estimate, uncertainty, oracle anchor, or drift model.
  • The flush preserves the existing free_cash minus liability per-market zero floor and total_nav aggregation.
  • Cash rebalance, settlement, and sweeping are standalone prerequisites before the flush snapshots the active set.
  • The three-second window knowingly accepts oracle movement and mint, redeem, or liquidation activity after refresh. It bounds mark age, not economic error magnitude.

Scope / Descoped

  • No activity revision or invalidation, write-through accounting, drift calculation, estimate, uncertainty, oracle anchors, raw pool-level netting, event changes, configuration, tests, keeper changes, or deployment work.

Test Plan

  • sui move build --path packages/predict --warnings-are-errors
  • Add behavior and adversarial interleaving tests after the source shape settles.

Risk / Rollout

  • Draft source foundation only. The accepted three-second stale-state window is intentionally unsafe and is not rollout-ready.

0xaslan and others added 4 commits July 15, 2026 09:56
The expiry market now only stores and reports its mark (NavMark, free
cash, liability, computed_at_ms); the flush consumer in plp owns the
staleness window, the missing-mark and expired-market aborts, and the
per-market zero floor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant