CryptocurrenciesIntermediate

Raydium (RAY)RAY

Raydium is a decentralised exchange and liquidity protocol on Solana that runs automated market maker pools; RAY is its token, with a 555 million maximum supply and buybacks funded by part of trading fees.

Raydium is one of the main places where tokens are swapped on Solana. Instead of matching buyers and sellers in an order book, most trades go through liquidity pools whose prices follow a formula. Liquidity providers earn most of the trading fees, and a fixed share is used to buy back RAY. This article explains how Raydium and RAY work, including the 2022 security incident, not what RAY will be worth.

Category
Cryptocurrencies
Reading time
7 min
Also called
RAY, Raydium DEX, Raydium AMM
Updated

Raydium in plain words

Raydium is a set of open, non-custodial smart contracts on Solana (SOL) for swaps, liquidity pools and token launches.1 It is a decentralised exchange built on automated market maker pools.

People who deposit two tokens into a pool are liquidity providers (LPs). They receive most of each trading fee, while 12% of the fee goes to buying back RAY.2

RAY has a maximum supply of 555,000,000 tokens, and its mint authority is disabled, so no new tokens can be created beyond that.3 RAY is not needed to swap or provide liquidity on Raydium.3

Raydium history, step by step

  1. February 2021 — AMM v4 launch

    Raydium launched its first pools in February 2021 as a hybrid AMM that could also route trades to the Serum (later OpenBook) order book when that gave a better price.4 See Order Book.

  2. 2021 — Farms and a launchpad

    Farms that paid RAY to LPs started in March 2021, and the AcceleRaytor launchpad followed in May 2021.4

  3. August 2022 — Concentrated liquidity

    CLMM pools, where LPs choose a price range, went live on Solana mainnet in August 2022.4 See Concentrated Liquidity.

  4. December 2022 — Pool authority compromise

    An attacker gained control of an AMM v4 admin key and drained eight constant-product pools; Raydium's post-mortem put the loss at about $4.4 million.5 Raydium says the cause was key management, not a program bug, and moved its authority roles to a multisig.4

  5. February 2024 — Vesting ends

    Team and seed tokens, locked for 12 months and then released daily through month 36, finished vesting on 21 February 2024.3 See Vesting Schedule.

  6. June 2024 — CPMM

    CPMM, a standard constant-product pool without the order-book link, went live in June 2024 and is now the recommended pool type for new pools.41

  7. Today — LaunchLab and perps

    Raydium also runs LaunchLab, a bonding-curve token launcher that moves graduated tokens into CPMM pools, and a perpetual futures interface powered by Orderly Network.1

Worked examples

Example 1 — Where a trading fee goes

0.30 USDC to buybacks

You swap 1,000 USDC in a CPMM pool with a 0.25% fee. In CPMM pools, 84% of the fee goes to LPs, 12% to RAY buybacks and 4% to the treasury.2

Example 1 — Where a trading fee goes — calculation
Total fee1,000 × 0.25% = 2.50 USDC
To LPs2.50 × 84% = 2.10 USDC
To RAY buybacks2.50 × 12% = 0.30 USDC
To treasury2.50 × 4% = 0.10 USDC
Check2.10 + 0.30 + 0.10 = 2.50 USDC

The buyback share is 12% of the fee, which is 0.03% of the trade, not 12% of the trade.6

Example 2 — Constant-product pricing

≈ 0.99% price impact

A hypothetical pool holds 1,000 SOL and 150,000 USDC, so its spot price is 150 USDC per SOL. Ignore fees and sell 10 SOL into it. A constant-product pool keeps SOL × USDC unchanged.7

Example 2 — Constant-product pricing — calculation
Constant1,000 × 150,000 = 150,000,000
SOL after the trade1,000 + 10 = 1,010 SOL
USDC after the trade150,000,000 ÷ 1,010 ≈ 148,514.85 USDC
USDC you receive150,000 − 148,514.85 = 1,485.15 USDC
Average price1,485.15 ÷ 10 ≈ 148.51 USDC per SOL (≈ 0.99% below spot)

The bigger the trade compared with the pool, the worse the average price. That is price impact, and it is why deep pools matter. See Slippage and Liquidity.

Example 3 — Supply arithmetic

≈ 0.34% a year

RAY has a 555,000,000 maximum supply. The mining reserve is 34%, the team 20%, and about 1.9 million RAY a year is emitted from the mining reserve.3

Example 3 — Supply arithmetic — calculation
Mining reserve555,000,000 × 34% = 188,700,000 RAY
Team allocation555,000,000 × 20% = 111,000,000 RAY
Yearly emission vs. max supply1,900,000 ÷ 555,000,000 ≈ 0.34%

