06Case study
GetFreeXRP
Crypto rewards priced against a moving market
- Year
- Role
- Status
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
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.
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.
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.
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
Specification
- Pricing
- Payout
- Anti-abuse
- Ledger
- Serving
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
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.