Skip to main content

Gas Cap

Definition

A gas cap sets an upper limit on the amount of gas a user is willing to spend for a transaction on a blockchain. This user-defined parameter specifies the maximum computational units a transaction can consume, preventing excessive costs due to complex operations or network congestion. When the transaction’s actual gas consumption exceeds this cap, the transaction fails, but the sender still pays for the consumed gas. It acts as a protective measure against unforeseen fee spikes and resource exhaustion.