Transactions:
86 txns
Latest 25 transactions from a total of 86 transactions
[ Download CSV Export ]
Latest 24 Internal Transactions Internal Transactions as a result of Contract Execution
[ Download CSV Export ]
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity), DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity) Solidity Compiler Bugs.
Contract Source Code Verified (Exact Match)
Contract Source Code Verified (Exact Match)
Contract Name: | PonzICO |
Compiler Version: | v0.4.11+commit.68ef5810 |
Optimization Enabled: | No |
Runs (Optimizer): | 200 |
Contract Source Code
pragma solidity ^0.4.0; /// @title PonzICO /// @author acityinohio contract PonzICO { address public owner; uint public total; mapping (address => uint) public invested; mapping (address => uint) public balances; address[] investors; //log event of successful investment/withdraw and address event LogInvestment(address investor, uint amount); event LogWithdrawal(address investor, uint amount); //modifiers for various things modifier checkZeroBalance() { if (balances[msg.sender] == 0) { throw; } _;} modifier accreditedInvestor() { if (msg.value < 100 finney) { throw; } _;} //constructor for initializing PonzICO. //the owner is the genius who made this revolutionary smart contract function PonzICO() { owner = msg.sender; } //the logic for a small fee for the creator of this contract //miniscule in the grand scheme of things function ownerFee(uint amount) private returns (uint fee) { if (total < 200000 ether) { fee = amount/2; balances[owner] += fee; } return; } //This is where the magic is withdrawn. //For users with balances. Can only be used to withdraw full balance. function withdraw() checkZeroBalance() { uint amount = balances[msg.sender]; balances[msg.sender] = 0; if (!msg.sender.send(amount)) { balances[msg.sender] = amount; } else { LogWithdrawal(msg.sender, amount); } } //What's better than withdrawing? Re-investing profits! function reinvest() checkZeroBalance() { uint dividend = balances[msg.sender]; balances[msg.sender] = 0; uint fee = ownerFee(dividend); dividend -= fee; for (uint i = 0; i < investors.length; i++) { balances[investors[i]] += dividend * invested[investors[i]] / total; } invested[msg.sender] += (dividend + fee); total += (dividend + fee); LogInvestment(msg.sender, dividend+fee); } //This is the where the magic is invested. //Note the accreditedInvestor() modifier, to ensure only sophisticated //investors with 0.1 ETH or more can invest. #SelfRegulation function invest() payable accreditedInvestor() { //first send the owner's modest 50% fee but only if the total invested is less than 200000 ETH uint dividend = msg.value; uint fee = ownerFee(dividend); dividend -= fee; //then accrue balances from the generous remainder to everyone else previously invested for (uint i = 0; i < investors.length; i++) { balances[investors[i]] += dividend * invested[investors[i]] / total; } //finally, add this enterprising new investor to the public balances if (invested[msg.sender] == 0) { investors.push(msg.sender); invested[msg.sender] = msg.value; } else { invested[msg.sender] += msg.value; } total += msg.value; LogInvestment(msg.sender, msg.value); } //finally, fallback function. no one should send money to this contract //without first being added as an investment. function () { throw; } }
Contract ABI
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"total","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"invested","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"invest","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogInvestment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"investor","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogWithdrawal","type":"event"}]
Contract Creation Code
6060604052341561000c57fe5b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b610b2a8061005f6000396000f30060606040523615610081576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806327e235e3146100975780632ddbd13a146100e15780633ccfd60b1461010757806366b3f6bf146101195780638da5cb5b14610163578063e8b5e51f146101b5578063fdb5a03e146101bf575b341561008957fe5b6100955b60006000fd5b565b005b341561009f57fe5b6100cb600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506101d1565b6040518082815260200191505060405180910390f35b34156100e957fe5b6100f16101e9565b6040518082815260200191505060405180910390f35b341561010f57fe5b6101176101ef565b005b341561012157fe5b61014d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506103be565b6040518082815260200191505060405180910390f35b341561016b57fe5b6101736103d6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bd6103fc565b005b34156101c757fe5b6101cf610721565b005b60036020528060005260406000206000915090505481565b60015481565b60006000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561023f5760006000fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f19350505050151561034d5780600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506103b9565b7fb4214c8c54fc7442f36d3682f59aebaf09358a4431835b30efb29d52cf9e1e913382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b5b50565b60026020528060005260406000206000915090505481565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006000600067016345785d8a00003410156104185760006000fd5b34925061042483610a12565b91508183039250600090505b60048054905081101561055c576001546002600060048481548110151561045357fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484028115156104c657fe5b04600360006004848154811015156104da57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8080600101915050610430565b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561065157600480548060010182816105b89190610aad565b916000526020600020900160005b33909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505034600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061069f565b34600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b346001600082825401925050819055507fc74590e3281392e897f5c0f45530951cfe0db0e86c76d65af861e80b925871a43334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b505050565b6000600060006000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156107755760006000fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205492506000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061080583610a12565b91508183039250600090505b60048054905081101561093d576001546002600060048481548110151561083457fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484028115156108a757fe5b04600360006004848154811015156108bb57fe5b906000526020600020900160005b9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8080600101915050610811565b818301600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508183016001600082825401925050819055507fc74590e3281392e897f5c0f45530951cfe0db0e86c76d65af861e80b925871a433838501604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b505050565b6000692a5a058fc295ed0000006001541015610aa757600282811515610a3457fe5b0490508060036000600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b5b919050565b815481835581811511610ad457818360005260206000209182019101610ad39190610ad9565b5b505050565b610afb91905b80821115610af7576000816000905550600101610adf565b5090565b905600a165627a7a72305820c028fe2aabb8285967178280c5094d0be41ab357db0e7d7a58efda6eb2940a2d0029
Swarm Source:
bzzr://c028fe2aabb8285967178280c5094d0be41ab357db0e7d7a58efda6eb2940a2d
Block | Age | transaction | Difficulty | GasUsed | Reward |
---|
Block | Age | Uncle Number | Difficulty | GasUsed | Reward |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.