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
Acceptance Criteria
Estimated Time
3-4 days
Description
resolve_dispute(contracts/trustflow/src/lib.rs, ~line 427) can be called by anyone, at any time, as soon asDisputeVoters(escrow_id)is non-empty — its only gate isvoters.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 callresolve_disputebefore 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
dispute_deadline(ledger sequence or timestamp) toDisputeRecord, set whenraise_disputeis calledDataKey) thatresolve_disputemust check alongside the deadlineresolve_disputecalls before the deadline has passed or before quorum is met, whichever the design settles on (decide: quorum-OR-deadline vs. quorum-AND-deadline)Acceptance Criteria
resolve_disputereverts if called before the voting window closes and quorum has not been metdispute_roundin the test module) updated to advance the ledger/timestamp past the deadline where neededEstimated Time
3-4 days