Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_estimateGas is not supplied the gasPrice parameter #118

Closed
wjmelements opened this issue Feb 14, 2019 · 4 comments
Closed

eth_estimateGas is not supplied the gasPrice parameter #118

wjmelements opened this issue Feb 14, 2019 · 4 comments

Comments

@wjmelements
Copy link

wjmelements commented Feb 14, 2019

Because Ethereum transactions can call the GASPRICE opcode (3a) and branch on it, eth_estimateGas without a gasPrice parameter can return inaccurate results. Transactions that do not supply enough gasLimit will revert.

You can test this by estimating gas on a TrueUSD transfer. The gasLimit required is approximately 21k higher for a 40 gwei tx than for a 1 wei tx.

A discussion of this issue for another project is here.

TrueUSD is the rank 4 ERC20 token by market cap. Please prioritize this issue so your users can use TrueUSD.

@wjmelements
Copy link
Author

We have temporarily lowered the refund threshold in order to alleviate the issue. The lower gasPrice to test with is now 1 wei.

You can also use the contract at 0x28a958cD020efeA3734a0bb36DDdc5F9B872cEa8 to test your estimateGas fix.

@shamatar
Copy link
Contributor

@wjmelements Great point. I’ve totally forgot it when was making the original implementation. @BaldyAsh can you quickly fix this?

@BaldyAsh
Copy link
Collaborator

BaldyAsh commented Feb 27, 2019

@wjmelements hi! Think I've fixed it, but need some tusd for test . Could you provide some? If yes, then my address: 0x4fd693F57e63714591A07A73A4D7AD84e5cCdE10

@BaldyAsh
Copy link
Collaborator

BaldyAsh commented Mar 4, 2019

@wjmelements Tested on contract you've posted to this discussion. Closed by #199.
If there will be some problems just re-open this issue

@BaldyAsh BaldyAsh closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants