Skip to content

docs: V2 bond sizing and window analysis - #121

Open
Kayce10 wants to merge 5 commits into
drydocs:mainfrom
Kayce10:docs/v2-bond-sizing
Open

docs: V2 bond sizing and window analysis#121
Kayce10 wants to merge 5 commits into
drydocs:mainfrom
Kayce10:docs/v2-bond-sizing

Conversation

@Kayce10

@Kayce10 Kayce10 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds docs/src/V2_BOND_SIZING.md, the economic simulation document requested in issue #75. This is a research/design document — no contract code is changed.

The document models the three quantitative questions the issue scoped:

1. Default-frequency model

Derives the minimum reveal-turnout required for the against-side to reach a strict majority as a function of the honesty share among revealers. Shows the issue-body example (49% revealed against, 50% non-reveal → assertion stands) in formula form and generalises it to a table. Identifies that a lone disputer at W = 2B can never cross the threshold and concludes that N_voters ≥ 3 realistically achievable third-party registrants is the practical floor for a correctable deployment.

2. Whale-capture model

Derives the minimum capital required for a single address or coalition to reach strict majority as a function of base_bond, max_position, and expected honest counter-stake. Provides a concentration-threshold table and shows that max_position = 2 × base_bond is the tightest single-parameter whale control. Discusses the self-hedging cost-illusion (a coalition's net exposure is its registration deposit, not the asserter bond it can recover).

3. Window-length tradeoffs

Frames registration_duration_secs, reveal_duration_secs, anti_snipe_extension_secs, and anti_snipe_hard_max_secs as a joint optimization over participation latency (τ_react), coordination time (τ_coord), and attacker capital-movement speed (τ_atk). Provides a sanity-check inequality set and a summary table.

4. Recommended profiles

Three-tier table (private beta / public testnet / higher-value mainnet candidate) matching the style of BOND_SIZING.md, with numeric ranges for all five window parameters plus max_position and max_total_weight, followed by narrative guidance and scenario checks.

Files changed

  • docs/src/V2_BOND_SIZING.md — new file (581 lines)
  • docs/src/SUMMARY.md — adds the new doc to the book outline under Deployment & Operations: Protocol v2

Testing

Research/documentation change only — no contract code, no WASM, no tests affected.

Closes #75

Models three v2-specific deployment decisions that were previously
reasoned about only qualitatively in V2_RESOLUTION.md:

- Default-frequency model: derives the minimum reveal turnout required
  for a strict-majority correction as a function of the honesty share of
  revealers, and shows that a lone disputer (W = 2B) can never by itself
  cross the strict-majority threshold.

- Whale-capture model: computes the minimum capital required for a single
  address or coalition to reach strict majority as a function of base_bond,
  max_position, and expected honest counter-stake. Shows that
  max_position = 2 × base_bond prevents single-address capture with no
  counter-stake.

- Window-length tradeoff model: frames registration and reveal durations,
  anti-snipe extension, and hard cap as a joint optimization over
  participation latency, coordination time, and capture speed. Provides
  sanity-check inequalities (T_rev ≥ 2τ_coord, T_reg ≥ τ_react, etc.).

- Recommended profiles: private beta / public testnet / higher-value
  mainnet candidate, following the same three-tier structure as
  BOND_SIZING.md, with a numeric profile table and narrative per tier.

- Scenario checks and monitoring guidance following the BOND_SIZING.md
  style.

Closes drydocs#75
Comment thread docs/src/V2_BOND_SIZING.md Outdated
Comment thread docs/src/V2_BOND_SIZING.md Outdated
Comment thread docs/src/V2_BOND_SIZING.md Outdated
- Replace all em/en dashes with plain punctuation throughout
- Fix 'three/four/eight times' phrasing in Part 2 to match Part 4's
  capture_cost_multiplier ~= 2; whale needs just over 2B, not 3B
- Reconcile threshold formula in Part 5: use side_weight > W - side_weight
  (the contract's actual check) and floor(W/2)+1 for integer W consistently,
  replacing the inconsistent W/2+1 vs W/2+0.5 in the worked example
- Move SUMMARY.md entry under Protocol v2 Resolution Proposal
@Kayce10

Kayce10 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

All three requested changes have been addressed in commits 0e76300 and 636d4df:

  1. Em/en dashes removed — all 21 em dashes and 16 en dashes replaced with plain
    punctuation (colons, semicolons, parentheses, or rephrased sentences) throughout
    V2_BOND_SIZING.md.
  2. capture-cost phrasing fixed — the "three times / four times / eight
    times" prose now reads "just over twice / just over three times / just over seven
    times" to match Part 4's capture_cost_multiplier ~= 2 and avoid understating how
    cheap capture is at R_w > 2B.
  3. threshold reconciled — the scenario check now uses the contract's actual
    comparison (side_weight > W - side_weight, equivalently 2 x side_weight > W) and
    states floor(W/2) + 1 for integer W consistently. The N_voters = 1 worked example
    is updated to match.

CI is fully green on 636d4df (test, sdk, demo, build all passing). Ready for
re-review.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three previous findings are genuinely fixed, not just cosmetically, the em/en dashes are gone, Part 2 and Part 4 now agree on the zero-counter-stake case, and the W/2 threshold section correctly explains the floor(W/2)+1 parity handling with a matching worked example. Two new things surfaced this round.

Comment thread docs/src/V2_BOND_SIZING.md Outdated
Comment thread docs/src/V2_BOND_SIZING.md
- Self-hedging section: remove false claim that the asserter bond is
  recovered when the honest side wins. settle() for StrictMajorityAgainst
  pays only positions with agrees_with_outcome == Some(false); the
  asserter's Fixed(true) position has Some(true) and is forfeited along
  with R_w. Real net exposure on loss is B + R_w, not R_w alone. Rewrite
  the section to reflect the correct settlement mechanic and state capture
  cost as B + R_w throughout.

- N_voters rule of thumb: add a clarifying paragraph making explicit that
  N_voters >= 3 is a floor for a healthy electorate, not a sufficient
  condition for correction. The symmetric-split model shows against-side
  weight equals exactly W / 2 for any N_voters; correction requires an
  honest-side imbalance in revealed weight, not just a minimum headcount.
@Kayce10

Kayce10 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Both findings from this round are addressed in bae9ce2.

  1. Self-hedging section: removed the incorrect claim that the asserter bond is
    recovered when the honest side wins. settle() for StrictMajorityAgainst pays only
    positions where agrees_with_outcome == Some(false); the asserter's Fixed(true)
    position has Some(true) and is forfeited along with R_w. The section now states the
    real net exposure on loss as B + R_w and uses that as the capture cost throughout.
  2. N_voters rule of thumb: added a clarifying paragraph making explicit that
    N_voters >= 3 is a floor for a healthy electorate, not a sufficient condition for
    correction. The symmetric-split model shows the against-side weight lands at
    exactly W / 2 regardless of headcount; what determines correction is an honest-side
    imbalance in revealed weight, not just how many participants registered.

Ready for re-review.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both findings from the last round are genuinely fixed, the self-hedging exposure and the N_voters clarification both check out against the actual settle() mechanic. One new thing this round.

Comment thread docs/src/V2_BOND_SIZING.md Outdated
where half the third parties side with each party.
3. Against-side weight: `base_bond x (1 + N_voters / 2)`.
4. Required threshold: strictly more than `W / 2`. The contract uses the
comparison `side_weight > W - side_weight` (equivalently `2 x side_weight > W`),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says the subtraction form avoids doubling overflow, but that's not why the code uses it. lib.rs:1376-1378's own comment says it's because integer division rounds down and would wrongly pass a boundary case on an odd W, not overflow, doubling side_weight can't overflow anyway since it's bounded well below i128::MAX. Please fix the stated rationale to match.

The subtraction form (side_weight > W - side_weight) is used because
integer division rounds down and would wrongly pass a side sitting
exactly at the boundary on an odd W, not to avoid overflow. Doubling
side_weight cannot overflow since it is bounded well below i128::MAX.

Fixes the rationale to match lib.rs:1376-1378's own comment.
@Kayce10

Kayce10 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 9b96191. The rationale now matches lib.rs:1376-1378: the subtraction form
is used because integer division rounds down and would wrongly pass a boundary case
on an odd W, not to avoid overflow. The overflow claim is removed.

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.

[Feature] V2: economic simulation for registration/reveal windows, minimum bond, and whale-capture risk

2 participants