ETH Price: $3,633.90 (+0.34%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Owner49588282018-01-23 15:35:182538 days ago1516721718IN
0xbE181DA0...Ec35daE4e
0 ETH0.0009440641
Set Owner47812542017-12-23 7:26:002569 days ago1514013960IN
0xbE181DA0...Ec35daE4e
0 ETH0.0004862321
Enter47812442017-12-23 7:24:112569 days ago1514013851IN
0xbE181DA0...Ec35daE4e
0 ETH0.0004708421

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
24401392016-10-14 18:19:113004 days ago1476469151
0xbE181DA0...Ec35daE4e
0 ETH
24400892016-10-14 18:08:573004 days ago1476468537
0xbE181DA0...Ec35daE4e
0 ETH
24400452016-10-14 18:00:113004 days ago1476468011
0xbE181DA0...Ec35daE4e
0 ETH
24399492016-10-14 17:35:503004 days ago1476466550
0xbE181DA0...Ec35daE4e
0 ETH
24390852016-10-14 14:10:013004 days ago1476454201
0xbE181DA0...Ec35daE4e
0 ETH
24390312016-10-14 13:54:373004 days ago1476453277
0xbE181DA0...Ec35daE4e
0 ETH
24387112016-10-14 12:28:483004 days ago1476448128
0xbE181DA0...Ec35daE4e
0 ETH
24385172016-10-14 11:39:213004 days ago1476445161
0xbE181DA0...Ec35daE4e
0 ETH
24385072016-10-14 11:35:483004 days ago1476444948
0xbE181DA0...Ec35daE4e
0 ETH
24384912016-10-14 11:31:583004 days ago1476444718
0xbE181DA0...Ec35daE4e
0 ETH
24384822016-10-14 11:29:083004 days ago1476444548
0xbE181DA0...Ec35daE4e
0 ETH
24384762016-10-14 11:28:253004 days ago1476444505
0xbE181DA0...Ec35daE4e
0 ETH
24384732016-10-14 11:27:153004 days ago1476444435
0xbE181DA0...Ec35daE4e
0 ETH
24384652016-10-14 11:24:343004 days ago1476444274
0xbE181DA0...Ec35daE4e
0 ETH
24384592016-10-14 11:22:493004 days ago1476444169
0xbE181DA0...Ec35daE4e
0 ETH
24384382016-10-14 11:18:023004 days ago1476443882
0xbE181DA0...Ec35daE4e
0 ETH
24384352016-10-14 11:17:303004 days ago1476443850
0xbE181DA0...Ec35daE4e
0 ETH
24384332016-10-14 11:17:033004 days ago1476443823
0xbE181DA0...Ec35daE4e
0 ETH
24384182016-10-14 11:13:043004 days ago1476443584
0xbE181DA0...Ec35daE4e
0 ETH
24384112016-10-14 11:12:073004 days ago1476443527
0xbE181DA0...Ec35daE4e
0 ETH
24383682016-10-14 11:03:303004 days ago1476443010
0xbE181DA0...Ec35daE4e
0 ETH
24383592016-10-14 11:02:053004 days ago1476442925
0xbE181DA0...Ec35daE4e
0 ETH
24383322016-10-14 10:55:593004 days ago1476442559
0xbE181DA0...Ec35daE4e
0 ETH
24383212016-10-14 10:53:393004 days ago1476442419
0xbE181DA0...Ec35daE4e
0 ETH
24382872016-10-14 10:44:333004 days ago1476441873
0xbE181DA0...Ec35daE4e
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PiggyBank

Compiler Version
v0.2.2-2016-03-10-34d714f

Optimization Enabled:
Yes with 200 runs

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

contract PiggyBank {

  struct InvestorArray {
      address etherAddress;
      uint amount;
  }

  InvestorArray[] public investors;

  uint public k = 0;
  uint public fees;
  uint public balance = 0;
  address public owner;

  // simple single-sig function modifier
  modifier onlyowner { if (msg.sender == owner) _ }

  // this function is executed at initialization and sets the owner of the contract
  function PiggyBank() {
    owner = msg.sender;
  }

  // fallback function - simple transactions trigger this
  function() {
    enter();
  }
  
  function enter() {
    if (msg.value < 50 finney) {
        msg.sender.send(msg.value);
        return;
    }
	
    uint amount=msg.value;


    // add a new participant to array
    uint total_inv = investors.length;
    investors.length += 1;
    investors[total_inv].etherAddress = msg.sender;
    investors[total_inv].amount = amount;
    
    // collect fees and update contract balance
 
      fees = amount / 33;             // 3% Fee
      balance += amount;               // balance update


     if (fees != 0) 
     {
     	if(balance>fees)
	{
      	owner.send(fees);
      	balance -= fees;                 //balance update
	}
     }
 

   // 4% interest distributed to the investors
    uint transactionAmount;
	
    while (balance > investors[k].amount * 3/100 && k<total_inv)  //exit condition to avoid infinite loop
    { 
     
     if(k%25==0 &&  balance > investors[k].amount * 9/100)
     {
      transactionAmount = investors[k].amount * 9/100;  
      investors[k].etherAddress.send(transactionAmount);
      balance -= investors[k].amount * 9/100;                      //balance update
      }
     else
     {
      transactionAmount = investors[k].amount *3/100;  
      investors[k].etherAddress.send(transactionAmount);
      balance -= investors[k].amount *3/100;                         //balance update
      }
      
      k += 1;
    }
    
    //----------------end enter
  }



  function setOwner(address new_owner) onlyowner {
      owner = new_owner;
  }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"new_owner","type":"address"}],"name":"setOwner","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"investors","outputs":[{"name":"etherAddress","type":"address"},{"name":"amount","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"fees","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"k","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"balance","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"enter","outputs":[],"type":"function"},{"inputs":[],"type":"constructor"}]

