ETH Price: $1,594.07 (+0.12%)
Gas: 7 Gwei
 

Overview

ETH Balance

0.2 ETH

Eth Value

$318.81 (@ $1,594.07/ETH)

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
Value
Transfer13894682016-04-23 13:11:142709 days 20 hrs ago1461417074IN
0xF767fC...6c3372A8
1 ETH0.002708320
Transfer13893872016-04-23 12:51:532709 days 21 hrs ago1461415913IN
0xF767fC...6c3372A8
1 ETH0.0048123922
Transfer13893762016-04-23 12:49:152709 days 21 hrs ago1461415755IN
0xF767fC...6c3372A8
1 ETH0.0034714220
Transfer13893552016-04-23 12:43:152709 days 21 hrs ago1461415395IN
0xF767fC...6c3372A8
1 ETH0.0052936224.2
Transfer13893342016-04-23 12:38:242709 days 21 hrs ago1461415104IN
0xF767fC...6c3372A8
1 ETH0.002708320
Transfer13893302016-04-23 12:36:592709 days 21 hrs ago1461415019IN
0xF767fC...6c3372A8
1 ETH0.0024220
Transfer13892922016-04-23 12:29:172709 days 21 hrs ago1461414557IN
0xF767fC...6c3372A8
1 ETH0.0037714220
Transfer13892852016-04-23 12:28:072709 days 21 hrs ago1461414487IN
0xF767fC...6c3372A8
1 ETH0.003366120
Transfer13892802016-04-23 12:26:492709 days 21 hrs ago1461414409IN
0xF767fC...6c3372A8
1 ETH0.004374920
Transfer13892702016-04-23 12:25:032709 days 21 hrs ago1461414303IN
0xF767fC...6c3372A8
1 ETH0.002708320
Transfer13892572016-04-23 12:22:462709 days 21 hrs ago1461414166IN
0xF767fC...6c3372A8
1 ETH0.0037714220
Transfer13892472016-04-23 12:19:152709 days 21 hrs ago1461413955IN
0xF767fC...6c3372A8
1 ETH0.004674920
Transfer13891722016-04-23 12:01:542709 days 22 hrs ago1461412914IN
0xF767fC...6c3372A8
1 ETH0.003666120
Transfer13891702016-04-23 12:01:272709 days 22 hrs ago1461412887IN
0xF767fC...6c3372A8
1 ETH0.0042093820
0x6060604013891552016-04-23 11:57:152709 days 22 hrs ago1461412635IN
 Create: LuckyDoubler
0 ETH0.0165757620

Latest 25 internal transactions (View All)

