flashbots / simple-arbitrage

Example arbitrage bot using Flashbots
1.98k stars 749 forks source link

Gas estimation failed #11

Open konstiantyn opened 3 years ago

konstiantyn commented 3 years ago

I'm getting this error. I changed serval ether.js version. But same error. 6A37CDE4-BE97-11EB-8CA0-8CEC4B55F049

ozgurk78 commented 3 years ago

I have same error , I guess ; No problem with any code, just no suitable Opportunity found.

KidL84 commented 2 years ago

same issue. Any solutions?

petenilson commented 2 years ago

I'm getting the same issue. When I dig into the error details I'm seeing code: 'UNPREDICTABLE_GAS_LIMIT', returned by the server. Any ideas?

red-saint-nft commented 2 years ago

@petenilson which chain are you running it on? Getting same error on different chain.

petenilson commented 2 years ago

@petenilson which chain are you running it on? Getting same error on different chain.

Ethereum main net

dariobuzz commented 2 years ago

same issue 'UNPREDICTABLE_GAS_LIMIT', how can I fix it?

ss-zheng commented 1 year ago

same issue here, any solution? Can we skip gas estimation?

RH-Adv1c3 commented 6 months ago

same issue here, any solution? Can we skip gas estimation?

In Theory yes, you could replace await this.bundleExecutorContract.provider.estimateGas( { ...transaction, from: this.executorWallet.address }) With a gas number which you find to be the average of a transaction. It sends gas limit double the number you put in. This is far from optimal to use but it's technically a go around. If you don't want to use static gas, then you'd have to see if you can change the ethers estimation interaction. Or change it with another lib. I haven't found the solution yet but I've had this for a couple hours now so.