Dysnomia Smart Contract Ecosystem¶
Overview¶
Dysnomia is a sophisticated PulseChain-based smart contract ecosystem implementing: - ERC20-like token mechanics with multi-owner governance - Cryptographic state transformations using modular exponentiation - Geographic coordinate-based mapping system (Hecke Meridians) - User identity/session management with "Soul" IDs - Encryption/messaging between users - Gaming/voting mechanics with acronym system
What This Means For Players¶
Plain English Summary: Dysnomia is an on-chain game and social platform where you create a player account, join venues (like chatrooms or marketplaces), claim territory, earn rewards, and trade tokens. Think of it as a blockchain-based virtual world where everything you do - from chatting to claiming land - is recorded on-chain and earns you various rewards.
Real-World Analogy: Imagine a massively multiplayer online game where instead of a company running the servers, everything runs on the blockchain. Your character (LAU token), your inventory (YUE wallet), the places you visit (QING venues), and the land you own (WORLD territories) are all permanent, verifiable, and tradeable. It's like a combination of Second Life, a cryptocurrency exchange, and a social chat platform.
What You Can Do: - Create an account (LAU) - Your permanent on-chain identity with a Soul ID - Chat & socialize - Send messages in venues using your LAU - Explore venues (QINGs) - Visit different locations on the game map - Claim territory (WORLD) - Become a creator and earn VITUS credits - Battle for resources (WAR) - Fight to earn H2O (water) tokens - Trade tokens - Exchange any game currency using built-in market rates - Play word games - Submit acronym guesses and vote on submissions
Architecture Diagram¶
┌─────────────────┐
│ LAUFactory │
│ (11c) │
└────────┬────────┘
│ creates
▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ VMREQ │◄───│ DYSNOMIA │◄─── │ LAU │
│ (00b) │ │ (01/01v2) │ │ (11) │
│ RNG Core │ │ Base Token │ │ User Layer │
└─────────────┘ └──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ SHA │ │ VOID │
│ (02) │ │ (10) │
│ Crypto │ │ Sessions │
└──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ SHIO │ │ SIU │
│ (03) │ │ (09) │
│ Rod/Cone │ │ Token Gen │
└──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ YI │ │ YANG │
│ (04) │ │ (08) │
│ DeFi Orch │ │ Aggregator │
└──────┬──────┘ └──────┬──────┘
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ ZHENG │ │ YAU │
│ (05) │ │ (07) │
│ Installer │ │ Protocol │
└──────┬──────┘ └──────┬──────┘
│ │
└─────────┬─────────┘
▼
┌─────────────┐
│ ZHOU │
│ (06) │
│ Market Rate │
└─────────────┘
DOMAIN CONTRACTS
┌─────────────────────────────────────────────────────────┐
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ CHO │───►│ QING │───►│ MAP │ │
│ │ (dan) │ │ (dan) │ │ │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ CHAN │───►│ YUE │───►│ WORLD │ │
│ │ (sky) │ │ │ │ │ │
│ └────┬────┘ └─────────┘ └────┬────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ CHOA │───►│ SEI │───►│ CHEON │──►META │
│ │ (sky) │ │ (tang) │ │ (tang) │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │
│ SOENG CHAIN: QI→MAI→XIA→XIE→ZI→PANG→GWAT │
│ │
│ ASSETS: H2O, VITUS │
│ WAR: Game mechanics │
│ │
└─────────────────────────────────────────────────────────┘
Key Constants¶
| Constant | Value | Description |
|---|---|---|
| MotzkinPrime | 953467954114363 | Prime number used across all cryptographic operations |
| Gua | 1652929763764148448182513644633101239607891671119935657884642 | Universe constant in CHO |
Core Data Structures¶
Fa (SHA State)¶
struct Fa {
uint64 Base, Secret, Signal, Channel, Contour, Pole;
uint64 Identity, Foundation, Element, Coordinate;
uint64 Charge, Chin, Monopole;
}
Bao (Operation Context)¶
struct Bao {
address Phi; // Address reference
SHA Mu; // Associated SHA token
uint64 Xi, Pi; // State values
SHIO Shio; // Associated SHIO pair
uint64 Ring; // Ring value
uint64 Omicron, Omega; // Reaction outputs
}
User¶
struct User {
uint64 Soul; // 64-bit user identifier
Bao On; // User's Bao context
string Username; // Display name
uint64 Entropy; // User-specific entropy
}
Contract Categories¶
Core Contracts¶
Base infrastructure including token mechanics, cryptographic primitives, and session management.
| Contract | Purpose |
|---|---|
| VMREQ | Random number generation via modular exponentiation |
| DYSNOMIA | Base ERC20-like token with market rates |
| SHA | Cryptographic state token |
| SHIO | Paired Rod/Cone token system |
| YI | DeFi orchestration layer |
| ZHENG | Rod/Cone installation manager |
| ZHOU | Market rate orchestrator |
| YAU | Protocol coordinator |
| YANG | Multi-state aggregator |
| SIU | Token generation with Aura identity |
| VOID | User session & chat management |
| LAU | User interface layer |
Domain Contracts¶
Application-specific logic for gaming, mapping, and asset management.
- dan/: CHO (login), QING (tokens), WAR (game)
- sky/: CHAN (player), CHOA (game), RING (time)
- soeng/: QI→MAI→XIA→XIE→ZI→PANG→GWAT chain
- tang/: SEI, CHEON, META (player management)
- assets/: H2O, VITUS (game currencies)
Library Contracts¶
Reusable utilities and helpers.
| Library | Purpose |
|---|---|
| MultiOwnable | Multi-owner access control |
| Registry | Key-value storage |
| Encrypt | User-to-user encryption |
| StringLib | String manipulation |
| Hecke | Geographic coordinate system |
| ReactionsCore | Entropy-based reactions |
| Attribute | User attribute storage |
Include Structures¶
Shared data structures used across contracts.
| Structure | Purpose |
|---|---|
| Fa | SHA state container |
| Bao | Operation context |
| User | User identity |
| Acronym | Game voting entry |
| UserVote | Vote tracking |
License¶
All contracts use SPDX-License-Identifier: Sharia
Solidity Version¶
All contracts target Solidity ^0.8.21
Cross-Reference Legend¶
- Inherits: Contract extends another contract
- Uses: Contract calls functions on another contract
- Creates: Contract deploys new instances of another contract
- Owns: Contract holds ownership privileges on another contract