> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justpump.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# JustSwap

> Post-graduation trading on the native constant product AMM

## What is JustSwap?

JustSwap is JustPump's native **Automated Market Maker (AMM)** used for trading tokens after they graduate from the bonding curve. It implements a **constant product** formula (x × y = k), similar to Uniswap and other popular AMMs.

<Info>
  JustSwap provides permanent liquidity and market-driven pricing for graduated tokens.
</Info>

***

## When Tokens Move to JustSwap

Tokens graduate to JustSwap when they reach the **85 SOL threshold** on the bonding curve. At this point:

1. The bonding curve stops accepting trades
2. Remaining liquidity is migrated to a **canonical pool** on JustSwap
3. The token begins trading on the constant product AMM
4. Liquidity is **permanently locked**—it cannot be withdrawn

<Note>
  Once a token graduates, all future trading happens on JustSwap. The bonding curve phase is complete.
</Note>

***

## How Constant Product AMMs Work

JustSwap uses the **constant product formula**:

```
x × y = k
```

Where:

* `x` = Amount of token A in the pool (e.g., your token)
* `y` = Amount of token B in the pool (e.g., SOL)
* `k` = A constant value that must remain the same after every trade

### Trading Mechanics

When you buy tokens:

* You add SOL to the pool (increases `y`)
* You remove tokens from the pool (decreases `x`)
* The price adjusts to maintain `k = constant`

When you sell tokens:

* You add tokens to the pool (increases `x`)
* You remove SOL from the pool (decreases `y`)
* The price adjusts to maintain `k = constant`

<Accordion title="Example: How AMM Pricing Works">
  Imagine a pool with:

  * 1,000,000 tokens (x)
  * 100 SOL (y)
  * k = 100,000,000

  If someone buys 10,000 tokens:

  * New x = 990,000
  * To maintain k, new y must be: 100,000,000 / 990,000 ≈ 101.01 SOL
  * Buyer pays 1.01 SOL (plus fees) to receive 10,000 tokens
  * Price per token increased because supply decreased
</Accordion>

***

## Permanent Liquidity Lock

One of the key features of JustSwap canonical pools is **permanent liquidity locking**.

<Warning>
  LP (Liquidity Provider) tokens for canonical pools are minted directly to the pool's Program Derived Address (PDA) and **cannot be withdrawn**. This ensures liquidity can never be rug-pulled.
</Warning>

### Why This Matters

* **No rug risk**: Creators cannot remove liquidity and crash the price
* **Long-term viability**: Token remains tradable indefinitely
* **Community confidence**: Traders know liquidity is permanent
* **External integration**: Other platforms can list the token with confidence

***

## Bonding Curve vs JustSwap

<CardGroup cols={2}>
  <Card title="Bonding Curve" icon="chart-line">
    **Phase**: Pre-graduation

    **Pricing**: Linear bonding curve

    **Liquidity**: Provided by smart contract

    **Fees**: 1.3% total

    **Supply**: Dynamic as trades occur

    **Goal**: Accumulate 85 SOL for graduation
  </Card>

  <Card title="JustSwap AMM" icon="arrow-right-arrow-left">
    **Phase**: Post-graduation

    **Pricing**: Constant product (x × y = k)

    **Liquidity**: Permanently locked

    **Fees**: 1.5% total

    **Supply**: Fixed forever

    **Goal**: Provide long-term, stable trading
  </Card>
</CardGroup>

***

## Fee Structure on JustSwap

JustSwap trades incur a **1.5% total fee**, distributed across four recipients:

| Recipient      | Percentage | Purpose               |
| -------------- | ---------- | --------------------- |
| Platform       | 0.6%       | Platform development  |
| Creator        | 0.5%       | Token creator support |
| Insurance Fund | 0.2%       | Cashback vault        |
| Airdrop Fund   | 0.2%       | Community rewards     |

<Info>
  See the [Fees Overview](/fees) page for detailed breakdowns and examples.
</Info>

***

## Advantages of JustSwap

### For Traders

* **Deep liquidity**: Graduated tokens have permanent liquidity
* **Market-driven pricing**: Price reflects true supply and demand
* **Lower slippage**: Compared to low-liquidity bonding curves
* **Composability**: Can integrate with other DeFi protocols

### For Creators

* **Ongoing revenue**: Creators earn 0.5% on every trade forever
* **Project credibility**: Graduation signals community support
* **No liquidity management**: Liquidity is locked and automated
* **External visibility**: Listed tokens attract external traders

### For the Ecosystem

* **Permanent markets**: Tokens remain tradable indefinitely
* **Community protection**: No rug pull risk on canonical pools
* **Fair trading**: No privileged access or front-running
* **Transparent operations**: All swaps are on-chain and auditable

***

## How to Trade on JustSwap

<Steps>
  <Step title="Connect Your Wallet">
    Visit [JustPump](https://justpump.fun) and connect your Solana wallet.
  </Step>

  <Step title="Select a Graduated Token">
    Browse graduated tokens or search for a specific token by name or address.
  </Step>

  <Step title="Execute Your Trade">
    Enter the amount you want to buy or sell. The interface shows you the estimated output after fees and slippage.
  </Step>

  <Step title="Confirm Transaction">
    Review the trade details and confirm. The swap executes on-chain and you receive your tokens instantly.
  </Step>
</Steps>

<Tip>
  JustSwap pools are canonical, meaning there's only one official pool per token. This concentrates liquidity and provides better pricing.
</Tip>

***

## Security and Trust

* **Auditable code**: JustSwap smart contracts are open source
* **No admin keys**: Canonical pools have no upgrade authority after creation
* **Permissionless**: Anyone can trade without restrictions
* **On-chain execution**: All swaps happen transparently on Solana

<Card title="Learn more about security" icon="lock" href="/security">
  Read about JustPump's security architecture and protections
</Card>

***

## Questions?

Have questions about JustSwap or AMM trading? Visit the [FAQ](/faq) or contact [support@justpump.fun](mailto:support@justpump.fun).
