Skip to content

Functions

DISCLAIMER // NFA // DYOR

This analysis is based on verified source code retrieved from Etherscan and observations of the contract behavior. We are not smart contract security experts. This document aims to explain what the contract appears to do based on the code. It should not be considered a comprehensive security audit or financial advice. Always verify critical information independently and consult with blockchain security professionals for important decisions.

⊙ generated by robots | curated by humans

METADATA
Contract Address 0xCa5E50710F656F2e537cE2Fc8504dB6E24eD3515 (etherscan)
Network Ethereum Mainnet
Analysis Date 2025-12-13

Function Selectors

SELECTOR FUNCTION SIGNATURE CATEGORY
N/A constructor(uint256,address,uint256) Deployment
0x42966c68 burn(uint256) User
0xa9059cbb transfer(address,uint256) User (inherited)
0x23b872dd transferFrom(address,address,uint256) User (inherited)
0x095ea7b3 approve(address,uint256) User (inherited)
0x70a08231 balanceOf(address) View (inherited)
0x18160ddd totalSupply() View (inherited)
0xdd62ed3e allowance(address,address) View (inherited)
0x06fdde03 name() View (inherited)
0x95d89b41 symbol() View (inherited)
0x313ce567 decimals() View (inherited)
0x8da5cb5b owner() View (inherited)
0xf2fde38b transferOwnership(address) Admin (inherited)
0x715018a6 renounceOwnership() Admin (inherited)

Summary

CATEGORY NUM FUNCTIONS
Total Custom Functions 2 (constructor, burn)
User Functions 1 custom + 3 inherited
Admin Functions 2 (inherited from Ownable)
View Functions 8 (inherited + custom getters)

Deployment Function

constructor(uint256 _totalSupply, address _presaleWallet, uint256 _presaleAllocation)

Initializes the token contract with fixed supply and distributes tokens between presale wallet and deployer.

ATTRIBUTE VALUE
Location Lines 38-59
Parameters _totalSupply, _presaleWallet, _presaleAllocation
Access Called once at deployment
FLAG OBSERVATION
All tokens minted at deployment - no future minting possible
TOTAL_SUPPLY stored as immutable variable
Zero presale allocation is valid (all tokens go to deployer)
Presale could receive 100% if allocation equals total supply
No vesting or time locks - tokens immediately transferable
CONDITION REQUIREMENT
Total supply _totalSupply > 0
Presale wallet _presaleWallet != address(0)
Allocation _presaleAllocation <= _totalSupply
STEP ACTION
1 Initialize ERC20 with name "Xcellar" and symbol "XCL"
2 Set msg.sender as owner via Ownable
3 Validate all input parameters
4 Set TOTAL_SUPPLY as immutable variable
5 Store presale wallet address and allocation
6 Mint presale allocation to presale wallet (if > 0)
7 Mint remaining tokens to deployer (if > 0)
VARIABLE CHANGE
TOTAL_SUPPLY Set to _totalSupply (immutable)
presaleWallet Set to _presaleWallet
presaleAllocation Set to _presaleAllocation
_balances[presaleWallet] Set to _presaleAllocation
_balances[msg.sender] Set to remaining tokens
_totalSupply Set to _totalSupply
CONDITION REVERT MESSAGE
_totalSupply == 0 "Total supply must be greater than zero"
_presaleWallet == address(0) "Presale wallet cannot be zero address"
_presaleAllocation > _totalSupply "Presale allocation exceeds total supply"
flowchart TD
    Start([Constructor Called])

    Start --> Init[Initialize ERC20<br/>name: Xcellar<br/>symbol: XCL]
    Init --> InitOwner[Initialize Ownable<br/>owner = msg.sender]

    InitOwner --> Check1{_totalSupply > 0?}
    Check1 -->|No| Revert1[Revert:<br/>Total supply must be<br/>greater than zero]
    Check1 -->|Yes| Check2{_presaleWallet<br/>not zero address?}

    Check2 -->|No| Revert2[Revert:<br/>Presale wallet cannot<br/>be zero address]
    Check2 -->|Yes| Check3{_presaleAllocation<br/><= _totalSupply?}

    Check3 -->|No| Revert3[Revert:<br/>Presale allocation<br/>exceeds total supply]
    Check3 -->|Yes| SetVars[Set State Variables]

    SetVars --> CheckPresale{_presaleAllocation > 0?}
    CheckPresale -->|Yes| MintPresale[Mint to presaleWallet]
    CheckPresale -->|No| CalcRemaining

    MintPresale --> CalcRemaining[Calculate remaining tokens]
    CalcRemaining --> CheckRemaining{remaining > 0?}

    CheckRemaining -->|Yes| MintDeployer[Mint to deployer]
    CheckRemaining -->|No| Complete
    MintDeployer --> Complete([Deployment Complete])
