|
| 1 | +# DevSOL Roadmap |
| 2 | + |
| 3 | +**Last updated:** 2026-02-22 |
| 4 | +**Current state:** Core API live (buy + sell E2E tested). API-only, no frontend. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## Phase 0: Infra (Immediate) |
| 9 | + |
| 10 | +- [ ] Add `mirror-gitlab.yml` workflow (force-push main to GitLab on every push) |
| 11 | +- [ ] Update README.md with current API docs |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Phase 1: Hardening |
| 16 | + |
| 17 | +Harden the existing backend before adding user-facing surfaces. |
| 18 | + |
| 19 | +### 1.1 Transaction Expiry |
| 20 | + |
| 21 | +- [ ] Add `expires_at` column to transactions table (default: `created_at + 30 min`) |
| 22 | +- [ ] Cleanup job runs every 60s, marks expired pending orders as `expired` |
| 23 | +- [ ] Deposit detectors skip expired transactions in `findPendingBuys/Sells` |
| 24 | +- [ ] Add `expired` to valid status enum in schema |
| 25 | + |
| 26 | +### 1.2 Amount Verification |
| 27 | + |
| 28 | +- [ ] Deposit detectors fetch on-chain transaction details after memo match |
| 29 | +- [ ] Verify actual transferred amount matches expected `usdc_amount` (buy) or `sol_amount` (sell) |
| 30 | +- [ ] Tolerance: exact match for USDC (atomic units), 0.1% for SOL (tx fees) |
| 31 | +- [ ] Amount mismatch: mark as `failed` with reason, don't deliver/payout |
| 32 | + |
| 33 | +### 1.3 Monitoring & Logging |
| 34 | + |
| 35 | +- [ ] Replace `console.log/warn/error` with `pino` structured logger |
| 36 | +- [ ] Log levels: info (normal flow), warn (retries), error (failures) |
| 37 | +- [ ] Low balance alerts: log error when treasury SOL < 10 or payout USDC < 10 |
| 38 | +- [ ] Extend `/health/detail` with `pending_orders` count and `last_completed_at` |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Phase 2: Frontend + Claude Code Skill |
| 43 | + |
| 44 | +Build user-facing surfaces. Frontend and skill can be developed in parallel. |
| 45 | + |
| 46 | +### 2.1 Minimal Buy/Sell Widget |
| 47 | + |
| 48 | +- [ ] React + Vite single-page app at `devsol.rectorspace.com` |
| 49 | +- [ ] Solana wallet adapter (Phantom, Solflare, Backpack) |
| 50 | +- [ ] Two-tab UI: Buy / Sell |
| 51 | +- [ ] Flow: connect wallet -> enter amount -> see quote -> confirm -> send tx with memo -> poll status -> show result |
| 52 | +- [ ] Tailwind CSS, clean utility-focused design |
| 53 | +- [ ] Static files served by nginx (same VPS, separate from API) |
| 54 | + |
| 55 | +### 2.2 Claude Code Skill |
| 56 | + |
| 57 | +- [ ] `devsol:buy` skill — agent calls `POST /buy`, sends USDC tx, polls `/tx/:id` |
| 58 | +- [ ] `devsol:sell` skill — agent calls `POST /sell`, sends devnet SOL tx, polls `/tx/:id` |
| 59 | +- [ ] Skill `.md` files referencing existing API (no SDK needed) |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## Phase 3: Growth |
| 64 | + |
| 65 | +Additive features once the marketplace has users and volume. |
| 66 | + |
| 67 | +### 3.1 Multi-Token Support |
| 68 | + |
| 69 | +- [ ] Accept USDT alongside USDC for buy flow |
| 70 | +- [ ] Payout in USDT or USDC (seller's choice) |
| 71 | +- [ ] Token registry config, per-token ATA derivation, per-token pricing |
| 72 | + |
| 73 | +### 3.2 Dynamic Pricing |
| 74 | + |
| 75 | +- [ ] Adjust spread based on reserve levels (low SOL -> higher buy price, low USDC -> higher sell price) |
| 76 | +- [ ] Optional: volume discounts, time-based pricing |
| 77 | +- [ ] Deferred until sufficient volume warrants it |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## Completed |
| 82 | + |
| 83 | +- [x] Core marketplace API (buy + sell endpoints) |
| 84 | +- [x] Direct USDC deposit buy flow (replaced x402 protocol) |
| 85 | +- [x] Devnet SOL deposit sell flow with memo matching |
| 86 | +- [x] Deposit detectors (BuyDepositDetector + DepositDetector) |
| 87 | +- [x] Mainnet USDC payout service with retry + exponential backoff |
| 88 | +- [x] Refund logic (both flows: USDC refund on failed SOL delivery, SOL refund on failed payout) |
| 89 | +- [x] Rate limiting (60/min global, 10/min on buy/sell) |
| 90 | +- [x] Balance pre-checks (treasury SOL for buy, payout USDC for sell) |
| 91 | +- [x] Docker deployment on VPS with GitHub Actions CI |
| 92 | +- [x] E2E test scripts (buy + sell, both verified live) |
| 93 | +- [x] 101 unit tests across 15 test files |
0 commit comments