Turnkey development of a trader leaderboard system

The trader rating on the storefront diverges from actual trades — and trust in the platform drops. We develop a turnkey trader leaderboard system: we collect data, consolidate calculation into a single core, and hand you a ready-made tool. Rating reconciliation takes minutes instead of a day, and discrepancies between the storefront and reports are eliminated as a class.

Blockchain Development Services

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1376
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1350
  • B2B Advance company logo design
    B2B Advance company logo design
    798
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1088
  • AIDER company logo development
    AIDER company logo development
    1034
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1130

Why the trader leaderboard diverges from real trades

A trader leaderboard diverges from real trading more often than it seems, and the cause is almost never arithmetic.

The same trade ends up in the public ranking and in the broker's report with different entry prices, because the data sources are different, and the moment they are received even more so. We examine four reasons that add up to the return discrepancy in most projects.

Trade history comes from the exchange's programmatic interface in chunks, and the retrieval depth differs for each source. Public Binance feeds return executions with a time limit, while private access has a request volume limit.

If the history backfill window closes before older executions are pulled in, only the tail enters the calculation: a trader with years of history looks like a beginner, and the discrepancy grows every day.

That is why the window is defined by a rule — how much depth we pull on first connection, what we use to close gaps, what we do if the source did not return everything.

Partially closed positions are the second quiet trap. A position built from several orders and closed in two parts becomes independent trades in a naive calculation, and the result is calculated on the wrong base. Trade reconciliation must match entry and exit by instrument and direction, not by order ID.

The third reason is the calculation methodology. Some calculate return relative to account deposits, others relative to average margin over the period, and still others do not subtract commissions and position rollover fees.

Two seemingly correct numbers diverge by multiples, and the dispute is not about mathematics but about what should even be considered the base. Until the methodology is fixed in code and documentation, any ranking remains an agreement rather than a measurement.

Next we examine how this is closed — at the level of collection, storage, and recalculation.

The effect of a single ranking calculation core and data marts

While the ranking was calculated independently in several data marts, discrepancies were only a matter of time.

A separate calculation for the trader dashboard, a separate one for the public leaderboard, and another for exports — each processed trades in its own order and with its own rounding, and by the end of the day the totals for a single account diverged by tenths of a percent.

A single calculation core removes the cause, not the effect: events pass through one journal in one order, and data marts read a common snapshot.

The switch happens in stages, one data mart at a time, so the new numbers are compared with the old ones for some time — the discrepancy between the dashboard and the public table ceases to be a class of defects; there is simply nowhere to get it.

Data freshness changes next. Recalculation happens as events arrive, not on a schedule; the lag window shrinks from hours to minutes, and the daily total reconciles without a nightly check.

Heavy summaries are built on top of the same snapshot, so yesterday's and today's values are calculated in the same way.

For support, this is a direct offload: the share of disputed requests falls, and investigating a disputed point comes down to one operation — you can see which event and in what order affected the position. Previously, such an investigation required manually reconciling three sources and still left doubt.

Trust in the ranking rests on predictability: a participant sees the same number in the dashboard, in the public leaderboard, and in the export. When this holds, the dispute is about the accrual rules, not about whose calculation is correct.

Trader leaderboard: calculation modes and their limitations

The ranking calculation mode determines two things: how much delay a trader sees before their place updates, and how many resources are spent maintaining the data mart.

You do not choose the “fastest” option, but the one whose delay fits the product requirements — because the limitations of a mode show up not at launch but at volume, when trade history accumulates in the ranking window.

Option When it fits Limitations
Scheduled recalculation An update interval of 5–30 minutes is sufficient: daily and weekly rankings Delay equals the interval; the window is calculated in full, and processing time grows with history
Event-driven calculation A response within seconds is needed: intraday competitions Events arrive out of order and are duplicated — deduplication and protection against a recalculation avalanche are required
Incremental calculation plus periodic snapshot The default compromise: trades update positions, the snapshot smooths out discrepancies Two independent write paths into the data mart — without regular reconciliation and a reproducible rollback, places “jitter”
On-demand calculation, without materialization Few users, many slices and filters Response time is unstable and grows with window depth; heavy queries compete for resources

