MetaMask / MetaMask/metamask-extension
Contracts who have loops with undefined number of iterations cause wrong price estimates
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
There are certain methods where it is hard to estimate gas. Example: exchange at [Curve](https://compound.curve.fi/), [recording](https://twitter.com/CurveFinance/status/1221433123507986433). The estimated gas amount is over 9 million while typical is 650k.
It it possible to let Metamask follow the gas estimates recorded in the ABI rather than re-estimating?
Contributor guide
Research direction
The issue names no files or tests. Start by tracing MetaMask’s transaction gas-estimation flow and how ABI gas values are handled, then reproduce the Curve exchange case. Done means the relevant ABI estimate can be used without an inflated re-estimation for contracts with loops of undefined length.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100