ETH Price: $1,850.96 (+1.56%)
Gas: 21 Gwei
 

Overview

ETH Balance

0.102467395483428427 ETH

Eth Value

$189.66 (@ $1,850.96/ETH)

Token Holdings

More Info

Private Name Tags

TokenTracker

Multi Chain

Multichain Addresses

0 address found via
Transaction Hash
Method
Block
From
To
Value
Withdraw172876972023-05-18 16:43:2321 days 4 hrs ago1684428203IN
0xc8Cc5c...862aC6aF
0 ETH0.0035109382.12520958
Sell172876792023-05-18 16:39:3521 days 4 hrs ago1684427975IN
0xc8Cc5c...862aC6aF
0 ETH0.0033508380.99082523
Reinvest56943252018-05-29 1:08:411836 days 20 hrs ago1527556121IN
0xc8Cc5c...862aC6aF
0 ETH0.000575837
Withdraw56588842018-05-22 18:35:001843 days 2 hrs ago1527014100IN
0xc8Cc5c...862aC6aF
0 ETH0.0010864725
Sell56588802018-05-22 18:33:281843 days 2 hrs ago1527014008IN
0xc8Cc5c...862aC6aF
0 ETH0.0009289619.3
Withdraw56588792018-05-22 18:33:181843 days 2 hrs ago1527013998IN
0xc8Cc5c...862aC6aF
0 ETH0.0010082423.2
Sell55686452018-05-06 22:25:341858 days 22 hrs ago1525645534IN
0xc8Cc5c...862aC6aF
0 ETH0.000048191
Withdraw55203682018-04-28 11:38:321867 days 9 hrs ago1524915512IN
0xc8Cc5c...862aC6aF
0 ETH0.000086912
Sell55192272018-04-28 6:52:191867 days 14 hrs ago1524898339IN
0xc8Cc5c...862aC6aF
0 ETH0.000144593
Sell55181942018-04-28 2:26:021867 days 18 hrs ago1524882362IN
0xc8Cc5c...862aC6aF
0 ETH0.000023311
Sell55128892018-04-27 4:22:281868 days 16 hrs ago1524802948IN
0xc8Cc5c...862aC6aF
0 ETH0.000048131
Withdraw54876462018-04-22 19:47:251873 days 1 hr ago1524426445IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
Sell54876332018-04-22 19:44:441873 days 1 hr ago1524426284IN
0xc8Cc5c...862aC6aF
0 ETH0.000048191
Buy54643572018-04-18 19:53:031877 days 1 hr ago1524081183IN
0xc8Cc5c...862aC6aF
0.008 ETH0.000489225
Withdraw54511592018-04-16 13:33:521879 days 7 hrs ago1523885632IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
Withdraw54511052018-04-16 13:17:371879 days 8 hrs ago1523884657IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
Withdraw54508922018-04-16 12:23:181879 days 8 hrs ago1523881398IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
Sell54507742018-04-16 11:55:391879 days 9 hrs ago1523879739IN
0xc8Cc5c...862aC6aF
0 ETH0.000048191
Withdraw54507742018-04-16 11:55:391879 days 9 hrs ago1523879739IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
Reinvest54353182018-04-13 21:28:491881 days 23 hrs ago1523654929IN
0xc8Cc5c...862aC6aF
0 ETH0.000082381.000001
Buy54050802018-04-08 19:50:241887 days 1 hr ago1523217024IN
0xc8Cc5c...862aC6aF
0.0115 ETH0.000135682
Withdraw54044412018-04-08 17:20:231887 days 3 hrs ago1523208023IN
0xc8Cc5c...862aC6aF
0 ETH0.000086912
Sell54044392018-04-08 17:19:261887 days 4 hrs ago1523207966IN
0xc8Cc5c...862aC6aF
0 ETH0.000096392
Buy54042342018-04-08 16:33:561887 days 4 hrs ago1523205236IN
0xc8Cc5c...862aC6aF
0.0113 ETH0.000195682
Withdraw54021172018-04-08 8:03:041887 days 13 hrs ago1523174584IN
0xc8Cc5c...862aC6aF
0 ETH0.000043451
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Advanced Filter
Parent Txn Hash Block From To Value
172876972023-05-18 16:43:2321 days 4 hrs ago1684428203
0xc8Cc5c...862aC6aF
0.00000904 ETH
56588842018-05-22 18:35:001843 days 2 hrs ago1527014100
0xc8Cc5c...862aC6aF
0.0317281 ETH
56588792018-05-22 18:33:181843 days 2 hrs ago1527013998
0xc8Cc5c...862aC6aF
0.0293062 ETH
55203682018-04-28 11:38:321867 days 9 hrs ago1524915512
0xc8Cc5c...862aC6aF
0.03288183 ETH
54876462018-04-22 19:47:251873 days 1 hr ago1524426445
0xc8Cc5c...862aC6aF
0.04187508 ETH
54511592018-04-16 13:33:521879 days 7 hrs ago1523885632
0xc8Cc5c...862aC6aF
0.01410541 ETH
54511052018-04-16 13:17:371879 days 8 hrs ago1523884657
0xc8Cc5c...862aC6aF
0.01517359 ETH
54508922018-04-16 12:23:181879 days 8 hrs ago1523881398
0xc8Cc5c...862aC6aF
0.06557865 ETH
54507742018-04-16 11:55:391879 days 9 hrs ago1523879739
0xc8Cc5c...862aC6aF
0.01724468 ETH
54044412018-04-08 17:20:231887 days 3 hrs ago1523208023
0xc8Cc5c...862aC6aF
0.00226724 ETH
54021172018-04-08 8:03:041887 days 13 hrs ago1523174584
0xc8Cc5c...862aC6aF
0.00554481 ETH
54004722018-04-08 1:35:171887 days 19 hrs ago1523151317
0xc8Cc5c...862aC6aF
0.07261103 ETH
54002122018-04-08 0:36:311887 days 20 hrs ago1523147791
0xc8Cc5c...862aC6aF
0.02685595 ETH
53958092018-04-07 7:17:201888 days 14 hrs ago1523085440
0xc8Cc5c...862aC6aF
0.00151725 ETH
53917732018-04-06 15:16:271889 days 6 hrs ago1523027787
0xc8Cc5c...862aC6aF
0.07223248 ETH
53914772018-04-06 14:05:251889 days 7 hrs ago1523023525
0xc8Cc5c...862aC6aF
0.00153128 ETH
53875702018-04-05 22:32:021889 days 22 hrs ago1522967522
0xc8Cc5c...862aC6aF
0.02826019 ETH
53510302018-03-30 21:13:361896 days 6 mins ago1522444416
0xc8Cc5c...862aC6aF
0.0002762 ETH
53368302018-03-28 11:34:521898 days 9 hrs ago1522236892
0xc8Cc5c...862aC6aF
0.00590059 ETH
53155772018-03-24 22:09:211901 days 23 hrs ago1521929361
0xc8Cc5c...862aC6aF
0.13947882 ETH
53077372018-03-23 14:48:251903 days 6 hrs ago1521816505
0xc8Cc5c...862aC6aF
0.00082904 ETH
52913422018-03-20 21:01:241906 days 18 mins ago1521579684
0xc8Cc5c...862aC6aF
0.01060289 ETH
52864992018-03-20 1:31:531906 days 19 hrs ago1521509513
0xc8Cc5c...862aC6aF
0.00134194 ETH
52821042018-03-19 7:45:131907 days 13 hrs ago1521445513
0xc8Cc5c...862aC6aF
0.02325323 ETH
52730372018-03-17 19:18:461909 days 2 hrs ago1521314326
0xc8Cc5c...862aC6aF
0.00829926 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FunCoin

