Skip to content

XIA

Overview

XIA is the third contract in the soeng chain. It calculates charge values using Fomalhaute SHIO and combines QI and MAI calculations.

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

What This Means For Players

Plain English Summary: XIA calculates your "charge" - a combined power value that mixes your general energy (QI) with your venue-specific power (MAI). It's like combining your raw strength with your technique to get your total fighting power.

Real-World Analogy: In a video game, you might have a base attack stat (QI) and a weapon skill (MAI). XIA combines these using fancy math to calculate your actual damage output (Charge) when you attack a specific enemy (QING).

How It Affects Your Gameplay: - Combined power - XIA merges QI and MAI into a single Charge value - SHIO weighting - Your Fomalhaute SHIO holdings influence the calculation - Third in the chain - XIA sits between MAI and XIE in the power calculation sequence

State Variables

Variable Type Visibility Description
Type string public constant "XIA"
Mai MAI public Reference to MAI
Fomalhaute SHIO public Reference to ZHOU's SHIO

Write Functions

Charge

function Charge(uint256 QingWaat) public returns (uint256)
- Access: public - Parameters: - QingWaat (uint256): Target QING's position identifier (Waat) - Returns: - uint256: Combined charge value from modular exponentiation of QI and MAI - Description: Combines QI and MAI using modular exponentiation with Fomalhaute balance as modulus. - Logic Flow: 1. Get current user: Alpha = Mai.Qi().Zuo().Cho().GetUser() 2. Get QING's QI: _b = Mai.Qi().ReactWaat(QingWaat) (base) 3. Get user's MAI: _e = Mai.React(Alpha.Soul, QingWaat) (exponent) 4. Get user's Fomalhaute balance: _m = Fomalhaute.balanceOf(Alpha.On.Phi) (modulus) 5. Return modExp(_b, _e, _m) - Computation Details: - Charge = QI^MAI mod Fomalhaute_Balance - QI (base) comes from ReactWaat - the QING's energy - MAI (exponent) comes from React - your venue-specific holdings - Fomalhaute balance (modulus) - your ZHOU SHIO holdings - Higher Fomalhaute holdings = larger range for the modExp result - Side Effects: Triggers QI.ReactWaat and MAI.React; mints tokens - In Plain English: Calculate your combined power for a venue. Takes the venue's QI energy as a base, raises it to the power of your MAI (venue-specific holdings), and takes the remainder when divided by your Fomalhaute SHIO holdings. This cryptographic mixing produces a single charge value that represents your total influence at this venue.

Contract Interactions

Depends On

Depended On By

  • XIE - Uses XIA for power calculations

Special Mechanisms

Fomalhaute Reference

Fomalhaute is the SHIO at ZHOU's Xi position:

Fomalhaute = Mai.Qi().Zuo().Cho().Void().Nu().Psi().Mu().Tau()
    .Upsilon().GetRodByIdx(
        Mai.Qi().Zuo().Cho().Void().Nu().Psi().Mu().Tau().Xi()
    ).Shio;

Charge Calculation

function Charge(uint256 QingWaat) public returns (uint256) {
    User memory Alpha = Mai.Qi().Zuo().Cho().GetUser();

    uint256 _b = Mai.Qi().ReactWaat(QingWaat);  // QI for QING
    uint256 _e = Mai.React(Alpha.Soul, QingWaat); // MAI for user+QING
    uint256 _m = Fomalhaute.balanceOf(Alpha.On.Phi);

    return Xiao.modExp(_b, _e, _m);
}

Contract Verification

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