BAG CITY/docs ... TPS Enter the city

$ open bagcity.fun

Every Solana token is a building.

BAG CITY renders the live Solana market as one walkable map, then lets you act on it without leaving the street. This page is the source of truth for how it works.

...towers live
7neighborhoods
16platforms linked
5live data feeds

00 Utility

Read the market at a glance

Every active token is a building. Height is market cap, lit windows are holders, the roof tells you if it's pumping, dumping or brand new.

Act where you look

Swap, launch, open the pools, jump into a terminal or burn dust. 16 platforms sit behind 12 landmarks in Bag Square.

Your wallet in the city

Connect read-only and every token you hold lights up gold. The Incinerator shows the SOL stuck in your empty accounts.

A city that talks

One shared chat, live billboards for the hour's biggest moves, and KOL calls checked against the tower.

$BAG burns with use

30% of creator rewards buy back $BAG and burn it every 10 minutes. The burned total is read from the chain, so anyone can check it.

01 Data model

A tower is a pure function of the token's live numbers. Nothing is placed by hand.

// height in city pixels, log scale so $40K and $4B fit on one screen
const height = clamp(10 * (Math.log10(Math.max(mcap, 1e4)) - 4) + 12, 10, 84) + 8;
// lit windows: a lit window is a holder
const lit = Math.min(0.95, Math.log10(holders + 10) / 5.2);
// what the roof shows
if (ageHours < 24)                      state = 'new';   // crane
else if (chg1h >= 8 || chg24h >= 30)   state = 'pump';  // beacon
else if (chg24h <= -20 || chg1h <= -10) state = 'dump';  // fire
else                                    state = 'hold';

Refreshed every 30 seconds. Heights ease to the new value, so a pump grows on screen.

02 Neighborhoods

Each neighborhood is a query over the same live token set, deduplicated so a token lives in one place.

NeighborhoodFilterSorted by
Upper East Pumpvol1h > 15_000 && chg1h > 0chg1h
The Trencheslaunchpad || age < 7d, chg24h > -60vol1h
Old Moneyverified || mcap > 200Mmcap
Stonk Street/xstock|stonk/ in name, launchpad, tagsvol24h
Lower Rug Sidechg24h <= -50vol24h
Meme Squarebillboards: top pump, new holders, volume, newestlive
Bag Squarethe twelve landmarksfixed

03 Bag Square

Twelve landmarks around the bag. Each one does one job, from inside the city.

On a phone, every app opens inside Phantom, Solflare or Backpack so it can connect to your wallet.

04 Wallets

Connect is read-only. We never ask for a signature; we read the public token accounts for your address.

const programs = ['Tokenkeg…', 'Tokenz…'];            // SPL Token and Token-2022
for (const programId of programs)
  rpc('getTokenAccountsByOwner', [wallet, { programId }, { encoding: 'jsonParsed' }]);
// amount > 0  → that token's tower lights up gold
// amount == 0 → an empty account: rent you can reclaim at the Incinerator

05 Live data

browser ──▶ Cloudflare Worker (edge cache) ──┬─▶ Jupiter        market cap, holders, activity
   │                                          ├─▶ DEX Screener   pairs, liquidity, links
   │                                          ├─▶ CoinGecko      candles, trades, terminal
   │                                          ├─▶ Magic Eden     collections, floors
   │                                          └─▶ Solana node    TPS, slot, wallets, $BAG supply
   └──▶ WebSocket ──▶ Durable Object          city chat, one shared room
FeedUsed forCache
Jupiterthe city, towers, neighborhoods30s
DEX Screenerpairs, pools, liquidity20s
CoinGeckocharts, big trades, terminal12–30s
Magic EdenAuction House board5m
Solana nodeCity Hall, wallets, $BAG burns6–30s

06 API

The city runs on these endpoints. Read-only JSON, cached at the edge. Hit Run to see a live response.

07 City chat

const ws = new WebSocket('wss://bagcity.fun/api/chat');
ws.send(JSON.stringify({ type: 'say', name: 'Neon Cabbie 33', text: 'gm' }));
// ← { type: 'hello', history: [...40], online: n }
// ← { type: 'msg', name, text, at }   every message pops a bubble on the street
  • No links
  • No addresses except the $BAG CA
  • No team-sounding names
  • 1 message / 1.5s
  • 200 characters

08 $BAG

CAG9Q51Jf7SYer6xv83UCa1myUCTcivMqAEVvUhA8ppump
LaunchPump.fun, paired with SOL1B supply
Creator rewardsPump.fun creator fees, paid in SOL on every tradeSOL
Buybackshare of creator rewards, set on-chain in Pump.fun fee sharing30%
Cadencepay out, swap to $BAG, burnevery 10 min
// every 10 minutes, on a Cloudflare cron, from a wallet that only ever holds the buyback share
await pumpSdk.distributeCreatorFees(BAG);          // permissionless: pays each shareholder, 30% lands here
const solIn  = await balance(SOL) - reserve;       // keeps a little SOL for fees
const bagOut = await swap(SOL, BAG, solIn);        // best Jupiter route, capped slippage
await burn(BAG, bagOut);                           // SPL burn: supply goes down, on-chain

// verify it yourself: burned = launch supply − supply now
const { value } = await rpc('getTokenSupply', [BAG]);
const burned = 1_000_000_000 - Number(value.uiAmountString);