Technical Architecture
Smart Contract Overview
┌─────────────────────────────────────────────────────────────┐
│ MakaChain (Hub) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ GasTank │ │PaymentNotifier│ │ TrustedOracle │ │
│ │ (Balances) │ │ (Events) │ │ (Price Feeds) │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Payment Chains (Ethereum, Polygon, BSC) │
│ ┌─────────────────────────┐ ┌───────────────────────────┐ │
│ │ PaymentWalletFactory │ │ PaymentWalletImplementation│ │
│ │ (Deploys wallets) │ │ (Template contract) │ │
│ └─────────────────────────┘ └───────────────────────────┘ │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │PaymentWallet│ │PaymentWallet│ │PaymentWallet│ ... │
│ │ (Proxy 1) │ │ (Proxy 2) │ │ (Proxy N) │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘PaymentWalletFactory
Key Functions
computeAddress()
computeAddress()createPaymentWallet()
createPaymentWallet()Address Computation (CREATE2)
PaymentWalletImplementation
Storage Variables
Key Functions
initialize()
initialize()withdraw()
withdraw()EIP-1167 Minimal Proxy Pattern
Benefits
Aspect
Full Contract
Minimal Proxy
How It Works
Nick's Method & Cross-Chain Recovery
What is Nick's Method?
Why It Matters for MakaPay
How Cross-Chain Recovery Works
Technical Requirements for Same Address
Deploying Factory at Same Address
Payment Flow (On-Chain)
Step 1: Address Computation
Step 2: Customer Payment
Step 3: Settlement
Step 4: Callback (Optional)
PaymentNotifier (Gasless Settlements)
Purpose
Contract Interface
Event
Security Measures
Reentrancy Protection
SafeERC20
One-Time Initialization
Nonce Validation (Gas Tank)
Contract Addresses
MakaChain Mainnet (777178)
Contract
Address
Payment Chains
Chain
Factory
Implementation
Upgradeability
Factory & Implementation
GasTank
Last updated
