@sdk.markets/sdk is currently a preview package. These docs show the SDK surface we're building toward.Join the waitlist
markets sdk

Disputes

The challenge window and the void path.

The dispute window is a fixed period — between 1 and 72 hours, chosen at market creation — during which participants can flag a resolution they disagree with. The mechanism is intentionally minimal: one binary vote per participant, strict majority voids the market.

Who can dispute

Anyone who has ever staked in this market can submit exactly one dispute vote, once per market, during the window.

await client.markets.submitDispute({ marketAddress });

Requires:

  • Status is ResolvedPendingFinality.
  • Challenge window is still open (await client.markets.isChallengeWindowActive(marketAddress)).
  • Caller has a non‑zero total stake.
  • Caller hasn't disputed yet.

Check the eligibility flags before prompting a user:

const position = await client.markets.getUserPosition({
  marketAddress,
  user: userAddress,
});
const active = await client.markets.isChallengeWindowActive(marketAddress);

const canDispute =
  active && position.isEligibleParticipant && !position.hasDisputed;

The majority rule

On every dispute call the contract checks:

if (2 * disputeVoteCount > eligibleParticipantCount) → market voids immediately

Note the strict inequality — exactly 50% is not enough. A market with 10 eligible participants voids at 6 disputes, not 5.

When the market voids it transitions to Voided in the same transaction that tips the count. Emitted events:

event DisputeSubmitted(address user, uint256 disputeVoteCount, uint256 eligibleParticipantCount);
event MarketVoided(uint256 timestamp);  // emitted only on the vote that trips the threshold

What voiding does

Nothing, immediately. The contract flips status to Voided and waits. Each participant calls refund() at their leisure:

await client.markets.refund({ marketAddress });
  • Requires status Voided.
  • Returns the caller's full stake in USDC.
  • One refund per address — the contract guards against re‑entry.

No fees are taken on voided markets. The creator and platform fee recipients receive zero.

What happens if no one disputes

After the challenge deadline elapses, anyone can call client.markets.finalize({ marketAddress }) and the market settles normally. See settlement.

UX considerations

  • Show a clear countdown — participants need to know how long they have.
  • Expose the evidence URL prominently; dispute rates track with evidence legibility.
  • Surface disputeVoteCount and eligibleParticipantCount so participants can see momentum.
  • Warn before dispute submission that it's a single, irrevocable vote.

Non‑features

The dispute system is deliberately shallow:

  • No dispute resolution step. Voided markets don't re‑resolve; they just refund.
  • No un‑dispute. A dispute vote cannot be retracted.
  • No stake weighting. One participant, one vote, regardless of stake size. Whales and dust wallets count equally.

If you need richer arbitration, layer it off‑chain and use the on‑chain dispute mechanism as a final escalation.

On this page