Source Code
Latest 25 from a total of 417 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Take Profit | 20665341 | 549 days ago | IN | 0 ETH | 0.00063035 | ||||
| Take Profit | 20665337 | 549 days ago | IN | 0 ETH | 0.00054558 | ||||
| Take Profit | 20432761 | 582 days ago | IN | 0 ETH | 0.00027403 | ||||
| Take Profit | 20370563 | 591 days ago | IN | 0 ETH | 0.00055245 | ||||
| Take Profit | 20370534 | 591 days ago | IN | 0 ETH | 0.00036059 | ||||
| Take Profit | 20370250 | 591 days ago | IN | 0 ETH | 0.00025767 | ||||
| Take Profit | 20370230 | 591 days ago | IN | 0 ETH | 0.00028991 | ||||
| Take Profit | 20370044 | 591 days ago | IN | 0 ETH | 0.00033672 | ||||
| Take Profit | 20370012 | 591 days ago | IN | 0 ETH | 0.00033312 | ||||
| Take Profit | 14446665 | 1443 days ago | IN | 0 ETH | 0.00229709 | ||||
| Take Profit | 14256942 | 1473 days ago | IN | 0 ETH | 0.0048686 | ||||
| Take Profit | 13760177 | 1549 days ago | IN | 0 ETH | 0.00397792 | ||||
| Take Profit | 13760075 | 1550 days ago | IN | 0 ETH | 0.00249017 | ||||
| Take Profit | 13494682 | 1591 days ago | IN | 0 ETH | 0.01170749 | ||||
| Take Profit | 12223267 | 1789 days ago | IN | 0 ETH | 0.0026423 | ||||
| Take Profit | 12070695 | 1813 days ago | IN | 0 ETH | 0.00664704 | ||||
| Transfer | 12068998 | 1813 days ago | IN | 0 ETH | 0.002352 | ||||
| Transfer | 12068978 | 1813 days ago | IN | 0 ETH | 0.002877 | ||||
| Transfer | 12068967 | 1813 days ago | IN | 0 ETH | 0.002856 | ||||
| Transfer | 12068954 | 1813 days ago | IN | 0 ETH | 0.002961 | ||||
| Transfer | 12068915 | 1813 days ago | IN | 0 ETH | 0.002415 | ||||
| Transfer | 12068915 | 1813 days ago | IN | 0 ETH | 0.002415 | ||||
| Transfer | 12068853 | 1813 days ago | IN | 0 ETH | 0.002961 | ||||
| Take Profit | 11692025 | 1871 days ago | IN | 0 ETH | 0.00363088 | ||||
| Take Profit | 11691878 | 1871 days ago | IN | 0 ETH | 0.00330288 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 20665341 | 549 days ago | 0.234 ETH | ||||
| Transfer | 20665337 | 549 days ago | 0.01 ETH | ||||
| - | 14446665 | 1443 days ago | 1 ETH | ||||
| - | 14256942 | 1473 days ago | 10.982047 ETH | ||||
| - | 12223267 | 1789 days ago | 0.3 ETH | ||||
| - | 12070695 | 1813 days ago | 4 ETH | ||||
| - | 11691878 | 1871 days ago | 15.64547922 ETH | ||||
| - | 11687760 | 1871 days ago | 79.501 ETH | ||||
| - | 11686242 | 1872 days ago | 11.38 ETH | ||||
| - | 7336294 | 2554 days ago | 1.12999999 ETH | ||||
| - | 7296736 | 2560 days ago | 1.086 ETH | ||||
| - | 7275287 | 2564 days ago | 0.24988888 ETH | ||||
| - | 7275279 | 2564 days ago | 0.02 ETH | ||||
| - | 7275233 | 2564 days ago | 0.0225 ETH | ||||
| - | 7275228 | 2564 days ago | 1.04 ETH | ||||
| - | 7275228 | 2564 days ago | 0.345 ETH | ||||
| - | 7275228 | 2564 days ago | 0.66 ETH | ||||
| - | 7275221 | 2564 days ago | 10.008888 ETH | ||||
| - | 7275199 | 2564 days ago | 0.0135 ETH | ||||
| - | 7275182 | 2564 days ago | 1.595 ETH | ||||
| - | 7275158 | 2564 days ago | 1.38 ETH | ||||
| - | 7275153 | 2564 days ago | 3.945 ETH | ||||
| - | 7275143 | 2564 days ago | 1.24 ETH | ||||
| - | 7275138 | 2564 days ago | 0.245 ETH | ||||
| - | 7275127 | 2564 days ago | 4.2 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Phoenix
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2018-02-12
*/
pragma solidity ^0.4.18;
contract Phoenix {
// If round last more than a year - cancel is activated
uint private MAX_ROUND_TIME = 365 days;
uint private totalCollected;
uint private currentRound;
uint private currentRoundCollected;
uint private prevLimit;
uint private currentLimit;
uint private currentRoundStartTime;
// That structure describes current user Account
// moneyNew - invested money in currentRound
// moneyHidden - invested in previous round and not profit yet
// profitTotal - total profit of user account (it never decreases)
// profitTaken - profit taken by user
// lastUserUpdateRound - last round when account was updated
struct Account {
uint moneyNew;
uint moneyHidden;
uint profitTotal;
uint profitTaken;
uint lastUserUpdateRound;
}
mapping (address => Account) private accounts;
function Phoenix() public {
totalCollected = 0;
currentRound = 0;
currentRoundCollected = 0;
prevLimit = 0;
currentLimit = 100e18;
currentRoundStartTime = block.timestamp;
}
// This function increments round to next:
// - it sets new currentLimit (round)using sequence:
// 100e18, 200e18, 4 * currentLImit - 2 * prevLimit
function iterateToNextRound() private {
currentRound++;
uint tempcurrentLimit = currentLimit;
if(currentRound == 1) {
currentLimit = 200e18;
}
else {
currentLimit = 4 * currentLimit - 2 * prevLimit;
}
prevLimit = tempcurrentLimit;
currentRoundStartTime = block.timestamp;
currentRoundCollected = 0;
}
// That function calculates profit update for user
// - if increments from last calculated round to current round and
// calculates current user Account state
// - algorithm:
function calculateUpdateProfit(address user) private view returns (Account) {
Account memory acc = accounts[user];
for(uint r = acc.lastUserUpdateRound; r < currentRound; r++) {
acc.profitTotal *= 2;
if(acc.moneyHidden > 0) {
acc.profitTotal += acc.moneyHidden * 2;
acc.moneyHidden = 0;
}
if(acc.moneyNew > 0) {
acc.moneyHidden = acc.moneyNew;
acc.moneyNew = 0;
}
}
acc.lastUserUpdateRound = currentRound;
return acc;
}
// Here we calculate profit and update it for user
function updateProfit(address user) private returns(Account) {
Account memory acc = calculateUpdateProfit(user);
accounts[user] = acc;
return acc;
}
// That function returns canceled status.
// If round lasts for more than 1 year - cancel mode is on
function canceled() public view returns(bool isCanceled) {
return block.timestamp >= (currentRoundStartTime + MAX_ROUND_TIME);
}
// Fallback function for handling money sending directly to contract
function () public payable {
require(!canceled());
deposit();
}
// Function for calculating and updating state during user money investment
// - first of all we update current user state using updateProfit function
// - after that we handle situation of investment that makes
// currentRoundCollected more than current round limit. If that happen,
// we set moneyNew to totalMoney - moneyPartForCrossingRoundLimit.
// - check crossing round limit in cycle for case when money invested are
// more than several round limit
function deposit() public payable {
require(!canceled());
updateProfit(msg.sender);
uint money2add = msg.value;
totalCollected += msg.value;
while(currentRoundCollected + money2add >= currentLimit) {
accounts[msg.sender].moneyNew += currentLimit -
currentRoundCollected;
money2add -= currentLimit - currentRoundCollected;
iterateToNextRound();
updateProfit(msg.sender);
}
accounts[msg.sender].moneyNew += money2add;
currentRoundCollected += money2add;
}
// Returns common information about round
// totalCollectedSum - total sum, collected in all rounds
// roundCollected - sum collected in current round
// currentRoundNumber - current round number
// remainsCurrentRound - how much remains for round change
function whatRound() public view returns (uint totalCollectedSum,
uint roundCollected, uint currentRoundNumber,
uint remainsCurrentRound) {
return (totalCollected, currentRoundCollected, currentRound,
currentLimit - currentRoundCollected);
}
// Returns current user account state
// profitTotal - how much profit is collected during all rounds
// profitTaken - how much profit was taken by user during all rounds
// profitAvailable (= profitTotal - profitTaken) - how much profit can be
// taken by user
// investmentInProgress - how much money are not profit yet and are invested
// in current or previous round
function myAccount() public view returns (uint profitTotal,
uint profitTaken, uint profitAvailable, uint investmentInProgress) {
var acc = calculateUpdateProfit(msg.sender);
return (acc.profitTotal, acc.profitTaken,
acc.profitTotal - acc.profitTaken,
acc.moneyNew + acc.moneyHidden);
}
// That function handles cancel state. In that case:
// - transfer all invested money in current round
// - transfer all user profit except money taken
// - remainder of 100 ETH is left after returning all invested in current
// round and all profit. Transfer it to users that invest money in
// previous round. Total investment in previous round = prevLimit.
// So percent of money return = 100 ETH / prevLimit
function payback() private {
require(canceled());
var acc = accounts[msg.sender];
uint hiddenpart = 0;
if(prevLimit > 0) {
hiddenpart = (acc.moneyHidden * 100e18) / prevLimit;
}
uint money2send = acc.moneyNew + acc.profitTotal - acc.profitTaken +
hiddenpart;
if(money2send > this.balance) {
money2send = this.balance;
}
acc.moneyNew = 0;
acc.moneyHidden = 0;
acc.profitTaken = acc.profitTotal;
msg.sender.transfer(money2send);
}
// Function for taking all profit
// If round is canceled than do a payback (see above)
// Calculate money left on account = (profitTotal - profitTaken)
// Increase profitTaken by money left on account
// Transfer money to user
function takeProfit() public {
Account memory acc = updateProfit(msg.sender);
if(canceled()) {
payback();
return;
}
uint money2send = acc.profitTotal - acc.profitTaken;
acc.profitTaken += money2send;
accounts[msg.sender] = acc;
if(money2send > 0) {
msg.sender.transfer(money2send);
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":true,"inputs":[],"name":"whatRound","outputs":[{"name":"totalCollectedSum","type":"uint256"},{"name":"roundCollected","type":"uint256"},{"name":"currentRoundNumber","type":"uint256"},{"name":"remainsCurrentRound","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"canceled","outputs":[{"name":"isCanceled","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"takeProfit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"myAccount","outputs":[{"name":"profitTotal","type":"uint256"},{"name":"profitTaken","type":"uint256"},{"name":"profitAvailable","type":"uint256"},{"name":"investmentInProgress","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]Contract Creation Code
60606040526301e13380600055341561001757600080fd5b600060018190555060006002819055506000600381905550600060048190555068056bc75e2d63100000600581905550426006819055506107c38061005d6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063032fc13b1461008b5780633f9942ff146100c957806370c10578146100f6578063b29c62f41461010b578063d0e30db014610149575b610075610153565b15151561008157600080fd5b610089610163565b005b341561009657600080fd5b61009e610281565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34156100d457600080fd5b6100dc610153565b604051808215151515815260200191505060405180910390f35b341561010157600080fd5b6101096102a5565b005b341561011657600080fd5b61011e6103b5565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610151610163565b005b6000805460065401421015905090565b600061016d610153565b15151561017957600080fd5b610182336103fd565b50349050346001600082825401925050819055505b600554816003540110151561021e5760035460055403600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282540192505081905550600354600554038103905061020f610496565b610218336103fd565b50610197565b80600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825401925050819055508060036000828254019250508190555050565b60008060008060015460035460025460035460055403935093509350935090919293565b6102ad610767565b60006102b8336103fd565b91506102c2610153565b156102d4576102cf6104fc565b6103b1565b816060015182604001510390508082606001818151019150818152505081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505060008111156103b0573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156103af57600080fd5b5b5b5050565b6000806000806103c3610767565b6103cc33610639565b9050806040015181606001518260600151836040015103836020015184600001510194509450945094505090919293565b610405610767565b61040d610767565b61041683610639565b905080600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505080915050919050565b60006002600081548092919060010191905055506005549050600160025414156104cf57680ad78ebc5ac62000006005819055506104e3565b600454600202600554600402036005819055505b8060048190555042600681905550600060038190555050565b6000806000610509610153565b151561051457600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020925060009150600060045411156105845760045468056bc75e2d6310000084600101540281151561058057fe5b0491505b8183600301548460020154856000015401030190503073ffffffffffffffffffffffffffffffffffffffff16318111156105d3573073ffffffffffffffffffffffffffffffffffffffff163190505b6000836000018190555060008360010181905550826002015483600301819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561063457600080fd5b505050565b610641610767565b610649610767565b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060a06040519081016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815250509150816080015190505b60025481101561075157600282604001818151029150818152505060008260200151111561071d57600282602001510282604001818151019150818152505060008260200181815250505b60008260000151111561074457816000015182602001818152505060008260000181815250505b80806001019150506106d2565b6002548260800181815250508192505050919050565b60a060405190810160405280600081526020016000815260200160008152602001600081526020016000815250905600a165627a7a72305820e1cadde3cb22332c066f91cbccfa733eab396516183c626699e728ec53f08c490029
Deployed Bytecode
0x60606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063032fc13b1461008b5780633f9942ff146100c957806370c10578146100f6578063b29c62f41461010b578063d0e30db014610149575b610075610153565b15151561008157600080fd5b610089610163565b005b341561009657600080fd5b61009e610281565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b34156100d457600080fd5b6100dc610153565b604051808215151515815260200191505060405180910390f35b341561010157600080fd5b6101096102a5565b005b341561011657600080fd5b61011e6103b5565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b610151610163565b005b6000805460065401421015905090565b600061016d610153565b15151561017957600080fd5b610182336103fd565b50349050346001600082825401925050819055505b600554816003540110151561021e5760035460055403600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008282540192505081905550600354600554038103905061020f610496565b610218336103fd565b50610197565b80600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600082825401925050819055508060036000828254019250508190555050565b60008060008060015460035460025460035460055403935093509350935090919293565b6102ad610767565b60006102b8336103fd565b91506102c2610153565b156102d4576102cf6104fc565b6103b1565b816060015182604001510390508082606001818151019150818152505081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505060008111156103b0573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156103af57600080fd5b5b5b5050565b6000806000806103c3610767565b6103cc33610639565b9050806040015181606001518260600151836040015103836020015184600001510194509450945094505090919293565b610405610767565b61040d610767565b61041683610639565b905080600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015590505080915050919050565b60006002600081548092919060010191905055506005549050600160025414156104cf57680ad78ebc5ac62000006005819055506104e3565b600454600202600554600402036005819055505b8060048190555042600681905550600060038190555050565b6000806000610509610153565b151561051457600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020925060009150600060045411156105845760045468056bc75e2d6310000084600101540281151561058057fe5b0491505b8183600301548460020154856000015401030190503073ffffffffffffffffffffffffffffffffffffffff16318111156105d3573073ffffffffffffffffffffffffffffffffffffffff163190505b6000836000018190555060008360010181905550826002015483600301819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561063457600080fd5b505050565b610641610767565b610649610767565b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060a06040519081016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820154815250509150816080015190505b60025481101561075157600282604001818151029150818152505060008260200151111561071d57600282602001510282604001818151019150818152505060008260200181815250505b60008260000151111561074457816000015182602001818152505060008260000181815250505b80806001019150506106d2565b6002548260800181815250508192505050919050565b60a060405190810160405280600081526020016000815260200160008152602001600081526020016000815250905600a165627a7a72305820e1cadde3cb22332c066f91cbccfa733eab396516183c626699e728ec53f08c490029
Swarm Source
bzzr://e1cadde3cb22332c066f91cbccfa733eab396516183c626699e728ec53f08c49
Loading...
Loading
Loading...
Loading
Net Worth in USD
$215,488.60
Net Worth in ETH
108.747278
Token Allocations
ETH
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $1,980.95 | 108.7803 | $215,488.6 |
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.