Using Defender Relay on Goerli and noticing that often the used gasPrice is much higher than the gas price you would observe by simply calling
provider.getGasPrice() or looking at the majority of other transactions on Goerli Etherscan. When I turn EIP-1559 txs off though, gas price estimation becomes accurate.
Open Zeppelin Defender Relay on Goerli Testnet
Usually Goerli gasPrice has been around 10-15 wei, but there have been many transactions we've sent through Relay that are priced at 0.5 - 1.5 gwei (hundreds of times higher).
I notice that when I click into the relayer, go to policies -> manage, and turn off EIP-1559 transactions OFF, the gas price estimation works correctly (is around 10-15 wei again). Attaching some example txs below. We specifically turned OFF EIP-1559 transactions around block 9807722 on goerli so you'll see in the contract (0x37fa8145F63A39B55b5a98bdF14Ae505CA4087f2) that gas price is very inconsistent/high before block 9807722 then becomes consistent and accurate after we turn off EIP-1559 txs.
EIP-1559 Transaction (gasPrice = 1 gwei)
Non-EIP-1559 (gasPrice = 11 wei)
Code to reproduce
- Submit Goerli some transactions via relay with EIP-1559 turned ON
- Submit Goerli some transactions via relay with EIP-1559 turned OFF