SCWE-127: EIP-1559 Basefee Assumptions
Stable Version v1.0
This content is in the version-(v1.0) and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Relationships¶
- CWE-841: Improper Enforcement of Behavioral Workflow
https://cwe.mitre.org/data/definitions/841.html
Description¶
Hardcoding gas price/basefee assumptions (e.g., fixed gasprice limits or expecting refunds) can break on EIP-1559 chains. Contracts that require exact block.basefee ranges or reimburse fixed gas can become stuck or exploitable via gas griefing.
Remediation¶
- Avoid relying on specific basefee values; parameterize and allow updates via governance with delays.
- Use robust gas estimation and caps on external calls; avoid refund-dependent logic.
- Simulate on mainnet forks with varying basefee to validate liveness.