CPU/GPU Vanity Address Generator for SVM (Solana) and EVM (Ethereum) blockchains
Vanity is a high-performance tool for generating vanity addresses with custom prefixes and/or suffixes for both Ethereum and Solana blockchains. It leverages GPU acceleration via CUDA for maximum throughput.
- π Blazing Fast: GPU acceleration with CUDA support
- π Multi-Chain: Supports both Ethereum (EVM) and Solana (SVM)
- π― Flexible Matching: Prefix, suffix, or both with case-insensitive options
- π Multiple Output Formats: Pretty cards, ASCII-only, or JSON
- πΎ Optional File Saving: Secure file saving with proper permissions
- π EIP-55 Checksummed: Ethereum addresses displayed with proper checksums
- Rust toolchain (1.70+)
- For GPU support: CUDA Toolkit 11.0+
cargo install --path .cargo install --path . --features gpuFor those without a GPU, consider using cloud GPU providers like vast.ai.
vanity --chain <eth|sol> [OPTIONS]--chain <CHAIN>(required): Chain type:eth|ethereum|evmorsol|solana|svm-p, --prefix <PREFIX>: Target prefix for the address-s, --suffix <SUFFIX>: Target suffix for the address-i, --ignore-case: Case-insensitive matching (Solana only)--gpus <N>: Number of GPUs to use (default: 1 if GPU detected, else 0) [available only when built with--features gpu]--gpu-blocks <N>(ETH, GPU builds): Override GPU blocks per launch--gpu-threads <N>(ETH, GPU builds): Override GPU threads per block--gpu-iters <N>(ETH, GPU builds): Override GPU iterations per thread--gpu-target-ms <MS>(ETH, GPU builds): Adaptive batch time target in ms--cpus <N>: Number of CPU threads (default: 0 = auto)--count <N>: Number of matches to find (default: 1)--max-runtime <SECONDS>: Maximum runtime in seconds (default: unlimited)-o, --output <FORMAT>: Output format:card|plain|json(default: card)--save [PATH]: Save result to file (optional path, defaults to current directory)--debug: Extra diagnostics to stderr
vanity --chain eth -p cafeOutput:
β¨ Vanity Match
π Chain: ETH (EVM)
π·οΈ Address: 0xCAFE935A8e7F3Ad03099c811c2299E5643DdEFf8
π Private Key: 0xe...2bc
βοΈ Method: GPU (CUDA) x1
β±οΈ Elapsed: 3.484s
π Iterations: 3,274,049
π Rate: 939,852 / sec
π― Pattern: prefix="cafe" (matched on lowercase, displayed with EIP-55 checksum)
vanity --chain eth -p dead -s beefvanity --chain eth -p 00 -o plainOutput:
* Vanity Match
- Chain: ETH (EVM)
- Address: 0x0062d7fF8315f842ceF94081b67bE3114a788B95
- Private Key: 0xe...4c1
- Method: GPU (CUDA) x1
- Elapsed: 3.443s
- Iterations: 2,716,412
- Rate: 789,065 / sec
- Pattern: prefix="00" (matched on lowercase, displayed with EIP-55 checksum)
vanity --chain eth -p 00 -o json# Save to current directory with default format (card)
vanity --chain eth -p cafe --save
# Save to specific directory as JSON
vanity --chain eth -p cafe -o json --save ./results
# Save to specific file path
vanity --chain eth -p cafe --save ./my-eth-key.txtvanity --chain sol -p Test -iOutput:
β¨ Vanity Match
π Chain: SOL (SVM)
π·οΈ Address: testvUrgUfrojUjEFohbtpL8ce6Y3gP3K6rxntbkvJx
π Private Key: f90...5bf
βοΈ Method: GPU (CUDA) x1
β±οΈ Elapsed: 25.053s
π Iterations: 432,083,169
π Rate: 17,246,647 / sec
π― Pattern: prefix="test", ignore_case=true
vanity --chain sol -p SOL --gpus 2vanity --chain sol -p test --cpus 8 --gpus 0Note on GPU vs CPU mode:
- When
--gpusis greater than 0, only GPU will be used (CPU threads are ignored) - To use CPU-only mode, you must specify
--gpus 0 - There is currently no hybrid mode that uses both GPU and CPU simultaneously
Examples:
# GPU only (ignores --cpus if specified)
vanity --chain eth -p cafe --gpus 1
# CPU only (must set --gpus 0)
vanity --chain eth -p cafe --cpus 16 --gpus 0
# This will use ONLY GPU (--cpus 24 is ignored)
vanity --chain eth -p cafe --cpus 24 --gpus 1- When both
--countand--max-runtimeare set, the tool stops when either condition is met. You may get fewer than--countresults if the timeout expires first. - CPU threads (
--cpus) are ignored when GPUs are used (--gpus > 0). - The
--gpusflag is present only in GPU builds (compiled with--features gpu).
vanity --chain eth -p cafe --max-runtime 30 -o jsonvanity --chain eth -p cafe --debug 2>debug.logPerformance varies by pattern and hardware. As rough guides:
- Ethereum GPU (modern high-end): 10M+ candidates/sec with tuning
- Solana GPU (modern high-end): 15β25M candidates/sec on suffix patterns
- CPU throughput depends on cores and chain
Pattern difficulty increases exponentially with length:
- 3-character prefix: seconds
- 4-character prefix: minutes
- 5-character prefix: hours
- 6+ character prefix: days to weeks
The tool accepts multiple aliases for chains:
- Ethereum:
eth,ethereum,evm - Solana:
sol,solana,svm
Vanity validates your prefix and suffix patterns before starting the search, providing helpful error messages if invalid characters are detected.
Ethereum addresses use hexadecimal characters only:
- β
Allowed:
0-9,a-f,A-F - β Not allowed: Any other characters (e.g.,
g-z,G-Z, special characters) - π‘ The
0xprefix is optional and will be automatically stripped
Example error message:
$ vanity --chain eth -p "hello"
Error: Invalid prefix 'hello' for Ethereum:
β Invalid character(s): 'h', 'l', 'o'
β
Allowed characters: 0-9, a-f, A-F (hexadecimal)
π‘ Tip: Remove these characters from your prefix: 'h', 'l', 'o'Solana addresses use Base58 encoding, which excludes characters that look similar to avoid confusion:
- β
Allowed:
1-9,A-Z,a-z(excluding0,O,I,l) - β Not allowed:
0(zero),O(letter O),I(letter I),l(lowercase L)
Why these characters are excluded:
0(zero) looks similar toO(letter O)I(letter I) looks similar tol(lowercase L)
Example error message with suggestions:
$ vanity --chain sol -p "COOL"
Error: Invalid prefix 'COOL' for Solana:
β Invalid character(s): 'O'
β
Allowed characters: Base58 (1-9, A-Z, a-z, excluding 0, O, I, l)
π‘ Suggestions:
'O' (letter O) β try 'P' or remove it
π‘ Tip: Remove these characters from your prefix: 'O'Common mistakes and suggestions:
0(zero) β Use1instead or remove itO(letter O) β UsePorNinstead or remove itI(letter I) β UseJorHinstead or remove itl(lowercase L) β Usekorminstead or remove it
Valid Solana examples:
- β
test- all lowercase, no excluded characters - β
ABC123- uppercase letters and numbers (no 0, O, I, l) - β
MyWallet- mixed case (note: case-sensitive by default)
Ethereum addresses are displayed with EIP-55 checksumming, which mixes uppercase and lowercase letters for error detection. Pattern matching is always done on lowercase hex, but the final address display will have mixed case.
Key points:
- Patterns are case-insensitive for Ethereum (e.g.,
cafe,CAFE,CaFeall match the same addresses) - Matching happens on lowercase:
cafematches address0xcafe... - Display uses EIP-55 checksum:
0xCaFE...(capitals determined by checksum algorithm) - The
--ignore-caseflag has no effect for Ethereum (always case-insensitive)
Example:
- Pattern:
cafeorCAFEorCaFe(all equivalent) - Matched (lowercase):
0xcafe... - Displayed (EIP-55):
0xCaFE...or0xcAfE...(checksum varies per address)
This is correct behavior! When you import the private key into a wallet, it will show the same checksummed address.
The -o, --output flag controls both screen output and file format when saving with -s.
Unicode emojis and formatted output for human-readable terminal display.
ASCII-only output for maximum compatibility (no Unicode characters).
Machine-readable JSON output with all metadata:
{
"chain": "eth",
"address": "0xCAFE935A8e7F3Ad03099c811c2299E5643DdEFf8",
"secret_type": "private_key",
"secret": "0xe...2bc",
"pattern": {
"prefix": "cafe",
"suffix": "",
"ignore_case": false
},
"metrics": {
"backend": "GPU (CUDA) x1",
"gpus": 1,
"cpus": 0,
"elapsed_sec": 3.484,
"iterations": 3274049,
"rate_per_sec": 939852.0,
"encodes": 3274049,
"encode_rate_per_sec": 939852.0
},
"created_at": "2025-10-08T10:00:00Z",
"version": "0.0.1"
}When using -s, --save, files are created with secure permissions:
- Linux/macOS:
0600(owner read/write only) - Windows: Warning issued to manually verify permissions
- Private keys are displayed to stdout by default
- Files are only written when explicitly requested via
-s, --save - Never commit private keys to version control
- Use a secure method to transfer keys to your wallet
Contributions are welcome! Please open an issue or pull request.
This project is licensed under the GNU Lesser General Public License v3.0 (LGPLv3).
You can use this software in your projects (including commercial and proprietary software) as long as you:
- Link to this library dynamically or statically
- Provide attribution
- Make any modifications to this library available under LGPLv3
See the LICENSE file for full details, or visit: https://www.gnu.org/licenses/lgpl-3.0.html
This project builds upon excellent work from the open-source community:
- SHA-256/SHA-512 CUDA implementations from cuda-hashing-algos (Public Domain) - Used for cryptographic hashing operations
- Keccak256 and secp256k1 implementations based on MrSpike63's vanity-eth-address - Core Ethereum address generation algorithms
- Base58 encoding from Firedancer (Apache-2.0) - Solana address encoding
- Ed25519 implementation - Solana keypair generation and signing
Thank you to all the developers who made their code available for others to build upon!
Current version: 0.0.1
- Saved filenames include the chain and the first 8 characters of the address (for Ethereum,
0xis stripped). - On Windows, file permissions cannot be restricted programmatically; verify permissions manually if saving secrets.
- Start with autotune:
--gpu-target-ms 1200(Windows) or1500(Linux) - Manually push launch size if desired:
--gpu-blocks,--gpu-threads,--gpu-iters - Example:
vanity --chain eth -s 1010 --gpus 1 \ --gpu-blocks 512 --gpu-threads 512 --gpu-target-ms 1200
- Solana GPU uses internal autotune; ETH tuning flags do not apply.
- Suffix patterns use a fast check to avoid most Base58 encodes.
- Output remains wallet-compatible: seed (32) + expanded private (64) + pubkey (32).
- Iterations/sec: total candidates evaluated per second
- Encodes/sec (Solana): full Base58 encodes per second (good predictor for time-to-hit)