Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xC37AEBDc7BE2431A6880B312541C7e270Ef810D3
Balance 0.021204 ETH
Nonce 1
Code Size 7459 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

7459 bytes
0x6080604052600436106100e85760003560e01c8063b7d9f0d21161008a578063cafb220211610059578063cafb2202146102ee578063e2eb41ff14610319578063f340fa011461035c578063fd5e6dd114610378576100e8565b8063b7d9f0d214610230578063c6859d071461026d578063c8084dd114610298578063c80ec522146102c3576100e8565b80633ccfd60b116100c65780633ccfd60b146101865780635432b6201461019d5780636da61d1e146101c85780638da5cb5b14610205576100e8565b806315c43aaf146100ed5780631959a0021461011a57806331ed0db41461015b575b600080fd5b3480156100f957600080fd5b506101026103b5565b60405161011193929190611563565b60405180910390f35b34801561012657600080fd5b50610141600480360381019061013c91906115fd565b6103ce565b6040516101529594939291906116d5565b60405180910390f35b34801561016757600080fd5b5061017061054a565b60405161017d9190611729565b60405180910390f35b34801561019257600080fd5b5061019b610557565b005b3480156101a957600080fd5b506101b2610853565b6040516101bf9190611729565b60405180910390f35b3480156101d457600080fd5b506101ef60048036038101906101ea91906115fd565b610859565b6040516101fc9190611729565b60405180910390f35b34801561021157600080fd5b5061021a610968565b6040516102279190611753565b60405180910390f35b34801561023c57600080fd5b506102576004803603810190610252919061179a565b61098e565b6040516102649190611729565b60405180910390f35b34801561027957600080fd5b506102826109a9565b60405161028f9190611753565b60405180910390f35b3480156102a457600080fd5b506102ad6109c1565b6040516102ba9190611729565b60405180910390f35b3480156102cf57600080fd5b506102d86109c7565b6040516102e59190611729565b60405180910390f35b3480156102fa57600080fd5b506103036109cd565b6040516103109190611729565b60405180910390f35b34801561032557600080fd5b50610340600480360381019061033b91906115fd565b6109d3565b60405161035397969594939291906117c7565b60405180910390f35b610376600480360381019061037191906115fd565b610a35565b005b34801561038457600080fd5b5061039f600480360381019061039a919061179a565b610d8d565b6040516103ac9190611753565b60405180910390f35b6000806000600154600254600354925092509250909192565b6000806000806103dc611528565b6000600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060003073ffffffffffffffffffffffffffffffffffffffff16636da61d1e896040518263ffffffff1660e01b815260040161045a9190611753565b60206040518083038186803b15801561047257600080fd5b505afa158015610486573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104aa919061184b565b905060005b60058160ff16101561050857826008018160ff16600581106104d4576104d3611878565b5b0154848260ff16600581106104ec576104eb611878565b5b6020020181815250508080610500906118e3565b9150506104af565b50816002015482600101548261051e919061190d565b610528919061190d565b8260040154836005015484600601549650965096509650505091939590929450565b6000600580549050905090565b60008054906101000a900460ff16156105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c906119c0565b60405180910390fd5b60016000806101000a81548160ff0219169083151502179055506000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816004015411610649576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161064090611a2c565b60405180910390fd5b61065233610dcc565b600081600101541180610669575060008160020154115b6106a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069f90611a98565b60405180910390fd5b6000816002015482600101546106be919061190d565b9050600061012c826106d09190611ae7565b9050600081836106e09190611b18565b905060008460010181905550600084600201819055508084600501600082825461070a919061190d565b925050819055508060026000828254610723919061190d565b92505081905550816004600082825461073c919061190d565b92505081905550738a7198c128587e89a8d21cffe5f1e3ed38fa7be573ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561079d573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156107e4573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243648260405161082b9190611729565b60405180910390a25050505060008060006101000a81548160ff021916908315150217905550565b60045481565b600080600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060005b81600701805490508110156109615760008260070182815481106108c7576108c6611878565b5b90600052602060002090600202019050600081600101548460030154116108f25781600101546108f8565b83600301545b905060004290508082101561094b576305265c00600a838361091a9190611b18565b85600001546109299190611b4c565b6109339190611b4c565b61093d9190611ae7565b86610948919061190d565b95505b505050808061095990611ba6565b9150506108a0565b5050919050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6006816005811061099e57600080fd5b016000915090505481565b738a7198c128587e89a8d21cffe5f1e3ed38fa7be581565b60035481565b60025481565b60015481565b600b6020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040154908060050154908060060154905087565b60008054906101000a900460ff1615610a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7a906119c0565b60405180910390fd5b60016000806101000a81548160ff02191690831515021790555066038d7ea4c68000341015610ae7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ade90611c61565b60405180910390fd5b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600081600701805490501415610b9e576005339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6064816007018054905010610be8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdf90611ccd565b60405180910390fd5b610bf3338334610f07565b600061012c34610c039190611ae7565b905060008134610c139190611b18565b90508260070160405180604001604052808381526020014281525090806001815401808255809150506001900390600052602060002090600202016000909190919091506000820151816000015560208201518160010155505080836004016000828254610c81919061190d565b925050819055508060016000828254610c9a919061190d565b925050819055508160046000828254610cb3919061190d565b92505081905550610cc43382611294565b738a7198c128587e89a8d21cffe5f1e3ed38fa7be573ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015610d1e573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff167f2cb77763bc1e8490c1a904905c4d74b4269919aca114464f4bb4d911e60de36482604051610d659190611729565b60405180910390a250505060008060006101000a81548160ff02191690831515021790555050565b60058181548110610d9d57600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003073ffffffffffffffffffffffffffffffffffffffff16636da61d1e836040518263ffffffff1660e01b8152600401610e079190611753565b60206040518083038186803b158015610e1f57600080fd5b505afa158015610e33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e57919061184b565b90506000811115610f035742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003018190555080600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254610efb919061190d565b925050819055505b5050565b600073ffffffffffffffffffffffffffffffffffffffff16600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610ff35750600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561128f576000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060070180549050141561106c57600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505b81600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fe6aa6b28bd475dad275b706ff13fb0c7c634a95842cca4f7a8795f7ddbbc492f6064846111499190611ae7565b6040516111569190611729565b60405180910390a360005b60058160ff16101561128d57600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206008018160ff16600581106111c4576111c3611878565b5b0160008154809291906111d690611ba6565b9190505550600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561127a5761128d565b8080611285906118e3565b915050611161565b505b505050565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060005b60058160ff16101561152257600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134457611522565b60006103e860068360ff16600581106113605761135f611878565b5b01548561136d9190611b4c565b6113779190611ae7565b905080600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008282546113cb919061190d565b9250508190555080600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206006016000828254611424919061190d565b92505081905550806003600082825461143d919061190d565b925050819055508473ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f16e746f9be6c4b545700b04df27afb9fceabf59b94ef1c816e78a435059fabea836040516114a19190611729565b60405180910390a3600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16925050808061151a906118e3565b9150506112fe565b50505050565b6040518060a00160405280600590602082028036833780820191505090505090565b6000819050919050565b61155d8161154a565b82525050565b60006060820190506115786000830186611554565b6115856020830185611554565b6115926040830184611554565b949350505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006115ca8261159f565b9050919050565b6115da816115bf565b81146115e557600080fd5b50565b6000813590506115f7816115d1565b92915050565b6000602082840312156116135761161261159a565b5b6000611621848285016115e8565b91505092915050565b600060059050919050565b600081905092915050565b6000819050919050565b6116538161154a565b82525050565b6000611665838361164a565b60208301905092915050565b6000602082019050919050565b6116878161162a565b6116918184611635565b925061169c82611640565b8060005b838110156116cd5781516116b48782611659565b96506116bf83611671565b9250506001810190506116a0565b505050505050565b6000610120820190506116eb6000830188611554565b6116f86020830187611554565b6117056040830186611554565b6117126060830185611554565b61171f608083018461167e565b9695505050505050565b600060208201905061173e6000830184611554565b92915050565b61174d816115bf565b82525050565b60006020820190506117686000830184611744565b92915050565b6117778161154a565b811461178257600080fd5b50565b6000813590506117948161176e565b92915050565b6000602082840312156117b0576117af61159a565b5b60006117be84828501611785565b91505092915050565b600060e0820190506117dc600083018a611744565b6117e96020830189611554565b6117f66040830188611554565b6118036060830187611554565b6118106080830186611554565b61181d60a0830185611554565b61182a60c0830184611554565b98975050505050505050565b6000815190506118458161176e565b92915050565b6000602082840312156118615761186061159a565b5b600061186f84828501611836565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff82169050919050565b60006118ee826118d6565b915060ff821415611902576119016118a7565b5b600182019050919050565b60006119188261154a565b91506119238361154a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611958576119576118a7565b5b828201905092915050565b600082825260208201905092915050565b7f4e6f2072652d656e7472616e6379000000000000000000000000000000000000600082015250565b60006119aa600e83611963565b91506119b582611974565b602082019050919050565b600060208201905081810360008301526119d98161199d565b9050919050565b7f4a6f696e20666972737400000000000000000000000000000000000000000000600082015250565b6000611a16600a83611963565b9150611a21826119e0565b602082019050919050565b60006020820190508181036000830152611a4581611a09565b9050919050565b7f5a65726f20616d6f756e74000000000000000000000000000000000000000000600082015250565b6000611a82600b83611963565b9150611a8d82611a4c565b602082019050919050565b60006020820190508181036000830152611ab181611a75565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000611af28261154a565b9150611afd8361154a565b925082611b0d57611b0c611ab8565b5b828204905092915050565b6000611b238261154a565b9150611b2e8361154a565b925082821015611b4157611b406118a7565b5b828203905092915050565b6000611b578261154a565b9150611b628361154a565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b9b57611b9a6118a7565b5b828202905092915050565b6000611bb18261154a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611be457611be36118a7565b5b600182019050919050565b7f4d696e696d756d206465706f73697420616d6f756e7420697320302e3030312060008201527f4554480000000000000000000000000000000000000000000000000000000000602082015250565b6000611c4b602383611963565b9150611c5682611bef565b604082019050919050565b60006020820190508181036000830152611c7a81611c3e565b9050919050565b7f4d617820313030206465706f7369747320706572206164647265737300000000600082015250565b6000611cb7601c83611963565b9150611cc282611c81565b602082019050919050565b60006020820190508181036000830152611ce681611caa565b905091905056fea2646970667358221220e44178fb4ca99a3ffa1858a51b6adc5fd7f950ee2dbe3d69f444fedfb3cb3d8664736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: No
xInfinityVault.sol 339 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @title xInfinityVault
 * @dev A decentralized investment protocol with the following features:
 * - 1% daily ROI on all deposits
 * - 5-level referral system with bonuses (5%, 3%, 2%, 1%, 0.5%)
 * - 3% marketing fee on all transactions (deposits and withdrawals)
 * - Minimum deposit: 0.001 ETH
 * - Maximum 100 deposits per address
 *
 * Security Features:
 * - No external dependencies
 * - Simple and auditable code
 * - Automatic ROI calculations
 * - Fair and transparent reward distribution
 *
 * How it works:
 * 1. Users deposit ETH (min 0.001)
 * 2. Daily ROI of 1% is calculated based on deposit time
 * 3. Users can withdraw earnings at any time
 * 4. Referral rewards are paid instantly on deposits
 * 5. Marketing fee (3%) is collected on all transactions
 */

