Skip to content

Instantly share code, notes, and snippets.

@al-maisan
Created December 25, 2025 08:38
Show Gist options
  • Select an option

  • Save al-maisan/30320008982aec0a95d49949176b3b48 to your computer and use it in GitHub Desktop.

Select an option

Save al-maisan/30320008982aec0a95d49949176b3b48 to your computer and use it in GitHub Desktop.
DCA as a service - cost estimates

DCA-as-a-Service estimates (backend build + AWS operating cost)

This file contains two estimates based on the high level design


1) Build effort estimate (backend + AWS deployment via Terraform)

What "backend" includes

  • Executor / reliability worker
    • Detects due steps (or consumes triggers)
    • Submits transactions
    • Handles dropped/expired transactions
    • Re-quotes routes and retries up to max_retries
    • Marks campaigns paused/error when needed
  • Indexer + metrics store
    • Subscribes to program events/logs
    • Persists StepExecuted/StepFailed-style events
    • Powers dashboards (streaks, avg price, success rate, retry counts)
  • API for the frontend
    • Read models (campaign status, next run, history, computed metrics)
    • Auth via wallet sign-in
    • Rate limiting
  • Ops + Terraform on AWS
    • VPC/IAM/secrets/KMS
    • Compute deploy (containers or serverless)
    • CI/CD
    • Alarms/dashboards
    • Runbooks

MVP (production-ish, lean)

Estimate: 10 to 14 person-weeks

  • Roughly 2.5 to 3.5 months for 1 strong senior, or
  • Roughly 5 to 7 weeks with 2 seniors

Typical breakdown:

  • Tx executor + retry logic + idempotency + fee-payer wallet ops: 3 to 4 weeks
  • Jupiter integration (quote/route refresh, failure modes): 1 week
  • Indexer (logs/events), backfill, data model, computed metrics: 2 to 3 weeks
  • API + auth (SIWS), basic admin endpoints: 1 to 2 weeks
  • Observability (structured logs/metrics/tracing, alerts): 1 week
  • Terraform AWS (networking, compute, DB, secrets, deploy pipeline): 2 to 3 weeks

Production "sleep at night" (HA + better failure handling)

Estimate: 18 to 28 person-weeks

Adds (typical):

  • Multi-AZ database and stronger durability
  • Migrations and schema versioning workflow
  • Replayable queues and better reconciliation/state repair
  • Abuse controls and rate-limits per key/wallet
  • Disaster recovery (backups, restore drills)
  • Load tests and chaos/failure testing
  • On-call tooling and incident runbooks

Not included (unless you want it)

  • The on-chain Solana program itself
  • Security audits (on-chain and off-chain)
  • Frontend/UI work

2) Operating cost estimate on AWS for N * 10,000 users (N < 9)

Key assumptions (so the math is concrete)

  • 1 active campaign per user
  • 1 step per day per campaign
  • steps/day = active_users
  • If only 20% of users are active at any time, divide variable portions by 5

Important note: The largest non-AWS cost is often the Solana RPC/provider. AWS spend can be modest; RPC spend can dominate. Monitoring, retries, and event indexing increase RPC traffic.


A) AWS-only monthly ballpark

A reasonable setup:

  • API service + worker + indexer (ECS/Fargate or similar)
  • Postgres (RDS) OR DynamoDB for state/events/metrics
  • SQS (or equivalent) for retries
  • CloudWatch logs and alarms

Baseline ranges (mostly independent of 10k vs 80k daily steps because the average rate is low):

  • Lean/serverless-ish (DynamoDB, minimal always-on compute, avoid NAT): $150 to $450 / month
  • Containers + RDS single-AZ: $300 to $900 / month
  • Add Multi-AZ RDS + stricter HA: $700 to $2,000 / month
  • If you require NAT gateways (private subnets, no public egress): add roughly $65 to $200+ / month depending on AZ count and traffic

Scaling note: Even 80k steps/day is under ~1 tx/sec on average. The executor/worker load is mostly I/O bound. So AWS costs typically do not scale linearly with users for this workload (until you add much heavier analytics, streaming, or strict HA).


B) Add Solana RPC/provider costs (often the real driver)

A conservative per-step RPC model:

  • 10 to 25 RPC requests per executed step
    • build/send/confirm
    • reads for balances/allowance/state
    • occasional re-quotes and retries
  • plus indexer subscriptions/queries

If we assume 20 RPC requests per step:

Active users Steps/day Steps/month RPC req/month (@20/step)
10,000 10,000 300,000 6,000,000
80,000 80,000 2,400,000 48,000,000

Example provider tiering often looks like:

  • ~10M requests/month at a low tier price
  • ~100M requests/month at a mid tier price (Exact pricing and limits depend on the provider and plan.)

So a plausible RPC spend band:

  • 10k active users: $50 to $200 / month (depends on provider + indexing usage)
  • 80k active users: about $500 / month class (depends on provider + indexing usage)

If you do heavy scans (e.g., frequent broad account queries) or you have high retry rates, increase these figures.


Combined estimate (AWS + RPC)

Assuming all users are active daily:

  • N = 1 (10k users): $250 to $1,100 / month total
  • N = 8 (80k users): $700 to $3,000 / month total

What drives the spread:

  • NAT gateways / private-only networking
  • RDS Multi-AZ vs single-AZ vs DynamoDB
  • Real RPC request mix (confirm strategy, retries, indexing approach)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment