{"id":26675191,"url":"https://github.com/cashblaze127/photon-swap","last_synced_at":"2025-03-26T03:16:52.853Z","repository":{"id":284341741,"uuid":"954547086","full_name":"cashblaze127/photon-swap","owner":"cashblaze127","description":"Photon Swap using Typescript, Pumpfun Swap using Photon Contract, Photon Swap, Swap for Photon Trading. Swap Photon, Photon Swap","archived":false,"fork":false,"pushed_at":"2025-03-25T11:18:55.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T12:27:19.653Z","etag":null,"topics":["blockchain","defi","dex","photon","pumpfun","solana","swap","web3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cashblaze127.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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}},"created_at":"2025-03-25T08:50:49.000Z","updated_at":"2025-03-25T11:18:59.000Z","dependencies_parsed_at":"2025-03-25T12:38:06.221Z","dependency_job_id":null,"html_url":"https://github.com/cashblaze127/photon-swap","commit_stats":null,"previous_names":["cashblaze127/photon-swap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cashblaze127%2Fphoton-swap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cashblaze127%2Fphoton-swap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cashblaze127%2Fphoton-swap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cashblaze127%2Fphoton-swap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cashblaze127","download_url":"https://codeload.github.com/cashblaze127/photon-swap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245579700,"owners_count":20638679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blockchain","defi","dex","photon","pumpfun","solana","swap","web3"],"created_at":"2025-03-26T03:16:52.371Z","updated_at":"2025-03-26T03:16:52.834Z","avatar_url":"https://github.com/cashblaze127.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photon Swap\n\nA TypeScript implementation for executing swaps on Solana using the Photon Protocol with PumpFun integration.\n\n## Overview\n\nPhoton Swap is a decentralized exchange (DEX) integration that facilitates token swaps on the Solana blockchain. It specifically implements PumpFun swaps with built-in fee management through the Photon protocol.\n\n\n## Have a project in mind? Ping me if you need help!\n\n[![Gmail](https://img.shields.io/badge/Gmail-EA4335?style=for-the-badge\u0026logo=gmail\u0026logoColor=white)](mailto:cashblaze129@gmail.com)\n[![Telegram](https://img.shields.io/badge/Telegram-0088cc?style=for-the-badge\u0026logo=telegram\u0026logoColor=white)](https://t.me/cashblaze127)\n[![Discord](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discordapp.com/users/965772784653443215)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0A66C2?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/legend-keyvel-alston)\n[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge\u0026logo=github\u0026logoColor=white)](https://github.com/cashblaze127)\n\n- Example Transaction: [View on Solscan](https://solscan.io/tx/4D1KSAd9B4TzPwF5UQBEhciffDchxxSsiFpJa5HYyYEdzequ3U4c3kSjkYdPJKpr4kzhBfxARu4wFLgtF3Detx5W)\n\n- Screenshot of the transaction:\n- ![image](https://github.com/user-attachments/assets/c8d3e57f-517e-45c2-a00e-5c45ed3b0bbe)\n\n\n## Features\n\n- **Photon Protocol Integration**: Implements swap functionality using the Photon Program (`BSfD6SHZigAfDWSjzD5Q41jw8LmKwtmjskPH9XW1mrRW`)\n- **PumpFun Support**: Direct integration with PumpFun protocol for token swaps\n- **Automatic Token Account Creation**: Creates Associated Token Accounts (ATAs) if they don't exist\n- **Fee Management**: \n  - Handles Photon protocol fees\n  - Includes BloxRoute integration for transaction routing\n  - Implements priority fees for better transaction success rates\n- **Transaction Optimization**: \n  - Compute budget management\n  - Priority fee settings\n  - Transaction simulation before submission\n\n## Technical Details\n\n### Key Components\n\n- **Program IDs**:\n  - Photon Program: `BSfD6SHZigAfDWSjzD5Q41jw8LmKwtmjskPH9XW1mrRW`\n  - PumpFun Program: `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P`\n\n- **Fee Structure**:\n  - Photon Fee Vault: `AVUCZyuT35YSuj4RH7fwiyPu82Djn2Hfg7y2ND2XcnZH`\n  - PumpFun Fee Recipient: `62qc2CNXwrYqQScmEdiZFFAnJR262PxWEwNQtxfafNgV`\n  - BloxRoute Fee: 0.06 SOL per transaction\n\n### Prerequisites\n\n- Node.js\n- TypeScript\n- Solana Web3.js\n- SPL Token Library\n- BloxRoute Solana Trader Client\n\n### Environment Variables\n\n```env\nSOLANA_PRIVATE_KEY=\u003cyour-private-key\u003e\n```\n\n## Installation\n\n```bash\nnpm install\n```\n\n## Usage\n\n1. Set up your environment variables in `.env`\n2. Run the application:\n\n```bash\nnpm dev\n```\n\n## Transaction Flow\n\n1. **Initialization**:\n   - Creates keypair from private key\n   - Establishes connection to Solana network\n   - Validates token accounts\n\n2. **Swap Execution**:\n   - Sets compute budget and priority fees\n   - Creates Associated Token Account if needed\n   - Constructs swap instruction with Photon protocol\n   - Handles fee transfers\n   - Simulates transaction\n   - Submits and confirms transaction\n\n## Security Considerations\n\n- Private keys should be securely stored in environment variables\n- Transaction simulation is performed before submission\n- Compute budget is properly configured to prevent transaction failures\n- Slippage protection is implemented (default: 1000 basis points)\n\n## Dependencies\n\n- `@solana/web3.js`\n- `@solana/spl-token`\n- `@bloxroute/solana-trader-client-ts`\n- `bs58`\n- `dotenv`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcashblaze127%2Fphoton-swap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcashblaze127%2Fphoton-swap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcashblaze127%2Fphoton-swap/lists"}