๐ Bug HuntSO Solidity Hardโก+35 XP
Reentrancy Vulnerability
This withdraw function is vulnerable to reentrancy.
๐ Find the bug
1
function withdraw(uint amt) external {2
require(balances[msg.sender] >= amt);3
msg.sender.call{value: amt}("");4
balances[msg.sender] -= amt;5
}๐ The bug is on line 3