constructor(
    uint256 _totalSupply,
    address _presaleWallet,
    uint256 _presaleAllocation
) ERC20("Xcellar", "XCL") Ownable(msg.sender) {
    require(_totalSupply > 0, "Total supply must be greater than zero");
    require(_presaleWallet != address(0), "Presale wallet cannot be zero address");
    require(_presaleAllocation <= _totalSupply, "Presale allocation exceeds total supply");

    TOTAL_SUPPLY = _totalSupply;
    presaleWallet = _presaleWallet;
    presaleAllocation = _presaleAllocation;

    if (_presaleAllocation > 0) {
        _mint(_presaleWallet, _presaleAllocation);
    }

    uint256 remainingTokens = TOTAL_SUPPLY - _presaleAllocation;
    if (remainingTokens > 0) {
        _mint(msg.sender, remainingTokens);
    }
}

User Functions

burn(uint256 value)

Allows token holders to permanently destroy their own tokens, reducing the circulating supply.

ATTRIBUTE VALUE
Selector 0x42966c68
Location Lines 66-68
Parameters value (uint256) - amount to burn
Access External - Any token holder
FLAG OBSERVATION
Burns are permanent and irreversible
Can only burn own tokens (not others')
No minimum or maximum burn amount
Creates deflationary pressure on token supply
No safety confirmations built into function
CONDITION REQUIREMENT
Balance Caller must have balance >= value
STEP ACTION
1 Call OpenZeppelin's _burn(msg.sender, value)
2 Check caller has sufficient balance
3 Reduce caller's balance by value
4 Reduce total supply by value
5 Emit Transfer event to Address(0)
VARIABLE CHANGE
_balances[msg.sender] Reduced by value
_totalSupply Reduced by value
CONDITION REVERT MESSAGE
balance < value "ERC20InsufficientBalance"
sequenceDiagram
    participant User
    participant XCL as XcellarToken
    participant ERC20 as OpenZeppelin ERC20

    User->>XCL: burn(value)
    Note over User: Must own sufficient tokens

    XCL->>ERC20: _burn(msg.sender, value)
    Note over ERC20: Check balance >= value

    alt Sufficient Balance
        ERC20->>ERC20: Reduce balance[msg.sender]
        ERC20->>ERC20: Reduce totalSupply
        ERC20->>ERC20: Emit Transfer(msg.sender, address(0), value)
        ERC20-->>XCL: Success
        XCL-->>User: Tokens burned successfully
    else Insufficient Balance
        ERC20-->>XCL: Revert: ERC20InsufficientBalance
        XCL-->>User: Transaction failed
    end
function burn(uint256 value) external {
    _burn(msg.sender, value);
}

Admin Functions

transferOwnership(address newOwner)

Transfers ownership to a new address. Inherited from OpenZeppelin Ownable.

ATTRIBUTE VALUE
Selector 0xf2fde38b
Source Inherited from OpenZeppelin Ownable
Parameters newOwner (address)
Access Owner only
FLAG OBSERVATION
Owner can transfer control to another address
New owner must not be Address(0)
Previous owner loses all owner privileges immediately
Does not affect token balances or operations
// Inherited from OpenZeppelin Ownable
function transferOwnership(address newOwner) public virtual onlyOwner {
    require(newOwner != address(0), "Ownable: new owner is the zero address");
    _transferOwnership(newOwner);
}

renounceOwnership()

Permanently removes ownership, making contract ownerless. Inherited from OpenZeppelin Ownable.

ATTRIBUTE VALUE
Selector 0x715018a6
Source Inherited from OpenZeppelin Ownable
Parameters None
Access Owner only
FLAG OBSERVATION
Irreversible - ownership cannot be restored
Makes contract fully decentralized
No one can ever become owner again
Does not affect token functionality
// Inherited from OpenZeppelin Ownable
function renounceOwnership() public virtual onlyOwner {
    _transferOwnership(address(0));
}

View Functions

Inherited ERC20 Functions

The contract inherits all standard ERC20 view functions from OpenZeppelin:

FUNCTION RETURNS PURPOSE
name() "Xcellar" Token name
symbol() "XCL" Token symbol
decimals() 18 Token decimals
totalSupply() uint256 Current circulating supply
balanceOf(address) uint256 Token balance of address
allowance(address,address) uint256 Approved spending amount

Custom State Getters

FUNCTION TYPE PURPOSE
TOTAL_SUPPLY() uint256 (immutable) Original maximum supply set at deployment
presaleWallet() address Address that received presale allocation
presaleAllocation() uint256 Amount allocated to presale wallet
owner() address Current contract owner