Category: Coding Mistakes
Potential division by zero in fee_checker
Low Severity
Low Impact
Low Likelihood
Description
A divide-by-zero error may occur if the gas is zero when calculating the fee cap:
feeCap := fee.Quo(sdkmath.NewIntFromUint64(gas))
Without a check ensuring gas > 0
, runtime errors could disrupt transaction processing.
Impact
The node could reject or fail to process transactions with zero gas.
Recommendations
Add a check to ensure the gas is nonzero in the validation logic.
Remediation
This issue has been acknowledged by Sigma Assets GmbH, and a fix was implemented in commit 1f238cb8↗.