Hey there! 👋 This is the smart contract for Pump.fun - a cool project that lets you create virtual liquidity pools and swap tokens using bonding curves on Solana.
We built this to make DeFi more accessible and fun. Instead of the usual AMM pools, we use bonding curves that automatically adjust prices based on supply and demand. Think of it like a vending machine that gets more expensive as it runs out of snacks!
- Create virtual liquidity pools (no need for massive capital)
- Swap tokens with prices that move smoothly
- Add/remove liquidity and earn fees
- Bridge to Raydium when you're ready for the big leagues
- Works with Meteora too!
First, make sure you have the basics:
- Rust (latest stable)
- Solana CLI
- Anchor Framework
- Node.js (for the TypeScript stuff)
# Clone this bad boy
git clone https://github.com/your-username/Pumpfun-Smart-Contract.git
cd Pumpfun-Smart-Contract
# Get the dependencies
cargo build
npm install
# Build the program
anchor build
- CurveConfiguration: Stores your fee settings and curve parameters
- LiquidityPool: Keeps track of your tokens and shares
- LiquidityProvider: Knows how much you've contributed
- Swap Engine: Does the math for fair pricing
initialize
: Set up your pool with custom fees (0-100%)add_liquidity
: Put tokens in, get shares outremove_liquidity
: Burn shares, get tokens backswap
: Trade tokens using the bonding curvecreate_raydium_pool
: Move liquidity to Raydium
We keep it simple:
- Default fee: 5% of reserves (you can change this)
- Initial price: 600 lamports per token
- Price discovery: Automatic based on supply/demand
The bonding curve makes sure prices move smoothly - no sudden jumps or manipulation!
Want to see what this looks like in real life? Here's a transaction showing virtual LP removal and Raydium pool creation:
Run the tests to make sure everything works:
anchor test
Got questions? We're here to help:
- Telegram: @yookee92
- Discord: _koga_8
Feel free to reach out - we love talking about DeFi and Solana!
Found a bug? Want to add a feature? Awesome! Here's how:
- Fork the repo
- Make your changes
- Test everything works
- Send us a pull request
We're always looking for contributors who are passionate about DeFi!
MIT License - do whatever you want with it, just don't blame us if something goes wrong 😄
Built with ❤️ by the Pump.fun team
P.S. Always test on devnet before mainnet!