Cannot sign a UserOperation for gasless approve + swap with MetaMask Stateless7702
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- blockchain, typescript
- Domain
- api, blockchain, security
Research direction
Review the restriction referenced in core PR 5470 and trace how @metamask/smart-accounts-kit forms the EIP-712 payload for eth_signTypedData_v4. Compare the delegated EOA and Stateless7702 implementation cases, then examine wallet_sendCalls and the external bundler/paymaster questions. Done means documenting the supported integration route and the security rationale, or identifying the required product change.
Written by the indexing model from the issue text.
Description
Hi MetaMask team,
I try to build a gasless atomic approve + swap flow for a MetaMask EOA that has already delegated to the Stateless7702 implementation.
The intended flow is:
User signs a UserOperation
→ External bundler submits it
→ External paymaster sponsors the gas
→ EntryPoint executes approve + swap
Using @metamask/smart-accounts-kit, the canonical EIP-712 payload sets verifyingContract to the delegated user EOA. This appears correct because the Stateless7702 implementation executes in the EOA's context.
However, MetaMask rejects eth_signTypedData_v4 with this error:
"External signature requests cannot use internal accounts as the verifying contract."
Using the Stateless7702 implementation address instead allows signing, but produces an invalid UserOperation signature because it changes the EIP-712 digest.
I found the related restriction here:
https://github.com/MetaMask/core/pull/5470
Could you please clarify:
-
Is raw UserOperation signing for a MetaMask-managed EIP-7702 EOA intentionally unsupported for external dapps?
-
What security risk is this restriction designed to prevent?
-
What is the supported integration route for a dapp to implement gasless approve + swap using its own bundler and paymaster?
-
If wallet_sendCalls is required, how can the dapp specify an external paymaster?
Thanks !
- Dominant language
- TypeScript
- Stars
- 422
- Forks
- 313
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 414
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/core
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
CI: "Validate changelog diffs" job fails on every fork-sourced pull requestPossibly taken @Roxen-AS claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`Possibly taken @gaohan1994 claimed this 21 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`Possibly taken @avantikonde claimed this 34 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MetaMask/core#10210 · 1 reaction ·
Maintainers usually reply within 1 day
-
[utils] `toWei` accepts fractional wei and returns wrong valuesPossibly taken @Roxen-AS claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
enhancement module: library-ui
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
chthollyphile/folia-major#1206 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
typescript-eslint/typescript-eslint#13189 ·
Maintainers usually reply within 2 days
-
severity:medium triage:confirmed triage:in-progress triage:reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Cotal-AI/Cotal#6442 · 2 comments ·
Maintainers usually reply within 1 day
-
wrong type
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
elastic/elasticsearch-specification#6919 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day