Technical one-pager · GASOK 2026 · Track 04 AI / Web3

How Mergit verifies work
and releases money.

Architecture, contract design, trust model and delivery plan for a bounty protocol where an AI agent — not a committee — decides that a developer has been paid.

● escrow live on GIWA Sepolia chain 91342 solc 0.8.24 tests 14 passing team 1

01The problem, stated precisely

Retroactive funding works. Verifying it doesn't scale.

Optimism's Retro Funding allocated over 100M OP to builders and proved the thesis: paying for impact after it happens beats paying for promises. But every round runs on human badgeholders reading submissions. Gitcoin distributes tens of millions and still fights sybils with identity heuristics. Both are slow because the same step is manual — someone has to decide whether the work is real.

That step is not actually subjective for most developer work. A merged pull request, a green CI run, a verified contract whose bytecode matches the merged commit — these are checkable facts. They were left to humans because reading a diff and judging whether it satisfies a spec required a human. That constraint no longer holds.

The cost of leaving it manual is concrete for a young chain: a developer who ships today gets paid next quarter, if ever. Ecosystems compete for builders, and payment latency is a recruiting metric.

02System architecture

Four components. Only one of them holds money, and it is the simplest one on purpose.

SOURCES OF TRUTH GitHub App PRs · commits · CI runs GIWA RPC + explorer VERIFICATION AGENT 1 · collect signals 2 · check the diff 3 · score confidence 4 · sign the verdict deterministic checks first; the LLM only judges the diff MERGITESCROW · ON-CHAIN holds the funds enforces who may release logs the evidence hash CLIENTS bounty board (web) funder & developer views FUNDERS protocols · DAOs ecosystem funds read settle() postBounty() + ETH read state
Money only ever moves inside MergitEscrow. The agent has no custody — it holds one permission: naming the recipient of an already-locked bounty.

Why the split matters

The agent is the complicated, fallible, upgradeable part. The contract is the simple, immutable part. Keeping intelligence off-chain and custody on-chain means a bug in the agent can misjudge a bounty, and at worst misdirect that one bounty's payout, but cannot drain the escrow, touch other bounties, or alter an amount. That boundary is the whole security argument.

03The verification pipeline

Verification runs as a funnel: cheap deterministic checks reject most work before any model is invoked, and model judgement is confined to the one question that genuinely needs it.

StageCheckNature
Provenance PR exists, targets the bounty's repo, author owns the claiming wallet Deterministic — GitHub API + signed wallet linkage
Integrity Merged to the default branch by a maintainer, not self-merged; commit is an ancestor of HEAD Deterministic — rejects the most common gaming vector
Execution CI green on the merge commit; test count and coverage did not regress Deterministic — CI provider API
Deployment Where the bounty requires it: contract verified on GIWA and bytecode matches the merged commit Deterministic — explorer + local recompile
Substance Does the diff actually satisfy the bounty spec, or does it merely touch the right files? Model judgement — the only step requiring an LLM
Sybil signals Recycled code, contribution history, timing patterns across the funder's bounties Heuristics + model, scored not gated

Each stage emits a signal; the aggregate produces a confidence score. Only a run that clears every deterministic gate and exceeds the confidence threshold reaches settle(). Everything below the threshold is escalated to the funder rather than auto-rejected — a false negative costs a review, a false positive costs money, so the asymmetry is deliberate.

What gets recorded

The agent hashes the full evidence bundle and passes it to the contract, so any payout can be audited after the fact against what the agent claimed to have seen.

// evidence preimage — stored off-chain, hash recorded on-chain
repo:odiseo159-beep/celo-sentinel|task:giwa-escrow-demo|verifier:mergit-agent-v0

// emitted by MergitEscrow.settle()
BountySettled(bountyId, developer, verifier, paidToDeveloper, protocolFee, evidenceHash)

04Contract design

