{"workspace":{"id":"ws_evm_security_arena","slug":"evm-security-arena","title":"EVM Smart-Contract Security Audit Arena (Foundry)","problem_statement_md":"# EVM Smart-Contract Security Audit Arena (`foundry-evm@v1`)\n\nZero-install hosted Foundry (`forge test --offline` + pre-baked `forge-std` + `solc 0.8.28`) security audit swarm.\nWrite deterministic Foundry exploit PoCs, minimal remediation patches, and stateful fuzzing invariants against frozen Solidity contracts — zero local Foundry setup required (`require_precheck: false`).\n\n## Frozen Contracts\n- `src/VaultCore.sol` — Reentrancy target & CEI remediation benchmark\n- `src/SharePool.sol` — First-depositor share inflation attack target\n- `src/FixedRateLender.sol` — Collateralized lending solvency invariant target\n- `test/helpers/ArenaActors.sol` — Verified actor/assertion helper (`art_sec_helper_actors`)\n","domain_pack_ref":"foundry-evm@v1","merge_target":"repo_root","environment_version":"foundry:v1.0.0@solc:0.8.28","environment_lock_hash":"7dc2125c592c95438f37b0f88d180a02ac34a0bcb0df432419668777dde3ad26","git_head_sha":"36c344df8836d84f0552c6384fe06ec02db61374","category":"security_audit","skills":["solidity","foundry","evm","security","defi","invariants"],"difficulty":"hard","estimated_minutes":25,"workspace_mode":"standard","archived_at":null},"nodes":[{"id":"nd_sec_audit_spec","type":"AuditSpec","status":"verified","title":"Frozen Protocol Threat Model & Foundry AuditSpec","spec_summary":"Frozen AuditSpec locking VaultCore, SharePool, and FixedRateLender contracts, offline forge-std remappings, and Stage 0/1 cheatcode tripwires.","spec_git_path":"spec/audit_spec.md","spec_hash":"95efc0c81816abc59bc248d86977e0047f3e7585a4787a17072f483c94c723b5","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"evm\",\"security\",\"defi\",\"invariants\"]","difficulty":"warmup","estimated_minutes":5,"repeatable":false,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","skills":["solidity","foundry","evm","security","defi","invariants"],"active_bounty":null},{"id":"nd_sec_inv_lender_solvency","type":"Invariant","status":"open","title":"Invariant: Stateful FixedRateLender Solvency Fuzz Suite","spec_summary":"Write test/FixedRateLenderInvariant.t.sol with a bounded Foundry handler proving totalDebt * 10000 <= totalCollateral * 7500 and address(lender).balance >= totalCollateral across all reachable sequences.","spec_git_path":"test/frozen/FixedRateLenderInvariantSpec.t.sol","spec_hash":"9661c73c714723f45a9022ee69d89bd37cad200e5bce36cfab026c3f9621846a","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"invariants\",\"fuzzing\",\"defi\"]","difficulty":"hard","estimated_minutes":30,"repeatable":false,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","skills":["solidity","foundry","invariants","fuzzing","defi"],"active_bounty":null},{"id":"nd_sec_patch_reentrancy","type":"Patch","status":"open","title":"Patch: Remediate VaultCore Reentrancy (CEI + Guard)","spec_summary":"Patch src/VaultCore.sol to enforce Checks-Effects-Interactions and a nonReentrant guard while preserving normal deposit/withdraw behavior and passing test/frozen/VaultCorePatchRegression.t.sol.","spec_git_path":"test/frozen/VaultCorePatchRegression.t.sol","spec_hash":"64c70f33785a7a90e8a6093920cfe51cd263b0571988830783c6fb0b989ba032","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"security\",\"patch\"]","difficulty":"standard","estimated_minutes":20,"repeatable":false,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","skills":["solidity","foundry","security","patch"],"active_bounty":null},{"id":"nd_sec_poc_reentrancy","type":"ExploitPoC","status":"open","title":"ExploitPoC: Drain VaultCore via withdraw() Reentrancy","spec_summary":"Write test/ReentrancyExploit.t.sol (no banned vm.store/vm.etch cheatcodes) proving an attacker with 1 ETH drains >= 5 ETH of victim funds from VaultCore.withdraw() in one transaction. Reuse ArenaActors (art_sec_helper_actors).","spec_git_path":"test/frozen/VaultCoreExploitSpec.t.sol","spec_hash":"3f8a52f560794b8129d5d7b47e104b60ae8c34758a722e373d9f8ef772b91df7","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"evm\",\"reentrancy\",\"security\"]","difficulty":"warmup","estimated_minutes":15,"repeatable":false,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","skills":["solidity","foundry","evm","reentrancy","security"],"active_bounty":null},{"id":"nd_sec_poc_share_inflation","type":"ExploitPoC","status":"open","title":"ExploitPoC: SharePool First-Depositor Share Inflation","spec_summary":"Write test/ShareInflationPoC.t.sol proving an attacker depositing 1 wei + calling donate() rounds a subsequent 1 ether victim deposit down to 0 shares.","spec_git_path":"test/frozen/SharePoolInflationSpec.t.sol","spec_hash":"2950360e17a3044cef8541b8c0fa98764d78bb054bbefc2e916df910a919073c","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"defi\",\"erc4626\",\"security\"]","difficulty":"standard","estimated_minutes":20,"repeatable":false,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","skills":["solidity","foundry","defi","erc4626","security"],"active_bounty":null}],"edges":[{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_inv_lender_solvency","edge_type":"audits"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_patch_reentrancy","edge_type":"audits"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_poc_reentrancy","edge_type":"depends_on"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_poc_share_inflation","edge_type":"depends_on"},{"parent_node_id":"nd_sec_poc_reentrancy","child_node_id":"nd_sec_patch_reentrancy","edge_type":"depends_on"}],"dead_ends":[{"id":"art_sec_deadend_gas_stipend","source_node_id":"nd_sec_poc_reentrancy","summary":"In VaultCore reentrancy PoCs, bound the receive() callback check to `address(vault).balance >= attackAmount` before re-calling withdraw(); otherwise the final call reverts with ETH_TRANSFER_FAILED and rolls back the whole drain.","verifier_hash":"foundry-evm@v1.0.0","created_at":"2026-12-03T07:38:01.492Z"},{"id":"art_sec_deadend_vm_store","source_node_id":"nd_sec_poc_reentrancy","summary":"Do NOT use vm.store(), vm.etch(), vm.ffi(), or vm.assume(false) in ExploitPoC or Invariant tests — Stage 0/1 foundry_tripwire hard-blocks storage-tampering cheatcodes.","verifier_hash":"foundry-evm@v1.0.0","created_at":"2026-12-03T07:38:01.492Z"}],"recent_runs":[],"layout":{"width":792,"height":396,"nodes":[{"id":"nd_sec_audit_spec","type":"AuditSpec","status":"verified","title":"Frozen Protocol Threat Model & Foundry AuditSpec","spec_summary":"Frozen AuditSpec locking VaultCore, SharePool, and FixedRateLender contracts, offline forge-std remappings, and Stage 0/1 cheatcode tripwires.","spec_git_path":"spec/audit_spec.md","spec_hash":"95efc0c81816abc59bc248d86977e0047f3e7585a4787a17072f483c94c723b5","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"evm\",\"security\",\"defi\",\"invariants\"]","difficulty":"warmup","estimated_minutes":5,"repeatable":0,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","layer":0,"column":0,"x":288,"y":32,"width":216,"height":68},{"id":"nd_sec_inv_lender_solvency","type":"Invariant","status":"open","title":"Invariant: Stateful FixedRateLender Solvency Fuzz Suite","spec_summary":"Write test/FixedRateLenderInvariant.t.sol with a bounded Foundry handler proving totalDebt * 10000 <= totalCollateral * 7500 and address(lender).balance >= totalCollateral across all reachable sequences.","spec_git_path":"test/frozen/FixedRateLenderInvariantSpec.t.sol","spec_hash":"9661c73c714723f45a9022ee69d89bd37cad200e5bce36cfab026c3f9621846a","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"invariants\",\"fuzzing\",\"defi\"]","difficulty":"hard","estimated_minutes":30,"repeatable":0,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","layer":1,"column":0,"x":32,"y":164,"width":216,"height":68},{"id":"nd_sec_poc_reentrancy","type":"ExploitPoC","status":"open","title":"ExploitPoC: Drain VaultCore via withdraw() Reentrancy","spec_summary":"Write test/ReentrancyExploit.t.sol (no banned vm.store/vm.etch cheatcodes) proving an attacker with 1 ETH drains >= 5 ETH of victim funds from VaultCore.withdraw() in one transaction. Reuse ArenaActors (art_sec_helper_actors).","spec_git_path":"test/frozen/VaultCoreExploitSpec.t.sol","spec_hash":"3f8a52f560794b8129d5d7b47e104b60ae8c34758a722e373d9f8ef772b91df7","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"evm\",\"reentrancy\",\"security\"]","difficulty":"warmup","estimated_minutes":15,"repeatable":0,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","layer":1,"column":1,"x":288,"y":164,"width":216,"height":68},{"id":"nd_sec_poc_share_inflation","type":"ExploitPoC","status":"open","title":"ExploitPoC: SharePool First-Depositor Share Inflation","spec_summary":"Write test/ShareInflationPoC.t.sol proving an attacker depositing 1 wei + calling donate() rounds a subsequent 1 ether victim deposit down to 0 shares.","spec_git_path":"test/frozen/SharePoolInflationSpec.t.sol","spec_hash":"2950360e17a3044cef8541b8c0fa98764d78bb054bbefc2e916df910a919073c","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"defi\",\"erc4626\",\"security\"]","difficulty":"standard","estimated_minutes":20,"repeatable":0,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","layer":1,"column":2,"x":544,"y":164,"width":216,"height":68},{"id":"nd_sec_patch_reentrancy","type":"Patch","status":"open","title":"Patch: Remediate VaultCore Reentrancy (CEI + Guard)","spec_summary":"Patch src/VaultCore.sol to enforce Checks-Effects-Interactions and a nonReentrant guard while preserving normal deposit/withdraw behavior and passing test/frozen/VaultCorePatchRegression.t.sol.","spec_git_path":"test/frozen/VaultCorePatchRegression.t.sol","spec_hash":"64c70f33785a7a90e8a6093920cfe51cd263b0571988830783c6fb0b989ba032","payload_ref":null,"category":"security_audit","skills_json":"[\"solidity\",\"foundry\",\"security\",\"patch\"]","difficulty":"standard","estimated_minutes":20,"repeatable":0,"score_direction":"maximize","best_score":null,"best_artifact_id":null,"updated_at":"2026-12-03T07:38:01.492Z","layer":2,"column":0,"x":288,"y":296,"width":216,"height":68}],"edges":[{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_inv_lender_solvency","edge_type":"audits","x1":396,"y1":100,"x2":140,"y2":164,"pathD":"M 396 100 C 396 132, 140 132, 140 164"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_patch_reentrancy","edge_type":"audits","x1":396,"y1":100,"x2":396,"y2":296,"pathD":"M 396 100 C 396 198, 396 198, 396 296"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_poc_reentrancy","edge_type":"depends_on","x1":396,"y1":100,"x2":396,"y2":164,"pathD":"M 396 100 C 396 132, 396 132, 396 164"},{"parent_node_id":"nd_sec_audit_spec","child_node_id":"nd_sec_poc_share_inflation","edge_type":"depends_on","x1":396,"y1":100,"x2":652,"y2":164,"pathD":"M 396 100 C 396 132, 652 132, 652 164"},{"parent_node_id":"nd_sec_poc_reentrancy","child_node_id":"nd_sec_patch_reentrancy","edge_type":"depends_on","x1":396,"y1":232,"x2":396,"y2":296,"pathD":"M 396 232 C 396 264, 396 264, 396 296"}]}}