Skip to content

fix(tholos-v2): bound max_total_weight / max_position ratio to raise Sybil cost (#168) - #174

Closed
ZacLou wants to merge 3 commits into
drydocs:mainfrom
ZacLou:fix/sybil-ratio-bound-168
Closed

fix(tholos-v2): bound max_total_weight / max_position ratio to raise Sybil cost (#168)#174
ZacLou wants to merge 3 commits into
drydocs:mainfrom
ZacLou:fix/sybil-ratio-bound-168

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Closes #168

Enforces a maximum ratio of max_total_weight to max_position (MAX_TOTAL_WEIGHT_TO_POSITION_RATIO = 10) in initialize, raising the cost of Sybil-style address splitting without requiring an external identity system.

  • Adds Error::InvalidWeightRatio.
  • Adds tests for acceptance at the bound and rejection above it.
  • Updates docs/src/CONTRACT_V2.md with the new invariant and the residual plutocratic risk note.

cargo test --workspace passes.

…n open_reveal_phase

Closes drydocs#156

When open_reveal_phase auto-reveals the asserter and disputer fixed
positions, publish a Revealed event for each so off-chain indexers can
observe the revealed choice without requiring an explicit reveal() call.

Adds a test assertion that exactly three Revealed events are emitted:
asserter, disputer, and the external voter that called reveal().
)

Closes drydocs#165

Adds a conflict-of-interest check in 
esolve: a resolver who is also
the asserter or disputer of the assertion cannot vote. A new
Error::SelfVote variant is returned.

Adds tests covering both the asserter-as-resolver and disputer-as-resolver
cases.
…Sybil cost (drydocs#168)

Closes drydocs#168

- Enforce max_total_weight <= MAX_TOTAL_WEIGHT_TO_POSITION_RATIO * max_position (ratio = 10) in initialize.
- Add Error::InvalidWeightRatio and document it in CONTRACT_V2.md.
- Add tests for the bound and adjust the existing max-position test so its policy satisfies the new ratio.

cargo test --workspace passes after rebuilding the tholos WASM for contract imports.
@collinsezedike

Copy link
Copy Markdown
Collaborator

@ZacLou Closing. #168 has no assignee. Comment on the issue and wait to be assigned before opening a PR.

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.

[Bug] register() has no Sybil resistance in tholos-v2

3 participants