Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Recipe — Mutual dispute resolution · Boson Protocol
Skip to content

Recipe: Mutual dispute resolution

When a buyer raises a dispute, the simplest happy-path is mutual resolution: one party signs an EIP-712 payload agreeing on buyerPercentBasisPoints (0–10000) and the counterparty submits the on-chain call with that signature.

const buyerPercentBasisPoints = 7000  // 70% to buyer
 
// 1. Counterparty signs the proposal (here the buyer signs; either side can)
const sig = await buyerSdk.signDisputeResolutionProposal({
  exchangeId,
  buyerPercentBasisPoints,
})
// sig is { r, s, v }
 
// 2. The other party (seller in this example) submits with the signature
await (await sellerSdk.resolveDispute({
  exchangeId,
  buyerPercentBasisPoints,
  sigR: sig.r,
  sigS: sig.s,
  sigV: sig.v,
})).wait()

Only one counterparty signature is required — the submitter is recovered from the calling wallet.

When negotiation fails

If the parties can't agree, the buyer can escalate to the dispute resolver — see Buyers → Raise a dispute and Build → Dispute Resolvers.

Common gotchas

  • The signed buyerPercentBasisPoints must match the value the submitter passes. Mismatch reverts.
  • The signature must come from the actual buyer or seller wallet (or a contract via EIP-1271). The Diamond verifies the recovered address against the on-chain entity.
  • The dispute must be in RESOLVING state when the tx submits. If escalation happened in the meantime, the resolution fails.

Related