Skip to content

fix(tholos): prevent resolver from voting on their own case (#165) - #198

Closed
ZacLou wants to merge 9 commits into
drydocs:mainfrom
ZacLou:fix/tholos-resolve-self-vote-165
Closed

fix(tholos): prevent resolver from voting on their own case (#165)#198
ZacLou wants to merge 9 commits into
drydocs:mainfrom
ZacLou:fix/tholos-resolve-self-vote-165

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Closes #165

Problem

resolve checked that the caller was a resolver and had not already voted, but never checked whether the resolver was also the assertion’s asserter or disputer. A party to the dispute could vote in their own favor, including the degenerate case of a size-1 committee where a single address acting as both disputer and sole resolver could guarantee their own win.

Fix

  • Adds Error::ConflictOfInterest = 24
  • Rejects resolve when resolver == assertion.asserter or resolver == assertion.disputer

The check runs after resolver-membership validation but before the vote is recorded, so a self-interested resolver gets a clear error rather than a silent rejection.

Verification

  • No dangerous patterns introduced (manual security scan)

)

resolve() now rejects calls where the resolver is the asserter or the
disputer of the assertion they are trying to resolve. Both parties have a
direct economic interest in the outcome, so their vote cannot be considered
neutral.

- Adds Error::ConflictOfInterest = 24
- Checks resolver against assertion.asserter and assertion.disputer before
  recording the vote

Closes drydocs#165
@ZacLou

ZacLou commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Fixed the SDK drift: the contract now returns Error::ConflictOfInterest = 24, but packages/tholos-sdk/src/index.ts only went up to 23. Added the generated error entry (24 → ConflictOfInterest) so the SDK matches the contract interface again. Local cargo check, pnpm install && pnpm build in packages/tholos-sdk, and quality gate all pass.

@ZacLou
ZacLou force-pushed the fix/tholos-resolve-self-vote-165 branch from b70cb0f to 331f348 Compare September 6, 2026 06:30
@ZacLou
ZacLou force-pushed the fix/tholos-resolve-self-vote-165 branch from 331f348 to 76ad8d1 Compare September 6, 2026 06:34
@collinsezedike

Copy link
Copy Markdown
Collaborator

@ZacLou Closing. Duplicate of #196, and #165 still has no assignee regardless.

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] resolve doesn't prevent a resolver from voting on their own case

2 participants