interface IERC20 {
    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);
}


abstract contract ReentrancyGuard {
    bool internal locked;

    modifier noReentrant() {
        require(!locked, "No re-entrancy");
        locked = true;
        _;
        locked = false;
    }
}

contract xInfinityVault is ReentrancyGuard {
    address public owner;
    address public constant MARKETING_WALLET = 0x8a7198c128587E89a8d21cfFe5F1e3ED38FA7be5; 
    

    uint256 public invested;
    uint256 public withdrawn;
    uint256 public match_bonus;
    uint256 public marketing_fees;
    address[] public stakers; 

    
    uint256 constant BONUS_LINES_COUNT = 5;
    uint256 constant PERCENT_DIVIDER = 1000; 
    uint256[BONUS_LINES_COUNT] public ref_bonuses = [50, 30, 20, 10, 5]; 

    struct Deposit {
        uint256 amount;
        uint256 time;
    }

    struct Player {
        address upline;
        uint256 dividends;
        uint256 match_bonus;
        uint256 last_payout;
        uint256 total_invested;
        uint256 total_withdrawn;
        uint256 total_match_bonus;
        Deposit[] deposits;
        uint256[5] structure;
    }

    mapping(address => Player) public players;

    event Upline(address indexed addr, address indexed upline, uint256 bonus);
    event NewDeposit(address indexed addr, uint256 amount);
    event MatchPayout(address indexed addr, address indexed from, uint256 amount);
    event Withdraw(address indexed addr, uint256 amount);

    constructor() {
        owner = msg.sender;
    }

    /**
     * @dev Internal function to calculate and update user payouts
     * Processes the ROI earnings for all user deposits
     * Updates the last payout timestamp and adds earnings to dividends
     */
    function _payout(address _addr) private {
        uint256 payout = this.payoutOf(_addr);

        if(payout > 0) {
            players[_addr].last_payout = block.timestamp;
            players[_addr].dividends += payout;
        }
    }

    /**
     * @dev Internal function to handle referral payments
     * @param _addr Address of the depositor
     * @param _amount Amount to calculate referral bonuses from
     * Distributes referral bonuses across 5 levels:
     * - Level 1: 5.0% (50/1000)
     * - Level 2: 3.0% (30/1000)
     * - Level 3: 2.0% (20/1000)
     * - Level 4: 1.0% (10/1000)
     * - Level 5: 0.5% (5/1000)
     */
    function _refPayout(address _addr, uint256 _amount) private {
        address up = players[_addr].upline;

        for(uint8 i = 0; i < ref_bonuses.length; i++) {
            if(up == address(0)) break;
            
            uint256 bonus = _amount * ref_bonuses[i] / PERCENT_DIVIDER;
            
            players[up].match_bonus += bonus;
            players[up].total_match_bonus += bonus;

            match_bonus += bonus;

            emit MatchPayout(up, _addr, bonus);

            up = players[up].upline;
        }
    }

    /**
     * @dev Internal function to set up referral relationships
     * @param _addr Address of the new user
     * @param _upline Address of the referrer
     * @param _amount Deposit amount (used for bonus calculation)
     *
     * Rules:
     * - Only sets upline for new users
     * - If upline has no deposits, defaults to owner
     * - Updates referral structure up to 5 levels deep
     * - Emits Upline event with 1% bonus amount
     */
    function _setUpline(address _addr, address _upline, uint256 _amount) private {
        if(players[_addr].upline == address(0) && _addr != owner) {
            if(players[_upline].deposits.length == 0) {
                _upline = owner;
            }

            players[_addr].upline = _upline;

            emit Upline(_addr, _upline, _amount / 100);
            
            for(uint8 i = 0; i < BONUS_LINES_COUNT; i++) {
                players[_upline].structure[i]++;

                _upline = players[_upline].upline;

                if(_upline == address(0)) break;
            }
        }
    }
    
    /**
     * @dev Allows users to make a deposit and enter the protocol
     * @param _upline Referrer's address
     * Requirements:
     * - Minimum deposit: 0.001 ETH
     * - Maximum 100 deposits per address
     * Fees:
     * - 1% marketing fee sent to MARKETING_WALLET
     * - Remaining 99% added to user's deposit balance
     * Effects:
     * - Updates user's deposit history
     * - Triggers referral payments if applicable
     * - Emits NewDeposit event
     */
    function deposit(address _upline) external payable noReentrant {
        require(msg.value >= 0.001 ether, "Minimum deposit amount is 0.001 ETH");

        Player storage player = players[msg.sender];

        if (player.deposits.length == 0) {
            stakers.push(msg.sender);
        }

        require(player.deposits.length < 100, "Max 100 deposits per address");

        _setUpline(msg.sender, _upline, msg.value);

        // Calculate fees
        uint256 marketingFee = msg.value / 300; // 3% marketing fee
        uint256 depositAmount = msg.value - marketingFee;

        player.deposits.push(Deposit({
            amount: depositAmount,
            time: block.timestamp
        }));

        player.total_invested += depositAmount;
        invested += depositAmount;
        marketing_fees += marketingFee;

        _refPayout(msg.sender, depositAmount);

        payable(MARKETING_WALLET).transfer(marketingFee);
        
        emit NewDeposit(msg.sender, depositAmount);
    }
    
    /**
     * @dev Allows users to withdraw their earnings
     * Includes:
     * - ROI earnings from deposits
     * - Referral bonuses
     * Fees:
     * - 1% marketing fee sent to MARKETING_WALLET
     * - Remaining 99% sent to user
     * Effects:
     * - Updates user's withdrawal history
     * - Resets dividends and match bonus to zero
     * - Emits Withdraw event
     */
    function withdraw() external noReentrant{
        Player storage player = players[msg.sender];
        require(player.total_invested > 0, "Join first");

        _payout(msg.sender);

        require(player.dividends > 0 || player.match_bonus > 0, "Zero amount");

        uint256 amount = player.dividends + player.match_bonus;
        uint256 marketingFee = amount / 300; // 3% marketing fee
        uint256 withdrawAmount = amount - marketingFee;

     

        player.dividends = 0;
        player.match_bonus = 0;
        player.total_withdrawn += withdrawAmount;
        withdrawn += withdrawAmount;
        marketing_fees += marketingFee;


        payable(MARKETING_WALLET).transfer(marketingFee);
        payable(msg.sender).transfer(withdrawAmount);
        
        emit Withdraw(msg.sender, withdrawAmount);
    }

    /**
     * @dev Calculates the current ROI earnings for a user
     * @param _addr User address to calculate earnings for
     * @return value Total pending ROI earnings in ETH
     *
     * Calculation Method:
     * - 1% daily ROI (0.01 = 10/1000)
     * - Prorated to the second (86400 seconds per day)
     * - Calculated separately for each active deposit
     * - Time period: from last payout (or deposit time) to current block time
     * - Automatically handles multiple deposits with different start times
     */
    function payoutOf(address _addr) view external returns(uint256 value) {
        Player storage player = players[_addr];

        for(uint256 i = 0; i < player.deposits.length; i++) {
            Deposit storage dep = player.deposits[i];

            uint256 from = player.last_payout > dep.time ? player.last_payout : dep.time;
            uint256 to = block.timestamp;

            if(from < to) {
                // Calculate 1% daily ROI
                // 1% = 0.01 = 10/1000
                // 86400 seconds in a day
                value += (dep.amount * (to - from) * 10) / (86400 * 1000);
            }
        }

        return value;
    }
    
    /**
     * @dev Retrieves comprehensive information about a user's account
     * @param _addr User address to get information for
     * @return for_withdraw Total available to withdraw (ROI + dividends + match bonus)
     * @return total_invested Total amount invested by user
     * @return total_withdrawn Total amount withdrawn by user
     * @return total_match_bonus Total referral bonuses earned
     * @return structure Array of referral counts at each level [L1, L2, L3, L4, L5]
     *
     * This function aggregates all user statistics including:
     * - Current ROI earnings
     * - Investment history
     * - Withdrawal history
     * - Referral earnings
     * - Referral structure
     */
    function userInfo(address _addr) view external returns(uint256 for_withdraw, uint256 total_invested, uint256 total_withdrawn, uint256 total_match_bonus, uint256[BONUS_LINES_COUNT] memory structure) {
        Player storage player = players[_addr];

        uint256 payout = this.payoutOf(_addr);

        for(uint8 i = 0; i < ref_bonuses.length; i++) {
            structure[i] = player.structure[i];
        }

        return (
            payout + player.dividends + player.match_bonus,
            player.total_invested,
            player.total_withdrawn,
            player.total_match_bonus,
            structure
        );
    }

    /**
     * @dev Retrieves global contract statistics
     * @return _invested Total ETH invested in the protocol
     * @return _withdrawn Total ETH withdrawn from the protocol
     * @return _match_bonus Total referral bonuses paid out
     *
     * This function provides transparency into the protocol's overall metrics
     * All values are cumulative since contract deployment
     */
    function contractInfo() view external returns(uint256 _invested, uint256 _withdrawn, uint256 _match_bonus) {
        return (invested, withdrawn, match_bonus);
    }

    /**
     * @dev Retrieves all stakers count
     * @return Total stakers count
     */
    function getTotalStakers() external view returns (uint256) {
        return stakers.length;
    }
}

Read Contract

MARKETING_WALLET 0xc6859d07 → address
contractInfo 0x15c43aaf → uint256, uint256, uint256
getTotalStakers 0x31ed0db4 → uint256
invested 0xcafb2202 → uint256
marketing_fees 0x5432b620 → uint256
match_bonus 0xc8084dd1 → uint256
owner 0x8da5cb5b → address
payoutOf 0x6da61d1e → uint256
players 0xe2eb41ff → address, uint256, uint256, uint256, uint256, uint256, uint256
ref_bonuses 0xb7d9f0d2 → uint256
stakers 0xfd5e6dd1 → address
userInfo 0x1959a002 → uint256, uint256, uint256, uint256, uint256[5]
withdrawn 0xc80ec522 → uint256

Write Contract 2 functions

These functions modify contract state and require a wallet transaction to execute.

deposit 0xf340fa01
address _upline
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address