Advanced mode:
Advanced Filter
Parent Txn Hash Block From To Value
17123722016-06-16 3:18:232656 days 6 hrs ago1466047103
0xF767fC...6c3372A8
0.05 ETH
17123722016-06-16 3:18:232656 days 6 hrs ago1466047103
0xF767fC...6c3372A8
1.25 ETH
17123722016-06-16 3:18:232656 days 6 hrs ago1466047103
0xF767fC...6c3372A8
1 ETH
17123562016-06-16 3:16:022656 days 6 hrs ago1466046962
0xF767fC...6c3372A8
0.05 ETH
17123562016-06-16 3:16:022656 days 6 hrs ago1466046962
0xF767fC...6c3372A8
1.25 ETH
17123562016-06-16 3:16:022656 days 6 hrs ago1466046962
0xF767fC...6c3372A8
1 ETH
17120632016-06-16 2:06:362656 days 7 hrs ago1466042796
0xF767fC...6c3372A8
0.05 ETH
17120632016-06-16 2:06:362656 days 7 hrs ago1466042796
0xF767fC...6c3372A8
1.25 ETH
17120632016-06-16 2:06:362656 days 7 hrs ago1466042796
0xF767fC...6c3372A8
1 ETH
17115912016-06-16 0:11:142656 days 9 hrs ago1466035874
0xF767fC...6c3372A8
1 ETH
17114902016-06-15 23:45:252656 days 10 hrs ago1466034325
0xF767fC...6c3372A8
1 ETH
17114612016-06-15 23:36:462656 days 10 hrs ago1466033806
0xF767fC...6c3372A8
1 ETH
13894682016-04-23 13:11:142709 days 20 hrs ago1461417074
0xF767fC...6c3372A8
0.05 ETH
13893872016-04-23 12:51:532709 days 21 hrs ago1461415913
0xF767fC...6c3372A8
0.05 ETH
13893872016-04-23 12:51:532709 days 21 hrs ago1461415913
0xF767fC...6c3372A8
1.25 ETH
13893762016-04-23 12:49:152709 days 21 hrs ago1461415755
0xF767fC...6c3372A8
0.05 ETH
13893762016-04-23 12:49:152709 days 21 hrs ago1461415755
0xF767fC...6c3372A8
1.25 ETH
13893552016-04-23 12:43:152709 days 21 hrs ago1461415395
0xF767fC...6c3372A8
0.05 ETH
13893552016-04-23 12:43:152709 days 21 hrs ago1461415395
0xF767fC...6c3372A8
1.25 ETH
13893342016-04-23 12:38:242709 days 21 hrs ago1461415104
0xF767fC...6c3372A8
0.05 ETH
13892922016-04-23 12:29:172709 days 21 hrs ago1461414557
0xF767fC...6c3372A8
0.05 ETH
13892922016-04-23 12:29:172709 days 21 hrs ago1461414557
0xF767fC...6c3372A8
1.25 ETH
13892852016-04-23 12:28:072709 days 21 hrs ago1461414487
0xF767fC...6c3372A8
0.05 ETH
13892852016-04-23 12:28:072709 days 21 hrs ago1461414487
0xF767fC...6c3372A8
1.25 ETH
13892802016-04-23 12:26:492709 days 21 hrs ago1461414409
0xF767fC...6c3372A8
0.05 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LuckyDoubler

Compiler Version
v0.3.1-2016-04-12-3ad5e82

Optimization Enabled:
Yes with 200 runs

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

