ETH Price: $3,252.91 (+2.44%)
Gas: 3 Gwei

Contract

0xEBB060F9D0029082a04F78D84b9FB9d3d26F9a93
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Bct Tok...130955212021-08-25 16:22:021065 days ago1629908522IN
0xEBB060F9...3d26F9a93
0 ETH0.00913515208
Transfer Bct Tok...121398202021-03-30 9:29:361213 days ago1617096576IN
0xEBB060F9...3d26F9a93
0 ETH0.00637509142
Transfer Ownersh...121397832021-03-30 9:19:381213 days ago1617095978IN
0xEBB060F9...3d26F9a93
0 ETH0.00445354142
Transfer Bct Tok...92983592020-01-17 11:06:341651 days ago1579259194IN
0xEBB060F9...3d26F9a93
0 ETH0.000137752.3
Transfer Bct Tok...92983252020-01-17 10:55:391651 days ago1579258539IN
0xEBB060F9...3d26F9a93
0 ETH0.000239494.0002
Set Rate79707712019-06-16 17:05:011866 days ago1560704701IN
0xEBB060F9...3d26F9a93
0 ETH0.000044512
Set Eth Usd Rate79707332019-06-16 16:56:531866 days ago1560704213IN
0xEBB060F9...3d26F9a93
0 ETH0.00004472
Withdraw Owner74827952019-04-01 13:17:531942 days ago1554124673IN
0xEBB060F9...3d26F9a93
0 ETH0.000072273
Withdraw Owner74827912019-04-01 13:16:061942 days ago1554124566IN
0xEBB060F9...3d26F9a93
0 ETH0.000096393
Transfer Token O...74827362019-04-01 13:03:231942 days ago1554123803IN
0xEBB060F9...3d26F9a93
0 ETH0.000094233
Transfer Data Ow...74827362019-04-01 13:03:231942 days ago1554123803IN
0xEBB060F9...3d26F9a93
0 ETH0.00009593
Set Eth Usd Rate74825822019-04-01 12:29:441942 days ago1554121784IN
0xEBB060F9...3d26F9a93
0 ETH0.000082073
Set Rate74823502019-04-01 11:39:151942 days ago1554118755IN
0xEBB060F9...3d26F9a93
0 ETH0.000237898
Set Eth Usd Rate74823462019-04-01 11:38:121942 days ago1554118692IN
0xEBB060F9...3d26F9a93
0 ETH0.000218858
Set Rate74821562019-04-01 10:54:281942 days ago1554116068IN
0xEBB060F9...3d26F9a93
0 ETH0.000178426
Set Eth Usd Rate74821372019-04-01 10:48:211942 days ago1554115701IN
0xEBB060F9...3d26F9a93
0 ETH0.000164146
Set Rate74818992019-04-01 9:58:111942 days ago1554112691IN
0xEBB060F9...3d26F9a93
0 ETH0.0002973710
Set Eth Usd Rate74818942019-04-01 9:56:521942 days ago1554112612IN
0xEBB060F9...3d26F9a93
0 ETH0.0002735710
Set Rate74816952019-04-01 9:09:011942 days ago1554109741IN
0xEBB060F9...3d26F9a93
0 ETH0.000237898
Set Eth Usd Rate74816912019-04-01 9:08:021942 days ago1554109682IN
0xEBB060F9...3d26F9a93
0 ETH0.000218858
Set Rate74814772019-04-01 8:18:561943 days ago1554106736IN
0xEBB060F9...3d26F9a93
0 ETH0.000178426
Set Eth Usd Rate74814752019-04-01 8:18:091943 days ago1554106689IN
0xEBB060F9...3d26F9a93
0 ETH0.000164146
Set Rate74812552019-04-01 7:28:091943 days ago1554103689IN
0xEBB060F9...3d26F9a93
0 ETH0.000089213
Set Eth Usd Rate74812482019-04-01 7:26:071943 days ago1554103567IN
0xEBB060F9...3d26F9a93
0 ETH0.000082073
Invite74812202019-04-01 7:18:551943 days ago1554103135IN
0xEBB060F9...3d26F9a93
0 ETH0.000169273
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
74827912019-04-01 13:16:061942 days ago1554124566
0xEBB060F9...3d26F9a93
73.83629347 ETH
74757412019-03-31 11:04:241943 days ago1554030264
0xEBB060F9...3d26F9a93
17.15468959 ETH
74756922019-03-31 10:55:461943 days ago1554029746
0xEBB060F9...3d26F9a93
0.05669666 ETH
74756852019-03-31 10:54:531943 days ago1554029693
0xEBB060F9...3d26F9a93
0.24395166 ETH
74755612019-03-31 10:28:011943 days ago1554028081
0xEBB060F9...3d26F9a93
0.43979333 ETH
74755452019-03-31 10:24:551943 days ago1554027895
0xEBB060F9...3d26F9a93
0.49775166 ETH
74722132019-03-30 21:52:101944 days ago1553982730
0xEBB060F9...3d26F9a93
0.346 ETH
74721892019-03-30 21:45:511944 days ago1553982351
0xEBB060F9...3d26F9a93
0.34705 ETH
74721762019-03-30 21:42:031944 days ago1553982123
0xEBB060F9...3d26F9a93
0.34705 ETH
74721702019-03-30 21:40:341944 days ago1553982034
0xEBB060F9...3d26F9a93
0.34705 ETH
74721542019-03-30 21:37:441944 days ago1553981864
0xEBB060F9...3d26F9a93
0.34705 ETH
74721432019-03-30 21:34:541944 days ago1553981694
0xEBB060F9...3d26F9a93
0.34705 ETH
74701532019-03-30 14:14:091944 days ago1553955249
0xEBB060F9...3d26F9a93
0.34742 ETH
74700692019-03-30 13:55:591944 days ago1553954159
0xEBB060F9...3d26F9a93
0.34742 ETH
74699512019-03-30 13:28:051944 days ago1553952485
0xEBB060F9...3d26F9a93
1.03827 ETH
74693912019-03-30 11:15:321944 days ago1553944532
0xEBB060F9...3d26F9a93
0.36 ETH
74648312019-03-29 17:54:201945 days ago1553882060
0xEBB060F9...3d26F9a93
0.35063 ETH
74648252019-03-29 17:53:411945 days ago1553882021
0xEBB060F9...3d26F9a93
0.35063 ETH
74647632019-03-29 17:39:471945 days ago1553881187
0xEBB060F9...3d26F9a93
0.35087 ETH
74624272019-03-29 8:50:511945 days ago1553849451
0xEBB060F9...3d26F9a93
0.37 ETH
74569102019-03-28 12:06:371946 days ago1553774797
0xEBB060F9...3d26F9a93
0.358 ETH
74568942019-03-28 12:04:201946 days ago1553774660
0xEBB060F9...3d26F9a93
0.358 ETH
74568702019-03-28 11:59:241946 days ago1553774364
0xEBB060F9...3d26F9a93
0.358 ETH
74519622019-03-27 17:29:471947 days ago1553707787
0xEBB060F9...3d26F9a93
0.35889 ETH
74519372019-03-27 17:25:231947 days ago1553707523
0xEBB060F9...3d26F9a93
0.35889 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Referral

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-08-07
*/

