Skill 3.1.3
Identify unsafe external calls and denial-of-service risks
Key Concepts
Low-level call, send and delegatecall return false on failure instead of reverting. Code that ignores the returned value, such as payable(to).send(amount);, continues as if the payment succeeded. Some older tokens also return nothing, or false, instead of reverting; OpenZeppelin's SafeERC20 handles them. Calling untrusted contracts, especially with delegatecall, lets them run code with the caller's authority.
Denial of service takes several forms. A function that loops over an array that anyone can grow will eventually need more gas than a transaction may use and then can never succeed. A function that pushes payments to many recipients in one transaction fails entirely if one recipient's receive reverts, as in the "King of the Ether" example where a contract refused refunds to keep its position. Relying on a single external contract or oracle that can be paused or manipulated is another availability risk.