contract LuckyDoubler {
//##########################################################
//#### LuckyDoubler: A doubler with random payout order ####
//#### Deposit 1 ETHER to participate                   ####
//##########################################################
//COPYRIGHT 2016 KATATSUKI ALL RIGHTS RESERVED
//No part of this source code may be reproduced, distributed,
//modified or transmitted in any form or by any means without
//the prior written permission of the creator.

    address private owner;
    
    //Stored variables
    uint private balance = 0;
    uint private fee = 5;
    uint private multiplier = 125;

    mapping (address => User) private users;
    Entry[] private entries;
    uint[] private unpaidEntries;
    
    //Set owner on contract creation
    function LuckyDoubler() {
        owner = msg.sender;
    }

    modifier onlyowner { if (msg.sender == owner) _ }
    
    struct User {
        address id;
        uint deposits;
        uint payoutsReceived;
    }
    
    struct Entry {
        address entryAddress;
        uint deposit;
        uint payout;
        bool paid;
    }

    //Fallback function
    function() {
        init();
    }
    
    function init() private{
        
        if (msg.value < 1 ether) {
             msg.sender.send(msg.value);
            return;
        }
        
        join();
    }
    
    function join() private {
        
        //Limit deposits to 1ETH
        uint dValue = 1 ether;
        
        if (msg.value > 1 ether) {
            
        	msg.sender.send(msg.value - 1 ether);	
        	dValue = 1 ether;
        }
      
        //Add new users to the users array
        if (users[msg.sender].id == address(0))
        {
            users[msg.sender].id = msg.sender;
            users[msg.sender].deposits = 0;
            users[msg.sender].payoutsReceived = 0;
        }
        
        //Add new entry to the entries array
        entries.push(Entry(msg.sender, dValue, (dValue * (multiplier) / 100), false));
        users[msg.sender].deposits++;
        unpaidEntries.push(entries.length -1);
        
        //Collect fees and update contract balance
        balance += (dValue * (100 - fee)) / 100;
        
        uint index = unpaidEntries.length > 1 ? rand(unpaidEntries.length) : 0;
        Entry theEntry = entries[unpaidEntries[index]];
        
        //Pay pending entries if the new balance allows for it
        if (balance > theEntry.payout) {
            
            uint payout = theEntry.payout;
            
            theEntry.entryAddress.send(payout);
            theEntry.paid = true;
            users[theEntry.entryAddress].payoutsReceived++;

            balance -= payout;
            
            if (index < unpaidEntries.length - 1)
                unpaidEntries[index] = unpaidEntries[unpaidEntries.length - 1];
           
            unpaidEntries.length--;
            
        }
        
        //Collect money from fees and possible leftovers from errors (actual balance untouched)
        uint fees = this.balance - balance;
        if (fees > 0)
        {
                owner.send(fees);
        }      
       
    }
    
    //Generate random number between 0 & max
    uint256 constant private FACTOR =  1157920892373161954235709850086879078532699846656405640394575840079131296399;
    function rand(uint max) constant private returns (uint256 result){
        uint256 factor = FACTOR * 100 / max;
        uint256 lastBlockNumber = block.number - 1;
        uint256 hashVal = uint256(block.blockhash(lastBlockNumber));
    
        return uint256((uint256(hashVal) / factor)) % max;
    }
    
    
    //Contract management
    function changeOwner(address newOwner) onlyowner {
        owner = newOwner;
    }
    
    function changeMultiplier(uint multi) onlyowner {
        if (multi < 110 || multi > 150) throw;
        
        multiplier = multi;
    }
    
    function changeFee(uint newFee) onlyowner {
        if (fee > 5) 
            throw;
        fee = newFee;
    }
    
    
    //JSON functions
    function multiplierFactor() constant returns (uint factor, string info) {
        factor = multiplier;
        info = 'The current multiplier applied to all deposits. Min 110%, max 150%.'; 
    }
    
    function currentFee() constant returns (uint feePercentage, string info) {
        feePercentage = fee;
        info = 'The fee percentage applied to all deposits. It can change to speed payouts (max 5%).';
    }
    
    function totalEntries() constant returns (uint count, string info) {
        count = entries.length;
        info = 'The number of deposits.';
    }
    
    function userStats(address user) constant returns (uint deposits, uint payouts, string info)
    {
        if (users[user].id != address(0x0))
        {
            deposits = users[user].deposits;
            payouts = users[user].payoutsReceived;
            info = 'Users stats: total deposits, payouts received.';
        }
    }
    
    function entryDetails(uint index) constant returns (address user, uint payout, bool paid, string info)
    {
        if (index < entries.length) {
            user = entries[index].entryAddress;
            payout = entries[index].payout / 1 finney;
            paid = entries[index].paid;
            info = 'Entry info: user address, expected payout in Finneys, payout status.';
        }
    }
    
    
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"multiplierFactor","outputs":[{"name":"factor","type":"uint256"},{"name":"info","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"newFee","type":"uint256"}],"name":"changeFee","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"totalEntries","outputs":[{"name":"count","type":"uint256"},{"name":"info","type":"string"}],"type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"userStats","outputs":[{"name":"deposits","type":"uint256"},{"name":"payouts","type":"uint256"},{"name":"info","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"multi","type":"uint256"}],"name":"changeMultiplier","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"currentFee","outputs":[{"name":"feePercentage","type":"uint256"},{"name":"info","type":"string"}],"type":"function"},{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"entryDetails","outputs":[{"name":"user","type":"address"},{"name":"payout","type":"uint256"},{"name":"paid","type":"bool"},{"name":"info","type":"string"}],"type":"function"},{"inputs":[],"type":"constructor"}]

606060405260006001556005600255607d60035560008054600160a060020a03191633179055610a78806100336000396000f36060604052361561006c5760e060020a600035046330677b8381146100a55780636a1db1bf146101b15780637fef036e146101e15780638a65d8741461022d578063a6f9dae1146102da578063ced926701461030f578063da3c300d14610347578063f67abd87146103e2575b6105476100a3670de0b6b3a764000034101561065157604051600160a060020a03331690600090349082818181858883f150505050505b565b604080516020808201835260009091528151600354608082018452604382527f5468652063757272656e74206d756c7469706c696572206170706c6965642074928201929092527f6f20616c6c206465706f736974732e204d696e20313130252c206d6178203135928101929092527f30252e00000000000000000000000000000000000000000000000000000000006060830152905b60405180838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101a25780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b610547600435600054600160a060020a039081163391909116141561030c57600254600590111561074c57610002565b604080516020808201835260009091528151600554818401909352601781527f546865206e756d626572206f66206465706f736974732e0000000000000000009181019190915261013c565b61054960043560408051602080820183526000808352600160a060020a0385811682526004909252928320548392911682146102d35750506040908190206002810154600191909101548251606081018452602e81527f55736572732073746174733a20746f74616c206465706f736974732c2070617960208201527f6f7574732072656365697665642e00000000000000000000000000000000000093810193909352915b9193909250565b610547600435600054600160a060020a039081163391909116141561030c5760008054600160a060020a031916821790555b50565b610547600435600054600160a060020a039081163391909116141561030c57606e81108061033d5750609681115b1561074757610002565b604080516020808201835260009091528151600254608082018452605482527f546865206665652070657263656e74616765206170706c69656420746f20616c928201929092527f6c206465706f736974732e2049742063616e206368616e676520746f20737065928101929092527f6564207061796f75747320286d6178203525292e00000000000000000000000060608301529061013c565b6105c560043560408051602081019091526000808252600554909182918291908510156105405760058054869081101561000257508054818452600487027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00154600160a060020a0316955066038d7ea4c6800091908790811015610002579060005260206000209060040201600050600201546005805492909104945090869081101561000257505060408051600487027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db30154608082018352604482527f456e74727920696e666f3a207573657220616464726573732c2065787065637460208301527f6564207061796f757420696e2046696e6e6579732c207061796f757420737461928201929092527f7475732e00000000000000000000000000000000000000000000000000000000606082015260ff91909116925090505b9193509193565b005b60405180848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105b55780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b6040518085600160a060020a03168152602001848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156106405780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6100a3670de0b6b3a76400006000808080348590111561069657604051600160a060020a033316908290670de0b6b3a763ffff1934019082818181858883f150505050505b600160a060020a0333811660009081526004602052604081205490911614156106dc57604060009081208054600160a060020a0319163317815560018101829055600201555b600580546001810180835582818380158290116107515760040281600402836000526020600020918201910161075191905b8082111561081e578054600160a060020a031916815560006001820181815560028301919091556003909101805460ff1916905561070e565b600355565b600255565b50505091909060005260206000209060040201600050604080516080810182523380825260208083018b9052600380546064908d020484860181905260006060959095018590528654600160a060020a0319168417875560018781018e905560028801919091559501805460ff19169055600160a060020a039091168252600490522081018054820190556006805491820180825590925082818380158290116108225781836000526020600020918201910161082291905b8082111561081e576000815560010161080a565b5090565b50505060009283525060055460209092206000199290920191015560018054600254606490810388020401815560065411610a185760005b60068054919550600591869081101561000257506000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f850154815481101561000257906000526020600020906004020160005060015460028201549194501115610a3357604051835460028501549350600160a060020a031690600090849082818181858883f193505050505060018360030160006101000a81548160ff02191690830217905550600460005060008460000160009054906101000a9004600160a060020a0316600160a060020a031681526020019081526020016000206000506002016000818150548092919060010191905055508160016000828282505403925050819055506001600660005080549050038410156109e657600680546000198101908110156100025750805460008290527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3e810154919086908110156100025750507ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8501555b600680546000198101808355909190828015829011610a2e57818360005260206000209182019101610a2e919061080a565b600654602319819004436000190140040661085a565b505050505b5060015430600160a060020a031631036000811115610a715760008054604051600160a060020a03919091169190839082818181858883f150505050505b505050505056

Deployed Bytecode

0x6060604052361561006c5760e060020a600035046330677b8381146100a55780636a1db1bf146101b15780637fef036e146101e15780638a65d8741461022d578063a6f9dae1146102da578063ced926701461030f578063da3c300d14610347578063f67abd87146103e2575b6105476100a3670de0b6b3a764000034101561065157604051600160a060020a03331690600090349082818181858883f150505050505b565b604080516020808201835260009091528151600354608082018452604382527f5468652063757272656e74206d756c7469706c696572206170706c6965642074928201929092527f6f20616c6c206465706f736974732e204d696e20313130252c206d6178203135928101929092527f30252e00000000000000000000000000000000000000000000000000000000006060830152905b60405180838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101a25780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b610547600435600054600160a060020a039081163391909116141561030c57600254600590111561074c57610002565b604080516020808201835260009091528151600554818401909352601781527f546865206e756d626572206f66206465706f736974732e0000000000000000009181019190915261013c565b61054960043560408051602080820183526000808352600160a060020a0385811682526004909252928320548392911682146102d35750506040908190206002810154600191909101548251606081018452602e81527f55736572732073746174733a20746f74616c206465706f736974732c2070617960208201527f6f7574732072656365697665642e00000000000000000000000000000000000093810193909352915b9193909250565b610547600435600054600160a060020a039081163391909116141561030c5760008054600160a060020a031916821790555b50565b610547600435600054600160a060020a039081163391909116141561030c57606e81108061033d5750609681115b1561074757610002565b604080516020808201835260009091528151600254608082018452605482527f546865206665652070657263656e74616765206170706c69656420746f20616c928201929092527f6c206465706f736974732e2049742063616e206368616e676520746f20737065928101929092527f6564207061796f75747320286d6178203525292e00000000000000000000000060608301529061013c565b6105c560043560408051602081019091526000808252600554909182918291908510156105405760058054869081101561000257508054818452600487027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00154600160a060020a0316955066038d7ea4c6800091908790811015610002579060005260206000209060040201600050600201546005805492909104945090869081101561000257505060408051600487027f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db30154608082018352604482527f456e74727920696e666f3a207573657220616464726573732c2065787065637460208301527f6564207061796f757420696e2046696e6e6579732c207061796f757420737461928201929092527f7475732e00000000000000000000000000000000000000000000000000000000606082015260ff91909116925090505b9193509193565b005b60405180848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156105b55780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b6040518085600160a060020a03168152602001848152602001838152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156106405780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b6100a3670de0b6b3a76400006000808080348590111561069657604051600160a060020a033316908290670de0b6b3a763ffff1934019082818181858883f150505050505b600160a060020a0333811660009081526004602052604081205490911614156106dc57604060009081208054600160a060020a0319163317815560018101829055600201555b600580546001810180835582818380158290116107515760040281600402836000526020600020918201910161075191905b8082111561081e578054600160a060020a031916815560006001820181815560028301919091556003909101805460ff1916905561070e565b600355565b600255565b50505091909060005260206000209060040201600050604080516080810182523380825260208083018b9052600380546064908d020484860181905260006060959095018590528654600160a060020a0319168417875560018781018e905560028801919091559501805460ff19169055600160a060020a039091168252600490522081018054820190556006805491820180825590925082818380158290116108225781836000526020600020918201910161082291905b8082111561081e576000815560010161080a565b5090565b50505060009283525060055460209092206000199290920191015560018054600254606490810388020401815560065411610a185760005b60068054919550600591869081101561000257506000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f850154815481101561000257906000526020600020906004020160005060015460028201549194501115610a3357604051835460028501549350600160a060020a031690600090849082818181858883f193505050505060018360030160006101000a81548160ff02191690830217905550600460005060008460000160009054906101000a9004600160a060020a0316600160a060020a031681526020019081526020016000206000506002016000818150548092919060010191905055508160016000828282505403925050819055506001600660005080549050038410156109e657600680546000198101908110156100025750805460008290527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3e810154919086908110156100025750507ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8501555b600680546000198101808355909190828015829011610a2e57818360005260206000209182019101610a2e919061080a565b600654602319819004436000190140040661085a565b505050505b5060015430600160a060020a031631036000811115610a715760008054604051600160a060020a03919091169190839082818181858883f150505050505b505050505056

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.