Reentrancy Guards
Reentrancy guards are a specific implementation pattern in smart contracts that prevents a function from being called again while it is still executing. This is typically achieved by using a boolean flag that is set to true when the function begins and false when it finishes.
If a call is made to the function while the flag is true, the transaction is reverted. This is a simple but effective defense against reentrancy attacks.
It provides an additional layer of security for functions that interact with untrusted external contracts.