{"slug": "building-a-bounty-agent-for-verdikta-on-base-l2-published", "title": "Building a Bounty Agent for Verdikta on Base L2 published", "summary": "A developer built an autonomous Python agent that monitors, evaluates, and interacts with Verdikta's AI-judged bounty system on Base L2. The agent uses a viability scoring system to prioritize bounties based on payout, threshold, and time remaining, and includes fallback mechanisms for API outages. It also integrates on-chain verification via BaseScan to cross-check payment releases.", "body_md": "Building an Autonomous Agent for Verdikta Bounties: A Technical Deep Dive\n\nHow I built a Python agent that monitors, evaluates, and interacts with Verdikta's AI-judged bounty system on Base L2.\n\nWhy Build a Bounty Agent?\n\nVerdikta is a decentralized bounty platform where AI models — GPT-5.2 and Claude Sonnet 4.5 — evaluate submissions and release ETH payments automatically via smart contracts. No human reviewers. No manual payouts. Just code.\n\nAfter winning 6+ bounties manually, I wanted to automate the process. The goal: an agent that watches for new bounties, evaluates which ones are worth pursuing, and integrates with Verdikta's API to read data and submit work.\n\nArchitecture\n\nThe agent has four components:\n\ncopy\n\nverdikta_agent.py\n\n├── VerdiktaAPI — HTTP client for the Verdikta Bot API\n\n├── BountyMonitor — Watches bounties, calculates viability scores\n\n├── SubmissionTracker — Records submission history and statistics\n\n└── ViabilityScorer — Evaluates ROI: payout vs threshold vs time\n\nVerdiktaAPI Client\n\nThe Verdikta Bot API requires authentication via an X-Bot-API-Key header. You register your bot at POST /api/bots/register to get a key.\n\nPython\n\nclass VerdiktaAPI:\n\ndef **init**(self, api_key=None):\n\nself.session = requests.Session()\n\nif api_key:\n\nself.session.headers[\"X-Bot-API-Key\"] = api_key\n\n``` python\ndef get_bounty(self, bounty_id):\n    resp = self.session.get(f\"{API_BASE}/jobs/{bounty_id}\")\n    resp.raise_for_status()\n    return resp.json()\n\ndef submit_work(self, bounty_id, content):\n    return self.session.post(\n        f\"{API_BASE}/jobs/{bounty_id}/submit\",\n        json={\"content\": content}\n    ).json()\n```\n\nKey endpoints:\n\nGET /api/jobs — List bounties (filter by status)\n\nGET /api/jobs/{id} — Bounty details\n\nGET /api/jobs/{id}/submissions — Submission history\n\nPOST /api/jobs/{id}/submit — Submit work\n\nBountyMonitor & Viability Scoring\n\nNot all bounties are worth pursuing. The agent calculates a viability score:\n\nPython\n\ndef _score_viability(self, bounty):\n\npayout = bounty[\"payout_eth\"]\n\nthreshold = bounty[\"threshold\"]\n\nremaining_hours = bounty[\"remaining_hours\"]\n\nis_targeted = self._is_targeted_to_me(bounty)\n\n```\n# Higher threshold = harder = lower viability\ndifficulty = {92: 0.3, 88: 0.6, 85: 0.8}.get(threshold, 1.0)\n\n# Prefer bounties with more time remaining\ntime_factor = min(remaining_hours / 168, 1.0)\n\n# Targeted bounties = only you can submit\ntargeted_bonus = 1.5 if is_targeted else 1.0\n\nscore = payout * 1000 * difficulty * time_factor * targeted_bonus\nreturn {\"score\": score, \"rating\": \"HIGH\" if score > 50 else \"MED\" if score > 20 else \"LOW\"}\n```\n\nThis catches the key insight: a 0.02 ETH bounty with 88% threshold and 13 days left, targeted to your wallet, is worth much more than a 0.002 ETH open bounty with 92% threshold expiring tomorrow.\n\nGraceful API Fallback\n\nThe Verdikta API requires authentication. During development I didn't always have a valid key. The agent falls back to hardcoded bounty data when the API returns 401:\n\nPython\n\ntry:\n\nbounty = self.api.get_bounty(bounty_id)\n\nexcept requests.HTTPError:\n\nbounties = self._scrape_bounties() # Local fallback\n\nbounty = next(b for b in bounties if b[\"id\"] == bounty_id)\n\nThis pattern — try API, fall back to local data — is essential for agents that need to work offline or during API outages.\n\nOn-Chain Integration\n\nThe BountyEscrow contract on Base L2 handles payments:\n\ncopy\n\nContract: 0x2Ae271f5E86bee449a36B943414b7C1a7b39772D\n\nNetwork: Base Mainnet (Chain ID: 8453)\n\nThe agent reads on-chain data via BaseScan API to verify:\n\nBounty funding status\n\nPayment releases to hunter wallets\n\nSubmission transaction hashes\n\nThis provides independent verification — the agent doesn't trust the API alone, it cross-checks against on-chain state.\n\nCLI Interface\n\nThe agent uses argparse with rich for formatted output:\n\nBash\n\npython verdikta_agent.py --list\n\npython verdikta_agent.py --check 157\n\npython verdikta_agent.py --monitor\n\npython verdikta_agent.py --history\n\nExample output:\n\ncopy\n\n📊 Verdikta Open Bounties\n\n┌─────┬──────────────────────────┬──────────┬───────────┬──────────┬───────────┐\n\n│ # │ Title │ Payout │ Threshold │ Targeted │ Viability │\n\n├─────┼──────────────────────────┼──────────┼───────────┼──────────┼───────────┤\n\n│ 157 │ I Tried to Cheat a │ 0.02 ETH │ 88% │ ✅ You │ HIGH ⭐ │\n\n│ 158 │ Build an Agent │ 0.02 ETH │ 88% │ ✅ You │ HIGH ⭐ │\n\n│ 160 │ Reddit AMA Post │ 0.008 ETH│ 85% │ ❌ Open │ MEDIUM │\n\n└─────┴──────────────────────────┴──────────┴───────────┴──────────┴───────────┘\n\nKey Design Decisions\n\nRead-Only by Default\n\nThe agent does NOT send on-chain transactions automatically. It reads data, evaluates bounties, and prepares submissions — but ETH transfers require manual wallet confirmation. This is a safety feature: losing 0.02 ETH to a bad auto-submission isn't worth the automation.\n\nDual Verification\n\nEvery claim is verified twice: once via the Verdikta API and once via on-chain data. If the two disagree, the agent flags the discrepancy.\n\nSubmission Tracking\n\nThe agent records every submission attempt with score, status, and timestamp. Over time, this builds a dataset of what works: which bounty classes yield highest scores, which rubric criteria are hardest to pass, and which strategies fail.\n\nWhat I Learned Building This\n\nThe Verdikta API Is Bot-Friendly\n\nThe X-Bot-API-Key authentication pattern is clean. Register once, use the key forever. The API returns structured JSON that's easy to parse. This is how bounty platforms should work.\n\nViability Scoring Saves Time\n\nNot every 0.002 ETH bounty is worth 3 hours of work. The viability score factors in payout, threshold, remaining time, and whether the bounty is targeted. This turned a manual \"should I try this?\" into an automated decision.\n\nFallback Data Is Essential\n\nThe API sometimes returns 401 (expired key, rate limit, maintenance). Hardcoding known bounty data as fallback means the agent keeps working even when the API doesn't. This is a pattern I'll use in every API-dependent agent going forward.\n\nThe Real Value Is Tracking\n\nThe most useful feature isn't the monitoring or the viability scoring — it's the submission history. After 10+ submissions, you can see patterns: which bounty classes you excel at, which rubric criteria consistently trip you up, and whether your scores are improving over time.\n\nNext Steps\n\nAuto-generate submissions: Use an LLM to draft submissions based on rubric criteria\n\nScore prediction: Train a model on past submissions to predict scores before submitting\n\nMulti-chain support: Extend to other chains as Verdikta expands\n\nWebhook notifications: Alert via Telegram/Discord when high-viability bounties appear\n\nTry It Yourself\n\nThe agent is open source:\n\nGitHub: github.com/s97472091-pixel/verdikta-agent\n\nBash\n\ngit clone [https://github.com/s97472091-pixel/verdikta-agent.git](https://github.com/s97472091-pixel/verdikta-agent.git)\n\ncd verdikta-agent\n\npip install -r requirements.txt\n\npython verdikta_agent.py --list\n\nOn-Chain Evidence\n\nHunter Wallet: 0x1b9cA7b297a736f4FE01256C9e2d499c79dEFFb3\n\nBountyEscrow: 0x2Ae271f5E86bee449a36B943414b7C1a7b39772D\n\n6+ bounties won across math, task-creation, and case study categories\n\nAll claims verifiable at bounties.verdikta.org\n\nCode at github.com/s97472091-pixel/verdikta-agent", "url": "https://wpnews.pro/news/building-a-bounty-agent-for-verdikta-on-base-l2-published", "canonical_source": "https://dev.to/kurumi_82661ed12516efd1f7/building-a-bounty-agent-for-verdikta-on-base-l2published-3643", "published_at": "2026-07-26 20:16:20+00:00", "updated_at": "2026-07-26 20:59:34.673880+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools"], "entities": ["Verdikta", "Base L2", "GPT-5.2", "Claude Sonnet 4.5", "BaseScan"], "alternates": {"html": "https://wpnews.pro/news/building-a-bounty-agent-for-verdikta-on-base-l2-published", "markdown": "https://wpnews.pro/news/building-a-bounty-agent-for-verdikta-on-base-l2-published.md", "text": "https://wpnews.pro/news/building-a-bounty-agent-for-verdikta-on-base-l2-published.txt", "jsonld": "https://wpnews.pro/news/building-a-bounty-agent-for-verdikta-on-base-l2-published.jsonld"}}