{"id":34255108,"url":"https://github.com/jongan69/autodepositlpcpmm","last_synced_at":"2026-03-10T23:04:00.332Z","repository":{"id":290524759,"uuid":"974739511","full_name":"jongan69/autodepositlpcpmm","owner":"jongan69","description":"Auto deposit and lock into Raydium CPMM LP using cron job","archived":false,"fork":false,"pushed_at":"2025-04-29T08:55:00.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-29T09:38:47.627Z","etag":null,"topics":["cpmm","liquidity-pools","raydium","solana"],"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/jongan69.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,"zenodo":null}},"created_at":"2025-04-29T08:30:21.000Z","updated_at":"2025-04-29T08:55:04.000Z","dependencies_parsed_at":"2025-04-29T09:40:25.591Z","dependency_job_id":"8a3fd96f-264b-4f9c-a909-b26d237b1e1a","html_url":"https://github.com/jongan69/autodepositlpcpmm","commit_stats":null,"previous_names":["jongan69/autodepositlpcpmm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jongan69/autodepositlpcpmm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2Fautodepositlpcpmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2Fautodepositlpcpmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2Fautodepositlpcpmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2Fautodepositlpcpmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongan69","download_url":"https://codeload.github.com/jongan69/autodepositlpcpmm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongan69%2Fautodepositlpcpmm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30360649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cpmm","liquidity-pools","raydium","solana"],"created_at":"2025-12-16T12:32:01.555Z","updated_at":"2026-03-10T23:04:00.327Z","avatar_url":"https://github.com/jongan69.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# autodepositlpcpmm\n\nA TypeScript/Node.js toolkit for automating liquidity management and reward harvesting on Raydium's CPMM and CLMM pools on Solana.\n\n## Features\n- **Deposit and lock liquidity** into Raydium CPMM pools\n- **Harvest all rewards** from CLMM and CPMM pools, including locked positions\n- **Automated batch operations** for efficient DeFi workflows\n\n## Project Structure\n\n- `raydium/clmm/`\n  - `harvestAllRewards.ts`: Harvests all available CLMM rewards for non-zero positions.\n  - `harvestLockedRewards.ts`: Harvests rewards from all locked CLMM positions (NFT-based).\n- `raydium/cpmm/`\n  - `depositAndLockLiquidity.ts`: Deposits 1% of your JAIL token balance into a CPMM pool and locks the resulting LP tokens.\n  - `harvestAllRfkLP.ts`: Harvests all CPMM rewards for locked LP NFTs (Raydium Fee Key - RFK).\n- `raydium/config.ts`: SDK and connection setup, environment variable management, and helper functions for fetching locked NFTs.\n- `raydium/utils.ts`: Utility for validating CPMM pool program IDs.\n- `constants.ts`: Pool and mint addresses.\n- `index.ts`: Example usage and entrypoint (uncomment desired function to run).\n\n## Setup\n\n1. **Clone the repository**\n\n```bash\ngit clone \u003crepo-url\u003e\ncd autodepositlpcpmm\n```\n\n2. **Install dependencies**\n\n```bash\nnpm install\n```\n\n3. **Environment Variables**\n\nCreate a `.env` file in the project root with the following variables:\n\n```\nPRIVATE_KEY=\u003cbase58-encoded-solana-private-key\u003e\nRPC_URL=\u003cyour-solana-rpc-url\u003e\nHELIUS_API_KEY=\u003cyour-helius-api-key\u003e\nGRPC_URL=\u003coptional-grpc-url\u003e\nGRPC_TOKEN=\u003coptional-grpc-token\u003e\n```\n\n- `PRIVATE_KEY`: Your Solana wallet's private key (base58 encoded)\n- `RPC_URL`: Solana RPC endpoint (mainnet recommended)\n- `HELIUS_API_KEY`: For NFT lookups (used in locked position scripts)\n\n**Note:** Never commit your `.env` file or private key to version control.\n\n## Usage\n\nAll scripts are TypeScript files. You can run them using `npm start` after uncommenting the desired function call in `index.ts`, or by running individual files with `tsx`:\n\n```bash\nnpx tsx raydium/clmm/harvestAllRewards.ts\n```\n\nOr, to run the main entrypoint (edit `index.ts` to select the function):\n\n```bash\nnpm start\n```\n\n### Script Details\n\n#### 1. `raydium/clmm/harvestAllRewards.ts`\n- **Purpose:** Harvests all available CLMM rewards for your wallet's non-zero positions.\n- **How it works:**\n  - Fetches all CLMM positions for the wallet.\n  - Filters out positions with zero liquidity.\n  - Fetches pool info for each position.\n  - Calls the Raydium SDK to harvest all rewards in batch.\n- **Usage:**\n  - Ensure your `.env` is set up.\n  - Uncomment the last line or call `harvestAllRewards()` in your script.\n\n#### 2. `raydium/clmm/harvestLockedRewards.ts`\n- **Purpose:** Harvests rewards from all locked CLMM positions (NFT-based).\n- **How it works:**\n  - Scans wallet for NFTs representing locked CLMM positions.\n  - For each, calls the Raydium SDK to harvest rewards.\n  - Handles errors gracefully and continues with remaining positions.\n- **Usage:**\n  - Ensure your `.env` is set up.\n  - Uncomment the last line or call `harvestLockedClmmRewards()` in your script.\n\n#### 3. `raydium/cpmm/depositAndLockLiquidity.ts`\n- **Purpose:** Deposits 1% of your JAIL token balance into a CPMM pool and locks the resulting LP tokens.\n- **How it works:**\n  - Fetches pool info and your JAIL token balance.\n  - Calculates 1% of your balance and deposits it as liquidity.\n  - Locks the received LP tokens.\n- **Usage:**\n  - Ensure your `.env` is set up and you have JAIL tokens.\n  - Uncomment the last line or call `depositAndLockLiquidity()` in your script.\n\n#### 4. `raydium/cpmm/harvestAllRfkLP.ts`\n- **Purpose:** Harvests all CPMM rewards for locked LP NFTs (Raydium Fee Key - RFK).\n- **How it works:**\n  - Uses the Helius API to find all RFK NFTs in your wallet.\n  - For each, calls the Raydium SDK to harvest rewards.\n  - Handles errors gracefully and continues with remaining NFTs.\n- **Usage:**\n  - Ensure your `.env` is set up and you have locked LP NFTs.\n  - Uncomment the last line or call `harvestAllRfkLP()` in your script.\n\n## Customization\n- **Pool IDs and Mint Addresses:**\n  - Edit `constants.ts` to change the target pool or mint addresses.\n- **Transaction Version:**\n  - Change `txVersion` in `config.ts` if you need to use legacy transactions.\n- **Priority Fees:**\n  - Uncomment and adjust `computeBudgetConfig` in scripts for custom priority fees.\n\n## Dependencies\n- [@raydium-io/raydium-sdk-v2](https://www.npmjs.com/package/@raydium-io/raydium-sdk-v2)\n- [@solana/web3.js](https://www.npmjs.com/package/@solana/web3.js)\n- [@solana/spl-token](https://www.npmjs.com/package/@solana/spl-token)\n- [bn.js](https://www.npmjs.com/package/bn.js)\n- [bs58](https://www.npmjs.com/package/bs58)\n- [dotenv](https://www.npmjs.com/package/dotenv)\n- [decimal.js](https://www.npmjs.com/package/decimal.js)\n- [tsx](https://www.npmjs.com/package/tsx) (for running TypeScript files directly)\n\n## Security Warning\n**Never share or commit your private key.** Use a dedicated wallet for DeFi automation and keep your funds safe.\n\n## License\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongan69%2Fautodepositlpcpmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongan69%2Fautodepositlpcpmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongan69%2Fautodepositlpcpmm/lists"}