Skip to content

feat: dispute-resolution v2 - #31

Merged
meshackyaro merged 2 commits into
workman-labs:developmentfrom
Rampop01:dispute-resolution-v2
Jul 23, 2026
Merged

feat: dispute-resolution v2#31
meshackyaro merged 2 commits into
workman-labs:developmentfrom
Rampop01:dispute-resolution-v2

Conversation

@Rampop01

Copy link
Copy Markdown
Contributor

Description

This PR implements Dispute Resolution v2 (Issue #29).
It introduces Sybil resistance through reputation-weighted jury selection, and an honest-minority-slashing softening mechanism for "close calls".

Changes

  • Configuration Updates: Config now requires reputation_contract, base_vote_weight, and close_call_margin_bps.
  • Weighted Voting: Integrated a cross-contract call to the reputation contract to dynamically fetch juror reputation scores at commit-time, calculating and recording vote weights (max(base_vote_weight, reputation_score)).
  • Vote Resolution by Weight: Updated the resolution logic to sum yes_weight and no_weight instead of just the raw vote count, making the jury selection more Sybil-resistant as reputation scores matter.
  • Close Call Handling: When the margin between the winning and losing sides is less than or equal to close_call_margin_bps (e.g., a tight 5% vote margin), minority jurors are fully refunded their stake instead of being slashed. This encourages honest participation on hard disputes where the outcome isn't totally clear.
  • Proportional Rewards: The slashed pot is now distributed to the winning jurors proportionally based on their individual weight, rather than an even split.
  • Testing: Added new unit tests reflecting the updated weighted configuration, and explicitly testing the close_call_refunds_minority edge cases to ensure refunds are processed accurately without slashing in tight outcomes.

Closes #29

@meshackyaro meshackyaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well done @Rampop01! Thank you for contributing to Guildworkman

@meshackyaro
meshackyaro merged commit 7c29725 into workman-labs:development Jul 23, 2026
1 check passed
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.

dispute-resolution v2: sybil-resistant/weighted jury selection & honest-minority-slashing softening

2 participants