Compiler Version
v0.4.20+commit.3155dd80

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-03-02
*/

pragma solidity ^0.4.20;


/**
 * @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.
   */
  function Ownable() 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) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant 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 c;
  }

  function sub(uint256 a, uint256 b) internal constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    Unpause();
  }
}


/*
* ====================================*
*  _____             ____      _
* |  ___|   _ _ __  / ___|___ (_)_ __
* | |_ | | | | '_ \| |   / _ \| | '_ \
* |  _|| |_| | | | | |__| (_) | | | | |
* |_|   \__,_|_| |_|\____\___/|_|_| |_|
*
* ====================================*
* That's a fun coin built by opensource developers,
* cleaned out of all previous premined bullshit and
* made it clean and fair for the community. :)
* Added nice elements like Ownable and Pausable.
*/

contract FunCoin is Ownable, Pausable {
    using SafeMath for uint256;

    /*=================================
    =            MODIFIERS            =
    =================================*/
    // only people with tokens
    modifier onlyBagholders() {
        require(myTokens() > 0);
        _;
    }

    // only people with profits
    modifier onlyStronghands() {
        require(myDividends(true) > 0);
        _;
    }

    /*==============================
    =            EVENTS            =
    ==============================*/
    event onTokenPurchase(
        address indexed customerAddress,
        uint256 incomingEthereum,
        uint256 tokensMinted,
        address indexed referredBy
    );

    event onTokenSell(
        address indexed customerAddress,
        uint256 tokensBurned,
        uint256 ethereumEarned
    );

    event onReinvestment(
        address indexed customerAddress,
        uint256 ethereumReinvested,
        uint256 tokensMinted
    );

    event onWithdraw(
        address indexed customerAddress,
        uint256 ethereumWithdrawn
    );

    // ERC20
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 tokens
    );


    /*=====================================
    =            CONFIGURABLES            =
    =====================================*/
    string public name = "FunCoin";
    string public symbol = "FUN";
    uint8 constant public decimals = 18;
    uint8 constant internal dividendFee_ = 15;
    uint8 constant internal devFee_ = 5;
    uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
    uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
    uint256 constant internal magnitude = 2**64;

    // proof of stake (defaults at 100 tokens)
    uint256 public stakingRequirement = 100e18;



   /*================================
    =            DATASETS            =
    ================================*/
    // amount of shares for each address (scaled number)
    mapping(address => uint256) internal tokenBalanceLedger_;
    mapping(address => uint256) internal referralBalance_;
    mapping(address => int256) internal payoutsTo_;
    uint256 internal tokenSupply_ = 0;
    uint256 internal profitPerShare_;


    /*=======================================
    =            PUBLIC FUNCTIONS            =
    =======================================*/

    function buy(address _referredBy) whenNotPaused() public payable returns(uint256)
    {
        purchaseTokens(msg.value, _referredBy);
    }

    /**
     * Fallback function to handle ethereum that was send straight to the contract
     * Unfortunately we cannot use a referral address this way.
     */
    function() whenNotPaused() payable public
    {
        purchaseTokens(msg.value, 0x0);
    }

    /**
     * Converts all of caller's dividends to tokens.
     */
    function reinvest() whenNotPaused() onlyStronghands() public
    {
        // fetch dividends
        uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code

        // pay out the dividends virtually
        address _customerAddress = msg.sender;
        payoutsTo_[_customerAddress] +=  (int256) (_dividends * magnitude);

        // retrieve ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;

        // dispatch a buy order with the virtualized "withdrawn dividends"
        uint256 _tokens = purchaseTokens(_dividends, 0x0);

        // fire event
        onReinvestment(_customerAddress, _dividends, _tokens);
    }

    /**
     * Alias of sell() and withdraw().
     */
    function exit() public
    {
        // get token count for caller & sell them all
        address _customerAddress = msg.sender;
        uint256 _tokens = tokenBalanceLedger_[_customerAddress];
        if(_tokens > 0) sell(_tokens);

        // lambo delivery service
        withdraw();
    }

    /**
     * Withdraws all of the callers earnings.
     */
    function withdraw() onlyStronghands() public
    {
        // setup data
        address _customerAddress = msg.sender;
        uint256 _dividends = myDividends(false); // get ref. bonus later in the code

        // update dividend tracker
        payoutsTo_[_customerAddress] +=  (int256) (_dividends * magnitude);

        // add ref. bonus
        _dividends += referralBalance_[_customerAddress];
        referralBalance_[_customerAddress] = 0;

        // lambo delivery service
        _customerAddress.transfer(_dividends);

        // fire event
        onWithdraw(_customerAddress, _dividends);
    }

    /**
     * Liquifies tokens to ethereum.
     */
    function sell(uint256 _amountOfTokens) onlyBagholders() public
    {
        // setup data
        address _customerAddress = msg.sender;
        // russian hackers BTFO
        require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
        uint256 _tokens = _amountOfTokens;
        uint256 _ethereum = tokensToEthereum_(_tokens);
        uint256 _dividends = calculateDividends_(_ethereum);
        uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);

        // burn the sold tokens
        tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens);
        tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens);

        // update dividends tracker
        int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude));
        payoutsTo_[_customerAddress] -= _updatedPayouts;

        // dividing by zero is a bad idea
        if (tokenSupply_ > 0) {
            // update the amount of dividends per token
            profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
        }

        // fire event
        onTokenSell(_customerAddress, _tokens, _taxedEthereum);
    }


    /**
     * Transfer tokens from the caller to a new holder.
     * Remember, there's a 10% fee here as well.
     */
    function transfer(address _toAddress, uint256 _amountOfTokens) onlyBagholders() public returns(bool)
    {
        // setup
        address _customerAddress = msg.sender;

        // make sure we have the requested tokens
        require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);

        // withdraw all outstanding dividends first
        if(myDividends(true) > 0) withdraw();

        // liquify 15% of the tokens that are transfered
        // these are dispersed to shareholders (Be happy shareholder!!! :) )
        uint256 _tokenFee = calculateDividends_(_amountOfTokens);
        uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee);
        uint256 _dividends = tokensToEthereum_(_tokenFee);

        // burn the fee tokens
        tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee);

        // exchange tokens
        tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens);
        tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens);

        // update dividend trackers
        payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens);
        payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens);

        // disperse dividends among holders
        profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);

        // fire event
        Transfer(_customerAddress, _toAddress, _taxedTokens);

        // ERC20
        return true;
    }

    /**
     * Precautionary measures in case we need to adjust the masternode rate.
     */
    function setStakingRequirement(uint256 _amountOfTokens) onlyOwner() public
    {
        stakingRequirement = _amountOfTokens;
    }

    /**
     * If we want to rebrand, we can.
     */
    function setName(string _name) onlyOwner() public
    {
        name = _name;
    }

    /**
     * If we want to rebrand, we can.
     */
    function setSymbol(string _symbol) onlyOwner() public
    {
        symbol = _symbol;
    }


    /*----------  HELPERS AND CALCULATORS  ----------*/
    /**
     * Method to view the current Ethereum stored in the contract
     * Example: totalEthereumBalance()
     */
    function totalEthereumBalance() public view returns(uint)
    {
        return this.balance;
    }

    /**
     * Retrieve the total token supply.
     */
    function totalSupply() public view returns(uint256)
    {
        return tokenSupply_;
    }

    /**
     * Retrieve the tokens owned by the caller.
     */
    function myTokens() public view returns(uint256)
    {
        address _customerAddress = msg.sender;
        return balanceOf(_customerAddress);
    }

    /**
     * Retrieve the dividends owned by the caller.
     * If `_includeReferralBonus` is to to 1/true, the referral bonus will be included in the calculations.
     * The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
     * But in the internal calculations, we want them separate.
     */
    function myDividends(bool _includeReferralBonus) public view returns(uint256)
    {
        address _customerAddress = msg.sender;
        return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress) ;
    }

    /**
     * Retrieve the token balance of any single address.
     */
    function balanceOf(address _customerAddress) view public returns(uint256)
    {
        return tokenBalanceLedger_[_customerAddress];
    }

    /**
     * Retrieve the dividend balance of any single address.
     */
    function dividendsOf(address _customerAddress) view public returns(uint256)
    {
        return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
    }

    /**
     * Return the buy price of 1 individual token.
     */
    function sellPrice() public view returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ - tokenPriceIncremental_;
        } else {
            uint256 _ethereum = tokensToEthereum_(1e18);
            uint256 _dividends = calculateDividends_(_ethereum);
            uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
            return _taxedEthereum;
        }
    }

    /**
     * Return the sell price of 1 individual token.
     */
    function buyPrice() public view returns(uint256)
    {
        // our calculation relies on the token supply, so we need supply. Doh.
        if(tokenSupply_ == 0){
            return tokenPriceInitial_ + tokenPriceIncremental_;
        } else {
            uint256 _ethereum = tokensToEthereum_(1e18);
            uint256 _dividends = calculateDividends_(_ethereum);
            uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends);
            return _taxedEthereum;
        }
    }

    /**
     * Function for the frontend to dynamically retrieve the price scaling of buy orders.
     */
    function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256)
    {
        uint256 _dividends = calculateDividends_(_ethereumToSpend);
        uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends);
        uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);

        return _amountOfTokens;
    }

    /**
     * Function for the frontend to dynamically retrieve the price scaling of sell orders.
     */
    function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256)
    {
        require(_tokensToSell <= tokenSupply_);
        uint256 _ethereum = tokensToEthereum_(_tokensToSell);
        uint256 _dividends = calculateDividends_(_ethereum);
        uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
        return _taxedEthereum;
    }


    /*==========================================
    =            INTERNAL FUNCTIONS            =
    ==========================================*/
    // It has refferedBuy, but its not used, so more money to all players :)
    // And we love to give more money to all players.
    function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns(uint256)
    {
        // data setup
        address _customerAddress = msg.sender;
        uint256 _undividedDividends = calculateDividends_(_incomingEthereum);
        uint256 _devCut = calculateDevCut_(_incomingEthereum);

        uint256 _dividends = SafeMath.sub(_undividedDividends, _devCut);
        uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends);
        uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
        uint256 _fee = _dividends * magnitude;

        // no point in continuing execution if OP is a poorfag russian hacker
        // prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world
        // (or hackers)
        // and yes we know that the safemath function automatically rules out the "greater then" equasion.
        require(_amountOfTokens > 0 && (SafeMath.add(_amountOfTokens,tokenSupply_) > tokenSupply_));

        // Pay a tiny devCut
        referralBalance_[owner] = SafeMath.add(referralBalance_[owner], _devCut);

        // we can't give people infinite ethereum
        if(tokenSupply_ > 0){

            // add tokens to the pool
            tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens);

            // take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder
            profitPerShare_ += (_dividends * magnitude / (tokenSupply_));

            // calculate the amount of tokens the customer receives over his purchase
            _fee = _fee - (_fee-(_amountOfTokens * (_dividends * magnitude / (tokenSupply_))));

        } else {
            // add tokens to the pool
            tokenSupply_ = _amountOfTokens;
        }

        // update circulating supply & the ledger address for the customer
        tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens);

        // Tells the contract that the buyer doesn't deserve dividends for the tokens before they owned them;
        //really i know you think you do but you don't
        int256 _updatedPayouts = (int256) ((profitPerShare_ * _amountOfTokens) - _fee);
        payoutsTo_[_customerAddress] += _updatedPayouts;

        // fire event
        onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy);

        return _amountOfTokens;
    }

    /**
     * Calculate Token price based on an amount of incoming ethereum
     * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
     * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
     */
    function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256)
    {
        uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
        uint256 _tokensReceived =
         (
            (
                // underflow attempts BTFO
                SafeMath.sub(
                    (sqrt
                        (
                            (_tokenPriceInitial**2)
                            +
                            (2*(tokenPriceIncremental_ * 1e18)*(_ethereum * 1e18))
                            +
                            (((tokenPriceIncremental_)**2)*(tokenSupply_**2))
                            +
                            (2*(tokenPriceIncremental_)*_tokenPriceInitial*tokenSupply_)
                        )
                    ), _tokenPriceInitial
                )
            )/(tokenPriceIncremental_)
        )-(tokenSupply_)
        ;

        return _tokensReceived;
    }

    /**
     * Calculate token sell value.
     * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
     * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
     */
     function tokensToEthereum_(uint256 _tokens) internal view returns(uint256)
    {

        uint256 tokens_ = (_tokens + 1e18);
        uint256 _tokenSupply = (tokenSupply_ + 1e18);
        uint256 _etherReceived =
        (
            // underflow attempts BTFO
            SafeMath.sub(
                (
                    (
                        (
                            tokenPriceInitial_ +(tokenPriceIncremental_ * (_tokenSupply/1e18))
                        )-tokenPriceIncremental_
                    )*(tokens_ - 1e18)
                ),(tokenPriceIncremental_*((tokens_**2-tokens_)/1e18))/2
            )
        /1e18);
        return _etherReceived;
    }

    /**
     * Calculate amount of dividends
     * base on the incoming value from the users.
     */
    function calculateDividends_(uint256 _incomingEthereum) internal view returns(uint256) {
      uint256 _dividends = SafeMath.div(SafeMath.mul(_incomingEthereum, dividendFee_), 100);
      return _dividends;
    }

    function calculateDevCut_(uint256 _incomingEthereum) internal view returns(uint256) {
      uint256 _devCut = SafeMath.div(SafeMath.mul(_incomingEthereum, devFee_), 100);
      return _devCut;
    }


    //This is where all your gas goes, sorry
    //Not sorry, you probably only paid 1 gwei
    function sqrt(uint x) internal pure returns (uint y) {
        uint z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"dividendsOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_ethereumToSpend","type":"uint256"}],"name":"calculateTokensReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokensToSell","type":"uint256"}],"name":"calculateEthereumReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sellPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stakingRequirement","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_includeReferralBonus","type":"bool"}],"name":"myDividends","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalEthereumBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_customerAddress","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"setStakingRequirement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"myTokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_toAddress","type":"address"},{"name":"_amountOfTokens","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_symbol","type":"string"}],"name":"setSymbol","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_amountOfTokens","type":"uint256"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_referredBy","type":"address"}],"name":"buy","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"incomingEthereum","type":"uint256"},{"indexed":false,"name":"tokensMinted","type":"uint256"},{"indexed":true,"name":"referredBy","type":"address"}],"name":"onTokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"tokensBurned","type":"uint256"},{"indexed":false,"name":"ethereumEarned","type":"uint256"}],"name":"onTokenSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"ethereumReinvested","type":"uint256"},{"indexed":false,"name":"tokensMinted","type":"uint256"}],"name":"onReinvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"customerAddress","type":"address"},{"indexed":false,"name":"ethereumWithdrawn","type":"uint256"}],"name":"onWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