pragma solidity ^0.4.24;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address public owner;


    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );


    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor() public {
        owner = msg.sender;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function transferOwnership(address _newOwner) public onlyOwner {
        _transferOwnership(_newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param _newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address _newOwner) internal {
        require(_newOwner != address(0));
        emit OwnershipTransferred(owner, _newOwner);
        owner = _newOwner;
    }
}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        c = a * b;
        assert(c / a == b);
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        // uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return a / b;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        assert(c >= a);
        return c;
    }
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * See https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
    function totalSupply() public view returns (uint256);
    function balanceOf(address who) public view returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender)
    public view returns (uint256);

    function transferFrom(address from, address to, uint256 value)
    public returns (bool);

    function approve(address spender, uint256 value) public returns (bool);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
    using SafeMath for uint256;

    mapping(address => uint256) balances;

    uint256 totalSupply_;

    /**
    * @dev Total number of tokens in existence
    */
    function totalSupply() public view returns (uint256) {
        return totalSupply_;
    }

    /**
    * @dev Transfer token for a specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) public returns (bool) {
        require(_value <= balances[msg.sender]);
        require(_to != address(0));

        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
    * @dev Gets the balance of the specified address.
    * @param _owner The address to query the the balance of.
    * @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address _owner) public view returns (uint256) {
        return balances[_owner];
    }

}

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/issues/20
 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

    mapping (address => mapping (address => uint256)) internal allowed;


    /**
     * @dev Transfer tokens from one address to another
     * @param _from address The address which you want to send tokens from
     * @param _to address The address which you want to transfer to
     * @param _value uint256 the amount of tokens to be transferred
     */
    function transferFrom(
        address _from,
        address _to,
        uint256 _value
    )
        public
        returns (bool)
    {
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);
        require(_to != address(0));

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        emit Transfer(_from, _to, _value);
        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     * Beware that changing an allowance with this method brings the risk that someone may use both the old
     * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param _spender The address which will spend the funds.
     * @param _value The amount of tokens to be spent.
     */
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param _owner address The address which owns the funds.
     * @param _spender address The address which will spend the funds.
     * @return A uint256 specifying the amount of tokens still available for the spender.
     */
    function allowance(
        address _owner,
        address _spender
    )
        public
        view
        returns (uint256)
    {
        return allowed[_owner][_spender];
    }

    /**
     * @dev Increase the amount of tokens that an owner allowed to a spender.
     * approve should be called when allowed[_spender] == 0. To increment
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _addedValue The amount of tokens to increase the allowance by.
     */
    function increaseApproval(
        address _spender,
        uint256 _addedValue
    )
        public
        returns (bool)
    {
        allowed[msg.sender][_spender] = (
        allowed[msg.sender][_spender].add(_addedValue));
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /**
     * @dev Decrease the amount of tokens that an owner allowed to a spender.
     * approve should be called when allowed[_spender] == 0. To decrement
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseApproval(
        address _spender,
        uint256 _subtractedValue
    )
        public
        returns (bool)
    {
        uint256 oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue >= oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

}

contract BlockchainToken is StandardToken, Ownable {

    string public constant name = 'Blockchain Token 2.0';

    string public constant symbol = 'BCT';

    uint32 public constant decimals = 18;

    /**
     *  how many USD cents for 1 * 10^18 token
     */
    uint public price = 210;

    function setPrice(uint _price) onlyOwner public {
        price = _price;
    }

    uint256 public INITIAL_SUPPLY = 21000000 * 1 ether;

    /**
   * @dev Constructor that gives msg.sender all of existing tokens.
   */
    constructor() public {
        totalSupply_ = INITIAL_SUPPLY;
        balances[msg.sender] = INITIAL_SUPPLY;
        emit Transfer(address(0), msg.sender, INITIAL_SUPPLY);
    }

}

/**
 * @title Mintable token
 * @dev Simple ERC20 Token example, with mintable token creation
 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
 */
contract MintableToken is StandardToken, Ownable {
    event Mint(address indexed to, uint256 amount);
    event Burn(address indexed burner, uint256 value);
    event MintFinished();

    bool public mintingFinished = false;


    modifier canMint() {
        require(!mintingFinished);
        _;
    }

    modifier hasMintPermission() {
        require(msg.sender == owner);
        _;
    }

    /**
     * @dev Function to mint tokens
     * @param _to The address that will receive the minted tokens.
     * @param _amount The amount of tokens to mint.
     * @return A boolean that indicates if the operation was successful.
     */
    function mint(
        address _to,
        uint256 _amount
    )
        public
        hasMintPermission
        canMint
        returns (bool)
    {
        totalSupply_ = totalSupply_.add(_amount);
        balances[_to] = balances[_to].add(_amount);
        emit Mint(_to, _amount);
        emit Transfer(address(0), _to, _amount);
        return true;
    }

    /**
     * @dev Burns a specific amount of tokens.
     * @param _addr The address that will have _amount of tokens burned
     * @param _value The amount of token to be burned.
     */
    function burn(
        address _addr,
        uint256 _value
    )
        public onlyOwner
    {
        _burn(_addr, _value);
    }

    function _burn(
        address _who,
        uint256 _value
    )
        internal
    {
        require(_value <= balances[_who]);
        // no need to require value <= totalSupply, since that would imply the
        // sender's balance is greater than the totalSupply, which *should* be an assertion failure

        balances[_who] = balances[_who].sub(_value);
        totalSupply_ = totalSupply_.sub(_value);
        emit Burn(_who, _value);
        emit Transfer(_who, address(0), _value);
    }

    /**
     * @dev Function to stop minting new tokens.
     * @return True if the operation was successful.
     */
    function finishMinting() public onlyOwner canMint returns (bool) {
        mintingFinished = true;
        emit MintFinished();
        return true;
    }
}

