click below
click below
Normal Size Small Size show me how
DOS
All about denial of service in Solidity.
Question | Answer |
---|---|
Define a DOS | A conditional statement ( if . for , while ) should not depend on an external call: the callee may permanently fail ( throw or revert ), preventing the caller from completing the execution. |
Denial of Service (DoS) Attacks Mitigation: | Implement rate limiting and circuit-breaking mechanisms, use gas stipends for external calls, set appropriate timeouts and maximum loop iterations, and consider potential resource exhaustion scenarios during contract design. |
DoS with (unexpected) revert | DoS (denial-of-service) attacks can occur in functions when you try to send funds to a user and the functionality relies on that fund transfer being successful. This can be problematic in the case that the funds are sent to a smart contract created by |
DoS with block gas limit | In the Ethereum blockchain, the blocks all have a gas limit. One of the benefits of a block gas limit is it prevents attackers from creating an infinite transaction loop, but if the gas usage of a transaction exceeds this limit, the transaction will fail. |