MetaMask / MetaMask/metamask-extension

Prevent tx submission when custom gas limit is significantly below MetaMask's estimate

Open
#7,423 0 comments 1 reaction 0 assignees View on GitHub
type-enhancement
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

[This issue](https://github.com/MetaMask/metamask-extension/issues/7382) happened when a tx was submitted with a gas limit of 21000. We should prevent tx submission in cases where customized limits are significantly below our estimated required gas.

Determining what constitutes "significantly below" is an open question. We can definitely prevent this is cases where we know we are sending to a contract, or when data is provided, and the gas limit is 21000.

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked issue 7382 and tracing MetaMask's transaction submission and gas-estimation entry points. Clarify what counts as significantly below the estimate, including the stated contract, data, and 21000-gas cases; done means unsafe submissions are prevented with coverage for the agreed rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.