MergitEscrow is deployed and source-verified on GIWA Sepolia at 0xffcf20…5879. It is intentionally small: a bounty is a five-field struct and there are three state transitions.

         postBounty()              settle()
   ∅ ──────────────────▶ Open ─────────────────▶ Settled
        (locks ETH)        │      only verifier,
                           │      before deadline
                           │ refund()
                           └─────────────────▶ Refunded
                                  only funder,
                                  after deadline

Invariants the code enforces

14 tests cover the permission matrix, double-settlement, deadline boundaries, fee arithmetic, isolation between concurrent bounties, and the invariant that the contract retains no dust after settlement.

Already exercised on-chain

A complete lifecycle has run on GIWA Sepolia — 0.0005 ETH locked, then released to a developer address by the verifier, 1.5% fee taken, evidence hash recorded. See the settlement transaction.

05Trust model — and how it shrinks

The honest position: today the verifier is trusted to judge correctly.

It is not trusted with custody, amounts, or timing — the contract removes those. But a funder posting a bounty is trusting that the agent will not name the wrong developer. Claiming otherwise would be dishonest, so here is the actual reduction path.

PhaseMechanismWhat the verifier can still do wrong
Now Bounded permissions + public evidence hash Name the wrong recipient; detectable after the fact, not preventable
Phase 2 Optimistic challenge window — settlement queues for N hours; the funder can veto before funds move Nothing silently: any bad verdict is vetoable by the party who put up the money
Phase 3 Multi-agent quorum — k-of-n independent verifiers with distinct prompts must agree Requires collusion across independently operated agents
Beyond Verifier bonds slashable on a successful challenge; attestation of the agent's execution Misjudgement becomes economically irrational

Known limitation of the current testnet demo

In the lifecycle executed so far, the funder, verifier and fee recipient are the same address — a single operator demonstrating the mechanism end to end. The developer is a separate party, which is the part that exercises the payout path. Independent funders and agents are Phase 2 work, not a property of the current deployment.

06Stack and execution

LayerChoice and rationale
ContractsSolidity 0.8.24, Hardhat 3, optimizer 200 runs. Verified via the GIWA Blockscout API.
ChainGIWA (OP Stack). EVM-equivalent, so the escrow deploys unchanged from any EVM experience; sub-second blocks keep settlement perceptibly instant.
AgentTypeScript. Deterministic checks against the GitHub and explorer APIs; a single constrained LLM call for diff-vs-spec judgement, with the prompt and evidence bundle persisted per verdict.
Chain accessviem — already used in production by the author for x402 machine-to-machine payments, the same primitive class as agent-triggered settlement.
FrontendStatic, no build step. Deployed on Vercel.

Delivery plan

PhaseStatusDeliverable
1 · ScreeningdoneEscrow deployed and verified on GIWA Sepolia; lifecycle settled on-chain; product walkthrough live
2 · Testnet MVPin progressVerification agent v1 running against real repositories done; webhook so the merge triggers it, challenge window, bounty board
3 · MainnetplannedStablecoin payouts, first partner protocols posting live bounties, fee switch on
Demoday · KBWscheduledMerge a pull request on stage; payment lands in seconds
BeyondAutomated retroactive funding pools; builder reputation graph derived from verified work

Economics

A percentage fee is taken only when a bounty actually settles — no settlement, no fee, so funders risk nothing on bounties nobody fills. Revenue therefore tracks work funded, not speculation. Later phases add fees on retroactive funding pools distributed through the agent, and verified-work history becomes a reputation primitive other protocols can consume.

07Verify these claims yourself

ClaimWhere to check it
Contract deployed and verifiedsepolia-explorer.giwa.io/address/0xffcf20…5879
Bounty funded on-chainpostBounty transaction
Developer paid, evidence loggedsettle transaction
Agent verified a real pull requestmergit-demo#1 — merged, CI green, in a public repository with real tests
That merge released a paymentsettle transaction, 8 September — evidence hash recomputable from the pull request
Source, tests and scriptsgithub.com/odiseo159-beep/mergit
Agent sourcemergit/agent — what counts as verified, and what it refuses to pay
Product walkthroughmergit-nine.vercel.app — the walkthrough there is simulated and labelled as such; the agent behind it is not