agentsclimarketplace

Raydium

Skill eugenepyvovarov/mcpbundler-agent-skills-marketplace/raydium

agent skills marketplace for mcp bundler(can be used with other ai tools with support of agent skills markeplaces). some skills are mine, also borrowed skills(credited to authors)From the repository description

Install
npx -y skills add eugenepyvovarov/mcpbundler-agent-skills-marketplace --skill raydium

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 12 stars12 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.7 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it

Raydium Protocol Integration Guide

A comprehensive guide for building applications with Raydium - Solana's leading AMM and liquidity protocol.

Overview

Raydium is a suite of automated market makers (AMMs) on Solana offering:

  • CLMM - Concentrated Liquidity Market Maker for capital-efficient LP positions
  • CPMM - Constant Product Market Maker with Token22 support (no OpenBook required)
  • AMM - Classic AMM integrated with OpenBook CLOB
  • Farms - Yield farming and staking rewards

Quick Start

Installation

npm install @raydium-io/raydium-sdk-v2
# or
yarn add @raydium-io/raydium-sdk-v2

Basic Setup

import { Raydium } from '@raydium-io/raydium-sdk-v2';
import { Connection, Keypair } from '@solana/web3.js';
import bs58 from 'bs58';

// Setup connection and wallet
const connection = new Connection('https://api.mainnet-beta.solana.com');
const owner = Keypair.fromSecretKey(bs58.decode('YOUR_SECRET_KEY'));

// Initialize SDK
const raydium = await Raydium.load({
  connection,
  owner,
  cluster: 'mainnet',
  disableLoadToken: false, // Load token list
});

// Access token data
const tokenList = raydium.token.tokenList;
const tokenMap = raydium.token.tokenMap;

// Access account data
const tokenAccounts = raydium.account.tokenAccounts;

Pool Types

CLMM (Concentrated Liquidity)

Allows LPs to concentrate liquidity in specific price ranges for higher capital efficiency.

// Fetch CLMM pool
const poolId = 'POOL_ID_HERE';
const poolInfo = await raydium.clmm.getPoolInfoFromRpc(poolId);

// Or from API (mainnet only)
const poolData = await raydium.api.fetchPoolById({ ids: poolId });

CPMM (Constant Product)

Simplified AMM without OpenBook market requirement, supports Token22.

// Fetch CPMM pool
const cpmmPool = await raydium.cpmm.getPoolInfoFromRpc(poolId);

AMM (Legacy)

Classic AMM integrated with OpenBook central limit order book.

// Fetch AMM pool
const ammPool = await raydium.liquidity.getPoolInfoFromRpc({ poolId });

Core Operations

Swap

import { CurveCalculator } from '@raydium-io/raydium-sdk-v2';

// Calculate swap
const { amountOut, fee } = CurveCalculator.swapBaseInput({
  poolInfo,
  amountIn: 1000000n, // lamports
  mintIn: inputMint,
  mintOut: outputMint,
});

// Execute CPMM swap
const { execute } = await raydium.cpmm.swap({
  poolInfo,
  inputAmount: 1000000n,
  inputMint,
  slippage: 0.01, // 1%
  txVersion: 'V0',
});

await execute({ sendAndConfirm: true });

Add Liquidity

// CPMM deposit
const { execute } = await raydium.cpmm.addLiquidity({
  poolInfo,
  inputAmount: 1000000n,
  baseIn: true,
  slippage: 0.01,
});

await execute({ sendAndConfirm: true });

Create Pool

// Create CPMM pool
const { execute } = await raydium.cpmm.createPool({
  mintA,
  mintB,
  mintAAmount: 1000000n,
  mintBAmount: 1000000n,
  startTime: new BN(0),
  feeConfig, // from API
  txVersion: 'V0',
});

const { txId } = await execute({ sendAndConfirm: true });

Program IDs

ProgramMainnetDevnet
AMM675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8DRaya7Kj3aMWQSy19kSjvmuwq9docCHofyP9kanQGaav
CLMMCAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqKdevi51mZmdwUJGU9hjN27vEz64Gps7uUefqxg27EAtH
CPMMCPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1CCPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW

API Endpoints

// Mainnet API
const API_URL = 'https://api-v3.raydium.io';

// Devnet API
const DEVNET_API = 'https://api-v3.raydium.io/main/';

// Common endpoints
const endpoints = {
  tokenList: '/mint/list',
  poolList: '/pools/info/list',
  poolById: '/pools/info/ids',
  farmList: '/farms/info/list',
  clmmConfigs: '/clmm/configs',
};

Transaction Options

const { execute } = await raydium.cpmm.swap({
  poolInfo,
  inputAmount,
  inputMint,
  slippage: 0.01,
  txVersion: 'V0', // or 'LEGACY'
  computeBudgetConfig: {
    units: 600000,
    microLamports: 100000, // priority fee
  },
});

// Execute with options
const { txId } = await execute({
  sendAndConfirm: true,
  skipPreflight: true,
});

console.log(`https://solscan.io/tx/${txId}`);

Key Features

FeatureCLMMCPMMAMM
Concentrated LiquidityYesNoNo
Token22 SupportLimitedYesNo
OpenBook RequiredNoNoYes
Custom Price RangesYesNoNo
LP NFT PositionsYesNoNo

Resources

Skill Structure

raydium/
├── SKILL.md                      # This file
├── resources/
│   ├── sdk-api-reference.md      # Complete SDK API
│   ├── program-ids.md            # All program addresses
│   └── pool-types.md             # Pool type comparison
├── examples/
│   ├── swap/README.md            # Token swap examples
│   ├── clmm-pool/README.md       # CLMM pool creation
│   ├── clmm-position/README.md   # CLMM position management
│   ├── cpmm-pool/README.md       # CPMM pool operations
│   └── liquidity/README.md       # Liquidity management
├── templates/
│   └── raydium-setup.ts          # SDK setup template
└── docs/
    ├── clmm-guide.md             # CLMM deep dive
    └── troubleshooting.md        # Common issues

What ships with it: 11 files

80.4 KB alongside SKILL.md, 1 of them executable

templates/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.