Conversation
A from-zero 900-tick ladder still spends the payout-tree budget below the traded region. Create now inverts the live 1–99% belly, pads it, and snapshots [min_tick, min_tick+899] so unique strikes stay inside the tree cap.
tonylee08
marked this pull request as draft
September 1, 2026 18:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_and_share_expiry_marketnow takes the live Pyth and Block Scholes feeds, inverts the 1%–99% UP belly, pads that interval by cadencebelly_pad, and freezes a 900-wide absolute tick window[min_tick, min_tick + 899].0andpos_inf_tickstay free. The grid does not move after create.belly_pad = 0means 1.0× (no extra room), not the old from-zero ladder. Cadencetick_sizeis a floor on derived granularity; admission stays the same multiple oftick_size.MarketCreatedcarriesmin_tick. Cadence config and its event carrybelly_pad. Keepers getregistry::next_deployable_expiryso they can seed the surface for the expiry create will actually open.Why
Each expiry market’s payout tree has a 1,000-node cap. Unique user-chosen strike ticks become tree nodes, so an unbounded finite-tick domain can exhaust NAV. #1191 capped finite ticks at
1..=900from zero, which does bound the tree, but those 900 slots are glued to$0. For a live underlier that spends the budget on strikes the market will never trade, or forces a coarsetick_sizethat skips the region people actually mint.This change keeps the 900-count budget and aims the window at the live smile. Create is no longer a no-spot snapshot of
tick_sizealone: it loads a pricer, derives the band, and freezes it. Later mints cannot grow the tree past that window.Linear / Context
Key decisions
from_surfaceentrypoint that leftbelly_pad = 0on the from-zero grid would leave the tree-cap hole on the default path. The extra create is deleted.belly_pad = 0is 1.0×, not “skip invert.” Zero maps toFLOAT_SCALINGat create. A near-step digital that inverts both 1% and 99% to the same strike is widened by onetick_sizebefore padding.1..=900check cannot express a slid window and still wastes slots below the belly.tick_sizeis a floor. Derived granularity can only get coarser, so admission (already a multiple oftick_size) does not change meaning.apply.Scope / Descoped
belly_pad,min_ticksnapshot and admission, public docs, harness/SDK/sim create wiring, Predict and Propbook test fixtures.Test plan
/tmp/sui-1.74.1/sui move build --path packages/predict --warnings-are-errors— package builds clean./tmp/sui-1.74.1/sui move test --path packages/predict --gas-limit 100000000000— 572/572, including create-window property tests, invert/pad unit tests, and the restored absence / overwide / non-monotone abort paths.Risk / Rollout
Create now fails closed if the live surface is missing or stale, so keepers must pass fresh feeds and should peek
next_deployable_expirybefore seeding. Existing harness/SDK create helpers take those feeds; a caller that still treats create as no-spot will not compile.A too-small
belly_padon a near-step smile can placemin_tickat the ATM tick and reject nearby in-the-money ticks (the 1.0× default). Operators who want room below the belly set a pad in[1.0×, 4.0×].The frozen window is per-expiry. A later spot jump does not slide it; deep-tail pricing still saturates, and the mint probability band still rejects untradeable tails. Pre-deploy: no live objects to migrate.