We made a smart contract where you send it ETH, it checks the current price of ETH/USD using a chainlink oracle and then sends back our token at 12 cents a token until March 1, then 15 cents etc.
All people do is send ETH to the contract, and then the payable function gets triggered and executes all this other stuff. Somehow, the main wallets all consistently UNDERESTIMATE how much gas is supposed to be used. Does this have something to do with the fact that the person is sending ETH so they think there should be a ceiling to how expensive that transaction can be, versus a call to some method directly, even though the payable hook consumes quite a bit?
The largest gas cost honestly is checking the chainlink oracle. I am not sure why! Isn’t it just looking up a value?
Here is my main question ... can’t wallets see the whole blockchain and simulate the execution of the ENTIRE CALL, and sum up the current gas price it would take? Where are the unpredictable spots for them to underestimate the cost so wildly?
What can we do to fix it?