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
- Whitelisted grout calls
disputeduring the submission review window. - The submission status becomes
Disputed. - The dispute bond is pulled from the grout.
- Mosaic review resolves the dispute.
- If the submission is accepted, the challenge status becomes
Rejected, the submission returns toSubmitted, and the tile receives dispute bond credit. - If the dispute is upheld, the challenge status becomes
Upheld, the submission becomesRejected, 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
- Bounty status is
Open. nextReviewSubmissionIdpoints to aSubmittedsubmission.- Bounty deadline has passed.
- Submission review deadline has passed.
- Public caller calls
finalize. - Bounty status becomes
Resolved. - Submission status becomes
Accepted. - 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
| Clock | Set By | Contract Check |
|---|---|---|
| Bounty deadline | createBounty | submit rejects at or after this timestamp. |
| Review deadline | submit | dispute rejects after this timestamp. |
| Finalization | Both deadlines | finalize 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.