contract WealthBuilderToken is MintableToken {

    string public name = 'Wealth Builder Token';

    string public symbol = 'WBT';

    uint32 public decimals = 18;

    /**
     *  how many {tokens*10^(-18)} get per 1wei
     */
    uint public rate = 10 ** 7;
    /**
     *  multiplicator for rate
     */
    uint public mrate = 10 ** 7;

    function setRate(uint _rate) onlyOwner public {
        rate = _rate;
    }

}

contract Data is Ownable {

    // node => its parent
    mapping (address => address) private parent;

    // node => its status
    mapping (address => uint8) public statuses;

    // node => sum of all his child deposits in USD cents
    mapping (address => uint) public referralDeposits;

    // client => balance in wei*10^(-6) available for withdrawal
    mapping(address => uint256) private balances;

    // investor => balance in wei*10^(-6) available for withdrawal
    mapping(address => uint256) private investorBalances;

    function parentOf(address _addr) public constant returns (address) {
        return parent[_addr];
    }

    function balanceOf(address _addr) public constant returns (uint256) {
        return balances[_addr] / 1000000;
    }

    function investorBalanceOf(address _addr) public constant returns (uint256) {
        return investorBalances[_addr] / 1000000;
    }

    /**
     * @dev The Data constructor to set up the first depositer
     */
    constructor() public {
        // DirectorOfRegion - 7
        statuses[msg.sender] = 7;
    }

    function addBalance(address _addr, uint256 amount) onlyOwner public {
        balances[_addr] += amount;
    }

    function subtrBalance(address _addr, uint256 amount) onlyOwner public {
        require(balances[_addr] >= amount);
        balances[_addr] -= amount;
    }

    function addInvestorBalance(address _addr, uint256 amount) onlyOwner public {
        investorBalances[_addr] += amount;
    }

    function subtrInvestorBalance(address _addr, uint256 amount) onlyOwner public {
        require(investorBalances[_addr] >= amount);
        investorBalances[_addr] -= amount;
    }

    function addReferralDeposit(address _addr, uint256 amount) onlyOwner public {
        referralDeposits[_addr] += amount;
    }

    function subtrReferralDeposit(address _addr, uint256 amount) onlyOwner public {
        referralDeposits[_addr] -= amount;
    }

    function setStatus(address _addr, uint8 _status) onlyOwner public {
        statuses[_addr] = _status;
    }

    function setParent(address _addr, address _parent) onlyOwner public {
        parent[_addr] = _parent;
    }

}

contract Declaration {

    // threshold in USD => status
    mapping (uint => uint8) statusThreshold;

    // status => (depositsNumber => percentage / 10)
    mapping (uint8 => mapping (uint16 => uint256)) feeDistribution;

    // status thresholds in USD
    uint[8] thresholds = [
    0, 5000, 35000, 150000, 500000, 2500000, 5000000, 10000000
    ];

    uint[5] referralFees = [50, 30, 20, 10, 5];
    uint[5] serviceFees = [25, 20, 15, 10, 5];


    /**
     * @dev The Declaration constructor to define some constants
     */
    constructor() public {
        setFeeDistributionsAndStatusThresholds();
    }


    /**
     * @dev Set up fee distribution & status thresholds
     */
    function setFeeDistributionsAndStatusThresholds() private {
        // Agent - 0
        setFeeDistributionAndStatusThreshold(0, [uint16(120), uint16(80), uint16(50), uint16(20), uint16(10)], thresholds[0]);
        // SilverAgent - 1
        setFeeDistributionAndStatusThreshold(1, [uint16(160), uint16(100), uint16(60), uint16(30), uint16(20)], thresholds[1]);
        // Manager - 2
        setFeeDistributionAndStatusThreshold(2, [uint16(200), uint16(120), uint16(80), uint16(40), uint16(25)], thresholds[2]);
        // ManagerOfGroup - 3
        setFeeDistributionAndStatusThreshold(3, [uint16(250), uint16(150), uint16(100), uint16(50), uint16(30)], thresholds[3]);
        // ManagerOfRegion - 4
        setFeeDistributionAndStatusThreshold(4, [300, 180, 120, 60, 35], thresholds[4]);
        // Director - 5
        setFeeDistributionAndStatusThreshold(5, [350, 210, 140, 70, 40], thresholds[5]);
        // DirectorOfGroup - 6
        setFeeDistributionAndStatusThreshold(6, [400, 240, 160, 80, 45], thresholds[6]);
        // DirectorOfRegion - 7
        setFeeDistributionAndStatusThreshold(7, [500, 300, 200, 100, 50], thresholds[7]);
    }


    /**
     * @dev Set up specific fee and status threshold
     * @param _st The status to set up for
     * @param _percentages Array of pecentages, which should go to member
     * @param _threshold The minimum amount of sum of children deposits to get
     *                   the status _st
     */
    function setFeeDistributionAndStatusThreshold(
        uint8 _st,
        uint16[5] _percentages,
        uint _threshold
    )
        private
    {
        statusThreshold[_threshold] = _st;
        for (uint8 i = 0; i < _percentages.length; i++) {
            feeDistribution[_st][i] = _percentages[i];
        }
    }

}

