PvP Gaming Mini-App
- Role
- Frontend Developer
- Period
- 2024
A Telegram-first PvP mini-app with live socket matches, Web3 payments, donations, referrals, and a fast tap loop shaped for high-volume player onboarding.
Users in ~3 months
grown from a 100K paid base.
Time to first match
down from about 90 seconds.
On-chain stakes
TON Connect and Stars behind one wallet.
From a 100K paid base to 1M players in a single week.
- Fast Canvas game
- Real-time PvP
- Automated rewards
- In-game economy
- Web3 payments
- Tournaments
What I owned
Frontend ownership end to end: the game client and how it feels on cheap phones, the realtime layer, and the Web3 payment surface.
It started as one fast Canvas game inside Telegram, then grew into a full arena: PvP, tournaments, an in-game economy and Web3 payments. Each layer had to stay fast on cheap phones and trustworthy once real currency was on the line.
- 01A custom 2D game, not a heavy engineBuilt on Canvas 2D with a requestAnimationFrame loop and a sprite system, so it loads fast inside the Telegram mini-app and stays smooth on low-end phones, no multi-megabyte engine.
- 02Deterministic match stateModelled the match as a socket reducer; the client renders an optimistic prediction and reconciles against the server frame, so play feels instant without trusting the client for outcomes.
- 03The client is untrustedAnti-cheat validates timing, consistency and rate limits server-side before any reward is credited, which matters the moment premium currency and betting are involved.
- 04One wallet providerTON Connect and Telegram Stars sit behind a single Wallet provider, so staking, donations and payments share one integration surface instead of three.
- Onboarding stopped being the funnel's drop-off point.
- Referrals, not paid spend, carried the growth.
From tap to payout
Every result is settled on the server
The client only renders and predicts. Match logic, anti-cheat and reward approval all run server-side, the moment real currency is in play.
The game economy
A loop players come back to
Energy, currencies and upgrades feed one another, so every session has an obvious next step. That pull is what kept players returning and inviting others.
Realtime data flow
Key considerations
- The client is untrusted; PvP results and rewards are validated server-side.
- Redis holds session and match state; PostgreSQL holds persistent data.
- Anti-cheat checks timing, consistency and rate limits before crediting.
- Passive income is calculated lazily, so idle users cost nothing.
Tech stack