Reentrancy in withdraw()
Vault.sol:16-19
Missing Access Control on mint()
Token.sol:14-15
Oracle Price Manipulation
Oracle.sol:18-20
Flash Loan Governance Attack
Governor.sol:21-30
First Depositor Inflation
ERC4626Vault.sol:16-19
Unverified Message Processing
TokenBridge.sol:21-32
Reward Calculation Flaw
Staking.sol:15-23
1// SPDX-License-Identifier: MIT 2pragma solidity ^0.8.19; 3 4contract Vault { 5 mapping(address => uint256) public balances; 6 7 function deposit() external payable { 8 balances[msg.sender] += msg.value; 9 } 10 11 function withdraw() external { 12 uint256 balance = balances[msg.sender]; 13 require(balance > 0, "No balance"); 14 15 // CEI Violation: call before state update 16 (bool success, ) = msg.sender.call{value: balance}(""); 17 require(success, "Transfer failed"); 18 19 balances[msg.sender] = 0; // Too late 20 } 21 22 receive() external payable {} 23}
Vulnerability Patterns
Analysis Depth
LLM Models
AI Agents