This repository contains a custom Pump.fun-style bonding-curve token launch system, upgraded to support $TAI (SPL token) as the base asset instead of SOL. It explains the logic behind minting, buying, price calculation, market cap tracking, virtual liquidity, Raydium migration, and fee distribution.
- Mint token & buy initial supply (uses SOL)
- Users buy on the bonding curve
- Users sell anytime and receive SOL
- Once the bonding curve reaches 100k MC, the token reaches migration threshold
- $17k liquidity is deposited into Raydium LP and LP is burned
- All buys & sells use $TAI
- Price discovery is based on TAI reserves
- LP deposited into Raydium becomes TAI–TOKEN LP
-
Bonding curve price updates dynamically:
- When users buy → token supply decreases, TAI increases
- When users sell → token supply increases, TAI decreases
- Original Pump.fun uses $100K market cap target
- MC is computed as:
MC = Remaining Token Supply * Current Token Price
- Price is derived from bonding curve state:
price = TAI_reserve / token_reserve
You launched a token with:
- Total supply: 10,000,000,000 tokens (10B)
- You bought initial tokens with 30 SOL (virtual liquidity)
Pump.fun calculates starting price as:
starting_price = (virtual_solana + real_solana) / tokens_in_curve
Example from your case:
- Initial bought SOL: 30 SOL
- This sets token price ≈ 3e-8 per token
As users buy:
- Token supply in curve decreases
- TAI/SOL reserve increases
- Price increases
- Market cap approaches $100k threshold
Your pool looks like:
11M (GOAT) : 10K SOL
10K = 9970 REAL + 30 VIRTUAL
-
From real 9970 SOL (or TAI):
- A % fee goes to platform treasury
- Remaining SOL/TAI becomes Raydium liquidity
Deposit:
(TOKEN amount, TAI amount)
Burn LP to ensure decentralization.
- Full bonding curve implementation
- Virtual liquidity configuration
- Custom base-token support (TAI instead of SOL)
- Buy & Sell functions
- Market cap tracking
- Raydium migration logic
- Fee extraction logic
- Curve state storage
- Developer-friendly TypeScript/Anchor structure
price = TAI_reserve / token_reserve
MC = circulating_supply * price
Price always increases as more TAI enters the contract.
git clone https://github.com/yourrepo
cd pumpfun-tai
npm installCreate .env:
RPC_URL=
WALLET_PRIVATE_KEY=
TAI_TOKEN_MINT=
await program.methods.buy(amountTAI).accounts({...}).rpc();await program.methods.sell(amountToken).accounts({...}).rpc();const price = await program.account.curve.fetch(curvePk);When MC hits target:
- Curve closes
- Fees extracted
- Remaining TAI + token deposited into Raydium
- LP burned
- Trading moves to Raydium AMM
If you want a custom Pump.fun fork, bonding curve, or token-launch infrastructure:
📨 Telegram: @terauss
Please star ⭐ this repository to support development.