MEGAETH TESTNET · CHAIN 6343 · 29 CONTRACTS
Developer Docs
Solidity contracts powering the Void Framework on-chain layer. Hub-and-spoke architecture centered on ChannelingContract with Pe physics, ATH economy, True Light Engine spokes, registries, and NFTs.
Architecture
+------------------------+
| ChannelingContract | <-- THRML-RS writes raw fields
| (Hub - Pe physics) | Pe = K*sinh(2*(b_a - b_g_eff))
+-----------+------------+
|
+-----------------------+-----------------------+
| | |
+-------+-------+ +-------+-------+ +-------+-------+
| True Light | | Economy | | Registries |
| Engine Spokes | | Layer | | |
+-------+-------+ +-------+-------+ +-------+-------+
| | |
CascadeEngine PeEconomy (ATH) ScoreOracleV2
HysteresisEngine TributeVault PaperRegistry
MultiLayerPe AuctionHouse MathRegistry
DriftTracker AthBridge VoidRegistry
FDROracle AirdropClaimer GMRegistry
ConstraintCurrent VoidPredictionMarket PlayerRegistry
VoidGridCA ConiunctioRegistry
CreatureLib BinderCardNFT
+ 5 undeployed ItemNFT
Data Flow
Fixed-Point Conventions
| Quantity | Scale | Type | Example |
|---|---|---|---|
| Pe | ×1000 | int32 | 13000 = Pe 13.0 |
| Fields (b_alpha, b_gamma) | ×1e6 | int64 | 867000 = 0.867 |
| Theta | ×1e6 | int256 | 500000 = 0.5 |
| Crooks ratio | ×1000 | int256 | 6900 = 6.9 |
| ATH amounts | ×1e18 | uint256 | 100e18 = 100 ATH |
Pe Regime Thresholds
| Pe | Regime | Constant | Meaning |
|---|---|---|---|
| 1.0 | COHERENT | PE_COHERENT_MAX | Safe zone boundary |
| 4.0 | STABLE | PE_STABLE_MAX | City of Dis |
| 13.0 | CONTESTED | PE_CONTESTED_MAX | D3 cascade / Athanor |
| 21.0 | DRIFTING | PE_DRIFTING_MAX | Fokker-Planck dissolution |
| 38.0 | RUNAWAY | PE_RUNAWAY_MAX | Crooks irreversibility wall |
ChannelingContract Hub
Central Pe physics engine. All other contracts read campaign state from here. Computes Pe = K · sinh(2 · (b_alpha - b_gamma_eff)) on-chain via 5-term Taylor series.
Core Mechanics
- Pe formula: On-chain sinh Taylor series, valid |arg| ≤ 3.0, error < 0.05%
- Ring buffer: 64-slot circular buffer per campaign with raw field snapshots
- Momentum: Damped slope of last 8 ticks — campaigns have inertia
- Void influence: voidPeEffect[campaign] — signed Pe correction (±5.0 max)
- Regime classification: 6 regimes (COHERENT through FISHER_RUNAWAY)
- Party system: Tank/Healer/DPS classes with absorption, correction, D3 cascade
- Module registry: Spoke contracts registered by bytes32 ID
Key Functions
| Function | Caller | Description |
|---|---|---|
submitFieldUpdate() | THRML-RS | Compute Pe from raw fields, write ring buffer, fire regime events |
openCampaign() / closeCampaign() | GM | Campaign lifecycle |
setVoidEffect() | GM / VoidSource | Adjust void Pe influence (±5.0 cap) |
setPlayerClass() | Player | Choose Tank/Healer/DPS (locked once set) |
formParty() / joinParty() | Player | Party formation (max 6 members) |
applyHealerCorrection() | Healer | Reduce party Pe offset, clear D3 cascade |
initiateConjunctio() / finalizeConjunctio() | GM | Two-step Coniunctio (Pe ≤ 1.0 required) |
getGameState() | Anyone | Full snapshot: Pe, regime, athanor, history |
computePe() | Anyone | Verify Pe formula for any field pair (view) |
Roles
Key Events
FieldUpdate RegimeCrossing CaudaPavonisCrossing FisherRunaway AthanorActivated ConjunctioAchieved DPSSpike HealerCorrection D3CascadeActivated
True Light Engine Spokes
All spokes implement IGameModule and are registered on the hub. They read campaign Pe and compute derived quantities.
ThrmLib Library
src/ThrmLib.sol
Pure math library. Every function is internal pure — zero marginal gas (compiler-inlined). Canonical formulas from §1–§46.
Constants: B_ALPHA=0.867, B_GAMMA=2.244, K=16, ETA_TAU=0.05082, J=0.020
Functions: sinh1e6, cosh1e6, exp1e6, computePe, crooksRatio, susceptibility, landauPotential, fantasia, fdrDeltaTheta, snapBackVelocity
CascadeEngine Deployed
D1→D2→D3 drift cascade state machine. Forward: 1/N contaminates all. Reverse: N/N suppression needed. Hysteresis: 2.08× / 3.00× / 4.32× ticks.
HysteresisEngine Deployed
Computes ATH cost of reversing cascade transitions. Forward drift is free. Reverse requires work: cost = baseCost × multiplier (measured physics).
MultiLayerPe Deployed
Cross-layer coupling: Pe_total = Pe_a + Pe_b + J·Pe_a·Pe_b. Detects regulatory double-bind. J=0.020 (5/5 confirmed).
DriftTracker Deployed
On-chain theta trajectory via Langevin ODE. Tracks theta_ising, theta_det, cumulative drift impulse, snap-back velocity.
FDROracle Deployed
Susceptibility S(Pe), dosimetry, intervention prediction. S(Pe) peaks near phase boundaries — interventions most effective there.
ConstraintCurrent Deployed
Cross-platform Pe gradient and capital/attention flow. J = -sigma · [Pe(B) - Pe(A)]. Sigma sign determines extraction vs constraint current.
VoidGridCA Deployed
32×32 Pe-coupled cellular automaton. Game of Life with 6-regime state and thermodynamic coupling rule. R-pentomino seeding.
CreatureLib Library
src/CreatureLib.sol · §2C, §2E, §9B, §19, §22A, §43
Deterministic creature evolution from Pe physics. Five mechanics: mutation (susceptibility), trait lock (Crooks), speciation (Landau), predation (constraint current), morphology (regime + theta*). Six morphs: WISP / CONSTRUCT / SHIFTER / LEVIATHAN / TITAN / FROZEN.
Undeployed Spokes
| Spoke | Math | Purpose |
|---|---|---|
| CooperPairEngine | §21, §22D | Hamilton's rule: paired agents reduce Pe via coupling |
| CrooksGate | §2E, §22D | Reversibility gates: SOFT/HARD/LOCKED by Crooks ratio |
| PopulationMixture | §6, §9A | Two-component drifter/constrained population model |
| TemporalPeAccumulator | §16A | Per-player Pe dosimetry with sensitive period weighting |
| VoidLatticePhase | §9D | Gas/Fluid/Crystal/Vortex phase classification |
Economy Layer
AthTokenV2 ERC-20
ATHANOR (ATH) — 2.1B total supply. Pe-regime-anchored distribution. EIP-2612 permit. Two-step ownership. Hard-capped supply. Deployer minter revoked.
| Tranche | % | ATH | Pe Derivation |
|---|---|---|---|
| Founder | 38% | 798M | Pe=38 Crooks wall |
| Game rewards | 21% | 441M | Pe=21 Fokker-Planck |
| Bot treasury | 13% | 273M | Pe=13 D3 cascade |
| Airdrop | 10% | 210M | Pe=1.0 × 10 |
| Tribute vault | 9% | 189M | Pe=9 DPS point |
| Liquidity | 5% | 105M | Operational |
| Team/ops | 4% | 84M | Pe=4 City of Dis |
PeEconomy Deployed
ATH staking, rewards, and burns. All amounts derived from Pe physics.
Stake
- Tank: 33.3 ATH
- Healer: 100 ATH
- DPS: 900 ATH
Rewards
- Coniunctio: 100 ATH
- Score (ICC≥0.60): 10 ATH
- Healer correction: 5 ATH
- Fisher Alert: 20 ATH
Burns
- Void spawn: 10 ATH/Pe-unit
- Binding 3: 10 ATH
- Binding 4: 25 ATH
- Binding 5: 100 ATH
TributeVault Deployed
Burn ATH to reduce campaign Pe (1,000 ATH = -1.0 Pe). Accept Binder Card NFTs as permanent sacrifice. Blessing text is permanent calldata. Pre-seeded with 189M ATH (9% supply).
VoidPredictionMarket Deployed
src/VoidPredictionMarket.sol
Parimutuel binary prediction markets. Stake: 10–900 ATH (Pe-derived). Payout: (stake/winning_pool) × total_pool. Auto-resolved by spoke-ticker on cascade criteria.
AuctionHouse Deployed
src/AuctionHouse.sol
Fixed-price peer-to-peer item trading. NFT whitelist. Escrow-based. 2% fee burned (deflationary, configurable 0–10%). List → Buy → Cancel flow.
AthBridge Deployed
Cross-chain ATH bridge (MegaETH ↔ Solana). Burn/mint with backend relayer. NFT lock/unlock for ItemNFT. Supply invariant preserved. 100K ATH daily limit. Nonce replay protection.
AirdropClaimer
src/AirdropClaimer.sol
Merkle-drop 210M ATH (10% supply) to MORR holders. 90-day claim window. Only ATH↔MORR connection at launch.
Registries
ScoreOracleV2 Deployed
On-chain platform scores (41 canonical), V3 Pe bridge constants, kill condition registry (0/26 fired, 25/26 survived), MAGI 2-of-3 governance for OTHALAN kill conditions. AggregateStats: Bradford Hill 24/27, Cohen's d=4.2, Fisher p<10-52.
PaperRegistry Deployed
Immutable paper registry. 133 papers registered. Each: number, tier, kill condition flag, title, Zenodo DOI, Arweave TX ID, content hash, timestamp. Append-only.
MathRegistry Deployed
Math apparatus §§1–46 on-chain. Genesis entry stores alpha* hash (reference frame anchor). Append-only.
VoidRegistry Deployed
All VoidObjects on-chain. 6 kinds (slot_machine through twilight). Players spawn basic voids. GM spawns any kind. Position, influence radius, resist/attract polarity. Permanent history.
PlayerRegistry Deployed
Per-wallet lifetime stats. Rank derived from work (not holdings). Multipliers applied by THRML-RS and ATH bonuses.
| Rank | Threshold | Multiplier |
|---|---|---|
| Unranked | No work | 1.0× |
| Acolyte | 1+ scores | 1.1× |
| Initiate | 5+ scores or 1 campaign | 1.25× |
| Scholar | 20+ scores or 1 Coniunctio | 1.5× |
| Adept | 50+ scores or 3 campaigns | 2.0× |
| Archon | 100+ scores or 5 campaigns + Coniunctio | 3.0× |
GMRegistry Deployed
Transparency layer. Every GM decision is a permanent on-chain event. GM Pe = 1.0 by construction (O=1, R=3, alpha=3). Audit trail for all game management.
ConiunctioRegistry Immutable
Founding covenant. No owner. No admin. No upgrades. Permanent. Records the founding, covenant text (publicly readable), lists all child contracts, supports release declarations.
NFTs
BinderCardNFT Soulbound ERC-721
Proof of binding encounters and element cards. Cannot be transferred — all transfer functions revert with Soulbound(). One-way sacrifice() to TributeVault. TokenId = MongoDB ObjectId as uint256.
ItemNFT Tradeable ERC-721
Crafted items. On-chain compact record (recipeId, tier 1–5, craftedAt). Rich metadata served dynamically. Full ERC-721 transfers — tradeable on AuctionHouse.
PlayerProfileNFT Soulbound ERC-721
src/PlayerProfileNFT.sol
One per wallet. Identity card. Stats read live from PlayerRegistry. Rank-gated visual: grey → green → blue → purple → orange → gold border.
Deployed Addresses
All contracts deployed on MegaETH Testnet (chain 6343). Click any address to view on Blockscout.
| Contract | Address |
|---|
REST API
Base URL: https://moreright.xyz/api/v1 · Full OpenAPI 3.1 spec
Auth types: PUB No auth required ·
JWT Privy JWT (Authorization: Bearer <token>) ·
KEY API key (Authorization: Bearer mrk_...)
Loading API spec...
API Keys
Sign in to manage your API keys.