Vault System
Overview
How It Works
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ User Flow │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Business creates user 2. User deposits tokens │
│ via API/Dashboard to their address │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ MakaPay Backend │ │ Deposit Address │ │
│ │ computeAddress()│ │ (CREATE2) │ │
│ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Deposit Address │ │ Deposit Detected│ │
│ │ returned to │ │ by cron job │ │
│ │ business │ └────────┬────────┘ │
│ └─────────────────┘ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ 3. Funds swept to │ Factory.process()│ │
│ business wallet │ sweeps funds │ │
│ ▲ └────────┬────────┘ │
│ │ │ │
│ └───────────────────────────┘ │
│ │
│ 4. Webhook sent to business with deposit details │
│ │
└─────────────────────────────────────────────────────────────────┘Address Computation
Smart Contracts
Contract Addresses
Contract
Address
Networks
Factory Functions
computeAddress(string userId, address casino)
computeAddress(string userId, address casino)process(string userId, address casino, address token, bytes callbackData)
process(string userId, address casino, address token, bytes callbackData)Fee Structure
Type
Fee
Recipient
Dashboard Setup
1. Configure Your Vault
2. Create User Addresses
3. Configure Webhooks (Optional)
API Integration
Authentication
Endpoints
Get Vault Configuration
Create User / Get Deposit Address
Get User Info
List Deposits
Get Supported Tokens (Public)
Webhooks
Webhook Events
Event
Description
Webhook Payload
Webhook Signature Verification
Integration Examples
Computing Address On-Chain (Solidity)
Computing Address Off-Chain (JavaScript)
Full Integration Flow
Supported Networks
Network
Chain ID
Status
Deposit Statuses
Status
Description
Best Practices
User ID Guidelines
Security
Error Handling
Troubleshooting
Deposit Not Detected
Webhook Not Received
Process Transaction Failed
Rate Limits
Endpoint
Limit
Support
Last updated
