How we trained LLM to find reentrancy vulnerabilities in smart contracts

We trained a CodeBERT model on a small dataset of manually selected reentrancy vulnerability examples, outperformed every static analysis tool at the time and found a couple real-world cases where DeFi projects and DAO admins could withdraw all tokens from the contract. Reentrancy vulnerabilities: a short recap For a broad…