MetaMask / MetaMask/metamask-mobile

[Bug]: Money Account Send flow fails [MM-PAY]

Open
#32,457 1 comment 0 reactions 1 assignee Claimed by @matthewwalsh0 View on GitHub
needs-triage regression-RC-8.0.0 release-blocker ta-bot-triage type-bug
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### Describe the bug

MM Pay Send Flow — Issue Summary on Build: `v8.00 `(`5719, 5718, 5710`)

The send flow is broken due to multiple overlapping errors:
Root cause (Money Account → Perps/Predict): Balance validation checks totalFiatRaw (total Money Account balance) instead of withdrawableMusd, allowing users to attempt withdrawals that exceed their actual vmUSD balance, causing Arithmetic overflow or underflow reverts. Fix: [PR #32452](https://github.com/MetaMask/metamask-mobile/pull/32452) by Jyoti Puri corrects validation in [useInsufficientPayTokenBalanceAlert.ts](https://github.com/MetaMask/metamask-mobile/blob/main/app/components/Views/confirmations/hooks/alerts/useInsufficientPayTokenBalanceAlert.ts#L63).
Slippage issue (Custom error 0x9883): The withdraw flow passes zero slippage tolerance (minimumAssets) to the Teller contract — if the vault share rate shifts between quote and execution, the transaction reverts. The app shows an error rather than prompting the user to retry with a fresh quote as originally intended. Shane has drafted [PR #32455](https://github.com/MetaMask/metamask-mobile/pull/32455) to make slippage tolerance configurable via a [LaunchDarkly flag](https://app.launchdarkly.com/projects/metamask-client-config-api-mobile/flags/money-account-withdrawal-slippage-tolerance) (money-account-withdrawal-slippage-tolerance), though the appropriate value is unknown without more revert data. Rate monitoring suggests the rate only increases monotonically, so the anomaly may have been a one-time event.
Secondary/resolved issues: Token balance is too low and Chain disabled errors were caused by Base temporarily going down on Relay and have since resolved. Longer-term, Matthew Walsh has a simulation/validation layer in progress for MetaMask Pay that would catch these errors at quote time.

Thread here https://consensys.slack.com/archives/C0BCUMGD0CW/p1782397649724789

https://github.com/user-attachments/assets/0c256cf3-3454-4cf5-acb8-49e50687bee3

https://github.com/user-attachments/assets/56df9ff7-2ce1-41aa-99b6-996d38497516

### Expected behavior

_No response_

### Screenshots/Recordings

_No response_

### Steps to reproduce

Money account
Click Send
See Error

### Error messages or log output

```shell

```

### Where was this bug found?

Internal release testing

### Version

8.0.0

### Build number

5718

### Build type

Other (please specify exactly where you obtained this build in "Additional Context" section)

### Device

iPhone 14 Pro Max

### Operating system

iOS

### Additional context

_No response_

### Severity

Release Blocker

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.