PoCo: Agentic Proof-of-Concept Exploit Generation for Smart Contracts
Vivi Andersson, Sofia Bobadilla, Harald Hobbelhagen, Martin MonperrusKTH Royal Institute of Technology {vivia,sofbob,hhob,monperrus}@kth.se · 2025
Read PoCo: Agentic Proof-of-Concept Exploit Generation for Smart Contracts by Vivi Andersson, Sofia Bobadilla, Harald Hobbelhagen, Martin MonperrusKTH Royal Institute of Technology {vivia,sofbob,hhob,monperrus}@kth.se (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-02780.txt.
Introduction
Smart contracts hold real money, and a flaw can mean huge losses. Auditors prove a reported flaw is real by writing a small working exploit, which takes time under tight deadlines. Vivi Andersson, Sofia Bobadilla, Harald Hobbelhagen, and Martin Monperrus built PoCo to write those proofs on its own, described in a 2025 paper.
PoCo reads an auditor's plain-language report of a flaw, then works in a reason-act-observe loop with code tools. It outputs ready-to-run exploits in the Foundry testing format, fit for audit reports. On twenty-three real-world flaw reports, PoCo beat zero-shot and fixed workflow baselines, producing well-formed and logically correct proofs. The team argues such agents can cut audit effort without lowering quality.
Catalog record
| CREATOR | Vivi Andersson, Sofia Bobadilla, Harald Hobbelhagen, Martin MonperrusKTH Royal Institute of Technology {vivia,sofbob,hhob,monperrus}@kth.se |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 71 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2511-02780
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
PoCo: Agentic Proof-of-Concept Exploit Generation for Smart Contracts Vivi Andersson, Sofia Bobadilla, Harald Hobbelhagen, Martin MonperrusKTH Royal Institute of Technology {vivia,sofbob,hhob,monperrus}@kth.se Abstract Smart contracts operate in a highly adversarial environment, where vulnerabilities can lead to substantial financial losses. Thus, smart contracts are subject to security audits. In auditing, proof-of-concept (PoC) exploits play a critical role by demonstrating to the stakeholders that the reported vulnerabilities are genuine, reproducible, and actionable. However, manually creating PoCs is time-consuming, error-prone, and often constrained by tight audit schedules. We introduce PoCo , an agentic framework that automatically generates executable PoC exploits from natural-language vulnerability descriptions written by auditors. PoCo autonomously generates PoC exploits in an agentic manner by interacting with a set of code-execution tools in a Reason–Act–Observe loop. It produces fully executable exploits compatible with the Foundry testing framework, ready for integration into audit reports and other security tools. We evaluate PoCo on a dataset of 23 real-world vulnerability reports. PoCo consistently outperforms the prompting and workflow baselines, generating well-formed and logically correct PoCs. Our results demonstrate that agentic frameworks can significantly reduce the effort required for high-quality PoCs in smart contract audits. Our contribution provides readily actionable knowledge for the smart contract security community. 1 1 footnotetext: Both authors contributed equally to this work. I Introduction Smart contracts operate in an extremely adversarial environment. As of October 2025, on-chain exploits have resulted in approximately $15 billion in losses [ 8 ] . With new exploits emerging daily, there is an urgent need to prevent vulnerable contracts from being deployed. If they are deployed, they will be exploited. The smart contract lifecycle typically comprises four stages [ 23 ] : (1) development and testing, (2) security auditing, (3) deployment, and (4) monitoring. Security auditing involves third-party experts assessing the smart contract code through careful manual and tool-supported analysis, and reporting vulnerabilities to the smart contract development team. They are essential for ensuring a project’s reliability and security. However, audits are often constrained by limited budgets and tight timelines. When writing an audit, it is a best practice to report a clear description of the vulnerability, an impact assessment, and a proof-of-concept (PoC) exploit [ 19 ] . A PoC demonstrates that the reported issue can produce harmful behavior, such as asset loss or protocol malfunction. PoCs are critical: for auditors, they provide verifiable evidence of a vulnerability; for developers, they serve as actionable test cases to reproduce and fix the issue; and for stakeholders, they offer clear evidence for risk assessment and prioritization. Fig. 1: Overview of PoCo ’s workflow. Starting with a smart contract project under audit, and a vulnerability annotation written by an auditor, PoCo autonomously crafts an executable PoC exploit. The auditor reviews and validates the PoC before submitting the vulnerability report, potentially receiving a monetary reward. The development team receives the PoC along with reproduction steps, enabling them to reproduce the issue and implement a patch efficiently. There has been little work on automated exploit generation [ 22 , 25 , 6 , 36 , 14 ] . Most existing tools focus on post-deployment exploits and produce transaction sequences rather than source-code PoCs suitable for audits. To our knowledge, there are only two prior works, by Gervais et al. [ 12 ] , and Xiao et al. [ 40 ] , which explore PoC generation applicable to audits. In this work, we address the problem of generating PoC exploits for audit reports. By reducing the cost and time of PoCs, more vulnerabilities will be prioritized appropriately and mitigated. This paper introduces PoCo , an agentic framework that generates PoC exploits from auditor-written natural-language descriptions of vulnerabilities. PoCo accepts as input (1) the target smart contract under audit, (2) a vulnerability annotation written by the auditor. PoCo produces as output an executable PoC exploit which is ready to be included in an audit deliverable. For auditors, PoCo gives PoC at a low cost, to serve as verifiable evidence of the strength of their vulnerability. For protocol developers, PoCo ’s PoC are concrete, executable test cases that precisely demonstrate how to reproduce the vulnerability, greatly reducing the time to write a vulnerability mitigation patch. PoCo ’s design is a state-of-the-art agentic loop, combining full autonomy and domain-specific tools related to smart contract development. We use PoCo with three frontier LLMs: Claude Sonnet, OpenAI o3 and GLM 4.6. We evaluate PoCo on 23 real-world vulnerabilities from real-world smart contracts projects. We first evaluate the capabilities of PoCo at generating well-formed PoC exploits that compile (RQ1): PoCo generates executable PoC in 50 runs. Next, we evaluate whether the PoCs are correct, with an original methodology based on the ground truth mitigation patch (RQ1): PoCo generates 32 correct PoC exploits for our real-world vulnerabilities. For perspective, we compare PoCo against two baselines: zero-shot prompting and workflow prompting. Across all measures, PoCo achieves the highest success rates in generating both well-formed and logically correct PoCs, by a large margin. To our knowledge, we are the first to report on real-world PoC exploit generation at this scale and level of difficulty, with only real-world vulnerabilities. To summarize, we make the following contributions: • PoCo , a blueprint for PoC exploit generation based on agentic AI. • A new evaluation methodology for large-scale PoC generation correctness using ground truth patches. • A large-scale experimental campaign on real-world smart contract vulnerabilities demonstrating that PoCo is able to generate smart contract PoCs. • A high-quality audit dataset that combines vulnerabilities, PoC, and mitigation patches. The dataset is fully reproducible and open-source at github.com/ASSERT-KTH/Proof-of-Patch/ . The rest of this paper is organized as follows. Section II provides the knowledge required to understand the contributions and novelty of this work. Section III presents PoCo , our PoC exploit generator tool. Section IV presents our evaluation methodology. Section V details our results. Section VII proposes related work on Automated Exploit Generation and AI for security. Section VI discusses the internal and external threads to validity. Finally, section VIII concludes our work. II Background Our work lies at the intersection of smart contract security and AI for code. This section covers key concepts for understanding our contribution and its novelty. II-A Blockchain Concepts Smart Contract & Solidity. Smart Contracts are programs deployed on blockchain networks to enforce predefined rules without the need for intermediaries. Contracts are written in high-level smart contract languages, such as Solidity, and then compiled into bytecode for deployment and execution. A smart contract deployed on-chain is immutable; this means its code can not be modified or altered. Solidity is Ethereum’s primary smart contract programming language. From a security perspective, the misuse of constructs such as fallback functions and low-level calls can lead to security vulnerabilities. Transactions. All operations on the blockchain are initiated via transactions. A transaction is typically sent from a user, signed by their private key, to perform actions such as transferring cryptocurrency or invoking functions on existing contracts. During execution, a called contract may interact with other contracts. Lifecycle of Smart Contract Development The lifecycle begins with the development phase, where protocol developers implement and test the smart contract logic. Development is followed by a security review, also known as a smart contract audit (see subsection II-A