Skip to content

VITUS

Overview

VITUS is the creator reward token distributed by WORLD. It represents accumulated creation credits that can be withdrawn by players.

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

What This Means For Players

Plain English Summary: VITUS is creator credits - rewards for building and contributing to the game world. When you claim territory using WORLD.Code(), you earn VITUS tokens. These credits accumulate in your YUE and can be withdrawn to your wallet.

Real-World Analogy: VITUS is like creator royalties. When you develop land (code at a location), you earn ongoing credits. It's like being a content creator who earns revenue every time their work is accessed.

How It Affects Your Gameplay: - Territory rewards - Earn VITUS by coding at locations near QINGs - YUE accumulation - Credits build up in your bank until you withdraw - Opt-in required - You must opt into VITUS via CHAN to withdraw - Overflow protection - Same mechanism as H2O prevents excessive accumulation

State Variables

Variable Type Visibility Description
Type string public constant "VITUS"
World WORLDINTERFACE public Reference to WORLD

Read Functions

Balance

function Balance() public view returns (uint256)
- Access: public view - Returns: - uint256: VITUS token balance held by the caller's YUE bank - Description: Retrieves the VITUS balance of the caller's YUE via the WORLD contract chain. - Logic Flow: 1. Get YUE from WORLD chain: Yue = World.Cheon().Sei().Chi() 2. Return VITUS balance: VITUS(address(this)).balanceOf(address(Yue)) - Side Effects: None (view function) - In Plain English: Check how many creator credits you have accumulated. These are your earnings from claiming territory with WORLD.Code().

Write Functions

Withdraw

function Withdraw(uint256 Amount) public
- Access: public - Parameters: - Amount (uint256): Amount of VITUS to withdraw to caller's wallet - Description: Withdraws VITUS from the caller's YUE bank to their wallet via CHAN. - Logic Flow: 1. Get player's YUE: (Yue, ) = World.Cheon().Sei().Chi() 2. Execute withdrawal via CHAN: World.Cheon().Sei().Chan().YueWithdraw(Yue, address(this), msg.sender, Amount) - Side Effects: Transfers VITUS from YUE to caller's wallet - In Plain English: Cash out your creator credits to your wallet. You must have opted into VITUS via CHAN.OptIn first. The tokens move from your YUE bank to your wallet address.

Mint

function Mint(address To, uint256 Amount) public onlyOwners
- Access: onlyOwners - Parameters: - To (address): Recipient address for minted tokens - Amount (uint256): Amount of VITUS to mint - Description: Mints VITUS tokens with overflow protection using Meridian thresholds. - Logic Flow: 1. Mint to recipient: _mint(To, Amount) 2. Check recipient balance: _flip = VITUS(address(this)).balanceOf(To) 3. Get max threshold: _max = World.Map().Map().Meridians(13) 4. If _flip > _max: - Check WORLD balance: _flip2 = VITUS(address(this)).balanceOf(address(World)) - Get WORLD max: _max2 = World.Map().Map().Meridians(20) - If _flip2 < _max2: transfer excess to WORLD - Else: transfer excess to address(0x0) (burn) - Computation Details: - Meridians(13) defines player maximum holding threshold - Meridians(20) defines WORLD maximum holding threshold - Excess = _flip - _max (amount over player's limit) - Side Effects: Mints tokens; may transfer excess to WORLD or burn to zero address - In Plain English: Create new creator credits and give them to a player. If they already have too much (over Meridian[13] limit), the excess flows to WORLD if it has room, otherwise gets burned.

Contract Interactions

Depends On

Created By

  • WORLD - Constructor deployment

Special Mechanisms

Withdrawal Flow

function Withdraw(uint256 Amount) public {
    (YUEINTERFACE Yue, ) = World.Cheon().Sei().Chi();
    World.Cheon().Sei().Chan().YueWithdraw(Yue, address(this), msg.sender, Amount);
}

Player must have opted into VITUS contract via CHAN.OptIn for withdrawal to work.

Overflow Protection

Same pattern as H2O:

function Mint(address To, uint256 Amount) public onlyOwners {
    _mint(To, Amount);

    uint256 _flip = VITUS(address(this)).balanceOf(To);
    uint256 _max = World.Map().Map().Meridians(13);

    if(_flip > _max) {
        uint256 _flip2 = VITUS(address(this)).balanceOf(address(World));
        uint256 _max2 = World.Map().Map().Meridians(20);

        if(_flip2 < _max2)
            _transfer(To, address(World), _flip - _max);
        else
            _transfer(To, address(0x0), _flip - _max);  // Burn excess
    }
}

Initial Supply

Constructor mints initial supply equal to WM token's total supply:

DYSNOMIA wmtoken = DYSNOMIA(WMContract);
_mint(address(this), wmtoken.totalSupply());

Purpose

VITUS represents creator credits earned through: 1. WORLD.Code() operations 2. Territory development 3. Game participation

Credits accumulate in YUE and can be withdrawn once opted in.


Contract Verification

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