ETH Price: $3,209.20 (-13.40%)

Contract

0xdcb13FA157eeBF22dDC8C9aA1d6E394810De6FA3
 
Transaction Hash
Method
Block
From
To
Enter144595782022-03-26 4:01:051000 days ago1648267265IN
0xdcb13FA1...810De6FA3
0 ETH0.000535924.79558989
Set Owner144595602022-03-26 3:57:531000 days ago1648267073IN
0xdcb13FA1...810De6FA3
0 ETH0.0007711632.39381059
Set Owner65218162018-10-15 21:01:472257 days ago1539637307IN
0xdcb13FA1...810De6FA3
0 ETH0.000115775
Transfer*60368112018-07-27 2:32:542338 days ago1532658774IN
0xdcb13FA1...810De6FA3
0.000001 ETH0.000057882
Enter57961732018-06-16 0:49:442379 days ago1529110184IN
0xdcb13FA1...810De6FA3
0 ETH0.000044842
Enter57961482018-06-16 0:42:172379 days ago1529109737IN
0xdcb13FA1...810De6FA3
0 ETH0.000086524
0xeebf980851998472018-03-05 8:28:362482 days ago1520238516IN
0xdcb13FA1...810De6FA3
0 ETH0.000116574
0xeebf980851998182018-03-05 8:21:362482 days ago1520238096IN
0xdcb13FA1...810De6FA3
0 ETH0.0001164
Transfer51997862018-03-05 8:12:182482 days ago1520237538IN
0xdcb13FA1...810De6FA3
0.00001 ETH0.000114564
Transfer51997712018-03-05 8:08:232482 days ago1520237303IN
0xdcb13FA1...810De6FA3
0.00001 ETH0.00009484
Owner51992552018-03-05 6:01:502482 days ago1520229710IN
0xdcb13FA1...810De6FA3
0.00001 ETH0.000087484
Owner51991692018-03-05 5:41:102482 days ago1520228470IN
0xdcb13FA1...810De6FA3
0 ETH0.000087484
Set Owner51991242018-03-05 5:29:012482 days ago1520227741IN
0xdcb13FA1...810De6FA3
0 ETH0.000115775
Set Owner42652902017-09-12 8:09:052656 days ago1505203745IN
0xdcb13FA1...810De6FA3
0 ETH0.0005556924
Enter42652842017-09-12 8:06:342656 days ago1505203594IN
0xdcb13FA1...810De6FA3
0 ETH0.000538124
Enter13091082016-04-10 4:46:333176 days ago1460263593IN
0xdcb13FA1...810De6FA3
0.1 ETH0.0048116550
Enter12607512016-04-02 4:15:193184 days ago1459570519IN
0xdcb13FA1...810De6FA3
0.05 ETH0.0048293550
Transfer12555262016-04-01 7:16:193185 days ago1459494979IN
0xdcb13FA1...810De6FA3
0.025 ETH0.0005588220
Transfer12205812016-03-26 12:14:123190 days ago1458994452IN
0xdcb13FA1...810De6FA3
2 ETH0.0021559620
Transfer12204462016-03-26 11:43:313190 days ago1458992611IN
0xdcb13FA1...810De6FA3
1 ETH0.00550
Transfer12202802016-03-26 11:04:023190 days ago1458990242IN
0xdcb13FA1...810De6FA3
14.97 ETH0.00550
Transfer12163692016-03-25 19:36:133191 days ago1458934573IN
0xdcb13FA1...810De6FA3
0.05 ETH0.0019158620
Transfer12163582016-03-25 19:32:283191 days ago1458934348IN
0xdcb13FA1...810De6FA3
0.05 ETH0.0019158620
Transfer12163552016-03-25 19:31:143191 days ago1458934274IN
0xdcb13FA1...810De6FA3
0.05 ETH0.0019158620
Transfer12163492016-03-25 19:30:343191 days ago1458934234IN
0xdcb13FA1...810De6FA3
0.05 ETH0.0019158620
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
60368112018-07-27 2:32:542338 days ago1532658774
0xdcb13FA1...810De6FA3
0.000001 ETH
51998472018-03-05 8:28:362482 days ago1520238516
0xdcb13FA1...810De6FA3
0 ETH
51997862018-03-05 8:12:182482 days ago1520237538
0xdcb13FA1...810De6FA3
0.00001 ETH
24401392016-10-14 18:19:112988 days ago1476469151
0xdcb13FA1...810De6FA3
0 ETH
24400892016-10-14 18:08:572988 days ago1476468537
0xdcb13FA1...810De6FA3
0 ETH
24400452016-10-14 18:00:112988 days ago1476468011
0xdcb13FA1...810De6FA3
0 ETH
24399492016-10-14 17:35:502988 days ago1476466550
0xdcb13FA1...810De6FA3
0 ETH
24390852016-10-14 14:10:012988 days ago1476454201
0xdcb13FA1...810De6FA3
0 ETH
24390312016-10-14 13:54:372988 days ago1476453277
0xdcb13FA1...810De6FA3
0 ETH
24387112016-10-14 12:28:482988 days ago1476448128
0xdcb13FA1...810De6FA3
0 ETH
24385172016-10-14 11:39:212988 days ago1476445161
0xdcb13FA1...810De6FA3
0 ETH
24385072016-10-14 11:35:482988 days ago1476444948
0xdcb13FA1...810De6FA3
0 ETH
24384912016-10-14 11:31:582988 days ago1476444718
0xdcb13FA1...810De6FA3
0 ETH
24384822016-10-14 11:29:082988 days ago1476444548
0xdcb13FA1...810De6FA3
0 ETH
24384762016-10-14 11:28:252988 days ago1476444505
0xdcb13FA1...810De6FA3
0 ETH
24384732016-10-14 11:27:152988 days ago1476444435
0xdcb13FA1...810De6FA3
0 ETH
24384652016-10-14 11:24:342988 days ago1476444274
0xdcb13FA1...810De6FA3
0 ETH
24384592016-10-14 11:22:492988 days ago1476444169
0xdcb13FA1...810De6FA3
0 ETH
24384382016-10-14 11:18:022988 days ago1476443882
0xdcb13FA1...810De6FA3
0 ETH
24384352016-10-14 11:17:302988 days ago1476443850
0xdcb13FA1...810De6FA3
0 ETH
24384332016-10-14 11:17:032988 days ago1476443823
0xdcb13FA1...810De6FA3
0 ETH
24384182016-10-14 11:13:042988 days ago1476443584
0xdcb13FA1...810De6FA3
0 ETH
24384112016-10-14 11:12:072988 days ago1476443527
0xdcb13FA1...810De6FA3
0 ETH
24383682016-10-14 11:03:302988 days ago1476443010
0xdcb13FA1...810De6FA3
0 ETH
24383592016-10-14 11:02:052988 days ago1476442925
0xdcb13FA1...810De6FA3
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-24
*/

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"}]

