ETH Price: $2,335.71 (+2.77%)

Contract

0x30b0D22416075184b8111C0E033FE6F33e6b7996
 

Overview

ETH Balance

1.102369889182244766 ETH

Eth Value

$2,574.81 (@ $2,335.71/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Fund67972612018-11-30 0:15:092118 days ago1543536909IN
0x30b0D224...33e6b7996
0.005 ETH0.000268923
Claim My Bet61841592018-08-20 23:35:152220 days ago1534808115IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet61685122018-08-18 8:18:152222 days ago1534580295IN
0x30b0D224...33e6b7996
0 ETH0.000100394
Claim My Bet61186872018-08-09 21:56:512231 days ago1533851811IN
0x30b0D224...33e6b7996
0 ETH0.0002509810
Claim My Bet57100332018-05-31 20:02:292301 days ago1527796949IN
0x30b0D224...33e6b7996
0 ETH0.0003513714
Claim My Bet56814582018-05-26 18:34:242306 days ago1527359664IN
0x30b0D224...33e6b7996
0 ETH0.000225889
Claim My Bet56669362018-05-24 4:50:182308 days ago1527137418IN
0x30b0D224...33e6b7996
0 ETH0.0002509810
Claim My Bet56648572018-05-23 20:08:562309 days ago1527106136IN
0x30b0D224...33e6b7996
0 ETH0.000127995.1
Claim My Bet56634682018-05-23 14:17:142309 days ago1527085034IN
0x30b0D224...33e6b7996
0 ETH0.0002534810.1
Claim My Bet54928482018-04-23 17:15:192339 days ago1524503719IN
0x30b0D224...33e6b7996
0 ETH0.000050192
Claim My Bet54928472018-04-23 17:14:592339 days ago1524503699IN
0x30b0D224...33e6b7996
0 ETH0.000050192
Claim My Bet54928442018-04-23 17:14:432339 days ago1524503683IN
0x30b0D224...33e6b7996
0 ETH0.000050192
Fund54928392018-04-23 17:13:042339 days ago1524503584IN
0x30b0D224...33e6b7996
0.0001 ETH0.000089711
Get Me Out Of He...54861252018-04-22 13:39:192340 days ago1524404359IN
0x30b0D224...33e6b7996
0 ETH0.00002730.42
Claim My Bet54175652018-04-10 21:39:292352 days ago1523396369IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet53995872018-04-07 22:10:372355 days ago1523139037IN
0x30b0D224...33e6b7996
0 ETH0.00005272.1
Claim My Bet53817342018-04-04 23:15:182358 days ago1522883718IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet53225302018-03-26 1:46:572367 days ago1522028817IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet53225292018-03-26 1:46:532367 days ago1522028813IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet53225252018-03-26 1:45:142367 days ago1522028714IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet53225052018-03-26 1:40:222367 days ago1522028422IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet52837732018-03-19 14:37:392374 days ago1521470259IN
0x30b0D224...33e6b7996
0 ETH0.000050192
Withdraw52818742018-03-19 6:52:552374 days ago1521442375IN
0x30b0D224...33e6b7996
0 ETH0.000092022
Claim My Bet52735502018-03-17 21:22:332376 days ago1521321753IN
0x30b0D224...33e6b7996
0 ETH0.000025091
Claim My Bet52735342018-03-17 21:17:452376 days ago1521321465IN
0x30b0D224...33e6b7996
0 ETH0.000025091
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
170061382023-04-08 20:50:35528 days ago1680987035
0x30b0D224...33e6b7996
119 wei
54861252018-04-22 13:39:192340 days ago1524404359
0x30b0D224...33e6b7996
0.00143807 ETH
52818742018-03-19 6:52:552374 days ago1521442375
0x30b0D224...33e6b7996
0.0132547 ETH
52707032018-03-17 9:50:482376 days ago1521280248
0x30b0D224...33e6b7996
0.01076307 ETH
52323952018-03-10 21:26:362383 days ago1520717196
0x30b0D224...33e6b7996
0.00056292 ETH
52083452018-03-06 19:09:292387 days ago1520363369
0x30b0D224...33e6b7996
0.00745662 ETH
52083212018-03-06 19:02:182387 days ago1520362938
0x30b0D224...33e6b7996
0.00777533 ETH
51870992018-03-03 4:48:232390 days ago1520052503
0x30b0D224...33e6b7996
0.09240945 ETH
51869092018-03-03 4:05:562390 days ago1520049956
0x30b0D224...33e6b7996
0.40815469 ETH
51868532018-03-03 3:51:162390 days ago1520049076
0x30b0D224...33e6b7996
0.08778576 ETH
51857742018-03-02 23:27:452391 days ago1520033265
0x30b0D224...33e6b7996
0.07592083 ETH
51857582018-03-02 23:23:482391 days ago1520033028
0x30b0D224...33e6b7996
0.00642307 ETH
51831202018-03-02 12:52:572391 days ago1519995177
0x30b0D224...33e6b7996
0.02655591 ETH
51788122018-03-01 19:05:392392 days ago1519931139
0x30b0D224...33e6b7996
0.00349414 ETH
51787352018-03-01 18:50:082392 days ago1519930208
0x30b0D224...33e6b7996
0.06339799 ETH
51760182018-03-01 7:43:582392 days ago1519890238
0x30b0D224...33e6b7996
0.13988322 ETH
51749182018-03-01 3:10:342392 days ago1519873834
0x30b0D224...33e6b7996
0.02833352 ETH
51749012018-03-01 3:06:102392 days ago1519873570
0x30b0D224...33e6b7996
0.03546376 ETH
51692922018-02-28 4:17:152393 days ago1519791435
0x30b0D224...33e6b7996
0.002 ETH
51681332018-02-27 23:37:492394 days ago1519774669
0x30b0D224...33e6b7996
0.02457044 ETH
51674102018-02-27 20:38:362394 days ago1519763916
0x30b0D224...33e6b7996
0.00012 ETH
51673532018-02-27 20:22:112394 days ago1519762931
0x30b0D224...33e6b7996
0.00156 ETH
51673102018-02-27 20:11:412394 days ago1519762301
0x30b0D224...33e6b7996
0.00108 ETH
51672662018-02-27 20:01:292394 days ago1519761689
0x30b0D224...33e6b7996
0.00156 ETH
51672292018-02-27 19:51:062394 days ago1519761066
0x30b0D224...33e6b7996
0.00118 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OurRoulette

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-02-23
*/

pragma solidity ^0.4.19;

/*
    Our Roulette - A decentralized, crowdfunded game of Roulette
    
    Developer:
        Dadas1337
        
    Thanks to:
    
        FrontEnd help & tips:
            CiernaOvca
            Matt007
            Kebabist
            
        Chief-Shiller:
            M.Tejas
            
        Auditor:
            Inventor
            
    If the website ever goes down for any reason, just send a 0 ETH transaction
    with no data and at least 150 000 GAS to the contract address.
    Your shares will be sold and dividends withdrawn.
*/

contract OurRoulette{
    struct Bet{
        uint value;
        uint height; //result of a bet placed at height is determined by blocks at height+1 and height+2, bet can be resolved from height+3 upwards..
        uint tier; //min bet amount
        bytes betdata;
    }
    mapping (address => Bet) bets;
    
    //helper function used when calculating win amounts
    function GroupMultiplier(uint number,uint groupID) public pure returns(uint){
        uint80[12] memory groups=[ //matrix of bet multipliers for each group - 2bits per number
            0x30c30c30c30c30c30c0, //0: 3rd column
            0x0c30c30c30c30c30c30, //1: 2nd column
            0x030c30c30c30c30c30c, //2: 1st column
            0x0000000000003fffffc, //3: 1st 12
            0x0000003fffffc000000, //4: 2nd 12
            0x3fffffc000000000000, //5: 3rd 12
            0x0000000002aaaaaaaa8, //6: 1 to 18
            0x2222222222222222220, //7: even
            0x222208888a222088888, //8: red
            0x0888a22220888a22220, //9: black
            0x0888888888888888888, //10: odd
            0x2aaaaaaaa8000000000  //11: 19 to 36
        ];
        return (groups[groupID]>>(number*2))&3; //this function is only public so you can verify that group multipliers are working correctly
    }
    
    //returns a "random" number based on blockhashes and addresses
    function GetNumber(address adr,uint height) public view returns(uint){
        bytes32 hash1=block.blockhash(height+1);
        bytes32 hash2=block.blockhash(height+2);
        if(hash1==0 || hash2==0)return 69;//if the hash equals zero, it means that its too late now (blockhash can only get most recent 256 blocks)
        return ((uint)(keccak256(adr,hash1,hash2)))%37;
    }
    
    //returns user's payout from his last bet
    function BetPayout() public view returns (uint payout) {
        Bet memory tmp = bets[msg.sender];
        
        uint n=GetNumber(msg.sender,tmp.height);
        if(n==69)return 0; //unable to get blockhash - too late
        
        payout=((uint)(tmp.betdata[n]))*36; //if there is a bet on the winning number, set payout to the bet*36
        for(uint i=37;i<49;i++)payout+=((uint)(tmp.betdata[i]))*GroupMultiplier(n,i-37); //check all groups
        
        return payout*tmp.tier;
    }
    
    //claims last bet (if it exists), creates a new one and sends back any leftover balance
    function PlaceBet(uint tier,bytes betdata) public payable {
        Bet memory tmp = bets[msg.sender];
        uint balance=msg.value; //user's balance
        require(tier<(realReserve()/12500)); //tier has to be 12500 times lower than current balance
        
        require((tmp.height+2)<=(block.number-1)); //if there is a bet that can't be claimed yet, revert (this bet must be resolved before placing another one)
        if(tmp.height!=0&&((block.number-1)>=(tmp.height+2))){ //if there is an unclaimed bet that can be resolved...
            uint win=BetPayout();
            
            if(win>0&&tmp.tier>(realReserve()/12500)){
                // tier has to be 12500 times lower than current balance
                // if it isnt, refund the bet and cancel the new bet
                
                //   - this shouldnt ever happen, only in a very specific scenario where
                //     most of the people pull out at the same time.
                
                if(realReserve()>=tmp.value){
                    bets[msg.sender].height=0; //set bet height to 0 so it can't be claimed again
                    contractBalance-=tmp.value;
                    SubFromDividends(tmp.value);
                    msg.sender.transfer(tmp.value+balance); //refund both last bet and current bet
                }else msg.sender.transfer(balance); //if there isnt enough money to refund last bet, then refund at least the new bet
                                                    //again, this should never happen, its an extreme edge-case
                                                    //old bet can be claimed later, after the balance increases again

                return; //cancel the new bet
            }
            
            balance+=win; //if all is right, add last bet's payout to user's balance
        }
        
        uint betsz=0;
        for(uint i=0;i<49;i++)betsz+=(uint)(betdata[i]);
        require(betsz<=50); //bet size can't be greater than 50 "chips"
        
        betsz*=tier; //convert chips to wei
        require(betsz<=balance); //betsz must be smaller or equal to user's current balance
        
        tmp.height=block.number; //fill the new bet's structure
        tmp.value=betsz;
        tmp.tier=tier;
        tmp.betdata=betdata;
        
        bets[msg.sender]=tmp; //save it to storage
        
        balance-=betsz; //balance now contains (msg.value)+(winnings from last bet) - (current bet size)
        
        if(balance>0){
            contractBalance-=balance;
            if(balance>=msg.value){
                contractBalance-=(balance-msg.value);
                SubFromDividends(balance-msg.value);
            }else{
                contractBalance+=(msg.value-balance);
                AddToDividends(msg.value-balance);
            }

            msg.sender.transfer(balance); //send any leftover balance back to the user
        }else{
            contractBalance+=msg.value;
            AddToDividends(msg.value);
        }
    }
    
    //adds "value" to dividends
    function AddToDividends(uint256 value) internal {
        earningsPerToken+=(int256)((value*scaleFactor)/totalSupply);
    }
    
    //subtract "value" from dividends
    function SubFromDividends(uint256 value)internal {
        earningsPerToken-=(int256)((value*scaleFactor)/totalSupply);
    }
    
    //claims last bet
    function ClaimMyBet() public{
        Bet memory tmp = bets[msg.sender];
        require((tmp.height+2)<=(block.number-1)); //if it is a bet that can't be claimed yet
        
        uint win=BetPayout();
        
        if(win>0){
            if(bets[msg.sender].tier>(realReserve()/12500)){
                // tier has to be 12500 times lower than current balance
                // if it isnt, refund the bet
                
                //   - this shouldnt ever happen, only in a very specific scenario where
                //     most of the people pull out at the same time.
                
                if(realReserve()>=tmp.value){
                    bets[msg.sender].height=0; //set bet height to 0 so it can't be claimed again
                    contractBalance-=tmp.value;
                    SubFromDividends(tmp.value);
                    msg.sender.transfer(tmp.value);
                }
                
                //if the code gets here, it means that there isnt enough balance to refund the bet
                //bet can be claimed later, after the balance increases again
                return;
            }
            
            bets[msg.sender].height=0; //set bet height to 0 so it can't be claimed again
            contractBalance-=win;
            SubFromDividends(win);
            msg.sender.transfer(win);
        }
    }
    
    //public function used to fill user interface with data
    function GetMyBet() public view returns(uint, uint, uint, uint, bytes){
        return (bets[msg.sender].value,bets[msg.sender].height,bets[msg.sender].tier,BetPayout(),bets[msg.sender].betdata);
    }
    
//          --- EthPyramid code with fixed compiler warnings and support for negative dividends ---

/*
          ,/`.
        ,'/ __`.
      ,'_/_  _ _`.
    ,'__/_ ___ _  `.
  ,'_  /___ __ _ __ `.
 '-.._/___...-"-.-..__`.
  B

 EthPyramid. A no-bullshit, transparent, self-sustaining pyramid scheme.
 
 Inspired by https://test.jochen-hoenicke.de/eth/ponzitoken/

 Developers:
	Arc
	Divine
	Norsefire
	ToCsIcK
	
 Front-End:
	Cardioth
	tenmei
	Trendium
	
 Moral Support:
	DeadCow.Rat
	Dots
	FatKreamy
	Kaseylol
	QuantumDeath666
	Quentin
 
 Shit-Tier:
	HentaiChrist
 
*/
    
    // scaleFactor is used to convert Ether into tokens and vice-versa: they're of different
	// orders of magnitude, hence the need to bridge between the two.
	uint256 constant scaleFactor = 0x10000000000000000;  // 2^64

	// CRR = 50%
	// CRR is Cash Reserve Ratio (in this case Crypto Reserve Ratio).
	// For more on this: check out https://en.wikipedia.org/wiki/Reserve_requirement
	int constant crr_n = 1; // CRR numerator
	int constant crr_d = 2; // CRR denominator

	// The price coefficient. Chosen such that at 1 token total supply
	// the amount in reserve is 0.5 ether and token price is 1 Ether.
	int constant price_coeff = -0x296ABF784A358468C;

	// Array between each address and their number of tokens.
	mapping(address => uint256) public tokenBalance;
		
	// Array between each address and how much Ether has been paid out to it.
	// Note that this is scaled by the scaleFactor variable.
	mapping(address => int256) public payouts;

	// Variable tracking how many tokens are in existence overall.
	uint256 public totalSupply;

	// Aggregate sum of all payouts.
	// Note that this is scaled by the scaleFactor variable.
	int256 totalPayouts;

	// Variable tracking how much Ether each token is currently worth.
	// Note that this is scaled by the scaleFactor variable.
	int256 earningsPerToken;
	
	// Current contract balance in Ether
	uint256 public contractBalance;

	// The following functions are used by the front-end for display purposes.

	// Returns the number of tokens currently held by _owner.
	function balanceOf(address _owner) public constant returns (uint256 balance) {
		return tokenBalance[_owner];
	}

	// Withdraws all dividends held by the caller sending the transaction, updates
	// the requisite global variables, and transfers Ether back to the caller.
	function withdraw() public {
		// Retrieve the dividends associated with the address the request came from.
		uint256 balance = dividends(msg.sender);
		
		// Update the payouts array, incrementing the request address by `balance`.
		payouts[msg.sender] += (int256) (balance * scaleFactor);
		
		// Increase the total amount that's been paid out to maintain invariance.
		totalPayouts += (int256) (balance * scaleFactor);
		
		// Send the dividends to the address that requested the withdraw.
		contractBalance = sub(contractBalance, balance);
		msg.sender.transfer(balance);
	}

	// Converts the Ether accrued as dividends back into EPY tokens without having to
	// withdraw it first. Saves on gas and potential price spike loss.
	function reinvestDividends() public {
		// Retrieve the dividends associated with the address the request came from.
		uint256 balance = dividends(msg.sender);
		
		// Update the payouts array, incrementing the request address by `balance`.
		// Since this is essentially a shortcut to withdrawing and reinvesting, this step still holds.
		payouts[msg.sender] += (int256) (balance * scaleFactor);
		
		// Increase the total amount that's been paid out to maintain invariance.
		totalPayouts += (int256) (balance * scaleFactor);
		
		// Assign balance to a new variable.
		uint value_ = (uint) (balance);
		
		// If your dividends are worth less than 1 szabo, or more than a million Ether
		// (in which case, why are you even here), abort.
		if (value_ < 0.000001 ether || value_ > 1000000 ether)
			revert();
			
		// msg.sender is the address of the caller.
		address sender = msg.sender;
		
		// A temporary reserve variable used for calculating the reward the holder gets for buying tokens.
		// (Yes, the buyer receives a part of the distribution as well!)
		uint256 res = reserve() - balance;

		// 10% of the total Ether sent is used to pay existing holders.
		uint256 fee = div(value_, 10);
		
		// The amount of Ether used to purchase new tokens for the caller.
		uint256 numEther = value_ - fee;
		
		// The number of tokens which can be purchased for numEther.
		uint256 numTokens = calculateDividendTokens(numEther, balance);
		
		// The buyer fee, scaled by the scaleFactor variable.
		uint256 buyerFee = fee * scaleFactor;
		
		// Check that we have tokens in existence (this should always be true), or
		// else you're gonna have a bad time.
		if (totalSupply > 0) {
			// Compute the bonus co-efficient for all existing holders and the buyer.
			// The buyer receives part of the distribution for each token bought in the
			// same way they would have if they bought each token individually.
			uint256 bonusCoEff =
			    (scaleFactor - (res + numEther) * numTokens * scaleFactor / (totalSupply + numTokens) / numEther)
			    * (uint)(crr_d) / (uint)(crr_d-crr_n);
				
			// The total reward to be distributed amongst the masses is the fee (in Ether)
			// multiplied by the bonus co-efficient.
			uint256 holderReward = fee * bonusCoEff;
			
			buyerFee -= holderReward;

			// Fee is distributed to all existing token holders before the new tokens are purchased.
			// rewardPerShare is the amount gained per token thanks to this buy-in.
			uint256 rewardPerShare = holderReward / totalSupply;
			
			// The Ether value per token is increased proportionally.
			earningsPerToken += (int256)(rewardPerShare);
		}
		
		// Add the numTokens which were just created to the total supply. We're a crypto central bank!
		totalSupply = add(totalSupply, numTokens);
		
		// Assign the tokens to the balance of the buyer.
		tokenBalance[sender] = add(tokenBalance[sender], numTokens);
		
		// Update the payout array so that the buyer cannot claim dividends on previous purchases.
		// Also include the fee paid for entering the scheme.
		// First we compute how much was just paid out to the buyer...
		int256 payoutDiff  = ((earningsPerToken * (int256)(numTokens)) - (int256)(buyerFee));
		
		// Then we update the payouts array for the buyer with this amount...
		payouts[sender] += payoutDiff;
		
		// And then we finally add it to the variable tracking the total amount spent to maintain invariance.
		totalPayouts    += payoutDiff;
		
	}

	// Sells your tokens for Ether. This Ether is assigned to the callers entry
	// in the tokenBalance array, and therefore is shown as a dividend. A second
	// call to withdraw() must be made to invoke the transfer of Ether back to your address.
	function sellMyTokens() public {
		uint256 balance = balanceOf(msg.sender);
		sell(balance);
	}

	// The slam-the-button escape hatch. Sells the callers tokens for Ether, then immediately
	// invokes the withdraw() function, sending the resulting Ether to the callers address.
    function getMeOutOfHere() public {
		sellMyTokens();
        withdraw();
	}

	// Gatekeeper function to check if the amount of Ether being sent isn't either
	// too small or too large. If it passes, goes direct to buy().
	function fund() payable public {
		// Don't allow for funding if the amount of Ether sent is less than 1 szabo.
		if (msg.value > 0.000001 ether) {
		    contractBalance = add(contractBalance, msg.value);
			buy();
		} else {
			revert();
		}
    }

	// Function that returns the (dynamic) price of buying a finney worth of tokens.
	function buyPrice() public constant returns (uint) {
		return getTokensForEther(1 finney);
	}

	// Function that returns the (dynamic) price of selling a single token.
	function sellPrice() public constant returns (uint) {
        uint256 eth;
        uint256 penalty;
        (eth,penalty) = getEtherForTokens(1 finney);
        
        uint256 fee = div(eth, 10);
        return eth - fee;
    }

	// Calculate the current dividends associated with the caller address. This is the net result
	// of multiplying the number of tokens held by their current value in Ether and subtracting the
	// Ether that has already been paid out. Returns 0 in case of negative dividends
	function dividends(address _owner) public constant returns (uint256 amount) {
	    int256 r=((earningsPerToken * (int256)(tokenBalance[_owner])) - payouts[_owner]) / (int256)(scaleFactor);
	    if(r<0)return 0;
		return (uint256)(r);
	}
	
	// Returns real dividends, including negative values
	function realDividends(address _owner) public constant returns (int256 amount) {
	    return (((earningsPerToken * (int256)(tokenBalance[_owner])) - payouts[_owner]) / (int256)(scaleFactor));
	}

	// Internal balance function, used to calculate the dynamic reserve value.
	function balance() internal constant returns (uint256 amount) {
		// msg.value is the amount of Ether sent by the transaction.
		return contractBalance - msg.value;
	}

	function buy() internal {
		// Any transaction of less than 1 szabo is likely to be worth less than the gas used to send it.
		if (msg.value < 0.000001 ether || msg.value > 1000000 ether)
			revert();
						
		// msg.sender is the address of the caller.
		address sender = msg.sender;
		
		// 10% of the total Ether sent is used to pay existing holders.
		uint256 fee = div(msg.value, 10);
		
		// The amount of Ether used to purchase new tokens for the caller.
		uint256 numEther = msg.value - fee;
		
		// The number of tokens which can be purchased for numEther.
		uint256 numTokens = getTokensForEther(numEther);
		
		// The buyer fee, scaled by the scaleFactor variable.
		uint256 buyerFee = fee * scaleFactor;
		
		// Check that we have tokens in existence (this should always be true), or
		// else you're gonna have a bad time.
		if (totalSupply > 0) {
			// Compute the bonus co-efficient for all existing holders and the buyer.
			// The buyer receives part of the distribution for each token bought in the
			// same way they would have if they bought each token individually.
			uint256 bonusCoEff =
			    (scaleFactor - (reserve() + numEther) * numTokens * scaleFactor / (totalSupply + numTokens) / numEther)
			    * (uint)(crr_d) / (uint)(crr_d-crr_n);
				
			// The total reward to be distributed amongst the masses is the fee (in Ether)
			// multiplied by the bonus co-efficient.
			uint256 holderReward = fee * bonusCoEff;
			
			buyerFee -= holderReward;

			// Fee is distributed to all existing token holders before the new tokens are purchased.
			// rewardPerShare is the amount gained per token thanks to this buy-in.
			uint256 rewardPerShare = holderReward / totalSupply;
			
			// The Ether value per token is increased proportionally.
			earningsPerToken += (int256)(rewardPerShare);
			
		}

		// Add the numTokens which were just created to the total supply. We're a crypto central bank!
		totalSupply = add(totalSupply, numTokens);

		// Assign the tokens to the balance of the buyer.
		tokenBalance[sender] = add(tokenBalance[sender], numTokens);

		// Update the payout array so that the buyer cannot claim dividends on previous purchases.
		// Also include the fee paid for entering the scheme.
		// First we compute how much was just paid out to the buyer...
		int256 payoutDiff = ((earningsPerToken * (int256)(numTokens)) - (int256)(buyerFee));
		
		// Then we update the payouts array for the buyer with this amount...
		payouts[sender] += payoutDiff;
		
		// And then we finally add it to the variable tracking the total amount spent to maintain invariance.
		totalPayouts    += payoutDiff;
		
	}

	// Sell function that takes tokens and converts them into Ether. Also comes with a 10% fee
	// to discouraging dumping, and means that if someone near the top sells, the fee distributed
	// will be *significant*.
	function sell(uint256 amount) internal {
	    // Calculate the amount of Ether that the holders tokens sell for at the current sell price.
		uint256 numEthersBeforeFee;
		uint256 penalty;
		(numEthersBeforeFee,penalty) = getEtherForTokens(amount);
		
		// 10% of the resulting Ether is used to pay remaining holders, but only if there are any remaining holders.
		uint256 fee = 0;
		if(amount!=totalSupply) fee = div(numEthersBeforeFee, 10);
		
		// Net Ether for the seller after the fee has been subtracted.
        uint256 numEthers = numEthersBeforeFee - fee;
		
		// *Remove* the numTokens which were just sold from the total supply. We're /definitely/ a crypto central bank.
		totalSupply = sub(totalSupply, amount);
		
        // Remove the tokens from the balance of the buyer.
		tokenBalance[msg.sender] = sub(tokenBalance[msg.sender], amount);

        // Update the payout array so that the seller cannot claim future dividends unless they buy back in.
		// First we compute how much was just paid out to the seller...
		int256 payoutDiff = (earningsPerToken * (int256)(amount) + (int256)(numEthers * scaleFactor));
		
        // We reduce the amount paid out to the seller (this effectively resets their payouts value to zero,
		// since they're selling all of their tokens). This makes sure the seller isn't disadvantaged if
		// they decide to buy back in.
		payouts[msg.sender] -= payoutDiff;
		
		// Decrease the total amount that's been paid out to maintain invariance.
        totalPayouts -= payoutDiff;
		
		// Check that we have tokens in existence (this is a bit of an irrelevant check since we're
		// selling tokens, but it guards against division by zero).
		if (totalSupply > 0) {
			// Scale the Ether taken as the selling fee by the scaleFactor variable.
			uint256 etherFee = fee * scaleFactor;
			
			if(penalty>0)etherFee += (penalty * scaleFactor); //if there is any penalty, use it to settle the debt
			
			// Fee is distributed to all remaining token holders.
			// rewardPerShare is the amount gained per token thanks to this sell.
			uint256 rewardPerShare = etherFee / totalSupply;
			
			// The Ether value per token is increased proportionally.
			earningsPerToken += (int256)(rewardPerShare);
		}else payouts[msg.sender]+=(int256)(penalty); //if he is the last holder, give him his penalty too, so there is no leftover ETH in the contract
		
		int256 afterdiv=realDividends(msg.sender); //get his dividends - after this sale
		if(afterdiv<0){
		     //if he was so deeply in debt, that even after selling his share, he still doesn't break even,
		     //then we have to spread his debt between other users to maintain invariance
		     SubFromDividends((uint256)(afterdiv*-1));
		     totalPayouts -= payouts[msg.sender];
		     payouts[msg.sender]=0;
		     //again, this shouldnt ever happen. It is not possible to win in the Roulette so much,
		     //that this scenario will happen. I have only managed to reach it by using the testing functions,
		     //SubDiv() - removed on mainnet contract
		}
	}
	
	//returns value of all dividends currently held by all shareholders
	function totalDiv() public view returns (int256){
	    return ((earningsPerToken * (int256)(totalSupply))-totalPayouts)/(int256)(scaleFactor);
	}
	
	// Dynamic value of Ether in reserve, according to the CRR requirement. Designed to not decrease token value in case of negative dividends
	function reserve() internal constant returns (uint256 amount) {
	    int256 divs=totalDiv();
	    
	    if(divs<0)return balance()+(uint256)(divs*-1);
	    return balance()-(uint256)(divs);
	}
	
	// Dynamic value of Ether in reserve, according to the CRR requirement. Returns reserve including negative dividends
	function realReserve() public view returns (uint256 amount) {
	    int256 divs=totalDiv();
	    
	    if(divs<0){
	        uint256 udivs=(uint256)(divs*-1);
	        uint256 b=balance();
	        if(b<udivs)return 0;
	        return b-udivs;
	    }
	    return balance()-(uint256)(divs);
	}

	// Calculates the number of tokens that can be bought for a given amount of Ether, according to the
	// dynamic reserve and totalSupply values (derived from the buy and sell prices).
	function getTokensForEther(uint256 ethervalue) public constant returns (uint256 tokens) {
		return sub(fixedExp(fixedLog(reserve() + ethervalue)*crr_n/crr_d + price_coeff), totalSupply);
	}

	// Semantically similar to getTokensForEther, but subtracts the callers balance from the amount of Ether returned for conversion.
	function calculateDividendTokens(uint256 ethervalue, uint256 subvalue) public constant returns (uint256 tokens) {
		return sub(fixedExp(fixedLog(reserve() - subvalue + ethervalue)*crr_n/crr_d + price_coeff), totalSupply);
	}
	
	// Converts a number tokens into an Ether value. Doesn't account for negative dividends
	function getEtherForTokensOld(uint256 tokens) public constant returns (uint256 ethervalue) {
		// How much reserve Ether do we have left in the contract?
		uint256 reserveAmount = reserve();

		// If you're the Highlander (or bagholder), you get The Prize. Everything left in the vault.
		if (tokens == totalSupply)
			return reserveAmount;

		// If there would be excess Ether left after the transaction this is called within, return the Ether
		// corresponding to the equation in Dr Jochen Hoenicke's original Ponzi paper, which can be found
		// at https://test.jochen-hoenicke.de/eth/ponzitoken/ in the third equation, with the CRR numerator 
		// and denominator altered to 1 and 2 respectively.
		return sub(reserveAmount, fixedExp((fixedLog(totalSupply - tokens) - price_coeff) * crr_d/crr_n));
	}

	// Converts a number tokens into an Ether value. Accounts for negative dividends
	function getEtherForTokens(uint256 tokens) public constant returns (uint256 ethervalue,uint256 penalty) {
		uint256 eth=getEtherForTokensOld(tokens);
		int256 divs=totalDiv();
		if(divs>=0)return (eth,0);
		
		uint256 debt=(uint256)(divs*-1);
		penalty=(((debt*scaleFactor)/totalSupply)*tokens)/scaleFactor;
		
		if(penalty>eth)return (0,penalty);
		return (eth-penalty,penalty);
	}

	// You don't care about these, but if you really do they're hex values for 
	// co-efficients used to simulate approximations of the log and exp functions.
	int256  constant one        = 0x10000000000000000;
	uint256 constant sqrt2      = 0x16a09e667f3bcc908;
	uint256 constant sqrtdot5   = 0x0b504f333f9de6484;
	int256  constant ln2        = 0x0b17217f7d1cf79ac;
	int256  constant ln2_64dot5 = 0x2cb53f09f05cc627c8;
	int256  constant c1         = 0x1ffffffffff9dac9b;
	int256  constant c3         = 0x0aaaaaaac16877908;
	int256  constant c5         = 0x0666664e5e9fa0c99;
	int256  constant c7         = 0x049254026a7630acf;
	int256  constant c9         = 0x038bd75ed37753d68;
	int256  constant c11        = 0x03284a0c14610924f;

	// The polynomial R = c1*x + c3*x^3 + ... + c11 * x^11
	// approximates the function log(1+x)-log(1-x)
	// Hence R(s) = log((1+s)/(1-s)) = log(a)
	function fixedLog(uint256 a) internal pure returns (int256 log) {
		int32 scale = 0;
		while (a > sqrt2) {
			a /= 2;
			scale++;
		}
		while (a <= sqrtdot5) {
			a *= 2;
			scale--;
		}
		int256 s = (((int256)(a) - one) * one) / ((int256)(a) + one);
		int256 z = (s*s) / one;
		return scale * ln2 +
			(s*(c1 + (z*(c3 + (z*(c5 + (z*(c7 + (z*(c9 + (z*c11/one))
				/one))/one))/one))/one))/one);
	}

	int256 constant c2 =  0x02aaaaaaaaa015db0;
	int256 constant c4 = -0x000b60b60808399d1;
	int256 constant c6 =  0x0000455956bccdd06;
	int256 constant c8 = -0x000001b893ad04b3a;
	
	// The polynomial R = 2 + c2*x^2 + c4*x^4 + ...
	// approximates the function x*(exp(x)+1)/(exp(x)-1)
	// Hence exp(x) = (R(x)+x)/(R(x)-x)
	function fixedExp(int256 a) internal pure returns (uint256 exp) {
		int256 scale = (a + (ln2_64dot5)) / ln2 - 64;
		a -= scale*ln2;
		int256 z = (a*a) / one;
		int256 R = ((int256)(2) * one) +
			(z*(c2 + (z*(c4 + (z*(c6 + (z*c8/one))/one))/one))/one);
		exp = (uint256) (((R + a) * one) / (R - a));
		if (scale >= 0)
			exp <<= scale;
		else
			exp >>= -scale;
		return exp;
	}
	
	// The below are safemath implementations of the four arithmetic operators
	// designed to explicitly prevent over- and under-flows of integer values.

	function mul(uint256 a, uint256 b) internal pure returns (uint256) {
		if (a == 0) {
			return 0;
		}
		uint256 c = a * b;
		assert(c / a == b);
		return c;
	}

	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 c;
	}

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

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

	// This allows you to buy tokens by sending Ether directly to the smart contract
	// without including any transaction data (useful for, say, mobile wallet apps).
	function () payable public {
		// msg.value is the amount of Ether sent by the transaction.
		if (msg.value > 0) {
			fund();
		} else {
			getMeOutOfHere();
		}
	}
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"GetMyBet","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"ClaimMyBet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"realDividends","outputs":[{"name":"amount","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"adr","type":"address"},{"name":"height","type":"uint256"}],"name":"GetNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tier","type":"uint256"},{"name":"betdata","type":"bytes"}],"name":"PlaceBet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","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":"ethervalue","type":"uint256"}],"name":"getTokensForEther","outputs":[{"name":"tokens","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"payouts","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"dividends","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BetPayout","outputs":[{"name":"payout","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"tokens","type":"uint256"}],"name":"getEtherForTokensOld","outputs":[{"name":"ethervalue","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"buyPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contractBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"reinvestDividends","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"number","type":"uint256"},{"name":"groupID","type":"uint256"}],"name":"GroupMultiplier","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"totalDiv","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getMeOutOfHere","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"fund","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"tokens","type":"uint256"}],"name":"getEtherForTokens","outputs":[{"name":"ethervalue","type":"uint256"},{"name":"penalty","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"ethervalue","type":"uint256"},{"name":"subvalue","type":"uint256"}],"name":"calculateDividendTokens","outputs":[{"name":"tokens","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"realReserve","outputs":[{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sellMyTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"tokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

6060604052341561000f57600080fd5b611a408061001e6000396000f3006060604052600436106101535763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302a2f06e81146101735780631015295c1461021a57806318160ddd1461022d5780631c990670146102525780631d2b63bf1461027157806324f731d5146102935780633ccfd60b146102de5780634b750334146102f157806362dbf2611461030457806365bcfbe71461031a57806368306e43146103395780636d15dc5a1461035857806370a082311461036b57806380aa57571461038a5780638620410b146103a05780638b7afe2e146103b3578063957b2e56146103c6578063a10daf4b146103d9578063a1ca70f4146103f2578063b1e3524214610405578063b60d428814610410578063b9f308f214610418578063bda5c45014610446578063cb6393221461045f578063e555c1a314610472578063eedc966a14610485575b6000341115610169576101646104a4565b610171565b6101716104d4565b005b341561017e57600080fd5b6101866104e4565b6040518086815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101db5780820151838201526020016101c3565b50505050905090810190601f1680156102085780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b341561022557600080fd5b6101716105f6565b341561023857600080fd5b610240610826565b60405190815260200160405180910390f35b341561025d57600080fd5b610240600160a060020a036004351661082c565b341561027c57600080fd5b610240600160a060020a0360043516602435610862565b610171600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506108da95505050505050565b34156102e957600080fd5b610171610c46565b34156102fc57600080fd5b610240610cc8565b341561030f57600080fd5b610240600435610cfc565b341561032557600080fd5b610240600160a060020a0360043516610d44565b341561034457600080fd5b610240600160a060020a0360043516610d56565b341561036357600080fd5b610240610da4565b341561037657600080fd5b610240600160a060020a0360043516610f3f565b341561039557600080fd5b610240600435610f5a565b34156103ab57600080fd5b610240610fb9565b34156103be57600080fd5b610240610fd1565b34156103d157600080fd5b610171610fd7565b34156103e457600080fd5b610240600435602435611176565b34156103fd57600080fd5b61024061127d565b341561016957600080fd5b6101716104a4565b341561042357600080fd5b61042e60043561129e565b60405191825260208201526040908101905180910390f35b341561045157600080fd5b61024060043560243561131e565b341561046a57600080fd5b610240611349565b341561047d57600080fd5b6101716113a0565b341561049057600080fd5b610240600160a060020a03600435166113b6565b64e8d4a510003411156104cd576104bd600654346113c8565b6006556104c86113d7565b6104d2565b600080fd5b565b6104dc6113a0565b6104d2610c46565b6000806000806104f2611917565b600160a060020a033316600090815260208190526040902080546001820154600290920154909190610522610da4565b60008033600160a060020a0316600160a060020a03168152602001908152602001600020600301808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105de5780601f106105b3576101008083540402835291602001916105de565b820191906000526020600020905b8154815290600101906020018083116105c157829003601f168201915b50505050509050945094509450945094509091929394565b6105fe611929565b600160a060020a03331660009081526020819052604080822090608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106da5780601f106106af576101008083540402835291602001916106da565b820191906000526020600020905b8154815290600101906020018083116106bd57829003601f168201915b505050505081525050915060014303826020015160020111156106fc57600080fd5b610704610da4565b90506000811115610822576130d461071a611349565b81151561072357fe5b600160a060020a0333166000908152602081905260409020600201549190049011156107c3578151610753611349565b106107be57600160a060020a03331660009081526020819052604081206001015581516006805491909103905561078a825161152b565b600160a060020a0333166108fc83519081150290604051600060405180830381858888f1935050505015156107be57600080fd5b610822565b600160a060020a0333166000908152602081905260408120600101556006805482900390556107f18161152b565b600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561082257600080fd5b5050565b60035481565b600160a060020a0316600090815260026020908152604080832054600190925290912054600554604060020a9102919091030590565b600060018201406002830140811580610879575080155b1561088757604592506108d2565b6025858383604051600160a060020a03939093166c01000000000000000000000000028352601483019190915260348201526054016040519081900390208115156108ce57fe5b0692505b505092915050565b6108e2611929565b600160a060020a033316600090815260208190526040808220829182918291608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109c35780601f10610998576101008083540402835291602001916109c3565b820191906000526020600020905b8154815290600101906020018083116109a657829003601f168201915b50505050508152505094503493506130d46109dc611349565b8115156109e557fe5b0487106109f157600080fd5b6001430385602001516002011115610a0857600080fd5b846020015115801590610a25575084602001516002016001430310155b15610b1757610a32610da4565b9250600083118015610a5b57506130d4610a4a611349565b811515610a5357fe5b048560400151115b15610b12578451610a6a611349565b10610adc57600160a060020a033316600090815260208190526040812060010155845160068054919091039055610aa1855161152b565b600160a060020a0333166108fc858751019081150290604051600060405180830381858888f193505050501515610ad757600080fd5b610b0d565b600160a060020a03331684156108fc0285604051600060405180830381858888f193505050501515610b0d57600080fd5b610c3d565b928201925b5060009050805b6031811015610b5157858181518110610b3357fe5b016020015160f860020a908190048102049190910190600101610b1e565b6032821115610b5f57600080fd5b9086029083821115610b7057600080fd5b43602080870191909152828652604080870189905260608701889052600160a060020a03331660009081529182905290208590815181556020820151816001015560408201518160020155606082015181600301908051610bd5929160200190611957565b50505092819003926000841115610c2957600680548590039055348410610c12576006805434860390819003909155610c0d9061152b565b610adc565b6006805434869003908101909155610adc9061154e565b6006805434908101909155610c3d9061154e565b50505050505050565b6000610c5133610d56565b600160a060020a03331660009081526002602052604090208054604060020a8302908101909155600480549091019055600654909150610c919082611571565b600655600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610cc557600080fd5b50565b600080600080610cde66038d7ea4c6800061129e565b9093509150610cee83600a611583565b905080830393505b50505090565b6000610d3e610d36680296abf784a358468b1960026001610d2587610d1f61159a565b016115d6565b02811515610d2f57fe5b05016116bb565b600354611571565b92915050565b60026020526000908152604090205481565b600160a060020a0381166000908152600260209081526040808320546001909252822054600554604060020a9102919091030581811215610d9a5760009150610d9e565b8091505b50919050565b6000610dae611929565b600160a060020a0333166000908152602081905260408082208291608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e8b5780601f10610e6057610100808354040283529160200191610e8b565b820191906000526020600020905b815481529060010190602001808311610e6e57829003601f168201915b5050505050815250509250610ea4338460200151610862565b91508160451415610eb85760009350610cf6565b82606001518281518110610ec857fe5b016020015160f860020a900460f860020a0260f860020a90046024029350602590505b6031811015610f3057610f018260258303611176565b83606001518281518110610f1157fe5b016020015160f860020a90819004810204029390930192600101610eeb565b82604001518402935050505090565b600160a060020a031660009081526001602052604090205490565b600080610f6561159a565b9050600354831415610f7957809150610d9e565b610fb281610fad60016002680296abf784a358468b19610f9c89600354036115d6565b0302811515610fa757fe5b056116bb565b611571565b9392505050565b6000610fcb66038d7ea4c68000610cfc565b90505b90565b60065481565b600080600080600080600080600080600080610ff233610d56565b600160a060020a03331660009081526002602052604090208054604060020a83029081019091556004805490910190559b508b9a5064e8d4a510008b1080611043575069d3c21bcecceda10000008b115b1561104d57600080fd5b3399508b61105961159a565b0398506110678b600a611583565b9750878b039650611078878d61131e565b9550604060020a88029450600060035411156110f45760016002036002888860035401604060020a8a8c8f0102028115156110af57fe5b048115156110b957fe5b04604060020a03028115156110ca57fe5b04935083880292508285039450600354838115156110e457fe5b6005805492909104918201905591505b611100600354876113c8565b600355600160a060020a038a1660009081526001602052604090205461112690876113c8565b600160a060020a03909a1660009081526001602090815260408083209c909c5560055460029091529a902080549a9096029490940398890190945550506004805490960190955550505050505050565b60006111806119d1565b610180604051908101604090815269030c30c30c30c30c30c0825268c30c30c30c30c30c3060208301526830c30c30c30c30c30c908201526303fffffc60608201526603fffffc00000060808201526903fffffc00000000000060a0820152642aaaaaaaa860c0820152690222222222222222222060e0820152690222208888a22208888861010082015268888a22220888a22220610120820152688888888888888888886101408201526902aaaaaaaa80000000006101608201529050600284028184600c811061124e57fe5b602002015169ffffffffffffffffffff169060020a900460031669ffffffffffffffffffff1691505092915050565b6000604060020a600454600354600554020381151561129857fe5b05905090565b60008060008060006112af86610f5a565b92506112b961127d565b9150600082126112d157919350600092508391611316565b81600019029050604060020a86600354604060020a84028115156112f157fe5b04028115156112fc57fe5b049350828411156113105760009450611316565b83830394505b505050915091565b6000610fb2610d36680296abf784a358468b1960026001610d25888861134261159a565b03016115d6565b60008060008061135761127d565b9250600083121561138e578260001902915061137161179f565b9050818110156113845760009350610cf6565b8181039350610cf6565b8261139761179f565b03935050505090565b60006113ab33610f3f565b9050610cc5816117a8565b60016020526000908152604090205481565b600082820183811015610fb257fe5b600080600080600080600080600064e8d4a51000341080611401575069d3c21bcecceda100000034115b1561140b57600080fd5b33985061141934600a611583565b9750873403965061142987610cfc565b9550604060020a88029450600060035411156114ac5760016002036002888860035401604060020a8a8c61145b61159a565b01020281151561146757fe5b0481151561147157fe5b04604060020a030281151561148257fe5b049350838802925082850394506003548381151561149c57fe5b6005805492909104918201905591505b6114b8600354876113c8565b600355600160a060020a0389166000908152600160205260409020546114de90876113c8565b600160a060020a0390991660009081526001602090815260408083209b909b5560055460029091529990208054999096029490940397880190945550506004805490950190945550505050565b600354604060020a820281151561153e57fe5b6005805492909104909103905550565b600354604060020a820281151561156157fe5b6005805492909104909101905550565b60008282111561157d57fe5b50900390565b600080828481151561159157fe5b04949350505050565b6000806115a561127d565b905060008112156115c55780600019026115bd61179f565b0191506115d2565b806115ce61179f565b0391505b5090565b60008080805b68016a09e667f3bcc9088511156115fe576002850494506001909201916115dc565b5b67b504f333f9de648485116116215760029490940293600019909201916115ff565b604060020a8501604060020a8087030281151561163a57fe5b05915050604060020a818002819005906801ffffffffff9dac9b67666664e5e9fa0c996738bd75ed37753d68673284a0c14610924f85028490050184028390056749254026a7630acf01840283900501830282900567aaaaaaac168779080183028290050183020567b17217f7d1cf79ac8460030b02019350505050919050565b6000808080604067b17217f7d1cf79ac682cb53f09f05cc627c887010503925067b17217f7d1cf79ac830285039450604060020a8586028115156116fb57fe5b059150604060020a672aaaaaaaaa015db0660455956bccdd06651b893ad04b3919850283900501840282900566b60b60808399d01901840282900501830205604060020a600202019050848103604060020a8683010281151561175a57fe5b0593506000831261177e578284600082121561177257fe5b9060020a029350611797565b8260000384600082121561178e57fe5b9060020a900493505b505050919050565b60065434900390565b6000806000806000806000806117bd8961129e565b60035491995097506000965089146117dd576117da88600a611583565b95505b85880394506117ee6003548a611571565b600355600160a060020a033316600090815260016020526040902054611814908a611571565b600160a060020a03331660009081526001602090815260408083209390935560055460029091529181208054928c02604060020a8902019283900390556004805483900390556003549195509011156118a657604060020a86029250600087111561188557604060020a8702830192505b6003548381151561189257fe5b6005805492909104918201905591506118c5565b600160a060020a03331660009081526002602052604090208054880190555b6118ce3361082c565b9050600081121561190c576118e6816000190261152b565b600160a060020a0333166000908152600260205260408120805460048054919091039055555b505050505050505050565b60206040519081016040526000815290565b608060405190810160405280600081526020016000815260200160008152602001611952611917565b905290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061199857805160ff19168380011785556119c5565b828001600101855582156119c5579182015b828111156119c55782518255916020019190600101906119aa565b506115d29291506119fa565b610180604051908101604052600c815b6000815260001990910190602001816119e15790505090565b610fce91905b808211156115d25760008155600101611a005600a165627a7a723058205fdba8090e8fcaf3aa227b29689c59a2be71f77fd685afab83631c554564252b0029

Deployed Bytecode

0x6060604052600436106101535763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302a2f06e81146101735780631015295c1461021a57806318160ddd1461022d5780631c990670146102525780631d2b63bf1461027157806324f731d5146102935780633ccfd60b146102de5780634b750334146102f157806362dbf2611461030457806365bcfbe71461031a57806368306e43146103395780636d15dc5a1461035857806370a082311461036b57806380aa57571461038a5780638620410b146103a05780638b7afe2e146103b3578063957b2e56146103c6578063a10daf4b146103d9578063a1ca70f4146103f2578063b1e3524214610405578063b60d428814610410578063b9f308f214610418578063bda5c45014610446578063cb6393221461045f578063e555c1a314610472578063eedc966a14610485575b6000341115610169576101646104a4565b610171565b6101716104d4565b005b341561017e57600080fd5b6101866104e4565b6040518086815260200185815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101db5780820151838201526020016101c3565b50505050905090810190601f1680156102085780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b341561022557600080fd5b6101716105f6565b341561023857600080fd5b610240610826565b60405190815260200160405180910390f35b341561025d57600080fd5b610240600160a060020a036004351661082c565b341561027c57600080fd5b610240600160a060020a0360043516602435610862565b610171600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506108da95505050505050565b34156102e957600080fd5b610171610c46565b34156102fc57600080fd5b610240610cc8565b341561030f57600080fd5b610240600435610cfc565b341561032557600080fd5b610240600160a060020a0360043516610d44565b341561034457600080fd5b610240600160a060020a0360043516610d56565b341561036357600080fd5b610240610da4565b341561037657600080fd5b610240600160a060020a0360043516610f3f565b341561039557600080fd5b610240600435610f5a565b34156103ab57600080fd5b610240610fb9565b34156103be57600080fd5b610240610fd1565b34156103d157600080fd5b610171610fd7565b34156103e457600080fd5b610240600435602435611176565b34156103fd57600080fd5b61024061127d565b341561016957600080fd5b6101716104a4565b341561042357600080fd5b61042e60043561129e565b60405191825260208201526040908101905180910390f35b341561045157600080fd5b61024060043560243561131e565b341561046a57600080fd5b610240611349565b341561047d57600080fd5b6101716113a0565b341561049057600080fd5b610240600160a060020a03600435166113b6565b64e8d4a510003411156104cd576104bd600654346113c8565b6006556104c86113d7565b6104d2565b600080fd5b565b6104dc6113a0565b6104d2610c46565b6000806000806104f2611917565b600160a060020a033316600090815260208190526040902080546001820154600290920154909190610522610da4565b60008033600160a060020a0316600160a060020a03168152602001908152602001600020600301808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105de5780601f106105b3576101008083540402835291602001916105de565b820191906000526020600020905b8154815290600101906020018083116105c157829003601f168201915b50505050509050945094509450945094509091929394565b6105fe611929565b600160a060020a03331660009081526020819052604080822090608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106da5780601f106106af576101008083540402835291602001916106da565b820191906000526020600020905b8154815290600101906020018083116106bd57829003601f168201915b505050505081525050915060014303826020015160020111156106fc57600080fd5b610704610da4565b90506000811115610822576130d461071a611349565b81151561072357fe5b600160a060020a0333166000908152602081905260409020600201549190049011156107c3578151610753611349565b106107be57600160a060020a03331660009081526020819052604081206001015581516006805491909103905561078a825161152b565b600160a060020a0333166108fc83519081150290604051600060405180830381858888f1935050505015156107be57600080fd5b610822565b600160a060020a0333166000908152602081905260408120600101556006805482900390556107f18161152b565b600160a060020a03331681156108fc0282604051600060405180830381858888f19350505050151561082257600080fd5b5050565b60035481565b600160a060020a0316600090815260026020908152604080832054600190925290912054600554604060020a9102919091030590565b600060018201406002830140811580610879575080155b1561088757604592506108d2565b6025858383604051600160a060020a03939093166c01000000000000000000000000028352601483019190915260348201526054016040519081900390208115156108ce57fe5b0692505b505092915050565b6108e2611929565b600160a060020a033316600090815260208190526040808220829182918291608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109c35780601f10610998576101008083540402835291602001916109c3565b820191906000526020600020905b8154815290600101906020018083116109a657829003601f168201915b50505050508152505094503493506130d46109dc611349565b8115156109e557fe5b0487106109f157600080fd5b6001430385602001516002011115610a0857600080fd5b846020015115801590610a25575084602001516002016001430310155b15610b1757610a32610da4565b9250600083118015610a5b57506130d4610a4a611349565b811515610a5357fe5b048560400151115b15610b12578451610a6a611349565b10610adc57600160a060020a033316600090815260208190526040812060010155845160068054919091039055610aa1855161152b565b600160a060020a0333166108fc858751019081150290604051600060405180830381858888f193505050501515610ad757600080fd5b610b0d565b600160a060020a03331684156108fc0285604051600060405180830381858888f193505050501515610b0d57600080fd5b610c3d565b928201925b5060009050805b6031811015610b5157858181518110610b3357fe5b016020015160f860020a908190048102049190910190600101610b1e565b6032821115610b5f57600080fd5b9086029083821115610b7057600080fd5b43602080870191909152828652604080870189905260608701889052600160a060020a03331660009081529182905290208590815181556020820151816001015560408201518160020155606082015181600301908051610bd5929160200190611957565b50505092819003926000841115610c2957600680548590039055348410610c12576006805434860390819003909155610c0d9061152b565b610adc565b6006805434869003908101909155610adc9061154e565b6006805434908101909155610c3d9061154e565b50505050505050565b6000610c5133610d56565b600160a060020a03331660009081526002602052604090208054604060020a8302908101909155600480549091019055600654909150610c919082611571565b600655600160a060020a03331681156108fc0282604051600060405180830381858888f193505050501515610cc557600080fd5b50565b600080600080610cde66038d7ea4c6800061129e565b9093509150610cee83600a611583565b905080830393505b50505090565b6000610d3e610d36680296abf784a358468b1960026001610d2587610d1f61159a565b016115d6565b02811515610d2f57fe5b05016116bb565b600354611571565b92915050565b60026020526000908152604090205481565b600160a060020a0381166000908152600260209081526040808320546001909252822054600554604060020a9102919091030581811215610d9a5760009150610d9e565b8091505b50919050565b6000610dae611929565b600160a060020a0333166000908152602081905260408082208291608090519081016040529081600082015481526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e8b5780601f10610e6057610100808354040283529160200191610e8b565b820191906000526020600020905b815481529060010190602001808311610e6e57829003601f168201915b5050505050815250509250610ea4338460200151610862565b91508160451415610eb85760009350610cf6565b82606001518281518110610ec857fe5b016020015160f860020a900460f860020a0260f860020a90046024029350602590505b6031811015610f3057610f018260258303611176565b83606001518281518110610f1157fe5b016020015160f860020a90819004810204029390930192600101610eeb565b82604001518402935050505090565b600160a060020a031660009081526001602052604090205490565b600080610f6561159a565b9050600354831415610f7957809150610d9e565b610fb281610fad60016002680296abf784a358468b19610f9c89600354036115d6565b0302811515610fa757fe5b056116bb565b611571565b9392505050565b6000610fcb66038d7ea4c68000610cfc565b90505b90565b60065481565b600080600080600080600080600080600080610ff233610d56565b600160a060020a03331660009081526002602052604090208054604060020a83029081019091556004805490910190559b508b9a5064e8d4a510008b1080611043575069d3c21bcecceda10000008b115b1561104d57600080fd5b3399508b61105961159a565b0398506110678b600a611583565b9750878b039650611078878d61131e565b9550604060020a88029450600060035411156110f45760016002036002888860035401604060020a8a8c8f0102028115156110af57fe5b048115156110b957fe5b04604060020a03028115156110ca57fe5b04935083880292508285039450600354838115156110e457fe5b6005805492909104918201905591505b611100600354876113c8565b600355600160a060020a038a1660009081526001602052604090205461112690876113c8565b600160a060020a03909a1660009081526001602090815260408083209c909c5560055460029091529a902080549a9096029490940398890190945550506004805490960190955550505050505050565b60006111806119d1565b610180604051908101604090815269030c30c30c30c30c30c0825268c30c30c30c30c30c3060208301526830c30c30c30c30c30c908201526303fffffc60608201526603fffffc00000060808201526903fffffc00000000000060a0820152642aaaaaaaa860c0820152690222222222222222222060e0820152690222208888a22208888861010082015268888a22220888a22220610120820152688888888888888888886101408201526902aaaaaaaa80000000006101608201529050600284028184600c811061124e57fe5b602002015169ffffffffffffffffffff169060020a900460031669ffffffffffffffffffff1691505092915050565b6000604060020a600454600354600554020381151561129857fe5b05905090565b60008060008060006112af86610f5a565b92506112b961127d565b9150600082126112d157919350600092508391611316565b81600019029050604060020a86600354604060020a84028115156112f157fe5b04028115156112fc57fe5b049350828411156113105760009450611316565b83830394505b505050915091565b6000610fb2610d36680296abf784a358468b1960026001610d25888861134261159a565b03016115d6565b60008060008061135761127d565b9250600083121561138e578260001902915061137161179f565b9050818110156113845760009350610cf6565b8181039350610cf6565b8261139761179f565b03935050505090565b60006113ab33610f3f565b9050610cc5816117a8565b60016020526000908152604090205481565b600082820183811015610fb257fe5b600080600080600080600080600064e8d4a51000341080611401575069d3c21bcecceda100000034115b1561140b57600080fd5b33985061141934600a611583565b9750873403965061142987610cfc565b9550604060020a88029450600060035411156114ac5760016002036002888860035401604060020a8a8c61145b61159a565b01020281151561146757fe5b0481151561147157fe5b04604060020a030281151561148257fe5b049350838802925082850394506003548381151561149c57fe5b6005805492909104918201905591505b6114b8600354876113c8565b600355600160a060020a0389166000908152600160205260409020546114de90876113c8565b600160a060020a0390991660009081526001602090815260408083209b909b5560055460029091529990208054999096029490940397880190945550506004805490950190945550505050565b600354604060020a820281151561153e57fe5b6005805492909104909103905550565b600354604060020a820281151561156157fe5b6005805492909104909101905550565b60008282111561157d57fe5b50900390565b600080828481151561159157fe5b04949350505050565b6000806115a561127d565b905060008112156115c55780600019026115bd61179f565b0191506115d2565b806115ce61179f565b0391505b5090565b60008080805b68016a09e667f3bcc9088511156115fe576002850494506001909201916115dc565b5b67b504f333f9de648485116116215760029490940293600019909201916115ff565b604060020a8501604060020a8087030281151561163a57fe5b05915050604060020a818002819005906801ffffffffff9dac9b67666664e5e9fa0c996738bd75ed37753d68673284a0c14610924f85028490050184028390056749254026a7630acf01840283900501830282900567aaaaaaac168779080183028290050183020567b17217f7d1cf79ac8460030b02019350505050919050565b6000808080604067b17217f7d1cf79ac682cb53f09f05cc627c887010503925067b17217f7d1cf79ac830285039450604060020a8586028115156116fb57fe5b059150604060020a672aaaaaaaaa015db0660455956bccdd06651b893ad04b3919850283900501840282900566b60b60808399d01901840282900501830205604060020a600202019050848103604060020a8683010281151561175a57fe5b0593506000831261177e578284600082121561177257fe5b9060020a029350611797565b8260000384600082121561178e57fe5b9060020a900493505b505050919050565b60065434900390565b6000806000806000806000806117bd8961129e565b60035491995097506000965089146117dd576117da88600a611583565b95505b85880394506117ee6003548a611571565b600355600160a060020a033316600090815260016020526040902054611814908a611571565b600160a060020a03331660009081526001602090815260408083209390935560055460029091529181208054928c02604060020a8902019283900390556004805483900390556003549195509011156118a657604060020a86029250600087111561188557604060020a8702830192505b6003548381151561189257fe5b6005805492909104918201905591506118c5565b600160a060020a03331660009081526002602052604090208054880190555b6118ce3361082c565b9050600081121561190c576118e6816000190261152b565b600160a060020a0333166000908152600260205260408120805460048054919091039055555b505050505050505050565b60206040519081016040526000815290565b608060405190810160405280600081526020016000815260200160008152602001611952611917565b905290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061199857805160ff19168380011785556119c5565b828001600101855582156119c5579182015b828111156119c55782518255916020019190600101906119aa565b506115d29291506119fa565b610180604051908101604052600c815b6000815260001990910190602001816119e15790505090565b610fce91905b808211156115d25760008155600101611a005600a165627a7a723058205fdba8090e8fcaf3aa227b29689c59a2be71f77fd685afab83631c554564252b0029

Swarm Source

bzzr://5fdba8090e8fcaf3aa227b29689c59a2be71f77fd685afab83631c554564252b

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.