Economy Intelligence
Real-time currency flow tracking with inflation detection. Dual-writes to Roblox Creator Hub and Baseplate.
Overview
BaseplateEconomy tracks every currency source and sink in your game. It dual-writes to both Roblox's AnalyticsService:LogEconomyEvent() (for Creator Hub) and Baseplate (for real-time dashboards). You get instant visibility into economy health instead of waiting 24+ hours.
Quick Start
local BaseplateEconomy = require(game.ServerStorage.Baseplate.BaseplateEconomy)
BaseplateEconomy:Init({
apiKey = "bp_live_your_key",
apiUrl = "https://baseplate-ab.baseplate-rblx.workers.dev",
})
-- Player earns coins from a quest
BaseplateEconomy:LogSource(player, "Coins", 100, newBalance, "QuestReward", "quest_001")
-- Player spends coins on an item
BaseplateEconomy:LogSink(player, "Coins", 50, newBalance, "Purchase", "iron_sword")
API Reference
BaseplateEconomy:LogSource(player, currencyType, amount, endingBalance, transactionType, itemSku?)
Log currency earned (source). Dual-writes to Roblox + Baseplate.
BaseplateEconomy:LogSink(player, currencyType, amount, endingBalance, transactionType, itemSku?)
Log currency spent (sink). Dual-writes to Roblox + Baseplate.
Dashboard API
GET /api/economy/summary?hours=24¤cy=Coins returns:
- sources — total currency generated + transaction count
- sinks — total currency removed + transaction count
- netFlow — sources minus sinks
- inflationRate — percentage imbalance
- health — "healthy", "inflating", or "deflating"
- topTransactions — ranked by volume
- currencies — breakdown by currency type