Based on the design overview, the backend scope is basically:
- onboarding/linking:
masterAddress,subAccountAddress,tradingWalletAddress,startEquity - order relay: verify
signature.vaultAddress+signer, apply competition/risk rules, forward to Hyperliquid - state + leaderboard: ingest Hyperliquid subaccount state (poll or stream), compute PnL/PnL%/volume, persist + serve leaderboard
~8-12 person-weeks (40-60 person-days)
Main work:
- REST + WS gateway (auth, sessions, websocket fanout)
- account linking + startEquity snapshot
- signed-order relay verification + rule engine v1
- ingestion worker(s) + leaderboard calc/store
- AWS Terraform: VPC, ECS/Fargate, ALB (WebSockets), RDS, Redis, secrets, CI/CD, logs/alerts
~14-22 person-weeks (70-110 person-days)
Adds:
- stronger abuse controls (rate limits, quotas, replay/nonce policy, edge cases)
- correctness/reconciliation jobs + idempotency
- multi-AZ posture, backups/restore drills, dashboards/SLOs, on-call readiness
- WS scaling concerns (backpressure, per-user throttles, drop policies)
Per 10k registered (so multiply by N):
- DAU = 2,000
- Avg "connected session time" 30 min/day per DAU user
- Avg WS payload from backend ~1 KB/s per connected user (account/positions/orders/leaderboard deltas; not full market data)
- WebSockets served via ALB ECS/Fargate (avoids per-message fees that API Gateway WS has)
Typical components:
- ECS/Fargate for API + workers
- ALB for HTTP+WS
- RDS Postgres (example: db.t4g.medium ballpark)
- Redis (example: cache.t4g.small/medium ballpark)
- CloudWatch logs
- Data Transfer Out ~$0.09/GB after free tier
Sensitivity: if your WS payload is 10 KB/s instead of 1 KB/s, your egress and ALB LCUs rise ~10. (That's the biggest cost swing with WebSockets.)
Two tiers:
- Lean: single-AZ-ish DB/cache, minimal NAT (or public subnets + endpoints)
- Prod HA: multi-AZ RDS, Redis replica, and 2 NAT gateways (common "boring but safe" default)
| N (10k users) | Lean ($/mo) | Prod HA ($/mo) |
|---|---|---|
| 1 (10k) | ~$214 | ~$366 |
| 2 (20k) | ~$232 | ~$387 |
| 3 (30k) | ~$279 | ~$436 |
| 4 (40k) | ~$350 | ~$534 |
| 5 (50k) | ~$369 | ~$554 |
| 6 (60k) | ~$416 | ~$603 |
| 7 (70k) | ~$463 | ~$653 |
| 8 (80k) | ~$481 | ~$673 |
What's driving cost here:
- Fargate always-on API + worker footprint
- ALB hourly + LCU (active connections + bytes/hour)
- RDS + Redis baseline
- NAT (if you go private subnets) can be a chunky fixed line item