Learn‑to‑Win (L2W)
Architecture and Flow
Version: 1.0.0 Solidity: ^0.8.20
Goal
L2W incentivizes user learning/participation with Neurons rewards, using PoK as the proof foundation.
Components
L2W App/Platform (off‑chain)
Learning experiences, challenges, quizzes, AI tasks
Orchestrator that computes the reward and prepares the
proof
(EIP‑712) for PoK
PoKMinter
+ECDSAVerifier
(on‑chain)Proof validation and token issuance
Neurons
tokenReceives mints from PoK, controls cap/pause/roles
(Optional)
NeuronsOFTAdapter
bridge for multi‑chain
User flow
User completes activities on the platform
Backend computes reward and generates EIP‑712 message with
(recipient, amount, nonce, expiry)
Backend signs with
trustedSigner
and sends theproof
to the contract via frontend/APIPoKMinter.mintWithProof(...)
validates limits and callstoken.mint
User receives Neurons as a reward
Reward model (examples)
Based on difficulty and time (more complex tasks are worth more)
Level progression (higher rewards for streak/consistency)
Event and curation bonuses (e.g., vetted content)
Controls and limits
minCooldown
: reduces continuous farming per accountmaxDailyMint
: caps daily issuance per usermaxSingleMint
: prevents anomalous per-proof valuesKYC/anti‑spam policies can complement (off‑chain)
Wallet/signature integration
ECDSAVerifier
uses domainNeuronsPoK
v1 and EIP‑712buildMessageHash(...)
facilitates SDK reuse
Metrics and telemetry
On‑chain:
totalMintsProcessed
,totalTokensMinted
Off‑chain: course completion, quiz accuracy, task weights
Dashboards: daily issuance, unique users, proof approval rate
Security
Rotate
trustedSigner
and protect the private keyMonitor
nonce
to avoid replay; expire proofsObservability on success/failure rates by source
Use
pause()
when needed
Multi‑chain (optional)
NeuronsOFTAdapter
(LayerZero) enables moving balances across chains:Burn/mint mode (preferred): burn on source, mint on destination
Lock/unlock mode: lock on source, release on destination
Controlled by
trustedRemote
andremoteChainAllowed
whitelist
Roadmap
Support for alternative verifiers (zk, oracles)
User reputation and trust levels
Collaborative missions and reward pools
Last updated
Was this helpful?