An OpenEnv-compliant RL environment for smart contract security analysis. Agents explore real-world DeFi contracts from Certora audit reports — detecting vulnerabilities, deriving properties, and checking invariants.
Each task mirrors a real step in a professional smart contract audit. Difficulty is graded easy → medium → hard.
Given a Solidity file, identify the vulnerable function and name the
vulnerability class in 2–3 words. Submit NO if no vulnerability exists.
Given a single function, derive its natural-language safety property — the kind a formal verification engineer would write as a CVL invariant. One submission attempt per episode, scored 0–5.
A property is given in plain English. At least one function in the contract breaks it. Find the offender. Partial credit for naming a direct caller of the true violating function.
All contracts and vulnerabilities are sourced from public Certora audit reports on production DeFi protocols.
{task_id, seed}
{action_type, params}
?task_id=
# 1. Reset — start Task 1 with a fixed seed curl -X POST $SPACE_URL/reset \ -H "Content-Type: application/json" \ -d '{"task_id": "task1_vuln_detection", "seed": 42}' # 2. Explore — list all functions in the contract curl -X POST $SPACE_URL/step \ -H "Content-Type: application/json" \ -d '{"action_type": "list_functions", "params": {}}' # 3. Submit — name the vulnerable function curl -X POST $SPACE_URL/step \ -H "Content-Type: application/json" \ -d '{"action_type": "submit", "params": {"function_name": "withdraw", "vulnerability_type": "reentrancy"}}'