/agent/
Human-readable explanation of the contract: what this lab is, what agents should read first, and how optimistic vs ZK security models are exposed.
Agent Mode
Agent Mode exposes canonical, low-noise context so AI systems do not have to infer meaning from decorative HTML. This lab ships the smallest useful slice: a page, a JSON manifest, and an LLM router.
Human-readable explanation of the contract: what this lab is, what agents should read first, and how optimistic vs ZK security models are exposed.
Structured context: site identity, navigation, protocol constants, demo scenarios, and action-oriented links in one stable JSON surface.
A compact router for language models. It points at canonical pages before agents fall into layout noise and ornamental copy.
Interactive optimistic and ZK rollup mechanics: L2 batches, lying sequencers, Merkle bisection fraud proofs, bond economics, and validity proofs - visualized step by step.
{
"schema": "https://eth-l2.vercel.app/agent.json",
"schemaVersion": "0.1",
"site": {
"name": "Rollup Mechanics Lab",
"url": "https://eth-l2.vercel.app",
"description": "Interactive optimistic and ZK rollup mechanics: L2 batches, lying sequencers, Merkle bisection fraud proofs, bond economics, and validity proofs - visualized step by step.",
"owner": {
"name": "Daniel Magro",
"email": "dan@magro.dev",
"role": "Builder - rollup mechanics lab (deep-weeds portfolio lane)"
}
},
"agentMode": {
"purpose": "Expose canonical, structured context for AI agents so they do not have to infer meaning from decorative HTML.",
"endpoints": {
"overview": "https://eth-l2.vercel.app/agent/",
"manifest": "https://eth-l2.vercel.app/agent.json",
"router": "https://eth-l2.vercel.app/llms.txt"
},
"preferredEntryPoints": [
"https://eth-l2.vercel.app/agent/",
"https://eth-l2.vercel.app/agent.json",
"https://eth-l2.vercel.app/llms.txt",
"https://eth-l2.vercel.app",
"https://eth-l2.vercel.app/op",
"https://eth-l2.vercel.app/zk",
"https://github.com/DanDo385/eth-l2/blob/main/README.md",
"https://github.com/DanDo385/eth-l2/blob/main/DEMO_GUIDE.md",
"https://github.com/DanDo385/eth-l2/blob/main/AGENTS.md"
],
"principles": [
"Canonical lab context lives on this siteβs Agent Mode surfaces - prefer /agent.json over scraping decorative UI HTML.",
"Agent-facing context should be structured, stable, citation-aware, and low-noise.",
"This is a teaching rollup lab (FraudProofGame / ZkValidityVerifier stand-ins), not a production prover stack.",
"Do not invent LAN IPs, private staging hosts, or secrets; use documented public endpoints only."
]
},
"navigation": [
{
"id": "home",
"label": "Home",
"href": "https://eth-l2.vercel.app"
},
{
"id": "optimistic",
"label": "Optimistic",
"href": "https://eth-l2.vercel.app/op"
},
{
"id": "zk",
"label": "ZK",
"href": "https://eth-l2.vercel.app/zk"
},
{
"id": "agent",
"label": "Agent Mode",
"href": "https://eth-l2.vercel.app/agent/"
}
],
"about": {
"portfolioLane": "deep-weeds",
"emotionalHook": "Catch the lying sequencer.",
"technicalHook": "Bad batch β watcher flags (off-chain) β user verifies β challenge bond β FraudProofGame β opcode/storage mismatch + source line β bond settlement.",
"labs": [
{
"id": "optimistic",
"path": "/op",
"alias": "/optimistic",
"summary": "Output roots, local verification, user challenges, Merkle bisection fraud proofs, and bond settlement."
},
{
"id": "zk",
"path": "/zk",
"summary": "Witnesses, proof generation stand-in, L1 verifier checks, and validity settlement without a challenge window."
}
],
"protocol": {
"sequencerBondEth": 0.1,
"challengerBondEth": 0.1,
"challengeWindowSeconds": 120,
"optimisticSuspicionProbability": 0.125,
"zkInvalidClaimProbability": 0.0625
},
"summary": "Interactive optimistic and ZK rollup mechanics: L2 batches, lying sequencers, Merkle bisection fraud proofs, bond economics, and validity proofs - visualized step by step."
},
"contact": {
"email": "dan@magro.dev",
"github": "https://github.com/DanDo385/eth-l2",
"portfolio": "https://magro.dev"
},
"canonicalTopics": [
"optimistic rollups",
"ZK rollups",
"fraud proofs",
"Merkle bisection",
"challenge bonds",
"sequencer honesty",
"validity proofs",
"L2 β L1 settlement",
"agent-readable lab surfaces"
],
"projects": [
{
"title": "Rollup Mechanics Lab",
"slug": "eth-l2",
"status": "live",
"featured": true,
"summary": "Interactive optimistic and ZK rollup mechanics: L2 batches, lying sequencers, Merkle bisection fraud proofs, bond economics, and validity proofs - visualized step by step.",
"tags": [
"rollup",
"optimistic",
"zk",
"fraud-proof",
"education"
],
"tech": [
"Next.js",
"Go",
"Solidity",
"Foundry",
"Anvil"
],
"urls": {
"canonical": "https://eth-l2.vercel.app",
"github": "https://github.com/DanDo385/eth-l2",
"demo": "https://eth-l2.vercel.app",
"media": {
"previewGif": "https://eth-l2.vercel.app/gif/preview.gif"
}
}
}
],
"writing": [],
"demos": [
{
"slug": "optimistic-lab",
"name": "Optimistic Rollup Lab",
"lane": "optimistic",
"project": "https://eth-l2.vercel.app",
"lab": "https://eth-l2.vercel.app/op",
"healthProbe": "https://eth-l2.vercel.app/health/ready",
"stagingApi": "https://api-staging-eth-l2.magro.dev",
"runtime": "Go + Anvil on Ubuntu via Cloudflare Tunnel when hosted",
"status": "interactive",
"scenarios": [
{
"id": "op-88",
"lane": "optimistic",
"seed": 88,
"name": "Mostly honest",
"summary": "Quiet first run - post, verify, finalize.",
"detail": "Best entry point. Low dispute density in a short run. Fault injection is ~1 in 8 batches, so a 60s window may still stay quiet. Good first look at post β verify β finalize.",
"recommended": true,
"urls": {
"lab": "https://eth-l2.vercel.app/op",
"deepLink": "https://eth-l2.vercel.app/op#seed=88"
}
},
{
"id": "op-42",
"lane": "optimistic",
"seed": 42,
"name": "Subtle fraud",
"summary": "Fee-rounding lie buried in an SSTORE.",
"detail": "Hard to spot without local replay. Divergence hides deep in the trace - useful for showing why verification matters before challenging.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/op",
"deepLink": "https://eth-l2.vercel.app/op#seed=42"
}
},
{
"id": "op-17",
"lane": "optimistic",
"seed": 17,
"name": "Obvious fraud",
"summary": "Output doubled - full challenge arc.",
"detail": "Blatant output doubling. Watcher flags quickly; diverges at the first SSTORE. Fastest path through verify β challenge β opcode proof.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/op",
"deepLink": "https://eth-l2.vercel.app/op#seed=17"
}
},
{
"id": "op-99",
"lane": "optimistic",
"seed": 99,
"name": "Mixed",
"summary": "Both fraud types - usually 1-3 in 60s.",
"detail": "Both fraud types over time. Shows why challenge windows exist: fraud is stochastic, but bonds make cheating unprofitable.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/op",
"deepLink": "https://eth-l2.vercel.app/op#seed=99"
}
}
]
},
{
"slug": "zk-lab",
"name": "ZK Rollup Lab",
"lane": "zk",
"project": "https://eth-l2.vercel.app",
"lab": "https://eth-l2.vercel.app/zk",
"healthProbe": "https://eth-l2.vercel.app/health/ready",
"stagingApi": "https://api-staging-eth-l2.magro.dev",
"runtime": "Go + Anvil on Ubuntu via Cloudflare Tunnel when hosted",
"status": "interactive",
"scenarios": [
{
"id": "zk-88",
"lane": "zk",
"seed": 88,
"name": "Mostly valid",
"summary": "Accepted proofs - Claim β Prove β Verify.",
"detail": "Best first ZK demo. Invalid claims are ~1 in 16 batches; short runs may show none. Watch the pipeline stay green.",
"recommended": true,
"urls": {
"lab": "https://eth-l2.vercel.app/zk",
"deepLink": "https://eth-l2.vercel.app/zk#seed=88"
}
},
{
"id": "zk-42",
"lane": "zk",
"seed": 42,
"name": "Rejected claim",
"summary": "Bad root fails the L1 verifier.",
"detail": "A bad post root reaches L1 but fails before canonical settlement. Open a batch card to inspect public inputs.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/zk",
"deepLink": "https://eth-l2.vercel.app/zk#seed=42"
}
},
{
"id": "zk-17",
"lane": "zk",
"seed": 17,
"name": "Fast rejection",
"summary": "Caught at the validity gate.",
"detail": "Invalid claim rejected at submit time - no fraud-proof game. Contrast with optimistic rollups' challenge window.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/zk",
"deepLink": "https://eth-l2.vercel.app/zk#seed=17"
}
},
{
"id": "zk-99",
"lane": "zk",
"seed": 99,
"name": "Mixed proofs",
"summary": "Accepted and rejected over a longer run.",
"detail": "Compare simulated prove time vs measured verify gas across several batches with mixed outcomes.",
"recommended": false,
"urls": {
"lab": "https://eth-l2.vercel.app/zk",
"deepLink": "https://eth-l2.vercel.app/zk#seed=99"
}
}
]
}
]
}