https://github.com/raydium-io/raydium-cp-swap
Revamped constant product AMM - no Openbook ID requirement, Token22 support
https://github.com/raydium-io/raydium-cp-swap
Last synced: 2 months ago
JSON representation
Revamped constant product AMM - no Openbook ID requirement, Token22 support
- Host: GitHub
- URL: https://github.com/raydium-io/raydium-cp-swap
- Owner: raydium-io
- License: apache-2.0
- Created: 2023-12-29T07:49:13.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-20T10:03:16.000Z (3 months ago)
- Last Synced: 2025-04-04T07:16:17.307Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 195 KB
- Stars: 150
- Watchers: 5
- Forks: 134
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-solana-security - Raydium program
README
# raydium-cp-swap
A revamped constant product AMM program optimized for straightforward pool deployment along with additional features and integrations:
- No Openbook market ID is required for pool creation
- Token22 is supported
- Built-in price oracle
- Optimized in AnchorThe program has been audited by [MadShield](https://www.madshield.xyz/). The report can be found [here](https://github.com/raydium-io/raydium-docs/tree/master/audit/MadShield%20Q1%202024).
The program assets are in-scope for Raydium’s [Immunefi bug bounty program](https://immunefi.com/bug-bounty/raydium/).
## Environment Setup
1. Install `Rust`
```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default 1.79.0
```2. Install `Solana `
```shell
sh -c "$(curl -sSfL https://release.solana.com/v1.17.0/install)"
```then run `solana-keygen new` to create a keypair at the default location.
3. install `Anchor`
```shell
# Installing using Anchor version manager (avm)
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
# Install anchor
avm install 0.29.0
```## Quickstart
Clone the repository and test the program.
```shell
git clone https://github.com/raydium-io/raydium-cp-swap
cd raydium-cp-swap && yarn && anchor test
```## License
Raydium constant product swap is licensed under the Apache License, Version 2.0.