pump-fee-system
Installation
SKILL.md
Fee System — Tiered Fees, Creator Fees & Protocol Fees
Implement and extend the Pump protocol's fee system: tiered protocol fees based on market cap, creator fee collection across two programs, and fee computation with ceiling division.
Context
The Pump protocol charges fees on every buy/sell transaction. Fees flow to protocol fee recipients and token creators. The fee system spans three programs and must handle tokens in both bonding curve and graduated (AMM) states.
Fee Types
| Fee | Recipient | When Charged |
|---|---|---|
| Protocol fee | feeRecipients[] in Global |
Every buy/sell |
| Creator fee | Token creator's vault PDA | Every buy/sell (if creator is set) |
| LP fee | Liquidity providers (AMM only) | Post-graduation trades |
Tiered Fee Calculation
When a FeeConfig exists, fees are market-cap-dependent: