Technology Choices
This page explains why specific technologies were chosen for each layer of the NMT platform.
Smart Wallets
| Choice |
What |
Why |
| Gnosis Safe |
Smart wallet framework |
Industry standard, $100B+ secured, audited extensively |
| Solidity 0.8.30 |
Contract language |
Latest stable, built-in overflow protection |
| Hardhat |
Development framework |
Rich plugin ecosystem, good debugging tools |
| OpenZeppelin 5.3 |
Security library |
Audited implementations of ReentrancyGuard, access control |
| EIP-712 |
Signature standard |
Human-readable transaction signing, replay protection |
Backend
| Choice |
What |
Why |
| Rust |
Language |
Memory safety without GC, excellent async performance |
| Tokio |
Async runtime |
Best-in-class for high-concurrency I/O workloads |
| Axum |
Web framework |
Built on Tokio/Tower, composable middleware |
| SeaORM |
Database ORM |
Async-native, compile-time query validation |
| Alloy |
Blockchain client |
Modern Rust Ethereum library (successor to ethers-rs) |
| PostgreSQL 16 |
Database |
Mature, supports complex queries needed for analytics |
Frontend
| Choice |
What |
Why |
| Next.js 16 |
Framework |
Server components for fast loads, App Router for routing |
| React 19 |
UI library |
Server components, concurrent rendering |
| TypeScript 5.9 |
Language |
Type safety across 60+ DeFi integration files |
| Prisma |
Database ORM |
Type-safe DB queries from server components |
| Viem |
Blockchain client |
Lightweight, TypeScript-first Ethereum library |
| Tailwind CSS 4 |
Styling |
Utility-first, consistent design system |
| Dynamic Labs |
Auth |
Multi-chain wallet connection with good UX |
| SWR |
Data fetching |
Stale-while-revalidate caching for API calls |
Infrastructure
All hosting is on DigitalOcean. The backend needs a full runtime (K8s), the frontend and docs just need managed hosting (App Platform).
| Choice |
What |
Why |
| DO Kubernetes (DOKS) |
Backend hosting |
Long-running workers, WebSocket connections, headless Chrome |
| DO App Platform |
Frontend + docs hosting |
Managed PaaS — auto-builds, auto-scales, zero-config TLS |
| DO DNS |
Domain management |
Single place for all newmarkettrading.com subdomains |
| Helm |
Package manager |
Templated K8s deployments, environment-specific configs |
| GitHub Actions |
CI/CD |
Builds and deploys all three repos (backend, frontend, docs) |
| doctl |
DO CLI |
Used in GitHub Actions to create/update App Platform apps and DNS |
| Trivy |
Security scanning |
Container vulnerability detection in CI pipeline |
| cert-manager |
TLS (backend) |
Automatic Let's Encrypt for K8s ingress |
Database Strategy
NMT uses PostgreSQL as the single source of truth today, with two additional databases staged for future use:
| Database |
Status |
Purpose |
| PostgreSQL 16 |
Active |
Primary data store — users, positions, pools, prices |
| ClickHouse |
Staged (configured, not enabled) |
Time-series analytics at scale |
| Redis |
Staged (configured, not enabled) |
Caching layer for hot data |
The staged databases are fully configured in Helm charts and Docker Compose but remain disabled until the platform reaches a scale that justifies them.