{"id":21093821,"url":"https://github.com/mwrites/raydium-puppet","last_synced_at":"2026-04-26T17:32:01.108Z","repository":{"id":263376592,"uuid":"890180819","full_name":"mwrites/raydium-puppet","owner":"mwrites","description":"Example code to interact with Raydium liquidity pools","archived":false,"fork":false,"pushed_at":"2025-04-30T17:54:20.000Z","size":1423,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-31T05:00:05.043Z","etag":null,"topics":["blockchain","liquidity-pools","raydium","raydium-pool","solana"],"latest_commit_sha":null,"homepage":"https://raydium.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwrites.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-18T06:05:05.000Z","updated_at":"2025-01-30T10:49:44.000Z","dependencies_parsed_at":"2024-11-18T07:23:40.412Z","dependency_job_id":"c78ca50e-a2b2-403e-8b19-8c97fbd521d5","html_url":"https://github.com/mwrites/raydium-puppet","commit_stats":null,"previous_names":["mwrites/raydium-puppet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mwrites/raydium-puppet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwrites%2Fraydium-puppet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwrites%2Fraydium-puppet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwrites%2Fraydium-puppet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwrites%2Fraydium-puppet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwrites","download_url":"https://codeload.github.com/mwrites/raydium-puppet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwrites%2Fraydium-puppet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32307011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T17:23:19.671Z","status":"ssl_error","status_checked_at":"2026-04-26T17:23:19.195Z","response_time":129,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["blockchain","liquidity-pools","raydium","raydium-pool","solana"],"created_at":"2024-11-19T22:12:44.079Z","updated_at":"2026-04-26T17:32:01.091Z","avatar_url":"https://github.com/mwrites.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raydium Puppet\n\n# ⚠️ Warning\n- `./testing_keys/` are just convenience mints for testing, pls generate your own stuff (and don't commit it :\u003e)\n\n\n# 🍭 Features \n\n### 📜 TS Client\n`./tests`\n- [x] Create Market\n- [x] Create Pool\n- [x] Add Liquidity\n- [x] Remove Liquidity\n- [ ] Add and Remove Liquidity in one Transaction\n\n### 🦀 Rust Client \n`./client`\n- [ ] Create Market\n- [ ] Create Pool\n- [x] Add Liquidity\n- [x] Remove Liquidity\n- [x] Add and Remove Liquidity in one Transaction\n\n### ⚓️ Program\n- Maybe later.\n\n---\n\n# 🧪 Tests \n\n\n### DevNet SOL\nYou don't need much more than 2000 lamports to run the tests.\nIf you intend to create your own market and pool you will need much more though:\n```\ncargo install devnet-pow\ndevnet-pow mine\n```\n\n\n### RPC\nI highly recommend you to use a paid RPC to get stable results with the tests, you can get a free tier with [helius](https://www.helius.dev/pricing). Then modify and copy `.env.template` to `.env` and fill in your cluster urls.\n\n### Rust Client Tests\n```\ncargo test\n```\n![Anchor Tests](images/cargo_tests.png)\n\n\n### Typescript Tests\n```\nanchor test\n```\n![Anchor Tests](images/anchor_tests.png)\n\n---\n\n# 🙋‍♀️ Pools for dummies \n\n### Add liquidity\n- input: a pair of coins, (mintA,mintB)\n- output: a liquidity provider coin 'mintLP'\n\nYou provide liquidity as a pair of coin, in exchange the pool mints a liquidity provider coin to you. You need to make sure that you have enough of each coin to provide liquidity.\n\n### Remove liquidity\n- input: a liquidity provider coin 'mintLP'\n- output: a pair of coins (mintA,mintB)\n\nYou burn the liquidity provider coin, and the pool returns the pair of coins representing that liquidity.\n\nEverything in between is just computing program derived addresses, creating or getting associated accounts. Verifying owners, calculating ratio and slippage. The primary difficulty comes from reproducability and having to recreate the whole state of the programs you interact with.\n\n## Slippage\nSlippage happens when you remove liquidity. The pool has to distribute the coins back to you, and the ratio has changed. How is that possible? It happens if someone else is adding or removing liquidity in between your transaction. The ratio changes, so you get less or more than expected.\n\nAs a user have you ever wondered why you get less than expected when you remove liquidity? Now you know!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwrites%2Fraydium-puppet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwrites%2Fraydium-puppet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwrites%2Fraydium-puppet/lists"}