Skip to content
← Work index

06Case study

GetFreeXRP

Crypto rewards priced against a moving market

Year
2025
Role
Full-stack
Status
Live

Advertise a prize in crypto and your marketing promise drifts with the market. Advertise it in dollars and every payout becomes a conversion you have to get right, cheaply, thousands of times a day, while people actively try to game it.

USD
What the prize is denominated in
XRP
What actually leaves the ledger
Cached
One quote serves many claims

The constraint

What made it hard

A fixed XRP reward is an open-ended liability - the token doubles and so does what you are giving away. Pricing in dollars fixes that but introduces a live dependency: the payout cannot be computed until the moment of the claim. Calling the price API on every roll is slow, expensive, and rate-limited, and a faucet is a magnet for automated abuse, so the cheap path has to also be the hard-to-farm path.

Approach

  1. 01

    Quote on a schedule, convert on demand

    The market price is fetched on an interval and cached. Claims read the cached quote rather than the upstream API, so one network call serves every roll in that window and the payout maths still happens at claim time.

  2. 02

    The dollar figure is the contract

    Prize tiers are defined in USD. The XRP amount is derived at the instant of the claim and written to the ledger as a settled number, so the record shows both what was promised and what was actually paid.

  3. 03

    Abuse handled in layers

    hCaptcha raises the floor for scripted claims, hourly limits bound how much any account can extract, and referral rewards are validated against the referred account’s own activity rather than its mere existence.

  4. 04

    Deliberately unfashionable infrastructure

    Django behind Gunicorn behind Nginx, on PostgreSQL. For a system whose defining property is that the money arithmetic is right, a boring, synchronous, well-understood stack is a feature.

Architecture

GetFreeXRP live-priced payout pathUserhourly rollhCaptchabot floorClaimprize in usdLedgerwithdrawalsPrice cacheone quoteCoinMarketCapupstreamrefreshed on a schedule,not once per rollprice at the momentof the claimprize is denominated in dollarspaid out in xrp
The upstream price feed is decoupled from the claim path - the cache in the middle is what makes per-claim conversion affordable.

Specification

Pricing
CoinMarketCap quote, cached on an interval
Payout
USD prize ÷ live quote, computed at claim
Anti-abuse
hCaptcha, hourly limits, referral validation
Ledger
PostgreSQL - promised and settled amounts both stored
Serving
Django · Gunicorn · Nginx

Stack

  • Django
  • Python
  • PostgreSQL
  • Nginx
  • Gunicorn
  • CoinMarketCap API
  • hCaptcha

Where it landed

  • 01

    Prize value stays fixed in dollars while the payout floats with the market.

  • 02

    Upstream price calls are bounded by the refresh interval, not by traffic.

  • 03

    Every payout is reconstructable from the quote that produced it.

Next case study

07

Trend Fiver

Real-time financial prediction engine

Read →

Something that has towork in production?

I take on contract engineering and full-time roles. Most useful first message: what you are building, what is currently in the way, and when you need it live.