Documentation

Overview

Mosaic protocol, read API, and SDK entry points.

Mosaic is a USDC bounty protocol on GIWA Sepolia. Posters create funded bounties. Tiles submit bonded work. Whitelisted grouts dispute submitted work. Accepted tiles withdraw credited test USDC.

Roles

  • Poster: creates a bounty and funds the reward plus post fee.
  • Tile: submits work and locks the submission bond.
  • Grout: whitelisted account allowed to dispute a submission during review.
  • Public caller: finalizes eligible bounties, advances the review cursor, and cleans up closed disputes.
  • Credited account: withdraws its own credited USDC.

Active Deployment

Chain: GIWA Sepolia (91342). RPC: https://sepolia-rpc.giwa.io. Explorer: https://sepolia-explorer.giwa.io. Test USDC: 0x25ceeBa0a118DA5C346a5328D7cC5f26aa331d17 (6 decimals). Mosaic: 0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84, deployed at block 32668700.

Sections

Core Flow

  1. Poster approves USDC for reward plus post fee.
  2. Poster creates a bounty with metadata URI, metadata hash, reward amount, and allowed duration.
  3. Tile approves the submission bond and submits before the bounty deadline.
  4. Submission review starts at submission time.
  5. Whitelisted grout disputes during the submission review window.
  6. Mosaic review resolves pending disputes.
  7. Public caller finalizes the current review target after the bounty deadline and submission review deadline.
  8. Credited accounts call withdraw or withdrawTo.

SDK Entry Points

TypeScript exports unsigned wallet transactions via @usemosiac/ts-sdk (npm · GitHub). Python source version 0.2.0 exports GIWA transaction construction, signing and sending, event decoding, and metadata helpers.

import { canonicalJson, createMosaicSdk, metadataToDataUri } from "@usemosiac/ts-sdk";
import { keccak256, stringToBytes } from "viem";

const GIWA_SEPOLIA_CHAIN_ID = 91342;
const MOSAIC_ADDRESS = "0x7ebC4d9EfA037dFaAfBB80025A09B249eCFf4F84" as const;
const TEST_USDC_ADDRESS = "0x25ceeBa0a118DA5C346a5328D7cC5f26aa331d17" as const;

const sdk = createMosaicSdk({
  chainId: GIWA_SEPOLIA_CHAIN_ID,
  contractAddress: MOSAIC_ADDRESS,
  usdcAddress: TEST_USDC_ADDRESS,
});

const metadata = {
  version: 1,
  title: "Find a reproducible bug",
  brief: "Submit a minimal reproduction and a fix suggestion.",
};

const metadataHash = keccak256(stringToBytes(canonicalJson(metadata)));

const post = sdk.createBounty({
  metadataUri: metadataToDataUri(metadata),
  metadataHash,
  rewardAmount: 50_000_000n,
  duration: 86_400,
});

Python source version 0.2.0 defaults to the active GIWA Sepolia deployment. See the Python guide for configuration and transaction sending.

Next Pages

On this page