safe-config-service icon indicating copy to clipboard operation
safe-config-service copied to clipboard

Better EIP 1559 support for oracle gas price

Open schmanu opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe. For EIP 1559 we need different values for gas price estimation:

  • maxFeePerGas OR baseFee
  • maxPriorityFeePerGas

This is currently poorly reflected by our oracle settings as we can only configure one Oracle parameter.

Provide references to the feature you are implementing that requires this change Workaround for this in the web interface: https://github.com/safe-global/safe-wallet-web/pull/3380

Describe the solution you'd like We need to be able to configure multiple oracle parameters for 1559 networks. Sadly oracles can vary in which parameters they return. So ideally we invent a new 1559 oracle type which can have different fields:

  • uri (required)
  • baseFeeParameter
  • maxPriorityFeePerGasParameter
  • maxFeePerGasParameter

Any two of the paramter values would be required as the third value can be computed from any combinations

  • baseFeeParameter + maxPriorityFeePerGasParameter = maxFeePerGas
  • maxFeePerGasParameter - baseFeeParameter = maxPriorityFeePerGas
  • maxFeePerGasParameter - maxPriorityFeePerGasParameter = baseFeeParameter

Describe alternatives you've considered None

Additional context

  • https://eips.ethereum.org/EIPS/eip-1559

schmanu avatar Mar 04 '24 12:03 schmanu