BTX Exchange

BTX Stock Exchange

BTX (BizTech Exchange) is a simulated stock market where event attendees trade virtual shares of Kickstart startup projects. Think of it like a mini stock exchange where each project is a "stock" with a ticker symbol, and attendees start with virtual cash to buy and sell shares.

Prices move based on supply and demand (how many people buy vs. sell), and there's even random "drift" to make the charts look realistic. It's a fun, gamified way to get attendees engaged with Kickstart projects.


How It Works (The Big Picture)

  1. Admin creates projects → Each Kickstart team becomes a "stock" with a ticker symbol (e.g., $TEAM1)
  2. Attendees get virtual cash → Everyone starts with $2,500 in virtual money
  3. Attendees buy/sell shares → Prices move based on net demand
  4. Real-world events affect prices → Judges can trigger "phase bumps" (e.g., "MVP shipped" → price jumps 30%)
  5. Investments affect prices → When real investment money flows to a team, their stock price rises
  6. Leaderboard → Top traders are ranked by portfolio value
Admin creates projects → Attendees trade → Prices move → WebSocket broadcasts updates → Charts update live

Key Files

Backend (services/btx/)

FileWhat it does
handler.jsAll HTTP + WebSocket endpoint handlers
helpers.jsCore business logic: trade execution, price calculation, drift, broadcasting
constants.jsConfiguration: initial cash, price sensitivity, phase bumps, drift settings
serverless.ymlAPI routes, DynamoDB table definitions, IAM permissions

Frontend

FileWhat it does
src/pages/btx.tsxMain exchange page (~2900 lines) with market view, trading UI, charts, portfolio
src/features/kickstart/2025/btx/BtxStockChart.tsxReusable price chart component using Recharts
src/hooks/useBtxExchange.tsCustom hook for market data, WebSocket connection, trading actions

What's Covered in This Section

Price Mechanics

How prices work: base price, supply & demand, drift, phase bumps, and investment impact.

Database & API

All 6 DynamoDB tables, REST API endpoints, and WebSocket routes.

Trade Execution & Frontend

Atomic trade flow, frontend components, price charts, and WebSocket hook.

Configuration & Development

Tunable constants, local dev setup, common admin tasks, and tips.

Previous
Customization & Reference