Repository navigation
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingdifficulty: hardHard difficulty issuepriority: highHigh priority issue
Description
Description
resolve_dispute (contracts/trustflow/src/lib.rs, ~line 427) can be called by anyone, at any time, as soon as DisputeVoters(escrow_id) is non-empty — its only gate is voters.is_empty(). There is no minimum quorum and no voting-window deadline. This means a single juror (including one colluding with whoever raised or is defending the dispute) can vote, and the caller can immediately call resolve_dispute before any other honest juror gets a chance to vote — the "tally" at that point is just that one vote, which trivially wins and settles the escrow.
This defeats the entire purpose of a juror pool: the honesty guarantee assumes disputes are decided by a meaningful sample of jurors, not whoever votes and resolves fastest.
Component
Contract
Difficulty
🔴 Hard
Tasks
- Add a
dispute_deadline(ledger sequence or timestamp) toDisputeRecord, set whenraise_disputeis called - Add a minimum-quorum requirement (configurable, e.g. via an admin-set
DataKey) thatresolve_disputemust check alongside the deadline - Reject
resolve_disputecalls before the deadline has passed or before quorum is met, whichever the design settles on (decide: quorum-OR-deadline vs. quorum-AND-deadline) - Handle the case where the deadline passes with fewer than quorum votes cast (e.g. default ruling, or require a higher juror participation incentive)
- Add contract tests covering: resolve attempted with 1 vote before deadline (should fail), resolve after deadline with sub-quorum votes, resolve after quorum reached before deadline
Acceptance Criteria
-
resolve_disputereverts if called before the voting window closes and quorum has not been met - Existing dispute-round test helpers (
dispute_roundin the test module) updated to advance the ledger/timestamp past the deadline where needed - New tests demonstrate the single-vote early-resolution scenario described above is no longer exploitable
- No regression in existing slashing/tie-break test suite
Estimated Time
3-4 days
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26bugSomething isn't workingdifficulty: hardHard difficulty issuepriority: highHigh priority issue
Activity
ranjeet150 commentedon Sep 13, 2026
Hi maintainers,
I would like to resolve this issue. Here is my proposed execution plan:
Add dispute voting window and quorum requirement to resolve_disputewith explicitrequire_authchecks, clean storage layouts, and robust Soroban contract logic.Happy to pick this up today—please assign to me!
guptakumarranjeet150 commentedon Oct 3, 2026
Hi,
I have experience with similar implementations and would like to take this on.
Proposed steps:
Let me know if this aligns with the repository guidelines and assign when convenient.
shobhamerabacha-star commentedon Oct 3, 2026
Hi,
I have experience with similar implementations and would like to take this on.
Technical outline:
Please assign this to me if the plan looks good. Thanks!