FiveM Economy Analytics: Using Transaction Logs to Find Inflation, Dupes and Money Sinks That Work
FiveM Economy Analytics: Using Transaction Logs to Find Inflation, Dupes and Money Sinks That Work
You can’t balance an economy you can’t measure, and most servers measure nothing. FiveM economy analytics means treating your money logs as a dataset: every dollar created, moved or destroyed becomes a row you can query, graph and alert on. The SaaS dashboards that rank for this topic will sell you the graphs; this guide shows you how to build them yourself from the database you already run.
Log Every Dollar That Moves — With a Source Tag
Everything downstream depends on one habit: no money changes hands without a row in a transactions table. In QBCore, Player.Functions.AddMoney and RemoveMoney already accept a reason argument — the problem is that half the scripts on your server pass nothing, so your logs fill up with “unknown”. Wrap both functions once in a small resource that writes to a money_transactions table and refuse to merge any new script that doesn’t pass a real tag.
On ESX, wrap xPlayer.addAccountMoney and removeAccountMoney the same way, since older builds never carried a reason field at all. The table needs five columns: player identifier, amount, direction, source tag, timestamp — plus an index on (source, created_at) or every query below crawls once you pass a few million rows. Log the actual event, not the intent: “trucker_delivery_payout”, not “job”.
The Money Supply Graph: One Chart That Shows Inflation
Total money supply is the sum of every character’s cash and bank balance, snapshotted on a schedule. Run it nightly, store one row per day, and plot it. If the line climbs faster than your player base grows, your economy is inflating — no other metric tells you this earlier or more honestly.
The query is short. QBCore stores balances as JSON in the players table, so a nightly cron can run something like:
INSERT INTO economy_snapshots (day, total)
SELECT CURDATE(),
SUM(JSON_EXTRACT(money,'$.cash') + JSON_EXTRACT(money,'$.bank'))
FROM players;
Then watch the week-over-week growth rate, not the raw number. A server that’s gaining players should sit somewhere around 1–3% weekly growth; sustained 5%+ with a flat population means your faucets are outrunning your sinks, and prices in player trades will drift up to match within a month or two.
Faucets vs Sinks: Group by Source and Find the Leak
Once transactions carry source tags, one GROUP BY shows you where money is born and where it dies. Sum all additions by source for the last seven days, do the same for removals, and sort. On nearly every server I’ve pulled this on, a single faucet accounts for 40–60% of all money created — usually one grindable job whose payout got buffed months ago and never revisited.
Go one level deeper and compute payout per player-hour for each job: total paid out divided by hours players spent clocked in. That normalizes the comparison, because a faucet paying out a lot isn’t broken if a lot of people work it. A job paying $28,000 an hour next to five jobs paying $9,000 is broken, and the group-by finds it in thirty seconds.
Dupe Signatures Hiding in Your Logs
Dupes rarely announce themselves; they show up as statistical anomalies. Four patterns catch the large majority of them. First, impossible balance jumps: any single transaction bigger than your largest legitimate payout deserves a look, and a balance delta between snapshots with no matching ledger rows means money entered outside your instrumented paths — that gap is a dupe or an un-hooked script, and both need fixing.
Second, mirrored transfers: player A sends B a sum and B returns it within seconds, repeatedly — a classic sign of a trade-window or banking race condition being farmed. Third, same-item sell loops: dozens of sell events for an identical item from one player in minutes, faster than the item can be acquired legitimately. Fourth, velocity outliers: compute each player’s transactions per hour and flag anyone several times above the server median. None of these prove a dupe on their own; together with the logs they hand you the exact resource and the exact players to review.
Wealth Distribution: When the Top 1% Breaks the Market
Inflation is about how much money exists; distribution is about who holds it. Rank characters by total balance and compute what share the top 1% controls. When a handful of players hold 30–40% of total supply, they set the price floor in every player-to-player trade — mid-tier cars, houses and items stop selling because the only real buyers no longer care about price.
You don’t need a formal Gini coefficient; a decile table works. If your top decile holds fifteen times your median player’s wealth, targeted sinks (luxury taxes, high-end upkeep) matter more than global ones — flat fees punish new players and barely dent the hoard at the top.
Did That Money Sink Actually Work? Measure It
A sink works if total supply growth slows after you ship it — not if it “collects a lot of money.” Take your weekly supply growth for the four weeks before launch, compare it to the four weeks after, and demand a visible bend in the line. Vehicle upkeep, property fees and tax scripts all report impressive collection totals while doing nothing, because the players paying them are the rich ones who regenerate the cost in an evening.
Also check who pays. Group the sink’s removals by player wealth decile: a sink that draws 80% of its intake from the bottom half of your population isn’t fighting inflation, it’s taxing newcomers out of the server. The best-performing sinks in my logs are recurring, unavoidable and scale with assets owned — upkeep beats one-time purchase fees every time, because a one-time fee stops sinking the day everyone owns the thing.
Tooling: SQL, Grafana and One Webhook Is Enough
You don’t need a subscription dashboard for any of this. Your server already runs MariaDB behind oxmysql; point a free Grafana instance at it as a read-only MySQL data source and build three panels — supply over time, top faucets, top sinks — in an afternoon. If Grafana feels heavy, a weekly CSV export into a spreadsheet with three charts covers 80% of the value.
Add one Discord webhook for anomalies: fire an alert when any player’s net worth rises more than a set threshold in an hour, or when a transaction exceeds your largest legitimate payout. Keep thresholds loose at first — an alert channel that pings forty times a day gets muted by Friday, and a muted alert is worse than none.
Nerfing With Data Instead of Vibes
The data’s real payoff is political. “We’re cutting trucker pay” starts a riot; “trucking created 52% of all money on the server last month, three times the next job, so payouts drop 15% on Monday” gets grudging nods — players accept nerfs they can verify. Publish the numbers, adjust one faucet at a time in 10–20% steps, and re-measure for two weeks before touching anything else.
Prefer adding sinks over cutting income where you can, since removing money players already earned always stings more than charging for something they want. And when the supply graph says the economy is too far gone — years of untagged faucets and unpatched dupes baked into balances — the same data makes the case for a wipe far better than any announcement post ever will. That’s the whole discipline: log everything, graph the supply, and let the numbers make the unpopular calls for you.
Building out the systems your logs will be watching? Browse economy and job scripts at official-tebex.io, full server packages and banking resources at shop-tebex.io, and optimized, low-resmon scripts at 0resmon-tebex.io.