This is a broad category of attacks where an attacker may render a contract inoperable, temporarily or permanently.
An attacker may be able to exploit the fact that transfer
(alternatively require(addr.send(amount))
) reverts on failure to prevent a function from ever completing execution.
In cases where the users of a system can manipulate how much computation (gas) is necessary for the execution of some function, it may be possible to DOS the system by causing the required gas to exceed the block gas limit. This is often the case in systems that loop over an array or mapping that can be enlarged by users at little cost.
In some cases, developers may want to make a transfer and continue execution regardless of the result. One way to achieve this is with call.value(v)()
, however this may allow the recipient to consume all the gas of the calling function, preventing execution from continuing. See example 1 here: