Skip to content

Centralize Predict config ownership#1060

Draft
0xaslan wants to merge 2 commits into
mainfrom
at/predict-config
Draft

Centralize Predict config ownership#1060
0xaslan wants to merge 2 commits into
mainfrom
at/predict-config

Conversation

@0xaslan

@0xaslan 0xaslan commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Centralizes Predict config authoring by moving feed templates and per-expiry mutable controls into ProtocolConfig.
  • Localizes frozen expiry terms into ExpiryMarket and StrikeExposure so hot paths read owned state instead of central snapshots.
  • Extracts StrikeGrid, removes duplicate grid storage in exposure indexes, and drops redundant registry expiry uniqueness state.

Key decisions

  • ProtocolConfig owns per-expiry bindings, mint pause, and oracle policy; Registry keeps Pyth source uniqueness, version sync, pause caps, and creation orchestration.
  • Frozen per-expiry values are stamped once at creation and copied into their owning objects instead of stored as central mutable-row snapshots.
  • StrikeExposure keeps order strike decoding and live index ownership; this PR avoids LiveExposure or StrikeRange extraction.

Test plan

  • npx -y prettier-move -c packages/predict/sources/registry.move packages/predict/sources/config/protocol_config.move --write
  • sui move build --path packages/predict
  • git diff --check
  • sui move test --path packages/predict --gas-limit 100000000000 (not run; source-only branch, tests still need API updates)

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