60606040526000600181905560035560048054600160a060020a031916331790556105168061002e6000396000f3606060405236156100615760e060020a600035046313af4035811461006c5780633feb5f2b146100a15780638da5cb5b146100f05780639af1d35a14610102578063b4f40c611461010b578063b69ef8a814610114578063e97dcb621461011d575b61015b61015d610121565b61015b600435600454600160a060020a039081163391909116141561009e5760048054600160a060020a031916821790555b50565b61015f600435600080548290811015610002575080526002026000805160206104d68339815191528101546000805160206104f68339815191529190910154600160a060020a03919091169082565b610185600454600160a060020a031681565b6101a260025481565b6101a260015481565b6101a260035481565b61015b5b60006000600066b1a2bc2ec500003410156101b457604051600160a060020a033316908290349082818181858883f150505050505b505050565b005b565b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b600080546001810180835534955090935090818480158290116102125760020281600202836000526020600020918201910161021291905b80821115610416578054600160a060020a031916815560006001919091019081556101ec565b50505050336000600050838154811015610002578180526002026000805160206104d6833981519152018054600160a060020a031916909217909155805484919084908110156100025760029081026000805160206104f6833981519152019290925581546021860401918290556003805486019055146102c95760025460035411156102c957600254600454604051600160a060020a03919091169160009182818181858883f150506003805491909103905550505b6001546000805460649290811015610002579080526002026000805160206104f68339815191520154600380549102919091049011801561030c57506001548290105b156101565760015460199006600014801561035b57506001546000805460649290811015610002579080526003546002919091026000805160206104f683398151915201546009029190910490115b1561041a5760015460008054606492908110156100025781805260015482546002929092026000805160206104f68339815191520154600902939093049350909190811015610002576002026000805160206104d68339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f683398151915201546003805460099290920292909204900390556104c9565b5090565b6001546000805460649290811015610002578180526002026000805160206104f683398151915201546001548254600392909202939093049350909190811015610002576002026000805160206104d68339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f683398151915201546003805491810292909204900390555b60018054810190556102c956290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564

Deployed Bytecode

0x606060405236156100615760e060020a600035046313af4035811461006c5780633feb5f2b146100a15780638da5cb5b146100f05780639af1d35a14610102578063b4f40c611461010b578063b69ef8a814610114578063e97dcb621461011d575b61015b61015d610121565b61015b600435600454600160a060020a039081163391909116141561009e5760048054600160a060020a031916821790555b50565b61015f600435600080548290811015610002575080526002026000805160206104d68339815191528101546000805160206104f68339815191529190910154600160a060020a03919091169082565b610185600454600160a060020a031681565b6101a260025481565b6101a260015481565b6101a260035481565b61015b5b60006000600066b1a2bc2ec500003410156101b457604051600160a060020a033316908290349082818181858883f150505050505b505050565b005b565b6040518083600160a060020a031681526020018281526020019250505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b60408051918252519081900360200190f35b600080546001810180835534955090935090818480158290116102125760020281600202836000526020600020918201910161021291905b80821115610416578054600160a060020a031916815560006001919091019081556101ec565b50505050336000600050838154811015610002578180526002026000805160206104d6833981519152018054600160a060020a031916909217909155805484919084908110156100025760029081026000805160206104f6833981519152019290925581546021860401918290556003805486019055146102c95760025460035411156102c957600254600454604051600160a060020a03919091169160009182818181858883f150506003805491909103905550505b6001546000805460649290811015610002579080526002026000805160206104f68339815191520154600380549102919091049011801561030c57506001548290105b156101565760015460199006600014801561035b57506001546000805460649290811015610002579080526003546002919091026000805160206104f683398151915201546009029190910490115b1561041a5760015460008054606492908110156100025781805260015482546002929092026000805160206104f68339815191520154600902939093049350909190811015610002576002026000805160206104d68339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f683398151915201546003805460099290920292909204900390556104c9565b5090565b6001546000805460649290811015610002578180526002026000805160206104f683398151915201546001548254600392909202939093049350909190811015610002576002026000805160206104d68339815191520154604051600160a060020a03919091169190839082818181858883f15050600154825460649450909150811015610002579080526002026000805160206104f683398151915201546003805491810292909204900390555b60018054810190556102c956290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564

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.