Some data mart limitations are not removed by changing the mode: window depth, the inclusion of backdated recalculated trades, and rights to hidden positions.

That is why the mode is fixed together with the accounting rules, not afterward — otherwise the storage layer has to be rewritten.

How we implement the system: from data audit to handover

The work order is structured so that a discrepancy in numbers surfaces at the verification stage, not when the leaderboard is already showing places to real clients. Each stage ends with an artifact that can be accepted, disputed, or reused when connecting a new source.

  1. Data source audit. We examine where trades, balances, and fund transfers come from: exchange trading interfaces, streaming notifications, archives, manual exports. We record delays, completeness, duplicates, and time zones — each source has its own reconciliation mode.
  2. Metric calculation scheme. We define exactly what we calculate: return on deposit, maximum drawdown, turnover, stability by period. We separately describe the accounting of deposits and withdrawals, commissions, and position payouts — otherwise return is distorted at the first fund transfer.
  3. Account eligibility rules. We set thresholds for history length and number of trades, and filter out transfers between one's own accounts, self-matching, and spikes on illiquid instruments. The rules live in configuration, not code — they are changed without a rebuild.
  4. Calculation and data mart setup. Recalculation runs on a schedule and only for new data; data marts return ready-made slices: overall ranking, periods, account categories. Manual edits do not enter the data mart — every number has a calculation trail.
  5. Calculation correctness check. We reconcile the total against the primary trade feed, manually recalculate a sample of accounts, and run historical periods with a known outcome. A discrepancy above the set threshold is a blocking defect, not a rounding error.
  6. Handover and training. We hand over configurations, the calculation scheme, the procedure for connecting a new source, and instructions for investigating disputed accounts. We train the team and stay in touch during the first period of independent operation.

As a result, calculation rules are fixed in configuration, a disputed account is investigated from the log, and a new source is connected according to a ready-made procedure.

What remains with you after project handover

A trader leaderboard lives not for the launch moment but for the following year: accrual rules change, trade sources are added, and the set of metrics is updated.

That is why we hand over not a “working service”, but a kit that your team can use to change calculation rules and roll out updates without us.

  • Integration scheme — which trade and balance sources are connected, how often data arrives, how the system behaves when the stream breaks, and how it backfills the missed period.
  • Calculation configurations — ranking rules, averaging windows, metric weights, and cutoff thresholds are moved into settings rather than hardcoded: changing a window does not require editing the service or rebuilding.
  • Access policies — roles, rights to export data and to change calculation rules, and logging: you can see who changed settings and when.
  • Metric update procedure — recalculation frequency, handling of an incomplete period, and the procedure for announcing changes to traders so that a rule change is not read as lost points.
  • System documentation — architecture diagram, description of services and queues, failure points, and behavior when a source is unavailable.
  • Support instructions — handling of typical requests, diagnostics of number discrepancies, and the procedure for rolling back to the previous calculation period.
  • Set of checks — tests for ranking correctness and protection against manipulation: multiple accounts of one trader, trades outside the window, anomalous volume spikes.

All of this is documented so that a new engineer on the team can figure it out from the documents, not from correspondence with us. Describe the task — we will come back with an estimate and a handover plan.

Case study: ranking reconciliation accelerated from a day to minutes

The TradeBoard platform calculated the trader ranking with a nightly batch recalculation: by publication time, the data mart lagged the market by almost a day, and discrepancies with recalculation from primary trades reached 4% of positions.

Disputed results were investigated manually — up to 30 requests per week, and each one required pulling up the accrual history.

What we changed

Recalculation was moved to an incremental mode: a trade event immediately updates aggregates, and accrual rules were collected into a single versioned reference — editing a formula no longer rewrites history retroactively.

In parallel, we set up hourly reconciliation: an independent recalculation from primary data is compared with the data mart, and discrepancies go into a review queue indicating the trader and period.

Metric Before After
Ranking recalculation once a day, in batch minutes after a trade
Discrepancies between data marts up to 4% of positions fractions of a percent, review on the same day
Requests about disputed results about 30 per week a few
Ranking staleness window up to 24 hours minutes

