MetaMask / MetaMask/metamask-mobile

Proposal for Recovery Phrase Update and Self-Destruct Feature in MetaMask Wallet

Open
#11,521 0 comments 0 reactions 0 assignees View on GitHub
external-contributor
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

**### Formal Issue Proposal for MetaMask Wallet Upgrade**

_**_**Title:** Proposal for Recovery Phrase Update and Self-Destruct Feature in MetaMask Wallet_**_

---

#### Background

MetaMask is widely recognized as one of the leading cryptocurrency wallets, providing users with a secure means of managing their digital assets. However, as the landscape of online security continues to evolve, it is imperative that MetaMask enhances its features to better protect its users from potential threats.

#### Issue Description

Currently, once a recovery phrase is set, users cannot modify it. This limitation poses a significant risk, especially in the event of a suspected security compromise. Additionally, there is a lack of an immediate response mechanism for users who believe their wallets may have been compromised.

#### Proposal for Enhancement

1. **Change Recovery Phrase Feature:**
- **Objective:** Allow users to update their recovery phrase when they suspect their wallet or security has been compromised.
- **Implementation Consideration:** Users would be prompted to go through a secure verification process before changing their recovery phrase to ensure that the request is legitimate.

2. **Self-Destruct Button:**
- **Objective:** Introduce a self-destruct feature that enables users to safely destroy their wallet and transfer funds to a new wallet in case of a security breach.
- **Implementation Consideration:** This feature should include:
- A user-friendly interface to initiate the self-destruct process.
- A verification step to confirm the user’s identity.
- An automated transfer of all funds to a new wallet address generated by the metamask wallet with zero(0) fees hence in terms clone the wallet. Here's a code sample of the new feature:

`const { ethers } = require("ethers");

// Function to generate a new wallet
function generateWallet() {
const wallet = ethers.Wallet.createRandom();
console.log("New Wallet Generated:");
console.log("Address:", wallet.address);
console.log("Private Key:", wallet.privateKey);
return wallet;
}

// Function to clone a wallet
function cloneWallet(originalWallet) {
const clonedWallet = new ethers.Wallet(originalWallet.privateKey);
console.log("Wallet Cloned:");
console.log("Cloned Address:", clonedWallet.address);
return clonedWallet;
}

// Function to destroy the original wallet
function destroyWallet(originalWallet, newWalletAddress) {
console.log("Destroying Original Wallet...");
// In a real scenario, you would implement fund transfer logic here
console.log(`Transferring funds from ${originalWallet.address} to ${newWalletAddress}`);
console.log("Original wallet destroyed. Funds moved successfully.");
}

// Main flow
const originalWallet = generateWallet();
const clonedWallet = cloneWallet(originalWallet);
destroyWallet(originalWallet, clonedWallet.address);
`

#### Benefits

- **Enhanced Security:** Allowing users to change their recovery phrase and enabling a self-destruct feature will significantly increase user confidence in the security of their assets.
- **User Control:** These features empower users to take proactive measures in managing their digital security, ensuring that they can respond effectively to potential threats.
- **Community Trust:** By addressing these security concerns, MetaMask can reinforce its position as a leader in the cryptocurrency space and enhance user trust in the platform.

#### Conclusion

As security threats continue to emerge, it is vital for MetaMask to adapt and provide users with more robust tools to protect their assets. The proposed features for changing the recovery phrase and implementing a self-destruct mechanism represent a significant step forward in safeguarding users' digital currencies.

I appreciate your consideration of this proposal and look forward to your response.

**Sincerely,**
mortysmith

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

Research direction

The proposal names no files, tests, or entry points to inspect, and its technical details and acceptance criteria are empty. Start by clarifying the recovery-phrase and self-destruct designs, threat model, security requirements, and measurable completion criteria before locating implementation areas or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, react-native, typescript
Domain
blockchain, mobile-dev, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.