Skip to main content

Blockchain Architecture Overview

LearnWay operates a high-throughput, gasless Web3 infrastructure built on Lisk L2 (OP Stack rollup). The blockchain subsystem is split into two distinct, decoupled pipelines:
  1. Backend Platform Execution (Relayer Path): Platform-triggered state changes (XP points, Gem rewards, NFT badges, Course certificates) are orchestrated by learnway-backend via the LearnWayManager contract, with learnway-transaction-processor acting as the relayer.
  2. Client-Side Account Abstraction (ERC-4337 Path): Mobile learners interact through embedded Smart Accounts. Transactions (such as USDT/fUSD transfers and approvals) are sponsored via the backend’s VerifyingPaymaster and dispatched to the self-hosted Alto Bundler (/alto).

Blockchain Subsystem Architecture Guides

  • Account Abstraction & Paymaster: Client-side smart accounts, VerifyingPaymaster policy engine, allowed selectors, whitelist tokens, and /alto bundler.
  • Smart Contracts Suite: Detailed specifications for LearnWayAdmin.sol, LearnWayManager.sol, XPContract.sol, GemContract.sol, BadgesNFT.sol, and LearnWayCertificate.sol.
  • Transaction Processor (Relayer): Server wallet nonce locks, BullMQ queue, 15-second automated gas escalation, and block confirmation webhooks.
  • Goldsky Indexer & Subgraphs: Real-time event ingestion from Lisk L2, wallet balance history, and GraphQL query APIs.