Pump.fun smart contract clone that works just like pump.fun site, like pump.fun, this smart contract creates the pool on contract, and make users to buy and sell from the pool.
anchor-cli-wasm v0.29.0 is used.
-
initialize
Sets up the bonding curve configuration, including parameters like fees and curve constants, ensuring only authorized users can initialize it. -
create_pool
Creates a liquidity pool tied to the bonding curve, initializing accounts to manage token liquidity and transactions. -
add_liquidity
Allows users to deposit assets into the liquidity pool, increasing the pool's balance and potentially minting pool tokens as a reward. -
remove_liquidity
Enables users to withdraw their share of liquidity from the pool, burning their pool tokens and adjusting the pool's balances. -
buy
Lets users purchase tokens based on the bonding curve price, transferring payment to the pool and minting tokens to the buyer. -
sell
Allows users to sell tokens back to the pool, burning tokens and receiving payment based on the current bonding curve price.