πŸ—οΈ Architecture

πŸ—οΈ System Architecture

Overview

SEAL360 is built on a multi-layer architecture designed for security, scalability, and decentralization β€” with VERA coordinating the commercial franchise layer and the Web3 stack securing the infrastructure.


Technology Stack

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    PRESENTATION LAYER                            β”‚
β”‚  🌐 Frontend: Next.js 14 + React 18 + TailwindCSS              β”‚
β”‚  πŸ“± Mobile: React Native (roadmap 2027)                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  APPLICATION LAYER (dApp)                        β”‚
β”‚  πŸ”— Web3: ethers.js v6 + wagmi + RainbowKit                    β”‚
β”‚  πŸ” Auth: Supabase Auth + wallet connection                    β”‚
β”‚  πŸ“Š State: Zustand + React Query                                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   BACKEND / API LAYER                            β”‚
β”‚  ⚑ API Routes: Next.js API + Edge Functions                   β”‚
β”‚  πŸ—„οΈ Database: Supabase (PostgreSQL 15)                         β”‚
β”‚  πŸ”” Webhooks: Alchemy Notify + Custom indexer                  β”‚
β”‚  πŸ“§ Email: Resend (transactional emails)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                BLOCKCHAIN LAYER (Avalanche C-Chain)             β”‚
β”‚  πŸ“ Smart Contracts: Solidity 0.8.28                           β”‚
β”‚  πŸ—οΈ Framework: Hardhat + Foundry                               β”‚
β”‚  πŸ” Testing: 753 Hardhat + 181 Foundry + 12 Echidna + 4 Manticore = 950 tests β”‚
β”‚  πŸ›‘οΈ Security: Slither + Manual Review                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              INFRASTRUCTURE LAYER                                β”‚
β”‚  ☁️ Hosting: Vercel (frontend) + AWS (nodes)                   β”‚
β”‚  πŸ”— RPC: Alchemy (primary) + Infura (backup)                   β”‚
β”‚  πŸ“¦ Storage: IPFS (metadata) + Arweave (audit reports)        β”‚
β”‚  πŸ“ˆ Analytics: Dune Analytics + Custom dashboard               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Smart Contract Ecosystem

15 Production Contracts

SEAL360 Smart Contract Ecosystem
β”‚
β”œβ”€β”€β”€ πŸ“¦ CORE (3 contracts)
β”‚    β”œβ”€ SEAL360Token.sol           β†’ ERC-20 + Flash Loans + Voting
β”‚    β”œβ”€ S360StakingRewards.sol     β†’ Staking with dynamic APY
β”‚    └─ S360FeeDistribution.sol    β†’ 3-way fee splitter (33/33/34%)
β”‚
β”œβ”€β”€β”€ πŸ›οΈ GOVERNANCE (5 contracts)
β”‚    β”œβ”€ S360Governor.sol           β†’ OpenZeppelin Governor
β”‚    β”œβ”€ S360TimelockController.sol β†’ 48h timelock
β”‚    β”œβ”€ S360MultiSigTimelock.sol   β†’ multisig β‰₯60% (ej.: 3/5 o 4/7) para emergencias
β”‚    β”œβ”€ S360Treasury.sol           β†’ DAO-controlled treasury
β”‚    └─ OwnershipMigrationHelper.sol β†’ Safe ownership transfer
β”‚
β”œβ”€β”€β”€ πŸ’Ή PERIPHERY (4 contracts)
β”‚    β”œβ”€ S360BondingCurve.sol       β†’ Bancor price discovery
β”‚    β”œβ”€ S360BondingCurveDynamic.sol β†’ Dynamic pricing v2
β”‚    β”œβ”€ S360Vesting.sol            β†’ Linear vesting with cliff
β”‚    └─ S360TimeVaultRND.sol       β†’ 5-year R&D lockup
β”‚
β”œβ”€β”€β”€ πŸŽ–οΈ BADGES (1 contract)
β”‚    └─ S360AchievementBadges.sol  β†’ NFT certification badges
β”‚
└─── πŸ’° GROWTH (2 contracts)
     β”œβ”€ S360GrowthFund.sol         β†’ Marketing & expansion fund
     └─ S360Launchpad.sol          β†’ IDO platform (roadmap)

Total Statistics:

  • 15 production contracts
  • 6 mock contracts (testing only)
  • 5,009 lines of Solidity code
  • 950 automated tests
  • Coverage: 61.22% overall / 84.41% core contracts

Note: Commercial compensation logic (Tier 1–4) is governed separately and aligned to Source of Truth v5.0. VERA controls the operational narrative and founder onboarding.


Contract Dependencies

