Skip to content
TaskFlow

Where the reward lives, and who gets to release it

The rules the bounty contract enforces, in plain words.

Escrow: the reward is locked before anyone starts

Posting moves the reward into escrow, a smart contract that pays an approved contributor or refunds you if you cancel.

  • Anyone can check the locked amount first.
  • The poster can't spend it elsewhere.
  • Cancel only while nothing awaits a decision.
Poster's walletBounty escrowApproved contributorLockReleaseRefund if cancelled

Two ways to decide

Each bounty says who decides before anyone starts.

Poster review

The poster approves, which pays out, or rejects with a reason.

For everyday tasks: bugs, docs, designs.

Validator vote

A named council votes; the quorum (e.g. 2 of 3) triggers the payout.

For audits, prizes and grants.

ApproveApproveNot votedQuorum 2 of 3Payout runs

Rejections and refunds

  • Every rejection has a reason

    Contributors see the note and can resubmit.

  • One winner, and the others are told

    The others are marked "not selected".

  • Refunds are public

    Cancelling refunds the poster, in the bounty's history.

Visibility by role

Everyone can read every bounty; posters restrict who can submit.

  • Open to everyone
  • Monark members
  • Ambassadors only

Reputation you earn, not buy

Earned only from approved work. It can't be bought or transferred.

DifficultyPoints per approved bounty
Beginner+10
Intermediate+25
Advanced+50
Expert+100

For developers and students

The demo's data layer mirrors this contract, so it can switch to wagmi/viem calls.

Show the contract interface
Contract interface (simplified)
// TaskFlow bounty escrow (simplified)
function post(token, reward, deadline, visibility, review) returns (bountyId);
function submit(bountyId, workUri) returns (submissionId);   // before deadline, role-gated

// Poster review
function approve(bountyId, submissionId);                   // pays the winner in the same call
function reject(bountyId, submissionId, string reason);     // reason is required

// Validator review
function vote(bountyId, submissionId, bool approve, string reason);
// when approvals >= quorum: pays the winner in the same call

function cancel(bountyId);   // only with no submission awaiting a decision; refunds the poster

event Posted(bountyId, poster, reward);
event Submitted(bountyId, submissionId, contributor);
event Voted(bountyId, submissionId, validator, approve);
event Paid(bountyId, contributor, amount);
event Cancelled(bountyId, refund);
  • src/lib/demo/types.tsBounties, submissions, votes, review modes
  • src/lib/demo/ops.tsPost, submit, approve, reject, vote, cancel
  • src/lib/demo/chain.tsWallet prompt, pending, confirmed or failed
  • src/lib/demo/select.tsReputation, leaderboard, who can submit
  • Left as exercises: validator rotation, disputes, multiple winners.
  • Worth studying: reentrancy on release, cancel rights, unreachable quorums.

See it with your own clicks

Open the bounty board