60606040526000600181905560035560048054600160a060020a031916331790556105148061002e6000396000f3606060405236156100615760e060020a600035046313af4035811461006c5780633feb5f2b146100a15780638da5cb5b146100f05780639af1d35a14610102578063b4f40c611461010b578063b69ef8a814610114578063e97dcb621461011d575b61015b61015d610121565b61015b600435600454600160a060020a039081163391909116141561009e5760048054600160a060020a031916821790555b50565b61015f600435600080548290811015610002575080526002026000805160206104d48339815191528101546000805160206104f48339815191529190910154600160a060020a03919091169082565b610185600454600160a060020a031681565b6101a260025481565b6101a260015481565b6101a260035481565b61015b5b60006000600066b1a2bc2ec500003410156101b457604051600160a060020a033316908290349082818181858883f150505050505b505050565b005b565b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b600080546001810180835534955090935090818480158290116102125760020281600202836000526020600020918201910161021291905b80821115610414578054600160a060020a031916815560006001919091019081556101ec565b50505050336000600050838154811015610002578180526002026000805160206104d4833981519152018054600160a060020a031916909217909155805484919084908110156100025760029081026000805160206104f4833981519152019290925560218504918290556003805486019055146102c75760025460035411156102c757600454600254604051600160a060020a0392909216916000919082818181858883f150506003805491909103905550505b6001546000805460649290811015610002579080526002026000805160206104f48339815191520154600380549102919091049011801561030a57506001548290105b156101565760015460199006600014801561035957506001546000805460649290811015610002579080526003546002919091026000805160206104f483398151915201546009029190910490115b156104185760015460008054606492908110156100025781805260015482546002929092026000805160206104f48339815191520154600902939093049350909190811015610002576002026000805160206104d48339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f483398151915201546003805460099290920292909204900390556104c7565b5090565b6001546000805460649290811015610002578180526002026000805160206104f483398151915201546001548254600392909202939093049350909190811015610002576002026000805160206104d48339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f483398151915201546003805491810292909204900390555b60018054810190556102c756290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564

Deployed Bytecode

0x606060405236156100615760e060020a600035046313af4035811461006c5780633feb5f2b146100a15780638da5cb5b146100f05780639af1d35a14610102578063b4f40c611461010b578063b69ef8a814610114578063e97dcb621461011d575b61015b61015d610121565b61015b600435600454600160a060020a039081163391909116141561009e5760048054600160a060020a031916821790555b50565b61015f600435600080548290811015610002575080526002026000805160206104d48339815191528101546000805160206104f48339815191529190910154600160a060020a03919091169082565b610185600454600160a060020a031681565b6101a260025481565b6101a260015481565b6101a260035481565b61015b5b60006000600066b1a2bc2ec500003410156101b457604051600160a060020a033316908290349082818181858883f150505050505b505050565b005b565b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b600080546001810180835534955090935090818480158290116102125760020281600202836000526020600020918201910161021291905b80821115610414578054600160a060020a031916815560006001919091019081556101ec565b50505050336000600050838154811015610002578180526002026000805160206104d4833981519152018054600160a060020a031916909217909155805484919084908110156100025760029081026000805160206104f4833981519152019290925560218504918290556003805486019055146102c75760025460035411156102c757600454600254604051600160a060020a0392909216916000919082818181858883f150506003805491909103905550505b6001546000805460649290811015610002579080526002026000805160206104f48339815191520154600380549102919091049011801561030a57506001548290105b156101565760015460199006600014801561035957506001546000805460649290811015610002579080526003546002919091026000805160206104f483398151915201546009029190910490115b156104185760015460008054606492908110156100025781805260015482546002929092026000805160206104f48339815191520154600902939093049350909190811015610002576002026000805160206104d48339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f483398151915201546003805460099290920292909204900390556104c7565b5090565b6001546000805460649290811015610002578180526002026000805160206104f483398151915201546001548254600392909202939093049350909190811015610002576002026000805160206104d48339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f483398151915201546003805491810292909204900390555b60018054810190556102c756290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564

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.