Skip to content

fix(money-account-mfa-whitelist): stop 2FA prompts on Money deposits and MPC migration - #11310

Open
tylerc-consensys wants to merge 4 commits into
mainfrom
fix/mfa-whitelist-redeemer-caveat
Open

tylerc-consensys wants to merge 4 commits into
mainfrom
fix/mfa-whitelist-redeemer-caveat

Conversation

@tylerc-consensys

@tylerc-consensys tylerc-consensys commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Currently the MPC Money Account flow has 2 steps prompting 2FA where we could skip it (for better UX).

1. Money deposit

  • Before: prompts 2FA.
  • After: single-use deposit delegations may carry one Redeemer caveat, which Mobile adds for gasless relays (metamask-mobile#37041). It only narrows who can redeem; the executions are checked as before.

2. Turning on 2-step verification (migration to the MPC Money Account)

  • Before: prompts 2FA a second time, right after setup, when the new account signs CHOMP's ownership message (ASSOCIATE_SUCCESSOR).
  • After: the message is allowed when it names the Money Account as successor, on the Money Account chain, and hasn't expired. Needs the new chompSignInDomain config field. It only links the two addresses; moving funds still needs the old account's signature.

Message signed during migration on dev:

chomp.dev-api.cx.metamask.io wants you to sign in with your Ethereum account:
0x81d67e7a8F25c8709291AE924Db3d2D827acD294

Associate 0x81d67e7a8f25c8709291ae924db3d2d827acd294 as the successor of 0xc1c732b47c6604f94ae69db0a34ced0b03f1fbe8 for CHOMP Money Account migration.

URI: https://chomp.dev-api.cx.metamask.io/
Version: 1
Chain ID: 143
Nonce: f60ff0d2a6c02b70ce5106097dabd163
Issued At: 2026-11-13T08:37:28.096Z
Expiration Time: 2026-11-13T08:42:28.096Z
Request ID: bcde79a3-12a8-419a-b404-579f7b5f69c3
Resources:
- urn:chomp:profile:79678b20-061e-4246-a1de-5dc1a8074564
- urn:chomp:purpose:ASSOCIATE_SUCCESSOR
- urn:chomp:predecessor:0xc1c732b47c6604f94ae69db0a34ced0b03f1fbe8

After this is released

  • metamask-mobile: bump the package and add chompSignInDomain to MPC_MFA_WHITELIST_CONFIG.
  • MPC service (va-mmcx-mpc-service-api): bump @metamask/money-account-mfa-whitelist (pinned at 0.2.0). It runs the same check and answers mfa_required otherwise.
  • MPC service config (va-mmcx-mpc-service-api-workload): add "chompSignInDomain": "chomp.dev-api.cx.metamask.io" to MPC_MFA_WHITELIST_CONFIG.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes which Money Account signatures bypass MFA; rules are narrow and fail closed, but misconfigured chompSignInDomain or overly permissive redeemer handling could weaken protection.

Overview
Reduces unnecessary 2FA during MPC Money Account migration and vault deposits by widening the MFA whitelist with tighter, config-bound checks.

Adds whitelist rule chomp-successor-association for CHOMP’s ASSOCIATE_SUCCESSOR SIWE personal message when chompSignInDomain is set—validates domain/URI, Money Account as signer and successor, matching predecessor in statement vs resources, chain, and freshness—so linking accounts during migration does not require MFA (funds still need the predecessor’s signature).

Single-use vault-deposit-delegation now tolerates an optional Redeemer caveat alongside LimitedCalls(1), exact vault deposit execution, and an optional Timestamp deadline (caveats in any order), matching Mobile gasless relay delegations; non-deposit executions still require MFA.

Introduces shared isFreshSignIn for SIWE expiry checks, extends config/types/docs/tests accordingly.

Reviewed by Cursor Bugbot for commit 6937b3a. Bugbot is set up for automated code reviews on this repo. Configure here.

@tylerc-consensys
tylerc-consensys requested review from a team as code owners November 5, 2026 02:38
@tylerc-consensys tylerc-consensys self-assigned this Nov 5, 2026
@tylerc-consensys tylerc-consensys changed the title fix(money-account-mfa-whitelist): allow a Redeemer caveat on single-use deposit delegations fix(money-account-mfa-whitelist): stop 2FA prompts on Money deposits and MPC migration Nov 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7a57e44. Configure here.

tylerc-consensys and others added 4 commits November 16, 2026 17:16
…se deposit delegations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ciation message

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MfaWhitelistRule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tylerc-consensys
tylerc-consensys force-pushed the fix/mfa-whitelist-redeemer-caveat branch from 7a57e44 to 6937b3a Compare November 16, 2026 09:18
@github-actions

Copy link
Copy Markdown
Contributor

🛑 Files requiring codeowner review

To merge this PR, you'll need to get approvals from the following owners.

@MetaMask/earn (7 files)
  • packages/money-account-mfa-whitelist/CHANGELOG.md
  • packages/money-account-mfa-whitelist/README.md
  • packages/money-account-mfa-whitelist/src/delegation.ts
  • packages/money-account-mfa-whitelist/src/get-mfa-requirement.test.ts
  • packages/money-account-mfa-whitelist/src/personal-message.ts
  • packages/money-account-mfa-whitelist/src/types.ts
  • packages/money-account-mfa-whitelist/tests/fixtures.ts

ℹ️ Files co-owned by @MetaMask/core-platform (expand for more)

[!NOTE]
For convenience in maintaining this repo, @MetaMask/core-platform co-owns
the following files. It is not required to seek approval from
@MetaMask/core-platform to change these files. This section is purely
informational.

  • packages/money-account-mfa-whitelist/CHANGELOG.md

This branch was previously deployed

1 inactive (outdated) deployment
default-branch — 23b85198 Deployed Nov 5, 2026 by tylerc-consensys via Determine whether this PR is a release PR #6538
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

Successfully merging this pull request may close these issues.

1 participant