Metric correctness was checked on a set of trades with a known outcome and on historical periods — they matched manual calculation exactly.

We keep the data mart stable through repeated reconciliation runs and automatic restoration of aggregates after a failure: the ranking is no longer a place where the result depends on how the nightly recalculation went.

How does the ranking data mart differ from the calculation core?

The ranking data mart and the calculation core solve different tasks, and while they live in the same process, the trader leaderboard remains fragile.

The core processes the trade stream, calculates participant metrics — return, drawdown, turnover — and stores the history of occupied places. The data mart calculates nothing: it returns a ready answer to “top 100 for the week” from a pre-built projection.

Mixing the layers breaks the system predictably. A page request hits the same database where recalculation over the entire history is running: heavy aggregation over millions of trades holds locks, and history depth starts directly determining response time.

A recalculation failure is seen by the user as an empty or “jumping” ranking, and the read peak coincides in time with the trade write peak.

The separation looks like this: the core calculates metrics incrementally over closed windows and writes place snapshots to a table in append-only mode; the data mart is a projection over these snapshots, updated by event.

Reads go to cache, and faster delivery stops depending on the accumulated trade volume. Heavy analytics are conveniently assembled on a columnar store — ClickHouse handles such aggregates without degradation.

Fault tolerance is a consequence of the same separation. The core can restart or fall behind by several windows: the data mart continues to serve the last consistent snapshot, and the ranking does not flicker for the user.

The source of truth is the trade journal, so any snapshot can be restored by a full recalculation, and the discrepancy between the core and the data mart is limited by the declared delay.

At the start, we fix the boundaries: acceptable lag, recalculation idempotency, and the version of the metric formula. Then editing the ranking does not require rebuilding the layers.

Technical questions about ranking calculation, protection, and updates

A leaderboard inspires trust only when the calculation is reproducible: the same set of trades produces the same result on recalculation. Below are questions that are usually raised before development starts, and how we address them engineering-wise.

How is the ranking protected from manipulation?

We calculate from confirmed trades in the trading core, not from declared figures. The threshold for the number of trades and the minimum participation period filter out one-off volume spikes.

What should be done if the trade history is incomplete?

We take only the window for which the data is complete and comparable, and label the period directly on the data mart. An account without sufficient history does not enter the overall top.

How are leverage and different instruments accounted for?

We show the result normalized to account risk, not to nominal volume — otherwise leveraged accounts crowd out the rest. Instruments with different volatility are calculated as separate groups.

Will the calculation withstand growth in the number of participants?

We update the ranking from new trades rather than recalculating the entire history from scratch. Heavy runs are scheduled in a separate loop, so the data mart responds quickly.

Can the ranking be closed to outsiders?

Yes, the data mart also works in closed mode: role-based access and separate slices for partners and the internal team. Public display is simply one of the modes, not the only scheme.

Let's discuss the task and come back with an estimate and work plan

To come back with an estimate rather than a “from and to” range, we need a minimum of input data. A leaderboard estimate rests on three things: where trades come from, how a trader's result is calculated, and how often the ranking is recalculated.

What to send for an accurate estimate:

  • list of venues and the method of data access — API, export, or webhooks, and how far back trade history is available;
  • the result formula: which metrics are included in the ranking (return, drawdown, volume), over what period, and how deposits and withdrawals are accounted for;
  • recalculation requirements: once a day, once an hour, or streaming, and how many participants are in the table;
  • anti-manipulation rules: minimum activity threshold, multi-accounts, self-trades, anomalous volume spikes;
  • what is already implemented: the current data scheme, running services, and venue limitations on history depth;
  • data and privacy requirements: whether to show names, whether to hide amounts, and which slices are published.

During the discussion, we will go over rank calculation and its resilience to repeated recalculations, then fix the work plan. A pilot calculation on history confirms the formula and the table update speed before the main development.

The plan will include stages, timelines, scope of work, and project handover: code, data scheme, documentation, and training for your team.

Describe the task in free form and attach what you already have — we will come back with an estimate and a work plan.