Description
Problem Statement
When a user's address (for which they hold the private key) is initialized as a Mint account and the mint authority is later discarded, users can inadvertently transfer native SOL to this address. Since this address belongs to the user, it's easy to mistakenly send SOL to it, resulting in lost funds that cannot be recovered through standard methods.
Furthermore, this vulnerability can be exploited in phishing attacks where users are tricked into signing transactions that convert their addresses into Mint accounts with the attacker holding the mint authority. In such cases, users lose access to any native SOL in those accounts.
This is a common issue that occurs when:
Users reuse addresses for different purposes
Users interact with UI/dApps that don't properly warn about these limitations
Users don't fully understand the implications of initializing an address as a Mint
Proposed Solution
I propose implementing a recovery mechanism that allows the private key holder of a Mint address to rescue any native SOL exceeding the rent exemption amount:
Add a new instruction to the Token Program that enables the signer of a Mint account (the holder of the private key) to transfer excess SOL from the Mint account to their wrapped SOL Associated Token Account (ATA)
This operation would:
Maintain the minimum rent exemption amount in the Mint account
Only transfer the excess SOL to the signer's wrapped SOL ATA
Require a valid signature from the private key holder of the Mint address
Not modify any other properties or data of the Mint account
This approach preserves the security model of the Token Program while providing a practical recovery path for users who have mistakenly lost access to their SOL. Since the funds are transferred to wrapped SOL in the user's own ATA, they maintain full control over these recovered assets.
Implementation Considerations
This solution is similar to the RecoverLamports instruction proposed in PR #2741 but specifically addresses the Mint account use case. It respects the authority principle since only the original address owner (with the private key) can initiate the recovery.