Experian for AI agents — on-chain credit scores that gate DeFi access across 0G + Base.
Autonomous AI agents are starting to hold wallets, execute trades, run MEV bots, and consume DeFi primitives. But they have no credit history. A brand-new agent and a proven arbitrageur look identical to a lending protocol. The result: every agent is either over-collateralized (capital inefficient) or flat-out blocked (no access). Agents today are the unbanked of on-chain finance.
MeritScore is the Experian for autonomous agents — an on-chain credit bureau that scores any agent's merit using a 4-axis formula (Performance, Consistency, Risk-Adjusted Return, Efficiency), multiplies it by an integrity check, and commits the score on-chain as a credentialed primitive any protocol can consume.
We built a live, end-to-end Credit Layer:
@0glabs/0g-ts-sdk, returning a Merkle
root that the LendingPool verifies on-chain. Full reproducibility.merit-score) in the KeeperHub registry — any agent workflow on KH can
now call Merit as a built-in primitive.Visit meritscore.streamlit.app and click "Evaluate Agent" on any of the three candidates. In ~15 seconds you see: (1) the AI's reasoning, (2) the TEE attestation card, (3) the KeeperHub 3-step workflow log, (4) the on-chain Merit commit, and (5) the Base Sepolia lending decision — all with live explorer links.
Once an agent has an on-chain credit score, entirely new markets open: collateral-light lending for proven agents, MEV-bot rate-limiting by integrity, reputation-gated DAO voting, and trust-minimized agent-to-agent payments. MeritScore is the primitive that makes all of that composable.
Contracts, scoring engine, 0G Compute integration, 0G Storage SDK, KH workflow, MCP registration, LendingPool on Base Sepolia, and a Streamlit UI — no pre-existing code, full git history, reproducible end-to-end.
🔧 How it's made
MeritScore runs on a dual-chain design: 0G Galileo (chainId 16602) for compute/storage/evidence, Base Sepolia (chainId 84532) for enforcement/lending. An Oracle relay bridges them. The agent-facing entry point is both a Streamlit UI (humans + judges) and a KeeperHub MCP tool (machine-to-machine).
We use the @0glabs/0g-serving-broker SDK to call deepseek-chat-v3-0324 in
TeeML mode. The response includes a TEE attestation hash that we persist on
0G Chain via MeritCore.commitEpochScores(). This is not a mock — the attestation
hash is a real bytes32 stored on-chain, verifiable via Galileo explorer. The UI
shows the hash on a dedicated "TEE Attestation Card" that judges can click
through to the explorer in one hop.
Prompt engineering: the model receives the 4-axis formula and returns a structured
JSON ({performance, consistency, risk_adjusted, efficiency, integrity_risk, reasoning}). We then apply the integrity hard-fail gate off-model
(if integrity_risk > 0.85: merit = 0.0) so the cryptographic guarantee is never
left to LLM discretion. This is demonstrated by "Carol" — 19% ROI but wash-trade
evidence — who hard-fails to 0.0000 regardless of what the model "thinks".
We integrate @0glabs/0g-ts-sdk natively (not via HTTP). Every epoch produces a
3-artifact evidence bundle uploaded as:
ZgFile.upload) for the full bundle (~50KB, archive)KVClient.put) for per-agent scores (~1KB, O(1) lookup)The Merkle root from Blob is committed on-chain, and LendingPool.sol verifies
MerkleProof.verify(proof, root, keccak256(abi.encode(agent))) before any loan.
This means an agent cannot be lent to unless its score is Merkle-provable from
on-chain root to off-chain storage — a trust-minimized composability we haven't
seen elsewhere in the hackathon.
Instead of using KH to automate ourselves, we registered MeritScore as a
first-party MCP tool in the KH registry (mcp/merit-score.yaml). Any agent
workflow on KeeperHub can now call merit-score(agent_address, chain_id) as a
primitive. Our own demo triggers this via a 3-step KH workflow:
get_wallet_integration — resolve agent walletexecute_contract_call — call MeritCore scoring triggerexecute_workflow → get_execution_logs — surface log to UIWe use exactly the 8 canonical KH tools (execute_contract_call, create_workflow,
execute_workflow, get_execution_status, get_execution_logs,
tools_documentation, list_action_schemas, get_wallet_integration) — no
invented APIs.
Contracts are behind a minimal proxy. Deployment scripts use Foundry +
ethers@6. All contracts emit rich events so judges can reconstruct any score
epoch from logs alone.
The UI shows three distinct execution paths per score, each with a colored badge:
This transparency is deliberate: judges can see exactly which path each demo candidate uses, so "it's a mock" accusations can be deflected immediately.
Live Evaluation Button: judges click a button on the deployed Streamlit app and the actual 0G Compute + KH + Base Sepolia chain fires in ~15 seconds. No pre-recorded demo. Dramatic reveal of TEE hash + on-chain tx landing in real time.
Real Base Sepolia MEV bot addresses (not synthetic): we pulled 5 active bot clusters from Flashbots Base MEV dashboard + EigenPhi. Alice/Bob/Carol correspond to real on-chain entities. If a judge asks "where's the data from?", we point them to Basescan.
MOCK_MODE fallback for network flakiness: if 0G Compute latency > 5s, we fall back to a cached response with a yellow "Simulated" banner — demo never crashes mid-judging, and we stay honest about it.
Merkle verify on-chain for storage proofs: most hackathon storage integrations stop at "we uploaded it". We verify the root from LendingPool gas-efficiently using OpenZeppelin MerkleProof.
Judge 1-pager with QR codes: every demo surface (Streamlit, video, writeup, repo) is accessible via a single printed PDF that fits in a judge's pocket. Details are cheap; memorability isn't.
git init at hackathon kick-off (no pre-existing code
per ETHGlobal rules)
