Overview
ETH Balance
20.099696042789215804 ETH
Eth Value
$68,517.60 (@ $3,408.89/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,752 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 18387296 | 272 days ago | IN | 0 ETH | 0.00021833 | ||||
Transfer Ownersh... | 16085618 | 595 days ago | IN | 0 ETH | 0.00027994 | ||||
Transfer Ownersh... | 14460507 | 845 days ago | IN | 0 ETH | 0.00071426 | ||||
Change Token Con... | 14165575 | 891 days ago | IN | 0 ETH | 0.00207099 | ||||
Transfer Ownersh... | 14165575 | 891 days ago | IN | 0 ETH | 0.00207862 | ||||
Withdrawal Profi... | 13275213 | 1030 days ago | IN | 0 ETH | 1.32311448 | ||||
Withdrawal Profi... | 12866467 | 1093 days ago | IN | 0 ETH | 0.00153 | ||||
Withdrawal Profi... | 12670830 | 1124 days ago | IN | 0 ETH | 0.00082571 | ||||
0x6cb927d8 | 11966469 | 1233 days ago | IN | 0 ETH | 0.00232932 | ||||
Withdrawal Profi... | 9017941 | 1693 days ago | IN | 0 ETH | 0.00006949 | ||||
Withdrawal Profi... | 9017932 | 1693 days ago | IN | 0 ETH | 0.00003473 | ||||
Withdrawal Profi... | 8243824 | 1816 days ago | IN | 0 ETH | 0.0018 | ||||
Withdrawal Profi... | 8243772 | 1816 days ago | IN | 0 ETH | 0.00015 | ||||
Withdrawal Profi... | 7852602 | 1877 days ago | IN | 0 ETH | 0.00410069 | ||||
Withdrawal Profi... | 7850903 | 1877 days ago | IN | 0 ETH | 0.00262469 | ||||
Withdrawal Profi... | 7850862 | 1877 days ago | IN | 0.01 ETH | 0.00123 | ||||
Withdrawal Profi... | 7850844 | 1877 days ago | IN | 0 ETH | 0.0008733 | ||||
Withdrawal Profi... | 7490480 | 1934 days ago | IN | 0 ETH | 0.00063179 | ||||
Withdrawal Profi... | 7296834 | 1964 days ago | IN | 0 ETH | 0.00063179 | ||||
Withdrawal Profi... | 7149973 | 1996 days ago | IN | 0 ETH | 0.00259033 | ||||
Withdrawal Profi... | 7145578 | 1997 days ago | IN | 0 ETH | 0.001 | ||||
Withdrawal Profi... | 6996835 | 2024 days ago | IN | 0 ETH | 0.0099056 | ||||
Withdrawal Profi... | 6989255 | 2025 days ago | IN | 0 ETH | 0.00035455 | ||||
Withdrawal Profi... | 6978735 | 2027 days ago | IN | 0 ETH | 0.00259033 | ||||
Withdrawal Profi... | 6820147 | 2054 days ago | IN | 0 ETH | 0.00099056 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
12670830 | 1124 days ago | 5.7680734 ETH | ||||
11719091 | 1271 days ago | 0.05953508 ETH | ||||
11607101 | 1288 days ago | 1.71865951 ETH | ||||
11607097 | 1288 days ago | 3.36994194 ETH | ||||
11607093 | 1288 days ago | 4.11905135 ETH | ||||
11607092 | 1288 days ago | 3.16623483 ETH | ||||
11607059 | 1288 days ago | 4.24718014 ETH | ||||
9017941 | 1693 days ago | 0.01791918 ETH | ||||
8341187 | 1801 days ago | 0.00196234 ETH | ||||
8341124 | 1801 days ago | 0.00205234 ETH | ||||
8341106 | 1801 days ago | 0.00195514 ETH | ||||
8338601 | 1801 days ago | 0.00209981 ETH | ||||
8338561 | 1801 days ago | 0.01076614 ETH | ||||
8324112 | 1804 days ago | 0.00195514 ETH | ||||
8324100 | 1804 days ago | 0.00195514 ETH | ||||
8324050 | 1804 days ago | 0.00195514 ETH | ||||
8324014 | 1804 days ago | 0.00455614 ETH | ||||
8323998 | 1804 days ago | 0.00402514 ETH | ||||
8323993 | 1804 days ago | 0.00204514 ETH | ||||
8323985 | 1804 days ago | 0.00195514 ETH | ||||
8323965 | 1804 days ago | 0.00195514 ETH | ||||
8293105 | 1808 days ago | 0.00195514 ETH | ||||
8293070 | 1808 days ago | 0.00195514 ETH | ||||
8293060 | 1808 days ago | 0.00195514 ETH | ||||
8293048 | 1808 days ago | 0.00195514 ETH |
Loading...
Loading
Contract Name:
ProfitContainer
Compiler Version
v0.4.6+commit.2dabbdf0
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-01-03 */ pragma solidity ^0.4.0; /* This vSlice token contract is based on the ERC20 token contract. Additional functionality has been integrated: * the contract Lockable, which is used as a parent of the Token contract * the function mintTokens(), which makes use of the currentSwapRate() and safeToAdd() helpers * the function disableTokenSwapLock() */ contract Lockable { uint public numOfCurrentEpoch; uint public creationTime; uint public constant UNLOCKED_TIME = 25 days; uint public constant LOCKED_TIME = 5 days; uint public constant EPOCH_LENGTH = 30 days; bool public lock; bool public tokenSwapLock; event Locked(); event Unlocked(); // This modifier should prevent tokens transfers while the tokenswap // is still ongoing modifier isTokenSwapOn { if (tokenSwapLock) throw; _; } // This modifier checks and, if needed, updates the value of current // token contract epoch, before executing a token transfer of any // kind modifier isNewEpoch { if (numOfCurrentEpoch * EPOCH_LENGTH + creationTime < now ) { numOfCurrentEpoch = (now - creationTime) / EPOCH_LENGTH + 1; } _; } // This modifier check whether the contract should be in a locked // or unlocked state, then acts and updates accordingly if // necessary modifier checkLock { if ((creationTime + numOfCurrentEpoch * UNLOCKED_TIME) + (numOfCurrentEpoch - 1) * LOCKED_TIME < now) { // avoids needless lock state change and event spamming if (lock) throw; lock = true; Locked(); return; } else { // only set to false if in a locked state, to avoid // needless state change and event spam if (lock) { lock = false; Unlocked(); } } _; } function Lockable() { creationTime = now; numOfCurrentEpoch = 1; tokenSwapLock = true; } } contract ERC20 { function totalSupply() constant returns (uint); function balanceOf(address who) constant returns (uint); function allowance(address owner, address spender) constant returns (uint); function transfer(address to, uint value) returns (bool ok); function transferFrom(address from, address to, uint value) returns (bool ok); function approve(address spender, uint value) returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract Token is ERC20, Lockable { mapping( address => uint ) _balances; mapping( address => mapping( address => uint ) ) _approvals; uint _supply; address public walletAddress; event TokenMint(address newTokenHolder, uint amountOfTokens); event TokenSwapOver(); modifier onlyFromWallet { if (msg.sender != walletAddress) throw; _; } function Token( uint initial_balance, address wallet) { _balances[msg.sender] = initial_balance; _supply = initial_balance; walletAddress = wallet; } function totalSupply() constant returns (uint supply) { return _supply; } function balanceOf( address who ) constant returns (uint value) { return _balances[who]; } function allowance(address owner, address spender) constant returns (uint _allowance) { return _approvals[owner][spender]; } // A helper to notify if overflow occurs function safeToAdd(uint a, uint b) internal returns (bool) { return (a + b >= a && a + b >= b); } function transfer( address to, uint value) isTokenSwapOn isNewEpoch checkLock returns (bool ok) { if( _balances[msg.sender] < value ) { throw; } if( !safeToAdd(_balances[to], value) ) { throw; } _balances[msg.sender] -= value; _balances[to] += value; Transfer( msg.sender, to, value ); return true; } function transferFrom( address from, address to, uint value) isTokenSwapOn isNewEpoch checkLock returns (bool ok) { // if you don't have enough balance, throw if( _balances[from] < value ) { throw; } // if you don't have approval, throw if( _approvals[from][msg.sender] < value ) { throw; } if( !safeToAdd(_balances[to], value) ) { throw; } // transfer and return true _approvals[from][msg.sender] -= value; _balances[from] -= value; _balances[to] += value; Transfer( from, to, value ); return true; } function approve(address spender, uint value) isTokenSwapOn isNewEpoch checkLock returns (bool ok) { _approvals[msg.sender][spender] = value; Approval( msg.sender, spender, value ); return true; } // The function currentSwapRate() returns the current exchange rate // between vSlice tokens and Ether during the token swap period function currentSwapRate() constant returns(uint) { if (creationTime + 1 weeks > now) { return 130; } else if (creationTime + 2 weeks > now) { return 120; } else if (creationTime + 4 weeks > now) { return 100; } else { return 0; } } // The function mintTokens is only usable by the chosen wallet // contract to mint a number of tokens proportional to the // amount of ether sent to the wallet contract. The function // can only be called during the tokenswap period function mintTokens(address newTokenHolder, uint etherAmount) external onlyFromWallet { uint tokensAmount = currentSwapRate() * etherAmount; if(!safeToAdd(_balances[newTokenHolder],tokensAmount )) throw; if(!safeToAdd(_supply,tokensAmount)) throw; _balances[newTokenHolder] += tokensAmount; _supply += tokensAmount; TokenMint(newTokenHolder, tokensAmount); } // The function disableTokenSwapLock() is called by the wallet // contract once the token swap has reached its end conditions function disableTokenSwapLock() external onlyFromWallet { tokenSwapLock = false; TokenSwapOver(); } } pragma solidity ^0.4.0; /* The ProfitContainer contract receives profits from the vDice games and allows a a fair distribution between token holders. */ contract Ownable { address public owner; function Ownable() { owner = msg.sender; } modifier onlyOwner() { if (msg.sender == owner) _; } function transferOwnership(address _newOwner) external onlyOwner { if (_newOwner == address(0x0)) throw; owner = _newOwner; } } contract ProfitContainer is Ownable { uint public currentEpoch; //This is to mitigate supersend and the possibility of //different payouts for same token ownership during payout phase uint public initEpochBalance; mapping (address => uint) lastPaidOutEpoch; Token public tokenCtr; event WithdrawalEnabled(); event ProfitWithdrawn(address tokenHolder, uint amountPaidOut); event TokenContractChanged(address newTokenContractAddr); // The modifier onlyNotPaidOut prevents token holders who have // already withdrawn their share of profits in the epoch, to cash // out additional shares. modifier onlyNotPaidOut { if (lastPaidOutEpoch[msg.sender] == currentEpoch) throw; _; } // The modifier onlyLocked prevents token holders from collecting // their profits when the token contract is in an unlocked state modifier onlyLocked { if (!tokenCtr.lock()) throw; _; } // The modifier resetPaidOut updates the currenct epoch, and // enables the smart contract to track when a token holder // has already received their fair share of profits or not // and sets the balance for the epoch using current balance modifier resetPaidOut { if(currentEpoch < tokenCtr.numOfCurrentEpoch()) { currentEpoch = tokenCtr.numOfCurrentEpoch(); initEpochBalance = this.balance; WithdrawalEnabled(); } _; } function ProfitContainer(address _token) { tokenCtr = Token(_token); } function () payable { } // The function withdrawalProfit() enables token holders // to collect a fair share of profits from the ProfitContainer, // proportional to the amount of tokens they own. Token holders // will be able to collect their profits only once function withdrawalProfit() external resetPaidOut onlyLocked onlyNotPaidOut { uint currentEpoch = tokenCtr.numOfCurrentEpoch(); uint tokenBalance = tokenCtr.balanceOf(msg.sender); uint totalSupply = tokenCtr.totalSupply(); if (tokenBalance == 0) throw; lastPaidOutEpoch[msg.sender] = currentEpoch; // Overflow risk only exists if balance is greater than // 1e+33 ether, assuming max of 96M tokens minted. // Functions throws, as such a state should never be reached // Unless significantly more tokens are minted if (!safeToMultiply(tokenBalance, initEpochBalance)) throw; uint senderPortion = (tokenBalance * initEpochBalance); uint amountToPayOut = senderPortion / totalSupply; if(!msg.sender.send(amountToPayOut)) { throw; } ProfitWithdrawn(msg.sender, amountToPayOut); } function changeTokenContract(address _newToken) external onlyOwner { if (_newToken == address(0x0)) throw; tokenCtr = Token(_newToken); TokenContractChanged(_newToken); } // returns expected payout for tokenholder during lock phase function expectedPayout(address _tokenHolder) external constant returns (uint) { if (!tokenCtr.lock()) return 0; return (tokenCtr.balanceOf(_tokenHolder) * initEpochBalance) / tokenCtr.totalSupply(); } function safeToMultiply(uint _a, uint _b) private constant returns (bool) { return (_b == 0 || ((_a * _b) / _b) == _a); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"withdrawalProfit","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_tokenHolder","type":"address"}],"name":"expectedPayout","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"initEpochBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newToken","type":"address"}],"name":"changeTokenContract","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"currentEpoch","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenCtr","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_token","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[],"name":"WithdrawalEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenHolder","type":"address"},{"indexed":false,"name":"amountPaidOut","type":"uint256"}],"name":"ProfitWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newTokenContractAddr","type":"address"}],"name":"TokenContractChanged","type":"event"}]
Contract Creation Code
6060604052346100005760405160208061085483398101604052515b5b60008054600160a060020a0319166c01000000000000000000000000338102041790555b60048054600160a060020a0319166c01000000000000000000000000838102041790555b505b6107e0806100746000396000f36060604052361561006c5760e060020a60003504632ebec916811461007557806336bc32a21461008457806350148ed2146100a6578063523aee69146100c557806376671808146100d75780638da5cb5b146100f6578063aef251a71461011f578063f2fde38b14610148575b6100735b5b565b005b346100005761007361015a565b005b346100005761009460043561052c565b60408051918252519081900360200190f35b3461000057610094610694565b60408051918252519081900360200190f35b346100005761007360043561069a565b005b3461000057610094610739565b60408051918252519081900360200190f35b346100005761010361073f565b60408051600160a060020a039092168252519081900360200190f35b346100005761010361074e565b60408051600160a060020a039092168252519081900360200190f35b346100005761007360043561075d565b005b60006000600060006000600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604051516001541015905061026d57600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750506040518051600155600160a060020a033016316002557f66f7d730c9ba098beec19ac6c1d94380c4f8b016455b36cb348ca4c646a075bc9150600090a15b600460009054906101000a9004600160a060020a0316600160a060020a031663f83d08ba6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506102dc57610000565b600154600160a060020a033316600090815260036020526040902054141561030357610000565b600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604080518051600480546000602094850181905285517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a03338116948201949094529551939b50911694506370a08231936024808201949392918390030190829087803b156100005760325a03f115610000575050604080518051600480546000602094850181905285517f18160ddd0000000000000000000000000000000000000000000000000000000081529551939a50600160a060020a0390911695506318160ddd94808301949392908390030190829087803b156100005760325a03f1156100005750506040515193505083151561046557610000565b600160a060020a033316600090815260036020526040902085905560025461048e9085906107bf565b151561049957610000565b6002548402915082828115610000576040519190049150600160a060020a0333169082156108fc029083906000818181858888f1935050505015156104dd57610000565b60408051600160a060020a03331681526020810183905281517f016e128b6bdadd9e9068abd0b18db2fc8b27ed3dbced50e4aa6cc0a6934251ab929181900390910190a15b5b5b5b5050505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a031663f83d08ba6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506105a05750600061068f565b600460009054906101000a9004600160a060020a0316600160a060020a03166318160ddd6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519060200150600254600460009054906101000a9004600160a060020a0316600160a060020a03166370a08231856000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519190910290508115610000570490505b919050565b60025481565b60005433600160a060020a039081169116141561073457600160a060020a03811615156106c657610000565b6004805473ffffffffffffffffffffffffffffffffffffffff19166c010000000000000000000000008381020417905560408051600160a060020a038316815290517fe89f98a27789c8313baa22de83cdb921b7026d66af0ee02973c97d45f952b6be916020908290030190a15b5b5b50565b60015481565b600054600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a039081169116141561073457600160a060020a038116151561078957610000565b6000805473ffffffffffffffffffffffffffffffffffffffff19166c01000000000000000000000000838102041790555b5b5b50565b60008115806107d75750828283850281156100005704145b90505b9291505056
Deployed Bytecode
0x6060604052361561006c5760e060020a60003504632ebec916811461007557806336bc32a21461008457806350148ed2146100a6578063523aee69146100c557806376671808146100d75780638da5cb5b146100f6578063aef251a71461011f578063f2fde38b14610148575b6100735b5b565b005b346100005761007361015a565b005b346100005761009460043561052c565b60408051918252519081900360200190f35b3461000057610094610694565b60408051918252519081900360200190f35b346100005761007360043561069a565b005b3461000057610094610739565b60408051918252519081900360200190f35b346100005761010361073f565b60408051600160a060020a039092168252519081900360200190f35b346100005761010361074e565b60408051600160a060020a039092168252519081900360200190f35b346100005761007360043561075d565b005b60006000600060006000600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604051516001541015905061026d57600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750506040518051600155600160a060020a033016316002557f66f7d730c9ba098beec19ac6c1d94380c4f8b016455b36cb348ca4c646a075bc9150600090a15b600460009054906101000a9004600160a060020a0316600160a060020a031663f83d08ba6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506102dc57610000565b600154600160a060020a033316600090815260036020526040902054141561030357610000565b600460009054906101000a9004600160a060020a0316600160a060020a031663018e13d06000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604080518051600480546000602094850181905285517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a03338116948201949094529551939b50911694506370a08231936024808201949392918390030190829087803b156100005760325a03f115610000575050604080518051600480546000602094850181905285517f18160ddd0000000000000000000000000000000000000000000000000000000081529551939a50600160a060020a0390911695506318160ddd94808301949392908390030190829087803b156100005760325a03f1156100005750506040515193505083151561046557610000565b600160a060020a033316600090815260036020526040902085905560025461048e9085906107bf565b151561049957610000565b6002548402915082828115610000576040519190049150600160a060020a0333169082156108fc029083906000818181858888f1935050505015156104dd57610000565b60408051600160a060020a03331681526020810183905281517f016e128b6bdadd9e9068abd0b18db2fc8b27ed3dbced50e4aa6cc0a6934251ab929181900390910190a15b5b5b5b5050505050565b6000600460009054906101000a9004600160a060020a0316600160a060020a031663f83d08ba6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506105a05750600061068f565b600460009054906101000a9004600160a060020a0316600160a060020a03166318160ddd6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519060200150600254600460009054906101000a9004600160a060020a0316600160a060020a03166370a08231856000604051602001526040518260e060020a0281526004018082600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519190910290508115610000570490505b919050565b60025481565b60005433600160a060020a039081169116141561073457600160a060020a03811615156106c657610000565b6004805473ffffffffffffffffffffffffffffffffffffffff19166c010000000000000000000000008381020417905560408051600160a060020a038316815290517fe89f98a27789c8313baa22de83cdb921b7026d66af0ee02973c97d45f952b6be916020908290030190a15b5b5b50565b60015481565b600054600160a060020a031681565b600454600160a060020a031681565b60005433600160a060020a039081169116141561073457600160a060020a038116151561078957610000565b6000805473ffffffffffffffffffffffffffffffffffffffff19166c01000000000000000000000000838102041790555b5b5b50565b60008115806107d75750828283850281156100005704145b90505b9291505056
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005c543e7ae0a1104f78406c340e9c64fd9fce5170
-----Decoded View---------------
Arg [0] : _token (address): 0x5c543e7AE0A1104f78406C340E9C64FD9fCE5170
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000005c543e7ae0a1104f78406c340e9c64fd9fce5170
Loading...
Loading
Loading...
Loading
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.