System Architecture
HashNut is built on a non-custodial, smart contract-based architecture that ensures merchants maintain full control of their funds while providing enterprise-grade payment infrastructure.
High-Level Architecture
Core Components
1. API Gateway
The entry point for all merchant interactions. Handles:
- Authentication and authorization
- Request routing
- Rate limiting
- Request/response transformation
2. Order Management System
Manages the complete order lifecycle:
- Order creation and validation
- Order state tracking
- Payment status monitoring
- Order history and reporting
3. Payment Processing Engine
Handles payment execution and verification:
- Payment link generation
- Transaction monitoring
- Blockchain confirmation tracking
- Payment status updates
4. Smart Contract Manager
Manages smart contract interactions:
- Contract deployment
- Address pool management
- Fund aggregation
- Withdrawal processing
5. Analytics Engine
Provides real-time insights:
- Transaction analytics
- Revenue reporting
- Performance metrics
- Business intelligence
Smart Contract Architecture
Payment Splitter Contract
The core smart contract that:
- Manages Address Pools: Creates and manages receipt wallet addresses
- Receives Payments: Accepts customer payments to assigned addresses
- Aggregates Funds: Collects funds from multiple receipt wallets
- Handles Withdrawals: Releases funds to merchant withdrawal address
- Calculates Fees: Transparently calculates and deducts platform fees
Address Pool System
Payment Flow Architecture
Multi-Chain Architecture
HashNut supports 164+ blockchain networks through a unified architecture:
Chain Abstraction Layer
Provides a unified interface for:
- Transaction Formatting: Converts to chain-specific formats
- Wallet Integration: Supports chain-specific wallets
- Transaction Monitoring: Monitors all chains simultaneously
- State Management: Tracks order states across chains
Security Architecture
Security Layers
- API Authentication: HMAC-SHA256 signature-based authentication
- Smart Contract Security: Audited contracts with role-based access
- Webhook Security: HTTPS delivery with data validation
- On-Chain Verification: All transactions verified on blockchain
- Non-Custodial: Funds never leave merchant's control
Data Flow
Scalability
HashNut is designed to handle:
- High Transaction Volume: Processes thousands of payments per second
- Multiple Chains: Simultaneous monitoring of 164+ networks
- Global Scale: Distributed infrastructure for low latency
- Real-Time Updates: WebSocket support for live updates
Next Steps
- Learn about Payment Models to choose your approach
- Understand the Payment Flow in detail
- Explore Smart Contracts architecture
Ready to dive deeper? Check out Payment Models →