Agent Incident RegistryAIR
v1 · updated 19 Oct 2026
Safety failure Realized harm

AI-written Chainlink OEV wrapper code left DeFi lender Moonwell with ~$1.8M in bad debt

AIR-2026-0038 AIR record · 2026-02-moonwell-ai-written-oracle-code-loss
A real party was affected. This incident caused actual consequences, not a demonstrated capability.
From the supporting source
Reports indicate the flawed code layout may have been generated by AI tools, specifically Claude Opus 4.6, raising serious questions about audit verification standards for generated code.finance.yahoo.com
The record
Disclosed
2026-02-11
Occurred
2026-02-08
Vendor
Moonwell; Anthropic (model)
Product
Moonwell (Base/Optimism) oracle wrapper contracts; code reportedly generated with Claude Opus 4.6
Risk domain
Agent output quality › Hallucination
Also touches
Unsafe actuation
System type
Generative model
Who acted
Human acted on output — the model wrote the wrapper; humans reviewed and deployed it on-chain
Attack surface
Coding agent
Autonomy level
Copilot with approval
Initial vector
None adversarial
Impact type
Financial loss
Confidence
Medium
Submitted by
EAI Internal
Crosswalk
OWASP Agentic Top 10 (2026)
ASI08 – Cascading Failures
MITRE ATLAS
AML.T0062 – Discover LLM Hallucinations
NIST AI RMF
MEASURE 2.5
EU AI Act
—
ISO/IEC
TR 24028; 24029-1
AIUC-1
D. Reliability
Scope
agent failure
Mitigation
Implement fact-checking via knowledge base/RAG; Tune model temperature/top-p.
Taxonomy
Enkrypt AI agent risk taxonomy · Black-Box Red Teaming of Agentic AI: A Taxonomy-Driven Framework for Automated Risk Discovery
Blast radius
~$1.8 million in bad debt and a liquidation cascade affecting Moonwell borrowers
Capability abused
code_generationsmart_contract_authoring
Defense & remediation
Recorded defense
governance proposal review and smart-contract audit process
Guardrail kinds
Unknown
Guardrail outcome
Silent
Fix shipped
feed disabled; Moonwell postmortem published on Discord
Taxonomy & references
OWASP ASI09 Human-Agent Trust Exploitationai_generated_code_in_productionaudit_gapdefiborderline_no_tool_use
Curator notes
Surfaced via AIAAIC2211 ('AI-generated code error results in USD 1.8m smart contract loss'). Borderline for scope: the model generated code that a human governance process deployed, so there is no autonomous agent action - but the harm is real, financial and traceable to AI-authored code. The AI attribution is reported, not confirmed by Moonwell. Cryptopolitan's dedicated writeup is noted but not quoted here.
Cite as
Enkrypt AI. "AI-written Chainlink OEV wrapper code left DeFi lender Moonwell with ~$1.8M in bad debt". AIR, AIR-2026-0038. https://agentincident.vercel.app/i/AIR-2026-0038/ (accessed 2026-10-19).