[Paper Review] An Adaptive Gas Cost Mechanism for Ethereum to Defend Against Under-Priced DoS Attacks
This paper proposes an adaptive gas cost mechanism for Ethereum that dynamically adjusts operation costs based on execution frequency to defend against both known and unknown under-priced DoS attacks. By using an emulation-based framework to measure EVM resource consumption and a special smart contract to enable runtime parameter updates, the method effectively mitigates DoS threats with negligible overhead for legitimate users.
The gas mechanism in Ethereum charges the execution of every operation to ensure that smart contracts running in EVM (Ethereum Virtual Machine) will be eventually terminated. Failing to properly set the gas costs of EVM operations allows attackers to launch DoS attacks on Ethereum. Although Ethereum recently adjusted the gas costs of EVM operations to defend against known DoS attacks, it remains unknown whether the new setting is proper and how to configure it to defend against unknown DoS attacks. In this paper, we make the first step to address this challenging issue by first proposing an emulation-based framework to automatically measure the resource consumptions of EVM operations. The results reveal that Ethereum's new setting is still not proper. Moreover, we obtain an insight that there may always exist exploitable under-priced operations if the cost is fixed. Hence, we propose a novel gas cost mechanism, which dynamically adjusts the costs of EVM operations according to the number of executions, to thwart DoS attacks. This method punishes the operations that are executed much more frequently than before and lead to high gas costs. To make our solution flexible and secure and avoid frequent update of Ethereum client, we design a special smart contract that collaborates with the updated EVM for dynamic parameter adjustment. Experimental results demonstrate that our method can effectively thwart both known and unknown DoS attacks with flexible parameter settings. Moreover, our method only introduces negligible additional gas consumption for benign users.
Motivation & Objective
- To investigate whether Ethereum's current fixed gas cost settings are sufficient to defend against both known and unknown DoS attacks.
- To identify the limitations of static gas cost assignments in the face of evolving EVM workloads and resource consumption patterns.
- To design a flexible, secure, and efficient mechanism that can adaptively adjust gas costs in response to abnormal execution frequencies.
- To enable dynamic parameter updates without frequent Ethereum client upgrades, ensuring long-term maintainability.
- To evaluate the mechanism’s effectiveness against both known and unknown DoS attacks under realistic conditions.
Proposed method
- Develops an emulation-based framework to automatically measure the actual resource consumption (CPU, memory) of EVM operations across diverse execution paths.
- Uses the framework to analyze Ethereum’s current gas cost settings, revealing that even recent adjustments remain insufficient for full DoS protection.
- Proposes a dynamic gas cost mechanism that increases the cost of operations executed significantly more frequently than normal, thereby deterring attackers.
- Introduces a special smart contract that collaborates with a patched EVM to securely and flexibly update cost adjustment parameters without requiring Ethereum client updates.
- Employs a sliding window mechanism with statistical analysis (mean and standard deviation) to detect abnormal execution patterns and flag potential DoS attempts.
- Filters out malicious transactions using sender addresses, function calls, and execution traces to prevent parameter tampering.
Experimental results
Research questions
- RQ1Is Ethereum’s current fixed gas cost configuration resilient against both known and unknown DoS attacks?
- RQ2Can a dynamic gas cost mechanism that adapts to execution frequency effectively prevent under-priced DoS attacks?
- RQ3How can the gas cost adjustment mechanism be made secure and flexible without requiring frequent Ethereum client updates?
- RQ4What is the performance overhead of the proposed mechanism on legitimate (benign) transactions?
- RQ5Can the system detect and respond to DoS attacks quickly and accurately using statistical anomaly detection?
Key findings
- The emulation framework revealed that Ethereum’s current gas cost settings, even after recent adjustments, remain inadequate for defending against DoS attacks due to under-priced operations.
- The study found that fixed gas costs are inherently vulnerable because resource consumption patterns and system workloads evolve over time, making static pricing insufficient.
- The proposed adaptive gas cost mechanism successfully mitigates both known and unknown DoS attacks by increasing costs for overused operations, effectively deterring attackers.
- The mechanism introduces negligible additional gas consumption—under 0.1%—for benign users across various parameter settings, ensuring minimal performance impact.
- The use of a smart contract for dynamic parameter updates enables secure and flexible configuration changes without requiring Ethereum client upgrades.
- The detection mechanism, based on statistical analysis of execution frequency over a sliding window, can identify DoS attacks quickly and resist manipulation attempts.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.