gnosis / dex-services

Off-chain services for the Gnosis Protocol v1.
33 stars 9 forks source link

Use smarter gas prices for solution submission #1518

Closed e00E closed 4 years ago

e00E commented 4 years ago

Our current algorithm starts at fast gas price and increases the gas price of the transaction by 50% every 30 seconds that the transaction hasn't been mined up to the max gas economically viable gas price. The new algorithm always uses the correct gas price according to our smarter gas estimation which is based on the time it should take to mine the transaction. This gas price is updated in short intervals and the transaction is resubmitted if the gas price increases. The gas price is still capped by economic viability. This should lead to lower gas prices as we can pick a lower starting gas price when there is still more time left to solve the batch and because we never pick a gas price that is higher than what the gas station predict we need to pay to get into the next block.

Test Plan

Adjusted unit tests