contract Referral is Declaration, Ownable {

    using SafeMath for uint;

    // reference to WBT token contract
    WealthBuilderToken private wbtToken;

    // reference to BCT2.0 token contract
    BlockchainToken private bctToken;

    // reference to data contract
    Data private data;

    /**
     *  how many USD cents get per ETH
     */
    uint public ethUsdRate;

    /**
     * @dev The Referral constructor to set up the first depositer,
     * reference to system wbt token, bct token, data and set ethUsdRate
     */
    constructor(
        uint _ethUsdRate,
        address _wbtToken,
        address _bctToken,
        address _data
    )
        public
    {
        ethUsdRate = _ethUsdRate;

        // instantiate wbtToken & data contracts
        wbtToken = WealthBuilderToken(_wbtToken);
        bctToken = BlockchainToken(_bctToken);
        data = Data(_data);
    }

    /**
     * @dev Callback function
     */
    function() payable public {
    }

    /**
     * @dev invest wbt token function
     * @param _client to transfer WBT token
     * @param _depositsCount num of the deposit
     */
    function invest(
        address _client,
        uint8 _depositsCount
    )
        payable public
    {
        uint amount = msg.value;

        // if less then 5 deposits
        if (_depositsCount < 5) {

            uint serviceFee;

            serviceFee = amount * serviceFees[_depositsCount];

            uint referralFee = amount * referralFees[_depositsCount];

            // distribute deposit fee among users above on the branch & update users' statuses
            distribute(data.parentOf(_client), 0, _depositsCount, amount);

            // update balance & number of deposits of user
            uint active = (amount * 100).sub(referralFee).sub(serviceFee);

            wbtToken.mint(_client, active / 100 * wbtToken.rate() / wbtToken.mrate());

            // update owner`s balance
            data.addBalance(owner, serviceFee * 10000);
        } else {
            wbtToken.mint(_client, amount * wbtToken.rate() / wbtToken.mrate());
        }
    }

    /**
     * @dev invest bct token function
     * @param _client to transfer BCT token
     */
    function investBct(
        address _client
    )
        public payable
    {
        uint amount = msg.value;
        // distribute deposit fee among users above on the branch & update users' statuses
        distribute(data.parentOf(_client), 0, 0, amount);

        bctToken.transfer(_client, amount * ethUsdRate / bctToken.price());
    }


    /**
     * @dev Recursively distribute deposit fee between parents
     * @param _node Parent address
     * @param _prevPercentage The percentage for previous parent
     * @param _depositsCount Count of depositer deposits
     * @param _amount The amount of deposit
     */
    function distribute(
        address _node,
        uint _prevPercentage,
        uint8 _depositsCount,
        uint _amount
    )
        private
    {
        address node = _node;
        uint prevPercentage = _prevPercentage;

        // distribute deposit fee among users above on the branch & update users' statuses
        while(node != address(0)) {
            uint8 status = data.statuses(node);

            // count fee percentage of current node
            uint nodePercentage = feeDistribution[status][_depositsCount];
            uint percentage = nodePercentage.sub(prevPercentage);
            data.addBalance(node, _amount * percentage * 1000);

            //update refferals sum amount
            data.addReferralDeposit(node, _amount * ethUsdRate / 10**18);

            //update status
            updateStatus(node, status);

            node = data.parentOf(node);
            prevPercentage = nodePercentage;
        }
    }


    /**
     * @dev Update node status if children sum amount is enough
     * @param _node Node address
     * @param _status Node current status
     */
    function updateStatus(
        address _node,
        uint8 _status
    )
        private
    {
        uint refDep = data.referralDeposits(_node);

        for (uint i = thresholds.length - 1; i > _status; i--) {
            uint threshold = thresholds[i] * 100;

            if (refDep >= threshold) {
                data.setStatus(_node, statusThreshold[thresholds[i]]);
                break;
            }
        }
    }


    /**
     * @dev Set wbtToken exchange rate
     * @param _rate wbt/eth rate
     */
    function setRate(
        uint _rate
    )
        onlyOwner public
    {
        wbtToken.setRate(_rate);
    }


    /**
     * @dev Set bctToken price
     * @param _price bct/usd rate
     */
    function setPrice(
        uint _price
    )
        onlyOwner public
    {
        bctToken.setPrice(_price);
    }


    /**
     * @dev Set ETH exchange rate
     * @param _ethUsdRate eth/usd rate
     */
    function setEthUsdRate(
        uint _ethUsdRate
    )
        onlyOwner public
    {
        ethUsdRate = _ethUsdRate;
    }


    /**
     * @dev Add new child
     * @param _inviter parent
     * @param _invitee child
     */
    function invite(
        address _inviter,
        address _invitee
    )
        public onlyOwner
    {
        data.setParent(_invitee, _inviter);
        // Agent - 0
        data.setStatus(_invitee, 0);
    }


    /**
     * @dev Set _status for _addr
     * @param _addr address
     * @param _status ref. status
     */
    function setStatus(
        address _addr,
        uint8 _status
    )
        public onlyOwner
    {
        data.setStatus(_addr, _status);
    }


    /**
     * @dev Withdraw _amount for _addr
     * @param _addr withdrawal address
     * @param _amount withdrawal amount
     * @param investor is investor
     */
    function withdraw(
        address _addr,
        uint256 _amount,
        bool investor
    )
        public onlyOwner
    {
        uint amount = investor ? data.investorBalanceOf(_addr) : data.balanceOf(_addr);
        require(amount >= _amount && address(this).balance >= _amount);

        if (investor) {
            data.subtrInvestorBalance(_addr, _amount * 1000000);
        } else {
            data.subtrBalance(_addr, _amount * 1000000);
        }

        _addr.transfer(_amount);
    }


    /**
     * @dev Withdraw contract balance to _addr
     * @param _addr withdrawal address
     */
    function withdrawOwner(
        address _addr,
        uint256 _amount
    )
        public onlyOwner
    {
        require(address(this).balance >= _amount);
        _addr.transfer(_amount);
    }


    /**
     * @dev Withdraw corresponding amount of ETH to _addr and burn _value tokens
     * @param _addr buyer address
     * @param _amount amount of tokens to buy
     */
    function transferBctToken(
        address _addr,
        uint _amount
    )
        onlyOwner public
    {
        require(bctToken.balanceOf(this) >= _amount);
        bctToken.transfer(_addr, _amount);
    }


    /**
     * @dev Withdraw corresponding amount of ETH to _addr and burn _value tokens
     * @param _addr withdrawal address
     * @param _amount amount of tokens to sell
     */
    function withdrawWbtToken(
        address _addr,
        uint256 _amount
    )
        onlyOwner public
    {
        wbtToken.burn(_addr, _amount);
        uint256 etherValue = _amount * wbtToken.mrate() / wbtToken.rate();
        _addr.transfer(etherValue);
    }


    /**
     * @dev Transfer ownership of wbtToken contract to _addr
     * @param _addr address
     */
    function transferTokenOwnership(
        address _addr
    )
        onlyOwner public
    {
        wbtToken.transferOwnership(_addr);
    }


    /**
     * @dev Transfer ownership of data contract to _addr
     * @param _addr address
     */
    function transferDataOwnership(
        address _addr
    )
        onlyOwner public
    {
        data.transferOwnership(_addr);
    }

}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"transferTokenOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_status","type":"uint8"}],"name":"setStatus","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ethUsdRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"address"},{"name":"_depositsCount","type":"uint8"}],"name":"invest","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferBctToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_inviter","type":"address"},{"name":"_invitee","type":"address"}],"name":"invite","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_client","type":"address"}],"name":"investBct","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawWbtToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"}],"name":"transferDataOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_amount","type":"uint256"},{"name":"investor","type":"bool"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_ethUsdRate","type":"uint256"}],"name":"setEthUsdRate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_ethUsdRate","type":"uint256"},{"name":"_wbtToken","type":"address"},{"name":"_bctToken","type":"address"},{"name":"_data","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

6101806040526000608090815261138860a0526188b860c052620249f060e0526207a12061010052622625a061012052624c4b406101405262989680610160526200004f906002906008620003cf565b506040805160a08101825260328152601e6020820152601491810191909152600a606082018190526005608083018190526200008c929062000419565b506040805160a0810182526019815260146020820152600f918101829052600a6060820152600560808201819052620000c792919062000419565b50348015620000d557600080fd5b5060405160808062001d3f83398101604090815281516020830151918301516060909301519092906200011064010000000062000161810204565b6014805433600160a060020a031991821617909155601894909455601580548516600160a060020a03948516179055601680548516928416929092179091556017805490931691161790556200046f565b6040805160a081018252607881526050602082015260329181019190915260146060820152600a6080820152620001aa906000906002825b015464010000000062000359810204565b6040805160a08181018352815260646020820152603c91810191909152601e606082015260146080820152620001e69060019060028262000199565b6040805160a08101825260c881526078602082015260509181019190915260286060820152601960808201526200022290600290818062000199565b6040805160a08101825260fa81526096602082015260649181019190915260326060820152601e60808201526200025f9060039060028262000199565b6040805160a08101825261012c815260b46020820152607891810191909152603c6060820152602360808201526200029d9060049060028262000199565b6040805160a08101825261015e815260d26020820152608c918101919091526046606082015260286080820152620002db9060059060028262000199565b6040805160a08181018352610190825260f060208301529181019190915260506060820152602d6080820152620003189060069060028262000199565b6040805160a0810182526101f4815261012c602082015260c8918101919091526064606082015260326080820152620003579060079060028262000199565b565b6000818152602081905260408120805460ff191660ff86161790555b60058160ff161015620003c9578260ff8216600581106200039257fe5b6020908102919091015160ff8087166000908152600180855260408083209387168352929094522061ffff90911690550162000375565b50505050565b826008810192821562000407579160200282015b8281111562000407578251829062ffffff16905591602001919060010190620003e3565b50620004159291506200044f565b5090565b826005810192821562000407579160200282015b8281111562000407578251829060ff169055916020019190600101906200042d565b6200046c91905b8082111562000415576000815560010162000456565b90565b6118c0806200047f6000396000f3006080604052600436106100cc5763ffffffff60e060020a60003504166321e6b53d81146100ce578063278e07ce146100ef57806334fcf437146101165780633b478fc51461012e578063581c5ae6146101555780635cbb122c1461016f5780636f4c6443146101935780638da5cb5b146101ba57806391b7f5ed146101eb578063a388541314610203578063a671277814610227578063c307f6ba1461023b578063e4952ddb1461025f578063ead5d35914610280578063f2fde38b146102a9578063fb6f93a4146102ca575b005b3480156100da57600080fd5b506100cc600160a060020a03600435166102e2565b3480156100fb57600080fd5b506100cc600160a060020a036004351660ff6024351661037b565b34801561012257600080fd5b506100cc60043561041e565b34801561013a57600080fd5b5061014361049b565b60408051918252519081900360200190f35b6100cc600160a060020a036004351660ff602435166104a1565b34801561017b57600080fd5b506100cc600160a060020a0360043516602435610994565b34801561019f57600080fd5b506100cc600160a060020a0360043581169060243516610ae6565b3480156101c657600080fd5b506101cf610bee565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100cc600435610bfd565b34801561020f57600080fd5b506100cc600160a060020a0360043516602435610c7a565b6100cc600160a060020a0360043516610cda565b34801561024757600080fd5b506100cc600160a060020a0360043516602435610e70565b34801561026b57600080fd5b506100cc600160a060020a0360043516611060565b34801561028c57600080fd5b506100cc600160a060020a036004351660243560443515156110de565b3480156102b557600080fd5b506100cc600160a060020a036004351661139f565b3480156102d657600080fd5b506100cc6004356113c2565b601454600160a060020a031633146102f957600080fd5b601554604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b5050505050565b601454600160a060020a0316331461039257600080fd5b601754604080517f278e07ce000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015260ff851660248301529151919092169163278e07ce91604480830192600092919082900301818387803b15801561040257600080fd5b505af1158015610416573d6000803e3d6000fd5b505050505050565b601454600160a060020a0316331461043557600080fd5b601554604080517f34fcf437000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a03909216916334fcf4379160248082019260009290919082900301818387803b15801561036057600080fd5b60185481565b3460008080600560ff861610156107e357600f60ff8616600581106104c257fe5b015484029250600a60ff8616600581106104d857fe5b0154601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a038a811660048301529151938802955061058093919092169163ee08388e9160248083019260209291908290030181600087803b15801561054b57600080fd5b505af115801561055f573d6000803e3d6000fd5b505050506040513d602081101561057557600080fd5b5051600087876113de565b6105a383610597606487028563ffffffff61169616565b9063ffffffff61169616565b601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051929350600160a060020a03909116916340c10f19918991849162f3e7179160048083019260209291908290030181600087803b15801561060d57600080fd5b505af1158015610621573d6000803e3d6000fd5b505050506040513d602081101561063757600080fd5b5051601554604080517f2c4e722e0000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691632c4e722e916004808201926020929091908290030181600087803b15801561069957600080fd5b505af11580156106ad573d6000803e3d6000fd5b505050506040513d60208110156106c357600080fd5b505160648604028115156106d357fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b505050506040513d602081101561075057600080fd5b5050601754601454604080517f21e5383a000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015261271087026024820152905191909216916321e5383a91604480830192600092919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b50505050610416565b601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216916340c10f19918991849162f3e7179160048083019260209291908290030181600087803b15801561084a57600080fd5b505af115801561085e573d6000803e3d6000fd5b505050506040513d602081101561087457600080fd5b5051601554604080517f2c4e722e0000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691632c4e722e916004808201926020929091908290030181600087803b1580156108d657600080fd5b505af11580156108ea573d6000803e3d6000fd5b505050506040513d602081101561090057600080fd5b5051880281151561090d57fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561096057600080fd5b505af1158015610974573d6000803e3d6000fd5b505050506040513d602081101561098a57600080fd5b5050505050505050565b601454600160a060020a031633146109ab57600080fd5b601654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518392600160a060020a0316916370a082319160248083019260209291908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511015610a4757600080fd5b601654604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610ab657600080fd5b505af1158015610aca573d6000803e3d6000fd5b505050506040513d6020811015610ae057600080fd5b50505050565b601454600160a060020a03163314610afd57600080fd5b601754604080517fb3204b8b000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015285811660248301529151919092169163b3204b8b91604480830192600092919082900301818387803b158015610b6c57600080fd5b505af1158015610b80573d6000803e3d6000fd5b5050601754604080517f278e07ce000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260006024830181905292519316945063278e07ce93506044808201939182900301818387803b15801561040257600080fd5b601454600160a060020a031681565b601454600160a060020a03163314610c1457600080fd5b601654604080517f91b7f5ed000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a03909216916391b7f5ed9160248082019260009290919082900301818387803b15801561036057600080fd5b601454600160a060020a03163314610c9157600080fd5b3031811115610c9f57600080fd5b604051600160a060020a0383169082156108fc029083906000818181858888f19350505050158015610cd5573d6000803e3d6000fd5b505050565b601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015291513493610d7a93169163ee08388e9160248083019260209291908290030181600087803b158015610d4557600080fd5b505af1158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b5051600080846113de565b601654604080517fa035b1fe0000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169163a9059cbb918591849163a035b1fe9160048083019260209291908290030181600087803b158015610de357600080fd5b505af1158015610df7573d6000803e3d6000fd5b505050506040513d6020811015610e0d57600080fd5b50516018548502811515610e1d57fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610ab657600080fd5b601454600090600160a060020a03163314610e8a57600080fd5b601554604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820186905291519190921691639dc29fac91604480830192600092919082900301818387803b158015610ef857600080fd5b505af1158015610f0c573d6000803e3d6000fd5b50505050601560009054906101000a9004600160a060020a0316600160a060020a0316632c4e722e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610f6357600080fd5b505af1158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b5051601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169162f3e717916004808201926020929091908290030181600087803b158015610fed57600080fd5b505af1158015611001573d6000803e3d6000fd5b505050506040513d602081101561101757600080fd5b5051830281151561102457fe5b04905082600160a060020a03166108fc829081150290604051600060405180830381858888f19350505050158015610ae0573d6000803e3d6000fd5b601454600160a060020a0316331461107757600080fd5b601754604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561036057600080fd5b601454600090600160a060020a031633146110f857600080fd5b8161119657601754604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152915191909216916370a082319160248083019260209291908290030181600087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b505050506040513d602081101561118f57600080fd5b505161122b565b601754604080517f61fba37d000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152915191909216916361fba37d9160248083019260209291908290030181600087803b1580156111fe57600080fd5b505af1158015611212573d6000803e3d6000fd5b505050506040513d602081101561122857600080fd5b50515b905082811015801561123e575030318311155b151561124957600080fd5b81156112de57601754604080517f0452396c000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152620f42408702602483015291519190921691630452396c91604480830192600092919082900301818387803b1580156112c157600080fd5b505af11580156112d5573d6000803e3d6000fd5b50505050611369565b601754604080517f5a6af33b000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152620f42408702602483015291519190921691635a6af33b91604480830192600092919082900301818387803b15801561135057600080fd5b505af1158015611364573d6000803e3d6000fd5b505050505b604051600160a060020a0385169084156108fc029085906000818181858888f19350505050158015610374573d6000803e3d6000fd5b601454600160a060020a031633146113b657600080fd5b6113bf816116a8565b50565b601454600160a060020a031633146113d957600080fd5b601855565b8383600080805b600160a060020a0385161561168b57601754604080517faf11c1f0000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163af11c1f09160248083019260209291908290030181600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b505050506040513d602081101561148657600080fd5b505160ff8082166000908152600160209081526040808320938c168352929052205490935091506114bd828563ffffffff61169616565b601754604080517f21e5383a000000000000000000000000000000000000000000000000000000008152600160a060020a0389811660048301526103e88b860202602483015291519394509116916321e5383a9160448082019260009290919082900301818387803b15801561153257600080fd5b505af1158015611546573d6000803e3d6000fd5b5050601754601854604080517fa7f1b77a000000000000000000000000000000000000000000000000000000008152600160a060020a038b81166004830152670de0b6b3a7640000938d02939093046024820152905191909216935063a7f1b77a9250604480830192600092919082900301818387803b1580156115c957600080fd5b505af11580156115dd573d6000803e3d6000fd5b505050506115eb8584611726565b601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163ee08388e9160248083019260209291908290030181600087803b15801561165357600080fd5b505af1158015611667573d6000803e3d6000fd5b505050506040513d602081101561167d57600080fd5b5051945090925082906113e5565b505050505050505050565b6000828211156116a257fe5b50900390565b600160a060020a03811615156116bd57600080fd5b601454604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36014805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b601754604080517f6244cfa4000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152915160009384938493911691636244cfa49160248082019260209290919082900301818787803b15801561179357600080fd5b505af11580156117a7573d6000803e3d6000fd5b505050506040513d60208110156117bd57600080fd5b50519250600791505b8360ff1682111561037457600282600881106117de57fe5b0154606402905080831061188857601754600160a060020a031663278e07ce866000806002876008811061180e57fe5b0154815260208101919091526040908101600090812054825160e060020a63ffffffff8716028152600160a060020a03909416600485015260ff166024840152905160448084019382900301818387803b15801561186b57600080fd5b505af115801561187f573d6000803e3d6000fd5b50505050610374565b600019909101906117c65600a165627a7a72305820bba32abb07ae2cf88961ad327fb68ff2d9053bbcd8553390d7909bc9d007d0a500290000000000000000000000000000000000000000000000000000000000009e32000000000000000000000000a7cb7f55ece2d1df3379f303f33dd3e1ee593b8f0000000000000000000000005c523d6abe17e98eaa58c2df62a6ec9162f3b9a10000000000000000000000006c3699aeb742bb0a179c0ac1628dedf0b1db8554

Deployed Bytecode

0x6080604052600436106100cc5763ffffffff60e060020a60003504166321e6b53d81146100ce578063278e07ce146100ef57806334fcf437146101165780633b478fc51461012e578063581c5ae6146101555780635cbb122c1461016f5780636f4c6443146101935780638da5cb5b146101ba57806391b7f5ed146101eb578063a388541314610203578063a671277814610227578063c307f6ba1461023b578063e4952ddb1461025f578063ead5d35914610280578063f2fde38b146102a9578063fb6f93a4146102ca575b005b3480156100da57600080fd5b506100cc600160a060020a03600435166102e2565b3480156100fb57600080fd5b506100cc600160a060020a036004351660ff6024351661037b565b34801561012257600080fd5b506100cc60043561041e565b34801561013a57600080fd5b5061014361049b565b60408051918252519081900360200190f35b6100cc600160a060020a036004351660ff602435166104a1565b34801561017b57600080fd5b506100cc600160a060020a0360043516602435610994565b34801561019f57600080fd5b506100cc600160a060020a0360043581169060243516610ae6565b3480156101c657600080fd5b506101cf610bee565b60408051600160a060020a039092168252519081900360200190f35b3480156101f757600080fd5b506100cc600435610bfd565b34801561020f57600080fd5b506100cc600160a060020a0360043516602435610c7a565b6100cc600160a060020a0360043516610cda565b34801561024757600080fd5b506100cc600160a060020a0360043516602435610e70565b34801561026b57600080fd5b506100cc600160a060020a0360043516611060565b34801561028c57600080fd5b506100cc600160a060020a036004351660243560443515156110de565b3480156102b557600080fd5b506100cc600160a060020a036004351661139f565b3480156102d657600080fd5b506100cc6004356113c2565b601454600160a060020a031633146102f957600080fd5b601554604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561036057600080fd5b505af1158015610374573d6000803e3d6000fd5b5050505050565b601454600160a060020a0316331461039257600080fd5b601754604080517f278e07ce000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015260ff851660248301529151919092169163278e07ce91604480830192600092919082900301818387803b15801561040257600080fd5b505af1158015610416573d6000803e3d6000fd5b505050505050565b601454600160a060020a0316331461043557600080fd5b601554604080517f34fcf437000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a03909216916334fcf4379160248082019260009290919082900301818387803b15801561036057600080fd5b60185481565b3460008080600560ff861610156107e357600f60ff8616600581106104c257fe5b015484029250600a60ff8616600581106104d857fe5b0154601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a038a811660048301529151938802955061058093919092169163ee08388e9160248083019260209291908290030181600087803b15801561054b57600080fd5b505af115801561055f573d6000803e3d6000fd5b505050506040513d602081101561057557600080fd5b5051600087876113de565b6105a383610597606487028563ffffffff61169616565b9063ffffffff61169616565b601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051929350600160a060020a03909116916340c10f19918991849162f3e7179160048083019260209291908290030181600087803b15801561060d57600080fd5b505af1158015610621573d6000803e3d6000fd5b505050506040513d602081101561063757600080fd5b5051601554604080517f2c4e722e0000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691632c4e722e916004808201926020929091908290030181600087803b15801561069957600080fd5b505af11580156106ad573d6000803e3d6000fd5b505050506040513d60208110156106c357600080fd5b505160648604028115156106d357fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561072657600080fd5b505af115801561073a573d6000803e3d6000fd5b505050506040513d602081101561075057600080fd5b5050601754601454604080517f21e5383a000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015261271087026024820152905191909216916321e5383a91604480830192600092919082900301818387803b1580156107c657600080fd5b505af11580156107da573d6000803e3d6000fd5b50505050610416565b601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051600160a060020a03909216916340c10f19918991849162f3e7179160048083019260209291908290030181600087803b15801561084a57600080fd5b505af115801561085e573d6000803e3d6000fd5b505050506040513d602081101561087457600080fd5b5051601554604080517f2c4e722e0000000000000000000000000000000000000000000000000000000081529051600160a060020a0390921691632c4e722e916004808201926020929091908290030181600087803b1580156108d657600080fd5b505af11580156108ea573d6000803e3d6000fd5b505050506040513d602081101561090057600080fd5b5051880281151561090d57fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561096057600080fd5b505af1158015610974573d6000803e3d6000fd5b505050506040513d602081101561098a57600080fd5b5050505050505050565b601454600160a060020a031633146109ab57600080fd5b601654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290518392600160a060020a0316916370a082319160248083019260209291908290030181600087803b158015610a1057600080fd5b505af1158015610a24573d6000803e3d6000fd5b505050506040513d6020811015610a3a57600080fd5b50511015610a4757600080fd5b601654604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610ab657600080fd5b505af1158015610aca573d6000803e3d6000fd5b505050506040513d6020811015610ae057600080fd5b50505050565b601454600160a060020a03163314610afd57600080fd5b601754604080517fb3204b8b000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015285811660248301529151919092169163b3204b8b91604480830192600092919082900301818387803b158015610b6c57600080fd5b505af1158015610b80573d6000803e3d6000fd5b5050601754604080517f278e07ce000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260006024830181905292519316945063278e07ce93506044808201939182900301818387803b15801561040257600080fd5b601454600160a060020a031681565b601454600160a060020a03163314610c1457600080fd5b601654604080517f91b7f5ed000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a03909216916391b7f5ed9160248082019260009290919082900301818387803b15801561036057600080fd5b601454600160a060020a03163314610c9157600080fd5b3031811115610c9f57600080fd5b604051600160a060020a0383169082156108fc029083906000818181858888f19350505050158015610cd5573d6000803e3d6000fd5b505050565b601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a03848116600483015291513493610d7a93169163ee08388e9160248083019260209291908290030181600087803b158015610d4557600080fd5b505af1158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b5051600080846113de565b601654604080517fa035b1fe0000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169163a9059cbb918591849163a035b1fe9160048083019260209291908290030181600087803b158015610de357600080fd5b505af1158015610df7573d6000803e3d6000fd5b505050506040513d6020811015610e0d57600080fd5b50516018548502811515610e1d57fe5b046040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b158015610ab657600080fd5b601454600090600160a060020a03163314610e8a57600080fd5b601554604080517f9dc29fac000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820186905291519190921691639dc29fac91604480830192600092919082900301818387803b158015610ef857600080fd5b505af1158015610f0c573d6000803e3d6000fd5b50505050601560009054906101000a9004600160a060020a0316600160a060020a0316632c4e722e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015610f6357600080fd5b505af1158015610f77573d6000803e3d6000fd5b505050506040513d6020811015610f8d57600080fd5b5051601554604080517ef3e7170000000000000000000000000000000000000000000000000000000081529051600160a060020a039092169162f3e717916004808201926020929091908290030181600087803b158015610fed57600080fd5b505af1158015611001573d6000803e3d6000fd5b505050506040513d602081101561101757600080fd5b5051830281151561102457fe5b04905082600160a060020a03166108fc829081150290604051600060405180830381858888f19350505050158015610ae0573d6000803e3d6000fd5b601454600160a060020a0316331461107757600080fd5b601754604080517ff2fde38b000000000000000000000000000000000000000000000000000000008152600160a060020a0384811660048301529151919092169163f2fde38b91602480830192600092919082900301818387803b15801561036057600080fd5b601454600090600160a060020a031633146110f857600080fd5b8161119657601754604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152915191909216916370a082319160248083019260209291908290030181600087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b505050506040513d602081101561118f57600080fd5b505161122b565b601754604080517f61fba37d000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152915191909216916361fba37d9160248083019260209291908290030181600087803b1580156111fe57600080fd5b505af1158015611212573d6000803e3d6000fd5b505050506040513d602081101561122857600080fd5b50515b905082811015801561123e575030318311155b151561124957600080fd5b81156112de57601754604080517f0452396c000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152620f42408702602483015291519190921691630452396c91604480830192600092919082900301818387803b1580156112c157600080fd5b505af11580156112d5573d6000803e3d6000fd5b50505050611369565b601754604080517f5a6af33b000000000000000000000000000000000000000000000000000000008152600160a060020a038781166004830152620f42408702602483015291519190921691635a6af33b91604480830192600092919082900301818387803b15801561135057600080fd5b505af1158015611364573d6000803e3d6000fd5b505050505b604051600160a060020a0385169084156108fc029085906000818181858888f19350505050158015610374573d6000803e3d6000fd5b601454600160a060020a031633146113b657600080fd5b6113bf816116a8565b50565b601454600160a060020a031633146113d957600080fd5b601855565b8383600080805b600160a060020a0385161561168b57601754604080517faf11c1f0000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163af11c1f09160248083019260209291908290030181600087803b15801561145c57600080fd5b505af1158015611470573d6000803e3d6000fd5b505050506040513d602081101561148657600080fd5b505160ff8082166000908152600160209081526040808320938c168352929052205490935091506114bd828563ffffffff61169616565b601754604080517f21e5383a000000000000000000000000000000000000000000000000000000008152600160a060020a0389811660048301526103e88b860202602483015291519394509116916321e5383a9160448082019260009290919082900301818387803b15801561153257600080fd5b505af1158015611546573d6000803e3d6000fd5b5050601754601854604080517fa7f1b77a000000000000000000000000000000000000000000000000000000008152600160a060020a038b81166004830152670de0b6b3a7640000938d02939093046024820152905191909216935063a7f1b77a9250604480830192600092919082900301818387803b1580156115c957600080fd5b505af11580156115dd573d6000803e3d6000fd5b505050506115eb8584611726565b601754604080517fee08388e000000000000000000000000000000000000000000000000000000008152600160a060020a0388811660048301529151919092169163ee08388e9160248083019260209291908290030181600087803b15801561165357600080fd5b505af1158015611667573d6000803e3d6000fd5b505050506040513d602081101561167d57600080fd5b5051945090925082906113e5565b505050505050505050565b6000828211156116a257fe5b50900390565b600160a060020a03811615156116bd57600080fd5b601454604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36014805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b601754604080517f6244cfa4000000000000000000000000000000000000000000000000000000008152600160a060020a038581166004830152915160009384938493911691636244cfa49160248082019260209290919082900301818787803b15801561179357600080fd5b505af11580156117a7573d6000803e3d6000fd5b505050506040513d60208110156117bd57600080fd5b50519250600791505b8360ff1682111561037457600282600881106117de57fe5b0154606402905080831061188857601754600160a060020a031663278e07ce866000806002876008811061180e57fe5b0154815260208101919091526040908101600090812054825160e060020a63ffffffff8716028152600160a060020a03909416600485015260ff166024840152905160448084019382900301818387803b15801561186b57600080fd5b505af115801561187f573d6000803e3d6000fd5b50505050610374565b600019909101906117c65600a165627a7a72305820bba32abb07ae2cf88961ad327fb68ff2d9053bbcd8553390d7909bc9d007d0a50029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000009e32000000000000000000000000a7cb7f55ece2d1df3379f303f33dd3e1ee593b8f0000000000000000000000005c523d6abe17e98eaa58c2df62a6ec9162f3b9a10000000000000000000000006c3699aeb742bb0a179c0ac1628dedf0b1db8554

-----Decoded View---------------
Arg [0] : _ethUsdRate (uint256): 40498
Arg [1] : _wbtToken (address): 0xA7cB7F55eCe2D1Df3379F303F33DD3E1ee593b8F
Arg [2] : _bctToken (address): 0x5C523d6aBe17e98eAA58C2dF62A6eC9162F3B9a1
Arg [3] : _data (address): 0x6C3699aeb742bB0A179C0Ac1628DeDF0b1db8554

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000009e32
Arg [1] : 000000000000000000000000a7cb7f55ece2d1df3379f303f33dd3e1ee593b8f
Arg [2] : 0000000000000000000000005c523d6abe17e98eaa58c2df62a6ec9162f3b9a1
Arg [3] : 0000000000000000000000006c3699aeb742bb0a179c0ac1628dedf0b1db8554


Swarm Source

bzzr://bba32abb07ae2cf88961ad327fb68ff2d9053bbcd8553390d7909bc9d007d0a5

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.