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.

29 Deployed
359 Tests
46 Math Sections
0.8.24 Solidity

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

1. THRML-RS
Rust game server sends raw field values (b_alpha, b_gamma_eff)
2. ChannelingContract
Computes Pe on-chain, writes 64-slot ring buffer, fires regime events
3. Spoke Ticker
pm2 worker reads campaignPe every 60s, calls each spoke's processTick()
4. Spokes Compute
CascadeEngine D-state, DriftTracker theta, FDROracle susceptibility, etc.
5. Auto-Resolution
Prediction markets auto-resolve on cascade criteria. Autoclaim pays winners.

Fixed-Point Conventions

QuantityScaleTypeExample
Pe×1000int3213000 = Pe 13.0
Fields (b_alpha, b_gamma)×1e6int64867000 = 0.867
Theta×1e6int256500000 = 0.5
Crooks ratio×1000int2566900 = 6.9
ATH amounts×1e18uint256100e18 = 100 ATH

Pe Regime Thresholds

PeRegimeConstantMeaning
1.0COHERENTPE_COHERENT_MAXSafe zone boundary
4.0STABLEPE_STABLE_MAXCity of Dis
13.0CONTESTEDPE_CONTESTED_MAXD3 cascade / Athanor
21.0DRIFTINGPE_DRIFTING_MAXFokker-Planck dissolution
38.0RUNAWAYPE_RUNAWAY_MAXCrooks irreversibility wall

ChannelingContract Hub

src/ChannelingContract.sol 0x52d2...c794406

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

Key Functions

FunctionCallerDescription
submitFieldUpdate()THRML-RSCompute Pe from raw fields, write ring buffer, fire regime events
openCampaign() / closeCampaign()GMCampaign lifecycle
setVoidEffect()GM / VoidSourceAdjust void Pe influence (±5.0 cap)
setPlayerClass()PlayerChoose Tank/Healer/DPS (locked once set)
formParty() / joinParty()PlayerParty formation (max 6 members)
applyHealerCorrection()HealerReduce party Pe offset, clear D3 cascade
initiateConjunctio() / finalizeConjunctio()GMTwo-step Coniunctio (Pe ≤ 1.0 required)
getGameState()AnyoneFull snapshot: Pe, regime, athanor, history
computePe()AnyoneVerify Pe formula for any field pair (view)

Roles

owner isGM isThrml isVoidSource

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

src/CascadeEngine.sol · §2G, §9E, §22A 0xdb9a...e8255

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

src/HysteresisEngine.sol · §9B, §22A 0xc51e...4de

Computes ATH cost of reversing cascade transitions. Forward drift is free. Reverse requires work: cost = baseCost × multiplier (measured physics).

MultiLayerPe Deployed

src/MultiLayerPe.sol · §16B 0x9de8...a112

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

src/DriftTracker.sol · §2C, §22B 0x101b...69ae

On-chain theta trajectory via Langevin ODE. Tracks theta_ising, theta_det, cumulative drift impulse, snap-back velocity.

FDROracle Deployed

src/FDROracle.sol · §43 0x60a9...4ee

Susceptibility S(Pe), dosimetry, intervention prediction. S(Pe) peaks near phase boundaries — interventions most effective there.

ConstraintCurrent Deployed

src/ConstraintCurrent.sol · §19 0xee1c...6df

Cross-platform Pe gradient and capital/attention flow. J = -sigma · [Pe(B) - Pe(A)]. Sigma sign determines extraction vs constraint current.

VoidGridCA Deployed

src/VoidGridCA.sol · Paper 121 §XI 0x507a...e809

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

SpokeMathPurpose
CooperPairEngine§21, §22DHamilton's rule: paired agents reduce Pe via coupling
CrooksGate§2E, §22DReversibility gates: SOFT/HARD/LOCKED by Crooks ratio
PopulationMixture§6, §9ATwo-component drifter/constrained population model
TemporalPeAccumulator§16APer-player Pe dosimetry with sensitive period weighting
VoidLatticePhase§9DGas/Fluid/Crystal/Vortex phase classification

Economy Layer

AthTokenV2 ERC-20

src/AthTokenV2.sol 0x813f...bb1b4

ATHANOR (ATH) — 2.1B total supply. Pe-regime-anchored distribution. EIP-2612 permit. Two-step ownership. Hard-capped supply. Deployer minter revoked.

Tranche%ATHPe Derivation
Founder38%798MPe=38 Crooks wall
Game rewards21%441MPe=21 Fokker-Planck
Bot treasury13%273MPe=13 D3 cascade
Airdrop10%210MPe=1.0 × 10
Tribute vault9%189MPe=9 DPS point
Liquidity5%105MOperational
Team/ops4%84MPe=4 City of Dis

PeEconomy Deployed

src/PeEconomy.sol 0x622c...0f78

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

src/TributeVault.sol 0x8a97...dc28

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

src/AthBridge.sol 0x4b73...afe0

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

src/ScoreOracleV2.sol 0xbbc9...3715

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

src/PaperRegistry.sol 0xd3e3...4918

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

src/MathRegistry.sol 0xc423...8259

Math apparatus §§1–46 on-chain. Genesis entry stores alpha* hash (reference frame anchor). Append-only.

VoidRegistry Deployed

src/VoidRegistry.sol 0x962d...1a9f

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

src/PlayerRegistry.sol 0x3941...16b5

Per-wallet lifetime stats. Rank derived from work (not holdings). Multipliers applied by THRML-RS and ATH bonuses.

RankThresholdMultiplier
UnrankedNo work1.0×
Acolyte1+ scores1.1×
Initiate5+ scores or 1 campaign1.25×
Scholar20+ scores or 1 Coniunctio1.5×
Adept50+ scores or 3 campaigns2.0×
Archon100+ scores or 5 campaigns + Coniunctio3.0×

GMRegistry Deployed

src/GMRegistry.sol 0xaa8c...8b81

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

src/ConiunctioRegistry.sol 0x0ea8...22c4

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

src/BinderCardNFT.sol · Symbol: BIND 0x09a1...653b

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

src/ItemNFT.sol · Symbol: ITEM 0xf7cc...4dc

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.

ContractAddress

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.