apply_execution_buffer

Documentation for eth_defi.gmx.gas_utils.apply_execution_buffer function.

apply_execution_buffer(base_fee, execution_buffer, validate=True)

Apply the execution buffer multiplier to a base execution fee.

Multiplies the base fee by the given buffer to produce a fee high enough for GMX keepers to execute profitably. Any excess is refunded by GMX.

Parameters
  • base_fee (int) – Raw execution fee in wei, typically gas_limit * gas_price.

  • execution_buffer (float) – Multiplier to apply. See DEFAULT_EXECUTION_BUFFER for the recommended default.

  • validate (bool) – If True (default), call validate_execution_buffer() before applying. Set to False to skip validation when the buffer has already been validated earlier in the call chain.

Returns

The buffered execution fee in wei.

Return type

int