Overview
STRATO Mercata is a blockchain platform built by BlockApps that provides enterprise-grade blockchain services with DeFi capabilities.
High-Level Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ Client Applications │
│ (Web UI, Mobile Apps, External Services) │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ NGINX Gateway Layer │
│ (highway-nginx, vault-nginx, nginx-packager) │
│ - Authentication (OAuth/OpenID) │
│ - CSRF Protection │
│ - Load Balancing │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌────────────────────────┼────────────────────────┐
▼ ▼ ▼
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────────┐
│ Mercata Backend │ │ STRATO API │ │ APEX API │
│ (TypeScript) │ │ (Haskell) │ │ (Node.js) │
│ - Tokens API │ │ - Bloc API │ │ - OAuth Management │
│ - Lending API │ │ - Core API │ │ - User Key Creation │
│ - Pools API │ │ - Ethereum JSON-RPC│ │ - Health Checks │
│ - Bridge API │ │ - Transaction API │ └─────────────────────────┘
│ - CDP API │ │ - Contracts API │
│ - Rewards API │ └─────────────────────┘
│ - Oracle API │ │
└─────────────────────┘ │
│ ▼
│ ┌─────────────────────────────────────────────────────┐
│ │ STRATO Core │
│ │ ┌──────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ │ Sequencer │ │ VM Runner │ │ P2P │ │
│ │ │(Blockstanbul)│ │ │ │ (Discovery) │ │
│ │ └──────────────┘ └─────────────┘ └─────────────┘ │
│ │ ┌──────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ │ SolidVM │ │ EVM │ │ Genesis │ │
│ │ └──────────────┘ └─────────────┘ └─────────────┘ │
│ └─────────────────────────────────────────────────────┘
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────────────────────────────────────┐
│ Smart Contracts │ │ Data Layer │
│ (SolidVM) │ │ ┌───────────┐ ┌───────────┐ ┌───────────────┐ │
│ - ERC20 Tokens │ │ │ PostgreSQL│ │ LevelDB │ │ Redis │ │
│ - Lending Pools │ │ │ (Cirrus) │ │ (State) │ │ (BlockDB) │ │
│ - CDP Engine │ │ └───────────┘ └───────────┘ └───────────────┘ │
│ - Rewards │ │ ┌───────────┐ ┌─────────────────────────────┐ │
│ - Bridge │ │ │ Kafka │ │ Slipstream (Indexer) │ │
│ - Token Factory │ │ └───────────┘ └─────────────────────────────┘ │
└─────────────────────┘ └─────────────────────────────────────────────────────┘Core Components
1. STRATO Node (strato/)
strato/)The blockchain node implementation written in Haskell:
strato-sequencer
Block production using Blockstanbul consensus
vm-runner
Transaction execution engine
strato-p2p
Peer-to-peer networking
ethereum-discovery
Node discovery protocol
SolidVM
Smart contract virtual machine (Solidity compatible)
EVM
Ethereum Virtual Machine compatibility layer
slipstream
Real-time contract state indexer to PostgreSQL
2. Mercata Platform (mercata/)
mercata/)DeFi and token management layer:
backend
REST API for DeFi operations (TypeScript)
contracts
Smart contracts (Solidity/SolidVM)
services
Bridge and Oracle services
ui
Web application frontend
3. APEX API (apex/)
apex/)OAuth and user management service (Node.js):
api
User key creation, OAuth integration, health checks
4. Infrastructure (*-nginx/, *-packager/)
*-nginx/, *-packager/)Supporting services:
highway-nginx
Main API gateway with OAuth
vault-nginx
Key management gateway
nginx-packager
SMD API gateway with CSRF protection
postgrest-packager
REST API auto-generation from PostgreSQL
prometheus-packager
Metrics collection
Data Flow
Transaction Flow
Client submits transaction via REST API
NGINX gateway authenticates request
STRATO API validates and signs transaction
Transaction enters mempool via Kafka
Sequencer includes transaction in block (Blockstanbul consensus)
VM Runner executes transaction in SolidVM/EVM
State changes written to LevelDB
Slipstream indexes contract state to PostgreSQL (Cirrus)
Client queries indexed data via PostgREST
Smart Contract Deployment
Source code submitted to
/compileendpointSolidVM compiler generates bytecode and ABI
Contract creation transaction submitted
Contract address derived (optionally with salt for deterministic addresses)
Bytecode stored in code reference table
Slipstream creates PostgreSQL tables for contract state
Networks
Helium
Testnet
helium
Upquark
Mainnet
upquark
Key Technologies
Language: Haskell (core), TypeScript (Mercata), Node.js (APEX)
Consensus: Blockstanbul (PBFT-based)
Smart Contracts: SolidVM (Solidity-compatible)
Database: PostgreSQL (indexed data), LevelDB (state), Redis (caching)
Message Queue: Kafka
Runtime: Docker, Nix
Related Documentation
Getting Started - Build and run instructions
STRATO API - Blockchain node API reference
Mercata Backend API - DeFi API documentation
Smart Contracts - Contract architecture and deployment
Last updated