If you need help or upgraded version, plz contact here:
PumpFun Bonding Curve Protocol is a Solana protocol that builds upon the Meteora Dex protocol to implement advanced functionalities for token rewards, liquidity management, and decentralized finance mechanics. This project is designed to integrate seamlessly with the Solana ecosystem, ensuring performance, scalability, and security.
The protocol implements a constant product bonding curve (x * y = k) with the following initial parameters:
- Initial Virtual Token Reserves: 1,073,000,000,000,000
- Initial Virtual SOL Reserves: 15,000,000,000
- Initial Real Token Reserves: 793,100,000,000,000
- Total Token Supply: 1,000,000,000,000,000
The bonding curve ensures price discovery and continuous liquidity for the token.
All fees are directed to the protocol's multisig wallet: Br4NUsLoHRgAcxTBsDwgnejnjqMe5bkyio1YCrM3gWM2
When the bonding curve accumulates 42.5 SOL:
- X SOL is sent to the protocol multisig
- Remaining SOL is used to seed a Meteora constant product liquidity pool
- LP tokens are locked with claim authority assigned to the protocol multisig
- Can initialize new bonding curves
- Sets initial parameters and optional whitelist
- Configures launch timing and initial purchases
- Can modify protocol parameters
- Manages fee settings
- Controls whitelist status
- Protocol Multisig (
Br4NUsLoHRgAcxTBsDwgnejnjqMe5bkyio1YCrM3gWM2
)- Receives trading fees
- Has authority over locked LP tokens
- Receives swapped USDC from liquidity migrations
To create a new bonding curve:
- Initialize curve parameters
- Optional: Enable whitelist
- Set launch timing
- Configure initial purchases
Trading is enabled along the bonding curve until 42.5 SOL are raised and all 793,100,000 tokens are sold.
Migration is a critical process that occurs once the bonding curve has completed and the tokens are empty. It involves:
-
Minting the remaining 206,900,000 tokens
-
Sending the experiment fee to the multisig wallet
-
A CPI (Cross-Program Invocation) call to create a Meteora Dynamic AMM (Automated Market Maker). It uses 206,900,000 matched with 42.5SOL - migration fee
-
A separate instruction CPI call that locks the liquidity in the AMM and creates an escrow from which the multisig can claim trading fees.
-
Clone the repository:
-
Install dependencies:
- anchor : v0.31.0 - solana : v1.18.18 - rustc : v1.75.0
programs/pumpfun
: Contains the main smart contract code.tests
: Automated test scripts for contract functionality.migrations
: Deployment scripts for managing updates.scripts
: Useful utilities for interacting with the contract.
-
Update the
Anchor.toml
file to set your Solana cluster (e.g., Devnet or Mainnet) and wallet details:[provider] cluster = "https://api.devnet.solana.com" wallet = "~/.config/solana/id.json"
-
Ensure you have Solana CLI installed and configured:
solana config set --url https://api.devnet.solana.com
- Interact with the smart contract: Use the provided scripts or integrate with a frontend to interact with the PumpFun smart contract.
- Testing: Run unit tests to validate the functionality
- Deploy to Mainnet: Ensure all tests pass, and then update the deployment configuration to target the mainnet cluster.
Mainnet CA: 9MHPjXpZXgJrB4NiJVFStE5qy7Nqp7yaYpaqNe5jNfMw
Devnet CA: 9MHPjXpZXgJrB4NiJVFStE5qy7Nqp7yaYpaqNe5jNfMw
Create Bonding Curve Tx: 32JZPjV9JAakkvJyqQMpFhW8ziNqZV3QN2jbsY1W6GRsuDtq69HPtXsQE1RpAyUE2rw1DW5usozh4oueWqb1aM2S
Swap (involved team fee) Tx: TrzFL5aMu6vGEdFHhpHiDQhYrCYEmo4swSDLrN7avxSQwP3LrweSMPFTDZYmVYMwVCsTHSKWRxJkt9xXboQAwi8
Meteora Migration Tx: 496nHgdFz5QYR4ah1pTsmnkQJSMiF8Z3FaJhSNgQKaHp5UFL1rQekdEoUG7vWRozSKg3YHJivQsHZk7b8TxfnUVU