Phantom
Phantom Overview¶
Phantom is the most popular cryptocurrency wallet in the Solana ecosystem, developed and maintained by Phantom Technologies. As a self-custodial digital wallet, Phantom provides users with a secure and convenient way to manage multi-chain assets on Solana, Ethereum, Polygon, and Bitcoin, and to interact with decentralized applications (DApps). Since its launch in 2021, Phantom has rapidly become the wallet of choice for Solana users, thanks to its clean design, powerful features, and excellent user experience.
Core Features of Phantom¶
1. Multi-Chain Asset Management¶
Phantom supports multiple blockchain networks:
- Solana: Native support for managing SOL and all SPL tokens
- Ethereum: Supports ETH and ERC-20 tokens
- Polygon: Supports MATIC and Polygon ecosystem tokens
- Bitcoin: Supports Bitcoin storage and transfers
- NFT Management: Display and manage multi-chain NFT collectibles
- Asset Transfers: Quickly send and receive cryptocurrency
2. DApp Connection¶
As a Web3 gateway, Phantom provides:
- One-Click Connection: Quickly connect to Solana and EVM DApps
- Transaction Signing: Securely authorize and sign transactions
- Auto-Approve: Set auto-approve limits for trusted DApps
- Session Management: Manage connected websites and permissions
- Mobile DApp Browser: Built-in browser for accessing DApps
3. Built-in Swap Feature¶
Phantom integrates a DEX aggregator:
- Cross-Chain Swaps: Swap assets between different chains
- Best Price: Aggregates multiple DEXes for the best price
- Low Slippage: Smart routing reduces price slippage
- Convenience: Trade without leaving the wallet
- Supported Protocols: Jupiter, Uniswap, and other major DEXes
4. Staking Feature¶
Stake directly within the wallet:
- SOL Staking: Stake SOL to validators for rewards
- Validator Selection: View validator performance and commission rates
- Auto-Compound: Staking rewards automatically compounded
- Flexible Unstaking: Unstake at any time (requires waiting for the unlock period)
Technical Features of Phantom¶
1. Security Mechanisms¶
Phantom employs multi-layered security protection:
- Local Key Storage: Private keys are encrypted and stored on the user's device
- Seed Phrase Backup: 12-word BIP-39 mnemonic phrase
- Password Protection: Set a password to lock the wallet
- Biometrics: Mobile support for fingerprint and facial recognition
- Hardware Wallet Support: Compatible with Ledger hardware wallets
- Trusted App Alerts: Warns users about unverified DApps
2. User Experience Optimization¶
Phantom emphasizes user experience:
- Clean Interface: Intuitive user interface design
- Fast Loading: Optimized performance and response speed
- Real-time Notifications: Push notifications for transactions and account activity
- Multi-Language: Supports multiple language interfaces
- Dark Mode: Provides dark and light themes
- Transaction History: Detailed transaction records and analysis
3. Developer Friendly¶
Provides comprehensive developer support:
- Provider API: Standardized wallet API
- Event Listening: Monitor account and network changes
- Complete Documentation: Detailed developer documentation
- Example Code: Rich integration examples
- SDK Support: Official TypeScript SDK
Phantom Versions¶
1. Browser Extension¶
Supports major browsers:
- Chrome: Most commonly used version
- Brave: Brave browser version
- Firefox: Firefox browser version
- Edge: Microsoft Edge version
2. Mobile Application¶
Native iOS and Android apps:
- Built-in Browser: DApp browser functionality
- Biometrics: Fingerprint and facial recognition unlock
- Push Notifications: Real-time transaction notifications
- Deep Links: Supports DApp deep links
- WalletConnect: Connect with desktop DApps
3. Feature Comparison¶
| Feature | Browser Extension | Mobile App |
|---|---|---|
| Asset Management | Yes | Yes |
| DApp Connection | Yes | Yes |
| Built-in Browser | No | Yes |
| Hardware Wallet | Yes | No |
| Biometrics | No | Yes |
| Push Notifications | No | Yes |
Developer Integration¶
1. Detection and Connection¶
Detect Phantom and request connection:
// Detect Phantom
const getProvider = () => {
if ('phantom' in window) {
const provider = window.phantom?.solana;
if (provider?.isPhantom) {
return provider;
}
}
window.open('https://phantom.app/', '_blank');
};
// Connect wallet
const connectWallet = async () => {
const provider = getProvider();
try {
const resp = await provider.connect();
console.log('Public Key:', resp.publicKey.toString());
} catch (err) {
console.error('Connection rejected');
}
};
2. Send Transaction¶
Build and send a Solana transaction:
import { Transaction, SystemProgram, LAMPORTS_PER_SOL } from '@solana/web3.js';
const sendTransaction = async () => {
const provider = getProvider();
const connection = new Connection('https://api.mainnet-beta.solana.com');
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey: provider.publicKey,
toPubkey: recipientPublicKey,
lamports: 0.1 * LAMPORTS_PER_SOL,
})
);
transaction.feePayer = provider.publicKey;
transaction.recentBlockhash = (
await connection.getLatestBlockhash()
).blockhash;
const signed = await provider.signTransaction(transaction);
const signature = await connection.sendRawTransaction(signed.serialize());
await connection.confirmTransaction(signature);
console.log('Transaction successful:', signature);
};
3. Sign Messages¶
Verify user identity:
const signMessage = async () => {
const provider = getProvider();
const message = `Login time: ${new Date().toISOString()}`;
const encodedMessage = new TextEncoder().encode(message);
const signedMessage = await provider.signMessage(encodedMessage, 'utf8');
console.log('Signature:', signedMessage.signature);
// Verify the signature
const publicKey = provider.publicKey;
const verified = nacl.sign.detached.verify(
encodedMessage,
signedMessage.signature,
publicKey.toBytes()
);
console.log('Signature valid:', verified);
};
4. Event Listening¶
Listen for account and network changes:
const provider = getProvider();
// Listen for account changes
provider.on('accountChanged', (publicKey) => {
if (publicKey) {
console.log('Switched to account:', publicKey.toString());
} else {
console.log('Account disconnected');
}
});
// Listen for network changes
provider.on('chainChanged', (chainId) => {
console.log('Network switched:', chainId);
});
// Listen for disconnection
provider.on('disconnect', () => {
console.log('Phantom disconnected');
});
Special Features of Phantom¶
1. Burn NFT¶
Destroy unwanted NFTs:
- Clean Collection: Remove spam NFTs
- Recover Rent: Close accounts to recover SOL
- Batch Operations: Burn multiple NFTs at once
- Safety Confirmation: Secondary confirmation to prevent accidental operations
2. Auto-Approve¶
Set auto-approval for trusted applications:
- Limit Setting: Set maximum amount per transaction
- Time Limit: Set auto-approval validity period
- App Whitelist: Enable only for specific applications
- Revoke Anytime: Disable auto-approval at any time
3. Collectibles Display¶
Beautiful NFT display:
- Grid Layout: Optimized NFT display interface
- Detailed Info: View NFT metadata and attributes
- Collection Grouping: Organize NFTs by collection
- Quick Send: Send NFTs directly from the wallet
4. Activity Tracking¶
Real-time account activity monitoring:
- Transaction History: Complete transaction records
- DApp Interactions: View DApp interaction history
- Asset Changes: Track asset balance changes
- Notification Center: Centralized notification management
Security Best Practices¶
User Security Guide¶
- Protect Your Seed Phrase:
- Back up the seed phrase offline
- Never share it with anyone
-
Do not take screenshots or store in the cloud
-
Verify Applications:
- Check the DApp's domain name
- Be wary of phishing websites
-
Carefully read transaction details
-
Permission Management:
- Regularly review connected applications
- Revoke permissions for unused applications
-
Use the auto-approve feature cautiously
-
Use a Hardware Wallet:
- Ledger is recommended for large holdings
- Phantom can connect to Ledger hardware wallets
- Hardware wallets provide an additional layer of security
Common Scam Prevention¶
- Fake Airdrops: Do not click on suspicious airdrop links
- Fake Customer Service: Phantom will never ask for your seed phrase
- Phishing Websites: Carefully check website URLs
- Suspicious NFTs: Unknown NFTs may contain malicious links
Comparison with Other Wallets¶
Phantom vs Solflare¶
- User Experience: Phantom focuses more on simplicity and ease of use
- Features: Solflare provides more advanced features
- Multi-Chain: Phantom supports more chains
- Mobile: Phantom's mobile app is more mature
Phantom vs MetaMask¶
- Primary Blockchain: Phantom focuses on Solana, MetaMask focuses on EVM
- Multi-Chain Support: Both are expanding multi-chain support
- User Base: MetaMask has a larger user base
- Performance: Phantom offers a better experience on Solana
Phantom vs Trust Wallet¶
- Positioning: Phantom is more specialized, Trust Wallet is more general
- Chain Support: Trust Wallet supports more chains
- DeFi Integration: Phantom has deeper Solana DeFi integration
- User Interface: Phantom's interface is more modern
Usage Tips¶
1. Network Settings¶
Switch between different Solana networks:
- Mainnet Beta: Production environment
- Devnet: Development test network
- Testnet: Test network
- Custom RPC: Add custom RPC nodes
2. Import/Export¶
Manage multiple wallets:
- Import Wallet: Import using seed phrase or private key
- Add Account: Derive multiple accounts from the same seed phrase
- Export Private Key: Export a single account's private key
- Switch Wallets: Quickly switch between multiple wallets
3. Transaction Optimization¶
Optimize the transaction experience:
- Priority Fee: Set higher priority fees to speed up transactions
- Compute Units: Adjust compute unit limits
- Simulate Transaction: Simulate execution before submitting
- Batch Operations: Combine multiple operations into a single transaction
Common Issues¶
1. Transaction Failure¶
Cause: Network congestion or insufficient balance Solution: Increase the priority fee or check SOL balance
2. DApp Cannot Connect¶
Cause: Browser extension conflicts Solution: Disable other wallet extensions or refresh the page
3. NFTs Not Displaying¶
Cause: Metadata loading issues Solution: Wait a moment or manually refresh
4. Forgot Password¶
Solution: Re-import the wallet using the seed phrase
Related Concepts and Technologies¶
- Solana: The primary blockchain supported by Phantom
- MetaMask: A similar wallet in the Ethereum ecosystem
- SPL Token: Solana token standard
- WalletConnect: Wallet connection protocol
Summary¶
As the leading wallet in the Solana ecosystem, Phantom has won user favor with its excellent user experience, powerful features, and multi-chain support. Whether for DeFi trading, NFT collecting, or daily asset management, Phantom provides a clean and efficient solution. As the Solana ecosystem continues to develop and Phantom's features continue to improve, it will continue to play an important role in the Web3 wallet space, providing users with a secure and convenient digital asset management experience.