Emissions are small compared with the maximum supply, and team tokens are fully vested, so buybacks and pool rewards are the main supply flows to watch. See Tokenomics.

Raydium (RAY) vs. Uniswap (UNI)

Both run automated market maker pools, but on different chains and with different token designs.

AspectRaydium (RAY)Uniswap (UNI)
Main chainSolana1Ethereum and other EVM chains
Pool typesConstant-product (AMM v4, CPMM) and concentrated liquidity (CLMM)1Constant-product and concentrated liquidity
Token's link to fees12% of trading fees buy back RAY6Governance token
Max supply555 million RAY31 billion UNI at genesis
Needed to trade?No3No

What Raydium and RAY are used for

  • Swapping Solana tokens

    Traders swap tokens through Raydium pools directly or through aggregators that route to them.1

  • Providing liquidity

    LPs deposit token pairs and earn most of the pool's trading fees.2 See Impermanent Loss.

  • Staking RAY

    Holders can stake RAY in the Raydium app to earn more RAY.8 See Staking.

  • Launching tokens

    LaunchLab lets projects launch tokens on a bonding curve before liquidity moves to a CPMM pool.1

Advantages and disadvantages

Advantages

  • Fixed maximum supply of 555 million, with mint authority disabled.3
  • A set share of trading fees buys back RAY, held at a public address.6
  • Several pool types, including concentrated liquidity.1
  • Open-source programs with published audits.74

Disadvantages

  • A 2022 admin-key compromise drained eight pools.5
  • LPs face impermanent loss and smart-contract risk.
  • Many newly launched tokens trade there, and some fail or are scams. See Rug Pull.
  • Its activity depends heavily on the Solana network and its memecoin cycles.

Going deeper

Read as far as you need. Each level builds on the one before it.

A pool-based exchange

Beginner

Raydium lets anyone swap Solana tokens against liquidity pools instead of an order book.1 LPs fund the pools and earn most of the fees.2

Three kinds of pool

Intermediate

AMM v4 is the original constant-product pool with a 0.25% fee, of which 88% goes to LPs and 12% to buybacks.2 CPMM is its successor, with fee tiers of 0.01%, 0.25% and 1%.2 CLMM pools let LPs choose a price range and offer tiers from 0.01% to 1%.2 AMM v4's OpenBook integration has been switched off.1

Admin keys and operational risk

Advanced

The 2022 incident did not come from a flaw in the pool maths. An attacker took control of an admin account that had authority over pool functions.5 Raydium then moved authority roles to a multisig and used protocol fees earmarked for buybacks to compensate affected LPs.4 Any DeFi protocol with upgrade or admin keys carries this kind of risk. See Reentrancy and Oracle Manipulation.

Common mistakes

  1. Thinking you need RAY to trade

    Swapping, providing liquidity and creating pools do not require RAY.3

  2. Reading 12% as 12% of the trade

    The buyback share is 12% of the fee; on a 0.25% fee that is 0.03% of the trade.6

  3. Ignoring price impact

    Large trades in shallow pools get a worse average price. See Slippage.

  4. Trusting every new pool

    Anyone can create a pool, so check the token mint before trading. See Rug Pull.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1In a 0.25% CPMM pool, how much of a 2,000 USDC trade's fee goes to RAY buybacks?
Q2What caused the December 2022 Raydium incident?

Key points to remember

  1. Raydium is an AMM-based decentralised exchange on Solana.
  2. It offers constant-product (AMM v4, CPMM) and concentrated-liquidity (CLMM) pools.
  3. LPs earn most of the fee; 12% of fees buy back RAY.
  4. RAY has a 555 million maximum supply, and team vesting ended in February 2024.
  5. A 2022 admin-key compromise drained eight pools of about $4.4 million.

Frequently asked questions

What does RAY do?

RAY can be staked for RAY rewards, is a common pair asset in Raydium pools, and is bought back with part of trading fees.3

Can more RAY be created?

No. The maximum supply is 555,000,000 and the mint authority is disabled.3

Was Raydium hacked?

In December 2022 an attacker used a compromised admin key to drain eight pools, about $4.4 million.5 Raydium moved its authority roles to a multisig afterwards.4

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. Raydium Docs. What is Raydium (opens in a new tab) Checked .
  2. Raydium Docs. Protocol fees (opens in a new tab) Checked .
  3. Raydium Docs. RAY token (opens in a new tab) Checked .
  4. Raydium Docs. History and milestones (opens in a new tab) Checked .
  5. The Block. Solana-based exchange Raydium suffers $4.4 million exploit (opens in a new tab) Checked .
  6. Raydium Docs. RAY buybacks (opens in a new tab) Checked .
  7. Raydium Docs. Raydium documentation home (opens in a new tab) Checked .
  8. Raydium Docs. RAY staking (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.