Pump Social Capital

Solana Backend-First Developer Documentation

1. Overview & MVP Goal

Pump Social Capital is a social capital market built on Solana. It enables users to create a market for creators, buy/sell Creator Keys, and perform price discovery on-chain while earning creator fees from trading activities.

"On-chain first. Backend fast. UI simple."

MVP Requirements

  • Connect Solana wallet
  • Create creator market
  • Buy and Sell Creator Keys
  • Bonding curve price discovery
  • Real-time creator and protocol fees

2. Architecture

The platform uses a Solana-first architecture. The backend is fast but the Solana program is always the single source of truth for balances and final pricing.

Wallet → Frontend → Backend API → Solana RPC → Anchor Program → Helius Webhook → Indexer → Postgres/Redis → Realtime WebSocket

3. Smart Contracts (Anchor)

The main program is `pump_social_capital`. It utilizes Program Account Ledgers instead of standard SPL tokens for efficiency.

Key PDAs

Protocol Config PDA ["protocol"]

Holds authority, treasury, and global fee BPS settings.

Creator Market PDA ["creator_market", creator_id]

Maintains supply, reserve lamports, total volume, and specific creator fee settings. Uses immutable X ID.

User Position PDA ["position", market, wallet]

Tracks exact key balances and PnL data per user per market without needing an SPL token mint.

4. Bonding Curve Math

Pricing is deterministic and calculated entirely on-chain using discrete quadratic pricing.

Price(s) = base + k × s²

*The frontend and backend use this exact formula for quotes, but the smart contract acts as the final validator for slippage and bounds.

5. Buy & Sell Flows

Buy Flow

  1. Validate protocol and market active.
  2. Read current supply.
  3. Calculate exact curve cost.
  4. Calculate creator & protocol fees.
  5. Validate cost <= `max_sol_cost`.
  6. Transfer SOL, route fees to vaults.
  7. Increase user balance and market supply.
  8. Emit `KeysPurchased` event.

Sell Flow

  1. Validate key balance.
  2. Calculate return based on supply.
  3. Calculate fees.
  4. Validate net >= `min_sol_received`.
  5. Reduce supply and balance.
  6. Transfer SOL to seller.
  7. Emit `KeysSold` event.

6. Fee Architecture

Pump Social Capital separates accounting strictly. Reserve liquidity is never mixed with fees.

Bonding Curve Fees (Before Graduation)

While your token is on the bonding curve, every trade generates a flat 1.25% fee.

  • Creator Fee: 0.30% - Routed to Creator Fee Vault PDA.
  • Protocol Fee: 0.95% - Routed to Protocol Treasury PDA.
  • Total Fee: 1.25%

PumpSwap Fees (Graduated Tokens)

Once graduated to PumpSwap, the creator fee scales dynamically with market cap.

Market Cap (SOL)Creator FeeProtocol FeeLP FeeTotal Fee
0 – 4200.300%0.930%0.020%1.250%
420 – 1,4700.950%0.050%0.200%1.200%
1,470 – 2,4600.900%0.050%0.200%1.150%
2,460 – 3,4400.850%0.050%0.200%1.100%
3,440 – 4,4200.800%0.050%0.200%1.050%
4,420 – 9,8200.750%0.050%0.200%1.000%
9,820 – 14,7400.700%0.050%0.200%0.950%
14,740 – 19,6500.650%0.050%0.200%0.900%
19,650 – 24,5600.600%0.050%0.200%0.850%
24,560 – 29,4700.550%0.050%0.200%0.800%
29,470 – 34,3800.500%0.050%0.200%0.750%
34,380 – 39,3000.450%0.050%0.200%0.700%
39,300 – 44,2100.400%0.050%0.200%0.650%
44,210 – 49,1200.350%0.050%0.200%0.600%
49,120 – 54,0300.300%0.050%0.200%0.550%
54,030 – 58,9400.275%0.050%0.200%0.525%
58,940 – 63,8600.250%0.050%0.200%0.500%
63,860 – 68,7700.225%0.050%0.200%0.475%
68,770 – 73,6810.200%0.050%0.200%0.450%
73,681 – 78,5900.175%0.050%0.200%0.425%
78,590 – 83,5000.150%0.050%0.200%0.400%
83,500 – 88,4000.125%0.050%0.200%0.375%
88,400 – 93,3300.100%0.050%0.200%0.350%
93,330 – 98,2400.075%0.050%0.200%0.325%
98,240+0.050%0.050%0.200%0.300%
Security Note: The bonding curve reserve is completely isolated and cannot be used as protocol treasury.

7. Backend & Realtime

The backend provides metadata, search, charts, and realtime feeds, but never acts as the authority for balances or prices.

  • Stack: Node.js, Fastify, PostgreSQL (Drizzle), Redis, BullMQ.
  • Indexing: Listens to Anchor events via Helius Webhooks. Validates signatures and decodes events to update Postgres.
  • WebSockets: Pushes updates (trade, price_update, supply_update) to clients in under 2 seconds.
MarketsPortfolioCreateProtocol