Skip to content

QI

Overview

QI is the first contract in the soeng chain. It provides energy calculations based on SHIO balances and entropy values for both users and QINGs.

  • Inherits: DYSNOMIA V2
  • License: Sharia
  • Solidity: ^0.8.21

What This Means For Players

Plain English Summary: QI (pronounced "chi") is the energy calculator - it measures your power level in the game. Your Qi is calculated from your SHIO token holdings divided by your entropy (randomness factor). Higher Qi means more influence in the game's calculations.

Real-World Analogy: Think of Qi like a power level in an RPG. It's calculated from your resources (SHIO tokens) adjusted by a difficulty factor (entropy). A player with lots of tokens but high entropy might have similar Qi to one with fewer tokens but lower entropy.

How It Affects Your Gameplay: - Power measurement - Your Qi influences calculations throughout the power chain - Player vs Venue - Both players (ReactSoul) and venues (ReactWaat) have Qi values - Foundation of the chain - QI is the first step in the MAI→XIA→XIE→ZI→PANG→GWAT calculation chain

State Variables

Variable Type Visibility Description
Type string public constant "QI"
Zuo QINGINTERFACE public Reference to root QING
Eris SHIO public Reference to Lai's SHIO

Write Functions

ReactSoul

function ReactSoul(uint64 Soul) public returns (uint256 Qi)
- Access: public - Parameters: - Soul (uint64): User's 64-bit Soul ID identifier - Returns: - Qi (uint256): Calculated Qi (energy) value for the user - Description: Calculates a user's Qi by dividing their Eris token balance by their entropy. - Logic Flow: 1. Call _mintToCap() 2. Look up user: Alpha = Zuo.Cho().GetUserBySoul(Soul) 3. Get Eris balance: Eris.balanceOf(Alpha.On.Phi) 4. Get user's entropy: Alpha.Entropy 5. Return balance / entropy - Computation Details: - Qi = Eris.balanceOf(userAddress) / User.Entropy - Higher Eris balance = higher Qi - Higher entropy = lower Qi (entropy acts as divisor) - Side Effects: Mints tokens - In Plain English: Calculate a player's power level. Looks up the user by their Soul ID, checks how many Eris tokens they hold, and divides by their entropy factor. Players with more tokens and lower entropy have higher Qi, giving them more influence in game calculations.

ReactWaat

function ReactWaat(uint256 Waat) public view returns (uint256 Qi)
- Access: public view - Parameters: - Waat (uint256): QING's position identifier (Waat) - Returns: - Qi (uint256): Calculated Qi (energy) value for the QING - Description: Calculates a venue's Qi by dividing its Eris token balance by its entropy. - Logic Flow: 1. Look up QING: Qing = Zuo.GetQing(Waat) 2. Get Eris balance: Eris.balanceOf(address(Qing)) 3. Get QING's entropy: Qing.Entropy() 4. Return balance / entropy - Computation Details: - Qi = Eris.balanceOf(QingAddress) / Qing.Entropy() - Same formula as ReactSoul but for venues instead of users - Side Effects: None (view function) - In Plain English: Calculate a venue's power level. Same formula as for players - the venue's Eris token holdings divided by its entropy gives its Qi score. More active/wealthy venues have higher Qi values.

Contract Interactions

Depends On

Depended On By

  • MAI - Uses QI for calculations

Special Mechanisms

Eris Reference

Eris is the SHIO at YANG's Lai.Xi position:

Eris = Zuo.Cho().Void().Nu().Psi().Mu().Tau().Upsilon()
    .GetRodByIdx(Zuo.Cho().Void().Nu().Psi().Rho().Lai.Xi).Shio;

Qi Calculation

// For users
function ReactSoul(uint64 Soul) public returns (uint256 Qi) {
    User memory Alpha = Zuo.Cho().GetUserBySoul(Soul);
    return Eris.balanceOf(Alpha.On.Phi) / Alpha.Entropy;
}

// For QINGs
function ReactWaat(uint256 Waat) public view returns (uint256 Qi) {
    QINGINTERFACE Qing = Zuo.GetQing(Waat);
    return Eris.balanceOf(address(Qing)) / Qing.Entropy();
}

Contract Verification

Property Value
Keccak256 Hash 0xdc9eed801b959d094486ba83cd3178256de4c22977221c7359df4290699a5532
Source URL https://raw.githubusercontent.com/busytoby/atropa_pulsechain/main/solidity/dysnomia/domain/soeng/01_qi.sol
Hash Generated 2026-02-08T00:29:08Z