{"id":50957844,"url":"https://github.com/chainsona/solana-pda-vanity","last_synced_at":"2026-06-18T09:32:33.888Z","repository":{"id":325258055,"uuid":"1099505808","full_name":"chainsona/solana-pda-vanity","owner":"chainsona","description":"A high-performance Solana program and utilities for generating and creating SPL Tokens with vanity PDA","archived":false,"fork":false,"pushed_at":"2025-11-20T10:26:03.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-20T12:12:25.805Z","etag":null,"topics":["pda","program-derived-address","solana","vanity","vanity-address"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainsona.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-19T04:38:35.000Z","updated_at":"2025-11-20T10:26:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chainsona/solana-pda-vanity","commit_stats":null,"previous_names":["chainsona/solana-pda-vanity"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chainsona/solana-pda-vanity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainsona%2Fsolana-pda-vanity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainsona%2Fsolana-pda-vanity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainsona%2Fsolana-pda-vanity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainsona%2Fsolana-pda-vanity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainsona","download_url":"https://codeload.github.com/chainsona/solana-pda-vanity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainsona%2Fsolana-pda-vanity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34485163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pda","program-derived-address","solana","vanity","vanity-address"],"created_at":"2026-06-18T09:32:32.715Z","updated_at":"2026-06-18T09:32:33.872Z","avatar_url":"https://github.com/chainsona.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDA Vanity Token Creator\n\nA high-performance Solana program and utility suite for generating and creating SPL Tokens with vanity Program Derived Addresses (PDAs).\n\n## Overview\n\nThis project allows you to create SPL Token Mints where the address ends with a specific suffix (e.g., `pump`). It consists of two main components:\n\n1.  **Off-chain Search Tool**: A multi-threaded Rust utility that brute-forces seeds to find a PDA matching your desired suffix.\n2.  **On-chain Program**: An Anchor program that initializes the token mint and enforces the vanity suffix requirement on-chain.\n\n## Features\n\n-   **High Performance Search**: Utilizes all available CPU cores to search millions of seeds per second.\n-   **On-Chain Enforcement**: The smart contract verifies that the generated address actually matches the required pattern before allowing creation.\n-   **Anchor Framework**: Built with modern Solana development standards.\n\n## Prerequisites\n\n-   Rust \u0026 Cargo\n-   Solana CLI\n-   Anchor CLI\n-   Node.js \u0026 Yarn/PNPM\n\n## Installation\n\n1.  Clone the repository:\n    ```bash\n    git clone \u003crepo-url\u003e\n    cd pda-vanity\n    ```\n\n2.  Install dependencies:\n    ```bash\n    pnpm install\n    ```\n\n## Usage\n\n### 1. Find a Vanity Seed\n\nUse the included Rust binary to search for a seed that generates a PDA with your desired suffix.\n\n```bash\ncd programs/pda-vanity\ncargo run --release --bin search -- --suffix \"pump\"\n```\n\n**Options:**\n-   `-s, --suffix \u003cSUFFIX\u003e`: The suffix to search for (default: \"pump\").\n-   `-t, --threads \u003cTHREADS\u003e`: Number of threads to use (default: all cores).\n-   `-p, --program-id \u003cID\u003e`: Target Program ID.\n\n*Example:*\n```bash\ncargo run --release --bin search -- --suffix \"moon\" --threads 16\n```\n\nOutput example:\n```text\nSearching for seed for suffix 'pump' with 14 threads...\nFound seed: 5270498306774619999\nPDA: HZTPCxeTBLEr5FfUkjzLixXduWCzhgzjhvoNrKVspump\nBump: 255\nTime: 197.830958ms\n```\n\n### 2. Create the Token\n\nOnce you have the seed, you can call the program to create the token.\n\n**Testing:**\nUpdate the seed in `tests/pda-vanity.ts` and run:\n\n```bash\nanchor test\n```\n\n**Production:**\nYou can integrate the client-side logic into your dApp using the IDL.\n\n```typescript\nawait program.methods\n  .createVanityToken(new BN(\"5270498306774619999\"), 6) // seed, decimals\n  .accounts({\n    payer: wallet.publicKey,\n  })\n  .rpc();\n```\n\n## Technical Details\n\n### PDA Derivation\nThe program uses a standard PDA derivation scheme:\n```rust\nseeds = [vanity_seed.to_le_bytes().as_ref()]\n```\n\n### Optimization\nThe search tool is heavily optimized for speed:\n-   **Zero-Allocation Check**: Performs a math-based suffix check on the hash bytes, avoiding expensive Base58 string allocation.\n-   **Hash-First Strategy**: Defers the expensive Elliptic Curve check (`is_on_curve`) until *after* the suffix matches. Since the suffix match is rare, this skips 99.9% of curve checks.\n-   **Multi-threading**: Uses all available CPU cores with manual thread spawning for maximum throughput.\n-   **Canonical Bump Optimization**: Only checks bump 255 to avoid the `find_program_address` loop.\n\n**Performance:**\n-   Single-core speed: ~2.8 million seeds/sec (vs ~330k/sec unoptimized).\n-   ~8.5x speedup compared to standard approaches.\n\n## Contributing\n\nContributions are welcome! Please check out the [CONTRIBUTING.md](CONTRIBUTING.md) file for guidelines on how to proceed.\n\nWe also have a [Code of Conduct](CODE_OF_CONDUCT.md) that we expect all contributors to adhere to.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsona%2Fsolana-pda-vanity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainsona%2Fsolana-pda-vanity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainsona%2Fsolana-pda-vanity/lists"}