606060409081526000805460a060020a60ff02191690558051908101604052600781527f46756e436f696e00000000000000000000000000000000000000000000000000602082015260019080516200005d929160200190620000db565b5060408051908101604052600381527f46554e000000000000000000000000000000000000000000000000000000000060208201526002908051620000a7929160200190620000db565b5068056bc75e2d63100000600355600060078190558054600160a060020a03191633600160a060020a031617905562000180565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200011e57805160ff19168380011785556200014e565b828001600101855582156200014e579182015b828111156200014e57825182559160200191906001019062000131565b506200015c92915062000160565b5090565b6200017d91905b808211156200015c576000815560010162000167565b90565b61138080620001906000396000f3006060604052600436106101685763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166265318b811461018d57806306fdde03146101be57806310d0ffdd1461024857806318160ddd1461025e5780632260937314610271578063313ce567146102875780633ccfd60b146102b05780633f4ba83a146102c55780634b750334146102d857806356d399e8146102eb5780635c975abb146102fe578063688abbf7146103255780636b2f46321461033d57806370a08231146103505780638328b6101461036f5780638456cb59146103855780638620410b146103985780638da5cb5b146103ab578063949e8acd146103da57806395d89b41146103ed578063a9059cbb14610400578063b84c824614610422578063c47f002714610473578063e4849b32146104c4578063e9fad8ee146104da578063f088d547146104ed578063f2fde38b14610501578063fdb5a03e14610520575b60005460a060020a900460ff161561017f57600080fd5b61018a346000610533565b50005b341561019857600080fd5b6101ac600160a060020a03600435166106fc565b60405190815260200160405180910390f35b34156101c957600080fd5b6101d1610737565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561020d5780820151838201526020016101f5565b50505050905090810190601f16801561023a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561025357600080fd5b6101ac6004356107d5565b341561026957600080fd5b6101ac610804565b341561027c57600080fd5b6101ac60043561080b565b341561029257600080fd5b61029a610842565b60405160ff909116815260200160405180910390f35b34156102bb57600080fd5b6102c3610847565b005b34156102d057600080fd5b6102c3610913565b34156102e357600080fd5b6101ac610992565b34156102f657600080fd5b6101ac6109e4565b341561030957600080fd5b6103116109ea565b604051901515815260200160405180910390f35b341561033057600080fd5b6101ac60043515156109fa565b341561034857600080fd5b6101ac610a3d565b341561035b57600080fd5b6101ac600160a060020a0360043516610a4b565b341561037a57600080fd5b6102c3600435610a66565b341561039057600080fd5b6102c3610a86565b34156103a357600080fd5b6101ac610b0a565b34156103b657600080fd5b6103be610b50565b604051600160a060020a03909116815260200160405180910390f35b34156103e557600080fd5b6101ac610b5f565b34156103f857600080fd5b6101d1610b72565b341561040b57600080fd5b610311600160a060020a0360043516602435610bdd565b341561042d57600080fd5b6102c360046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610d8395505050505050565b341561047e57600080fd5b6102c360046024813581810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610db595505050505050565b34156104cf57600080fd5b6102c3600435610de3565b34156104e557600080fd5b6102c3610f3e565b6101ac600160a060020a0360043516610f71565b341561050c57600080fd5b6102c3600160a060020a0360043516610f93565b341561052b57600080fd5b6102c361102e565b600033818080808080806105468b611101565b96506105518b611120565b955061055d8787611131565b94506105698b88611131565b935061057484611143565b9250680100000000000000008502915060008311801561059e575060075461059c84826111db565b115b15156105a957600080fd5b60008054600160a060020a03168152600560205260409020546105cc90876111db565b60008054600160a060020a0316815260056020526040812091909155600754111561064a576105fd600754846111db565b600781905568010000000000000000860281151561061757fe5b6008805492909104909101905560075468010000000000000000860281151561063c57fe5b048302820382039150610650565b60078390555b600160a060020a03881660009081526004602052604090205461067390846111db565b600160a060020a03808a16600081815260046020908152604080832095909555600854600690915290849020805491880287900391820190559350908c16917f022c0d992e4d873a3748436d960d5140c1f9721cf73f7ca5ec679d3d9f4fe2d5908e9087905191825260208201526040908101905180910390a350909998505050505050505050565b600160a060020a0316600090815260066020908152604080832054600490925290912054600854680100000000000000009102919091030490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107cd5780601f106107a2576101008083540402835291602001916107cd565b820191906000526020600020905b8154815290600101906020018083116107b057829003601f168201915b505050505081565b6000806000806107e485611101565b92506107f08584611131565b91506107fb82611143565b95945050505050565b6007545b90565b600080600080600754851115151561082257600080fd5b61082b856111ea565b925061083683611101565b91506107fb8383611131565b601281565b600080600061085660016109fa565b1161086057600080fd5b33915061086d60006109fa565b600160a060020a0383166000818152600660209081526040808320805468010000000000000000870201905560059091528082208054929055920192509082156108fc0290839051600060405180830381858888f1935050505015156108d257600080fd5b81600160a060020a03167fccad973dcd043c7d680389db4378bd6b9775db7124092e9e0422c9e46d7985dc8260405190815260200160405180910390a25050565b60005433600160a060020a0390811691161461092e57600080fd5b60005460a060020a900460ff16151561094657600080fd5b6000805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600080600080600754600014156109b0576414f46b040093506109de565b6109c1670de0b6b3a76400006111ea565b92506109cc83611101565b91506109d88383611131565b90508093505b50505090565b60035481565b60005460a060020a900460ff1681565b60003382610a1057610a0b816106fc565b610a34565b600160a060020a038116600090815260056020526040902054610a32826106fc565b015b91505b50919050565b600160a060020a0330163190565b600160a060020a031660009081526004602052604090205490565b60005433600160a060020a03908116911614610a8157600080fd5b600355565b60005433600160a060020a03908116911614610aa157600080fd5b60005460a060020a900460ff1615610ab857600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060008060075460001415610b285764199c82cc0093506109de565b610b39670de0b6b3a76400006111ea565b9250610b4483611101565b91506109d883836111db565b600054600160a060020a031681565b600033610b6b81610a4b565b91505b5090565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107cd5780601f106107a2576101008083540402835291602001916107cd565b600080600080600080610bee610b5f565b11610bf857600080fd5b33600160a060020a038116600090815260046020526040902054909450861115610c2157600080fd5b6000610c2d60016109fa565b1115610c3b57610c3b610847565b610c4486611101565b9250610c508684611131565b9150610c5b836111ea565b9050610c6960075484611131565b600755600160a060020a038416600090815260046020526040902054610c8f9087611131565b600160a060020a038086166000908152600460205260408082209390935590891681522054610cbe90836111db565b600160a060020a0388811660008181526004602090815260408083209590955560088054948a16835260069091528482208054948c02909403909355825491815292909220805492850290920190915554600754610d329190680100000000000000008402811515610d2c57fe5b046111db565b600855600160a060020a038088169085167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a35060019695505050505050565b60005433600160a060020a03908116911614610d9e57600080fd5b6002818051610db19291602001906112c6565b5050565b60005433600160a060020a03908116911614610dd057600080fd5b6001818051610db19291602001906112c6565b6000806000806000806000610df6610b5f565b11610e0057600080fd5b33600160a060020a038116600090815260046020526040902054909650871115610e2957600080fd5b869450610e35856111ea565b9350610e4084611101565b9250610e4c8484611131565b9150610e5a60075486611131565b600755600160a060020a038616600090815260046020526040902054610e809086611131565b600160a060020a0387166000908152600460209081526040808320939093556008546006909152918120805492880268010000000000000000860201928390039055600754919250901115610ef157610eed600854600754680100000000000000008602811515610d2c57fe5b6008555b85600160a060020a03167fc4823739c5787d2ca17e404aa47d5569ae71dfb49cbf21b3f6152ed238a31139868460405191825260208201526040908101905180910390a250505050505050565b33600160a060020a03811660009081526004602052604081205490811115610f6957610f6981610de3565b610db1610847565b6000805460a060020a900460ff1615610f8957600080fd5b610a373483610533565b60005433600160a060020a03908116911614610fae57600080fd5b600160a060020a0381161515610fc357600080fd5b600054600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600080548190819060a060020a900460ff161561104a57600080fd5b600061105660016109fa565b1161106057600080fd5b61106a60006109fa565b33600160a060020a0381166000908152600660209081526040808320805468010000000000000000870201905560059091528120805490829055909201945092506110b6908490610533565b905081600160a060020a03167fbe339fc14b041c2b0e0f3dd2cd325d0c3668b78378001e53160eab3615326458848360405191825260208201526040908101905180910390a2505050565b60008061111961111284600f611256565b606461127a565b9392505050565b600080611119611112846005611256565b60008282111561113d57fe5b50900390565b6007546000906c01431e0fae6d7217caa00000009082906402540be4006111c86111c2730380d4bd8a8678c1bb542c80deb4800000000000880268056bc75e2d631000006002860a02017005e0a1fd2712875988becaad0000000000850201780197d4df19d605767337e9f14d3eec8920e40000000000000001611291565b85611131565b8115156111d157fe5b0403949350505050565b60008282018381101561111957fe5b600754600090670de0b6b3a76400008381019181019083906112436414f46b04008285046402540be40002018702600283670de0b6b3a763ffff1982890a8b900301046402540be4000281151561123d57fe5b04611131565b81151561124c57fe5b0495945050505050565b6000828202831580611272575082848281151561126f57fe5b04145b151561111957fe5b600080828481151561128857fe5b04949350505050565b80600260018201045b81811015610a375780915060028182858115156112b357fe5b04018115156112be57fe5b04905061129a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061130757805160ff1916838001178555611334565b82800160010185558215611334579182015b82811115611334578251825591602001919060010190611319565b50610b6e926108089250905b80821115610b6e57600081556001016113405600a165627a7a723058208eb6e806b6c430a38702353b73505f4387fc0802461bdc39deedb9d4a8f975420029

Swarm Source

bzzr://8eb6e806b6c430a38702353b73505f4387fc0802461bdc39deedb9d4a8f97542

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.