Key Relationships

  1. SEAL360Token β†’ All Contracts
    The token is the center - all contracts reference it

  2. FeeDistribution β†’ 3 Destinations
    Splits fees to: Treasury (33.33%), Stakers (33.33%), Growth (33.34%)

  3. Governor β†’ Timelock β†’ Treasury
    Chain of command for governance decisions

  4. BondingCurve β†’ FeeDistribution
    Trading fees flow into the distribution system


Security Architecture

Defense in Depth (7 Layers)

LAYER 7: Post-Launch Monitoring
         └─ Alchemy Notify + Dune Analytics
              ↓
LAYER 6: Access Control
         └─ Ownable2Step + Role-Based Access
              ↓
LAYER 5: Circuit Breakers
         └─ Pausable + Emergency Multisig
              ↓
LAYER 4: Rate Limiting
         └─ Flash Loan Limits + Per-TX Caps
              ↓
LAYER 3: Reentrancy Protection
         └─ ReentrancyGuard on 22 functions
              ↓
LAYER 2: Input Validation
         └─ require() + custom errors
              ↓
LAYER 1: Audits + Tests
         └─ Slither + 950 tests passing

Protection Mechanisms

LayerMechanismCoverage
ReentrancyReentrancyGuard22 functions
Access ControlOwnable2Step13 contracts
Emergency StopPausable6 contracts
Rate LimitingPer-TX capsAll trading
Flash Loans0.09% fee + 1.08M limitSEAL360Token
Governance48h timelockAll proposals
Multisigβ‰₯60% signers (ej.: 3/5 o 4/7)Solo emergencias

Data Flow

Transaction Lifecycle

USER β†’ WALLET β†’ RPC β†’ BLOCKCHAIN β†’ INDEXER β†’ DATABASE β†’ FRONTEND
 ↓       ↓       ↓         ↓          ↓          ↓         ↓
[Sign] [MetaMask] [Alchemy] [Avalanche] [Webhook] [Supabase] [UI]

Step by Step:

  1. User initiates (e.g., stake 10,000 S360)
  2. Wallet signs transaction
  3. RPC broadcasts to Avalanche
  4. Smart contract executes logic
  5. Event emitted on-chain
  6. Indexer captures via webhook
  7. Database updates user stats
  8. Frontend refreshes (real-time)

Total Time: < 3 seconds
Gas Cost: ~$0.02 AVAX


Fee Distribution Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    FEE COLLECTION SOURCES                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1. Bonding Curve (2% per trade)                            β”‚
β”‚ 2. Flash Loans (0.09% per loan)                            β”‚
β”‚ 3. Launchpad (5% commission)                               β”‚
β”‚ 4. Audit Services (50% in S360)                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                S360FeeDistribution.sol                      β”‚
β”‚              (Automated 3-Way Splitter)                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           ↓
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        ↓                  ↓                   ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   TREASURY   β”‚  β”‚   STAKERS    β”‚  β”‚ GROWTH FUND  β”‚
β”‚   33.33%     β”‚  β”‚   33.33%     β”‚  β”‚   33.34%     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        ↓                  ↓                   ↓
   Governance      Passive Income       Marketing
   Operations      for Holders          + Expansion

Mathematical Precision

No token loss due to rounding:

// Example: 100.000000000000000007 S360
 
uint256 toTreasury = (amount * 3333) / 10000;  // 33.330...002
uint256 toStakers  = (amount * 3333) / 10000;  // 33.330...002
uint256 toGrowth   = amount - toTreasury - toStakers; // Remainder
 
// Total = 100.000000000000000007 βœ… (exact match, 0 loss)

Tested in: SecurityCritical.v3.3.2.test.cjs β†’ TEST 6 (v2.4.0)


Network Configuration

Avalanche C-Chain (Mainnet)

{
  chainId: 43114,
  name: "Avalanche C-Chain",
  rpcUrl: "https://api.avax.network/ext/bc/C/rpc",
  explorer: "https://snowtrace.io",
  nativeCurrency: {
    name: "Avalanche",
    symbol: "AVAX",
    decimals: 18
  }
}

Fuji Testnet

{
  chainId: 43113,
  name: "Avalanche Fuji Testnet",
  rpcUrl: "https://api.avax-test.network/ext/bc/C/rpc",
  explorer: "https://testnet.snowtrace.io",
  faucet: "https://faucet.avax.network"
}

Why Avalanche?

FeatureAvalancheEthereumBNB Chain
Finality< 1 second12-15 seconds3 seconds
Gas Cost~$0.01$5-50$0.10-1
TPS4,500+15-30300+
EVM Compatibleβœ… Yesβœ… Nativeβœ… Yes
Subnet Capabilityβœ… Yes❌ No❌ No

Decision: Avalanche provides 10x faster transactions and 100x lower costs than Ethereum, while maintaining full EVM compatibility.


Next Steps