Skip to content

feat: add MAD Bounty action provider - #1700

Open
GGBossman wants to merge 1 commit into
coinbase:mainfrom
GGBossman:add-mad-bounty-action-provider
Open

GGBossman wants to merge 1 commit into
coinbase:mainfrom
GGBossman:add-mad-bounty-action-provider

Conversation

@GGBossman

@GGBossman GGBossman commented Dec 1, 2026 •

Copy link
Copy Markdown

Summary

Adds madBountyActionProvider, an EVM action provider for MAD Bounty: a dual-deposit USDC bounty escrow on Base. It lets an agent post tasks for humans or other agents, take on tasks as a worker, and settle work as a verifier, all with plain contract calls through EvmWalletProvider (no new dependencies, no API keys).

How the protocol works:

  • A poster escrows a USDC reward (1 to 1,000 USDC) and names a verifier.
  • A worker claims by locking a deposit (at least max(1 USDC, 2% of reward)), then submits evidence.
  • Verifier accepts → worker is paid the reward minus a 5% fee and gets the deposit back. Verifier rejects → reward and deposit are burned after a 24h cooling period. Verifier silent past the review window → worker is paid.
  • Contracts are immutable (no owner, proxy or pause). Task specs and worker evidence are published on-chain as trailing calldata (MADBSPEC1 / MADBEVID1 marker + UTF-8 JSON/text), and their keccak256 hashes are stored on-chain so readers can verify them.

Supported networks: base-mainnet, base-sepolia (supportsNetwork returns false for everything else).

Actions

Action Role Tx Description
get_bounty anyone read State, reward, deposit, locked fee, poster/verifier/worker, windows, deadlines
list_open_bounties anyone read Claimable bounties newest first, with the title from the verified on-chain spec
post_bounty poster approve (if needed) + post Escrows the reward; spec appended to calldata; returns the bounty id from the Posted event. Verifier address is required (never guessed); verifier adapter contracts that need per-bounty config are refused
claim_bounty worker approve (if needed) + claim Locks the deposit on an open, ungated bounty
submit_work worker submit evidenceHash = keccak256(evidence), evidence text appended to calldata
settle_bounty verifier settle Accept or reject; description warns that reject burns reward and deposit
cancel_bounty poster cancel Cancel an unclaimed bounty, full reward back

Every write action pre-checks state, role, deadlines, amounts and USDC balance, and returns a descriptive error instead of sending a transaction that would revert. Action descriptions carry explicit safety notes for the LLM: bugs are permanent, verifier silence pays the worker, a reject burns reward and deposit, specs and evidence are public forever.

Files

  • typescript/agentkit/src/action-providers/madBounty/ (madBountyActionProvider.ts, schemas.ts, constants.ts with minimal ABI fragments and deployments, utils.ts, index.ts, README.md, madBountyActionProvider.test.ts)
  • typescript/agentkit/src/action-providers/index.ts (export)
  • typescript/agentkit/README.md (actions table)
  • typescript/.changeset/mad-bounty-action-provider.md (minor)

Scaffolded with pnpm run generate:action-provider -n madBounty -p evm -t base-mainnet,base-sepolia -w EvmWalletProvider.

Testing

  • pnpm test -- madBounty: 61 tests pass, covering every action (happy path, every validation error, reverted receipts, send failures), schema validation, calldata encoding (decoded post / claim / submit / settle / cancel args, spec and evidence round-trip after the markers with hash match), Posted event id extraction, and eth_getLogs chunking (≤ 10,000 blocks down to the deploy block). Coverage on the provider folder: 100% lines, 85% branches.
  • Full pnpm test in typescript/agentkit: 64 suites, 984 tests pass.
  • pnpm lint: clean. prettier --check on all changed files: clean. tsc --noEmit: clean.
  • Live read-only check against Base mainnet (https://base-rpc.publicnode.com) through the built provider with a viem public client:

Disclosure

The author of this PR maintains MAD Bounty. The protocol charges a 5% fee on accepted bounties, paid to the MAD Bounty treasury.

Adds madBountyActionProvider with get_bounty, list_open_bounties, post_bounty, claim_bounty, submit_work, settle_bounty and cancel_bounty for the MAD Bounty USDC escrow on base-mainnet and base-sepolia.
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Dec 1, 2026
@GGBossman GGBossman changed the title feat(agentkit): add MAD Bounty action provider feat: add MAD Bounty action provider Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants