13. Reentrancy Attack
Last updated
Last updated
If we call a function of another contract in the middle of a withdraw, the other contract may have malicious function which may recalls the withdraw function again and again resulting in draining of all the funds
https://solidity-by-example.org/hacks/re-entrancy/
Always call another contract in the last step of transaction
Updated balances (change state) before calling another contract
Use a mutex
Openzepplin provides a way to safeguard i.e a Modifier
Contract name is