Documentation

Lifecycle

Bounty creation, submission review, dispute resolution, finalization, refund, and withdrawal paths.

Mosaic processes each bounty through a submission queue. nextReviewSubmissionId points to the current review target. Finalization only checks that current target.

Bounty Creation

Build Metadata

Prepare a metadata URI and a non-zero 32-byte metadata hash. The contract stores both values and does not parse the payload.

Approve Funding

The poster approves USDC for reward plus post fee. Example: a 50_000_000 reward with default fee BPS requires 50_125_000 USDC base units.

Create Bounty

createBounty pulls reward plus post fee, stores bounty terms, and sets the bounty deadline.

Submission Review

Approve Bond

The tile approves USDC for the bounty submission bond.

Submit Work

submit pulls the submission bond, stores submission metadata, appends the submission to the bounty queue, and sets reviewDeadline.

Review Window

The submission is disputable until reviewDeadline. A submission is finalizable only after both bounty.deadline and submission.reviewDeadline have passed.

Dispute Path

  1. Whitelisted grout calls dispute during the submission review window.
  2. The submission status becomes Disputed.
  3. The dispute bond is pulled from the grout.
  4. Mosaic review resolves the dispute.
  5. If the submission is accepted, the challenge status becomes Rejected, the submission returns to Submitted, and the tile receives dispute bond credit.
  6. If the dispute is upheld, the challenge status becomes Upheld, the submission becomes Rejected, and the grout receives submission bond plus dispute bond credit.

An upheld dispute against the current review target advances the review cursor to the next queued submission. advanceReviewCursor skips a rejected or refunded current target.

Finalization Path

  1. Bounty status is Open.
  2. nextReviewSubmissionId points to a Submitted submission.
  3. Bounty deadline has passed.
  4. Submission review deadline has passed.
  5. Public caller calls finalize.
  6. Bounty status becomes Resolved.
  7. Submission status becomes Accepted.
  8. Tile receives reward plus submission bond credit.

Refund Paths

Poster refund. refundExpired requires the poster, an open bounty, an empty review cursor, and time after the bounty deadline. The poster receives reward credit.

Submission bond refund. refundSubmissionBond requires the claimant and a bounty that is Resolved or Refunded. The submission must not be Accepted, Rejected, or Refunded.

Pending dispute cleanup. cancelResolvedDispute requires a pending dispute whose bounty is Resolved or Refunded. The grout receives dispute bond credit. The tile receives submission bond credit.

Timing

ClockSet ByContract Check
Bounty deadlinecreateBountysubmit rejects at or after this timestamp.
Review deadlinesubmitdispute rejects after this timestamp.
FinalizationBoth deadlinesfinalize rejects before or exactly at either timestamp.

Use contract timestamps for settlement. UI timers are display data.

Withdrawal

Settlement credits do not transfer USDC to wallets. withdraw and withdrawTo transfer credited USDC.

On this page