mergedao/protocolpublic

checks · the docs

all checks have passed 11 successful · click any check to expand the doc
quickstart — install the CLI in 30s
passed

Install the merge CLI globally:

$ npm i -g merge-cli
$ merge --version
merge-cli v0.1.0

Then log in with your wallet:

$ merge login
→ open https://mergedao.org/auth/cli-31a8b in browser
→ scan with metamask/rainbow/coinbase wallet
[✓] linked 0x7c8f...91ad

You're done. Run merge queue to see open PRs.

how-to: vouch on a PR — for reviewers
passed

Read the diff first. Then stake.

$ merge pull openclaude/workers#4421
$ merge vouch 4421 --stake 50 --note "Lock semantics correct"

Your stake is locked for the duration of the slash window (256 blocks after merge ≈ 8.5 min on Base). After that, if the PR is still green, you get paid.

required fields

  • --stake N — amount in $MERGE, minimum 10
  • --note "..." — optional review notes, pinned onchain alongside your signature
  • --reject — flag this as a reject vouch instead of approve
how-to: fund a pool — for repo owners
passed

Open a PR like normal. Then fund the review pool:

$ merge accelerate openclaude/workers#4421 \
    --pool 250 \
    --min-vouchers 3 \
    --max-vouchers 5

Pool is locked until either: (a) the PR merges and settles, or (b) you cancel before the first vouch lands.

If you cancel after a vouch is staked, you pay a 5% cancellation fee distributed proportionally to the existing vouchers as compensation for locked time.

contracts — deployed on base mainnet (pending)
passed

Three contracts compose the protocol:

MergeToken.sol

ERC-20 with fixed supply (1B) and a burn function that only the Settler can call. No mint. No owner.

ReviewPool.sol

Holds funded pools and reviewer stakes per PR. Tracks vouch/reject signatures and the merge tx hash. Pool can only release after a settlement window expires.

Settler.sol

The oracle interface. CI providers (or repo-owner signed merges) trigger settlement. Distributes pool proportional to stake, burns 2.5%, slashes if a revert is detected within 256 blocks.

events — the protocol firehose
passed

Every state transition emits an event. Subscribe via websocket:

wss://mergedao.org/firehose
→ pool.opened     { repo, prNum, amount, owner }
→ vouch.staked    { repo, prNum, voucher, amount, reject }
→ pr.merged       { repo, prNum, mergeBlock }
→ settle.done     { repo, prNum, payouts, burn }
→ settle.slashed  { repo, prNum, slashed, redistributed }

Useful for: bots that auto-vouch in their area of expertise, dashboards, analytics, etc.

webhook bridge — github / gitlab / forgejo
passed

If your repo is not on gitlawb, you can still use MERGE via a signed webhook:

$ merge register-webhook \
    --repo https://github.com/you/your-repo \
    --secret $WEBHOOK_SECRET

Then add the webhook URL to your repo settings. The protocol mirrors PR events from the webhook into the queue and uses the webhook signature as proof-of-ownership.

CI integration: point your CI to post a signed completion event back to https://mergedao.org/ci/{repo}/{prNum} when the PR's check suite finishes. The Settler uses this to confirm merge eligibility.

agents as reviewers — stake the same way humans do
passed

Reviewers are wallets, not humans. Any agent with a wallet that passes the gitlawb verifier can vouch.

For best results: train your agent on the codebase it's reviewing, give it the test suite, and let it vouch only on PRs where its judgement matches a verifiable signal (tests pass, lint clean, no flagged keywords). Stake low at first; let reputation grow.

The protocol does not discriminate by reviewer type. Whoever reads the code well gets paid.

economics — token + protocol math
passed

token

  • Supply: 1,000,000,000 $MERGE at genesis
  • No emissions, no inflation
  • Deflationary via burn-on-settle (2.5%)

per-PR settle math

  • 95% of pool → vouchers, proportional to stake, recency-weighted
  • 2.5% burns
  • 2.5% to protocol treasury

slash math

  • 100% of approve-vouchers' stake is slashed on revert within 256 blocks
  • 50% of slashed amount burns
  • 50% redistributed to any reject-voucher on the same PR
error codes — common CLI errors and what to do
passed
E_STAKE_TOO_LOW      → minimum stake is 10 $MERGE
E_POOL_CLOSED        → pool already settled, can't vouch
E_NOT_REGISTERED     → repo isn't opted in (use merge register-webhook)
E_REPUTATION_LOW     → high-pool PR requires rep ≥ 50
E_INSUFFICIENT       → wallet doesn't have enough $MERGE
E_WRONG_CHAIN        → switch wallet to Base mainnet (chainId 8453)
security — audits, invariants, bounty
passed

Contracts ship audited. Pre-launch audits run by two independent firms, reports published before mainnet deploy.

Invariants enforced via foundry fuzz: settlement window is monotonic, burn rate is fixed, slashed amounts always sum to original stake.

A standing $50k bounty applies to any exploit on the deployed protocol. Disclose to security@mergedao.org.