Sponsored:   LH-CRYPTO - 200 instruments (BTC, EUR, GOLD, OIL, SHARES). Leverage up to 1:500. OPEN ACCOUNT
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 852 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5fat txn 0x541b00075609f63ac962e14a1019fa2a84ffd2334d78117b76fc7eb4a4c87d73
Token Balance:
 Latest 25 transactions from a total of 852 transactions

TxHash Age From To Value [TxFee]
0xc6e2c52438758efe5ace48ff84930ab89221fe5ccd547da9ec4534245147f06943 days 9 hrs ago0x51763d18e92ade0b95256e57120cc17a9ef7d213  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000183632
0x5d9b7b638432e996d2336da73a68530bb8891c63f27cf61f6d8ceb6752b96ec143 days 9 hrs ago0x51763d18e92ade0b95256e57120cc17a9ef7d213  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950.00001 Ether0.0000110495
0x70e0456d9c1f917e542c0ce85069650a147dd03d6ee5e7bbdc3e2070abd7910543 days 9 hrs ago0x51763d18e92ade0b95256e57120cc17a9ef7d213  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950.00001 Ether0.0000110495
0xd7add54a613fcdf8a26b421a7c03e4fb14d1c985bf05250f9b45989ddc5d486849 days 2 hrs ago0x9dbe0db82aefa66d854855205e78545f31003858  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000091816
0x6ee5f8cd18d845432f95de2439ec056fcf6eba46010f160a42df7512566876ea49 days 10 hrs ago0x6e41c9b6ab7531b95d241cca4fe913078acfe309  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00025800296
0x207d9fcd4df14484f43b8b64d3d449ddf3208133b725391618a01c27c1b10ea949 days 10 hrs ago0x6e41c9b6ab7531b95d241cca4fe913078acfe309  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000252494
0x56176b77765e31200a0b5505c6d6ea07b51fad58e8f0a49a1a7a1f80845bbc9b49 days 10 hrs ago0x6e41c9b6ab7531b95d241cca4fe913078acfe309  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0002616756
0x4ff22fc9c5a38678bbdebbf0ee84cf22252356e785b13519149be1c184d2bc3550 days 1 hr ago0x0329781ee94c2ed022dd6ab0ba966fd7ac381a79  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0000879
0x5f126d2fd3643c90594368331700b12237ae99b0e3d68a9922bc90f4dea4a50850 days 9 hrs ago0xf56036f6a5d9b9991c209dcbc9c40b2c1cd46540  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000125375
0xb336e8475e39dfa3be40b30b5bf841502720b0dd293fdf643920042b3f8b7dce50 days 12 hrs ago0x52cd579935fd1ea0a09d316e2281782d15c935e2  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0000827475
0x631a8ae23a919e6fd57e7a7f49a6508f8da456a510b969dc5565ab749f3a494450 days 22 hrs ago0xf6135aa4ebe6378bdd980bacee309622de91dcfb  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000620158
0x2e6fbcad66a140cdccde17e50668d2901f1a531d97aa13cc2a07553fb961d29a50 days 23 hrs ago0x5d7faff0e33d550ee3aeed96fa30496771dd7867  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00056696
0xcbfff046629dc394863db035006721af2347c865e1b703dc18e7417123455af851 days 59 mins ago0x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a7553  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00094809496
0xb67c743795b7606eaaec887e975e5fa1ad136aeea9151d00c85efef0d48745c051 days 1 hr ago0x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a7553  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00063154872
0x7e8d3381282c6e82607aa8b208bfdb25d816edea395d986c8bb7f5cfe15c664651 days 3 hrs ago0x53e1eb6a53d9354d43155f76861c5a2ac80ef361  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000396963
0xe662e659813393e5f80c1b746dcedc3a06f453ec56bf842079ac9496f07acf8051 days 4 hrs ago0xafe7e3264efca320af481af3408d6f348878ec88  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00062932
0x79f9d378a59a7081b5c76d6f5dd83acc7156fe9e8b67a1cea7fca231934f290951 days 4 hrs ago0x3530bc82fe3a04638d596a7cd8062108082d20a6  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.00062932
0xd432c15f3724deee737450f8d71d63daeb0edc1f63109e4109b37f5ad05240a251 days 4 hrs ago0x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a7553  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0005103424
0xcef0e55678db2893f9b6455820e3ee9b7d2c07f2e5d1fb4887b8f5b6f7ccaafa51 days 4 hrs ago0x3530bc82fe3a04638d596a7cd8062108082d20a6  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950.01 Ether0.000640836
0xfa0ecad3ecded64403964c23aa6f301d8246e5946e9c2889306291abbe6e7d0751 days 4 hrs ago0xc951d3463ebba4e9ec8ddfe1f42bc5895c46ec8f  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0005602672
0x1ae847203e4884c5230ae2da7dc62983e28a00ce0d6209c1c75e2ad91223382951 days 4 hrs ago0x0b962755d87dc50f49deb45d5b0e7717db11dc71  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000375381
0x9259a27753d96d8bc37c14771252997acb3e0fc8d34764cad851a4b7485ed77551 days 4 hrs ago0xbbdc1d406c4aaee056dbbd0394d80eedba67de93  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.000453672
0x56b5d27d4589f32439a22e0c8e7cc9e6e3bf98968ecd032eb2e192f76c1dcd5551 days 4 hrs ago0x0b962755d87dc50f49deb45d5b0e7717db11dc71  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950.01 Ether0.000779553
0xe50df150b4e47bd83dd10878774fa9f0677727786260d30da0503d8c7b874fa551 days 4 hrs ago0x5100f9a8580c4a6d5b67790f796ff96326477e30  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950 Ether0.0003878937
0xc1251d15979a96a4e1d152229932d36d0705e2aa36a60300eb673f86071da7cc51 days 4 hrs ago0x5100f9a8580c4a6d5b67790f796ff96326477e30  IN   0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950.01 Ether0.0008055381
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x631a8ae23a919e6fd57e7a7f49a6508f8da456a510b969dc5565ab749f3a4944641380350 days 22 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a75531.285328175221653121 Ether
0xb67c743795b7606eaaec887e975e5fa1ad136aeea9151d00c85efef0d48745c0641304551 days 1 hr ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a75530.034478465531003638 Ether
0xd432c15f3724deee737450f8d71d63daeb0edc1f63109e4109b37f5ad05240a2641243951 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a75530.046031223335985154 Ether
0xcef0e55678db2893f9b6455820e3ee9b7d2c07f2e5d1fb4887b8f5b6f7ccaafa641243451 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.0001 Ether
0xcef0e55678db2893f9b6455820e3ee9b7d2c07f2e5d1fb4887b8f5b6f7ccaafa641243451 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.0004 Ether
0xfa0ecad3ecded64403964c23aa6f301d8246e5946e9c2889306291abbe6e7d07641243451 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xc951d3463ebba4e9ec8ddfe1f42bc5895c46ec8f0.018301259231255028 Ether
0x56b5d27d4589f32439a22e0c8e7cc9e6e3bf98968ecd032eb2e192f76c1dcd55641235151 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.0001 Ether
0x56b5d27d4589f32439a22e0c8e7cc9e6e3bf98968ecd032eb2e192f76c1dcd55641235151 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.0004 Ether
0xc1251d15979a96a4e1d152229932d36d0705e2aa36a60300eb673f86071da7cc641233251 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.0001 Ether
0xc1251d15979a96a4e1d152229932d36d0705e2aa36a60300eb673f86071da7cc641233251 days 4 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.0004 Ether
0x1b070990fcc2f2947b798debf55ffbaffc37ab14d103bf1fd7302d6aeaff1df9641190651 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.010052350404445985 Ether
0x2fa2899cc02a8dff02e4ad4e96b915c1d7687b1c677be260ad00722ff9b0f36d641190051 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.00013 Ether
0x2fa2899cc02a8dff02e4ad4e96b915c1d7687b1c677be260ad00722ff9b0f36d641190051 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.00052 Ether
0x03e41192610fdef41843beff8a871fe87b6ed8257fdc14950ffb254764ae5b0d641178251 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x36e058332ae39efad2315776b9c844e30d07388b0.000939922950489102 Ether
0xa7dc394f30f4d4fc11cb4fcfad6f5c78a37e01cd899e29597d8a28c53047c5c5641178051 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xf6135aa4ebe6378bdd980bacee309622de91dcfb0.00749953854475858 Ether
0x2b6538b89cff604c020d04b18e143edc20263e640afda208ed5e122cde3e27ba641177451 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.0001 Ether
0x2b6538b89cff604c020d04b18e143edc20263e640afda208ed5e122cde3e27ba641177451 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.0004 Ether
0x3c1a0b388915cf443d4cab0a7ba26c7c96ead75893dddeeaf66fbcc538295dcc641175851 days 6 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x8bcdaeeb1dd2f7b8fa6f0939051c70cc2a4a75530.06123129883520979 Ether
0xebec7aae9d6adf18e550d41cab40558f737f5a24ba42aa97c8383a090eda9c2c641152951 days 7 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.009743141359427212 Ether
0x19577e4aea936e4b1e9db711e8b5064b7135763de20d20b4a3aa0911cf8c30d6641152451 days 7 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.000125 Ether
0x19577e4aea936e4b1e9db711e8b5064b7135763de20d20b4a3aa0911cf8c30d6641152451 days 7 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950xaebbd80fd7dae979d965a3a5b09bbcd23eb40e5f0.0005 Ether
0x9edbe391709c7880265ff41ceb5726fcde66f1774af40673cb414a2989cffb08641136151 days 8 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x62eb3e90696d302f80c48d859943f0e2448234360.003360375008327076 Ether
0x28c0b91913828437e5327f1cbab6560c3b767643dddabce41ae8190f47578945641121351 days 8 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.011021348822073046 Ether
0xc5737a1a3e649fae79af990007616df86a76836114f198e26e77ae6899ac85ff641089151 days 10 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x5479a9ec6386db424b563ef059fc127042543a5d0.002155484077601112 Ether
0x3b75e7d871333d6a3d69a7d5d0db31a386274c65484e184f0f8805c9087c949a641081751 days 10 hrs ago0xb4d95449f1d4a793c7d32ab23a52ab58af5fe0950x95096780efd48fa66483bc197677e89f37ca0cb50.00012 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: ShrimpFarmer
Compiler Text: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18; // solhint-disable-line



contract VerifyToken {
    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    bool public activated;

    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
contract ApproveAndCallFallBack {
    function receiveApproval(address from, uint256 tokens, address token, bytes data) public;
}
contract EthVerifyCore{
  mapping (address => bool) public verifiedUsers;
}
contract ShrimpFarmer is ApproveAndCallFallBack{
    using SafeMath for uint;
    address vrfAddress=0x5BD574410F3A2dA202bABBa1609330Db02aD64C2;
    VerifyToken vrfcontract=VerifyToken(vrfAddress);

    //257977574257854071311765966
    //                10000000000
    //uint256 EGGS_PER_SHRIMP_PER_SECOND=1;
    uint256 public EGGS_TO_HATCH_1SHRIMP=86400;//86400
    uint public VRF_EGG_COST=(1000000000000000000*300)/EGGS_TO_HATCH_1SHRIMP;
    uint256 public STARTING_SHRIMP=300;
    uint256 PSN=100000000000000;
    uint256 PSNH=50000000000000;
    uint public potDrainTime=2 hours;//
    uint public POT_DRAIN_INCREMENT=1 hours;
    uint public POT_DRAIN_MAX=3 days;
    uint public HATCH_COOLDOWN_MAX=6 hours;//6 hours;
    bool public initialized=false;
    //bool public completed=false;

    address public ceoAddress;
    address public dev2;
    mapping (address => uint256) public hatchCooldown;//the amount of time you must wait now varies per user
    mapping (address => uint256) public hatcheryShrimp;
    mapping (address => uint256) public claimedEggs;
    mapping (address => uint256) public lastHatch;
    mapping (address => bool) public hasClaimedFree;
    uint256 public marketEggs;
    EthVerifyCore public ethVerify=EthVerifyCore(0x1c307A39511C16F74783fCd0091a921ec29A0b51);

    uint public lastBidTime;//last time someone bid for the pot
    address public currentWinner;
    uint public potEth=0;//eth specifically set aside for the pot
    uint public totalHatcheryShrimp=0;
    uint public prizeEth=0;

    function ShrimpFarmer() public{
        ceoAddress=msg.sender;
        dev2=address(0x95096780Efd48FA66483Bc197677e89f37Ca0CB5);
        lastBidTime=now;
        currentWinner=msg.sender;
    }
    function finalizeIfNecessary() public{
      if(lastBidTime.add(potDrainTime)<now){
        currentWinner.transfer(this.balance);//winner gets everything
        initialized=false;
        //completed=true;
      }
    }
    function getPotCost() public view returns(uint){
        return totalHatcheryShrimp.div(100);
    }
    function stealPot() public {

      if(initialized){
          _hatchEggs(0);
          uint cost=getPotCost();
          hatcheryShrimp[msg.sender]=hatcheryShrimp[msg.sender].sub(cost);//cost is 1% of total shrimp
          totalHatcheryShrimp=totalHatcheryShrimp.sub(cost);
          setNewPotWinner();
          hatchCooldown[msg.sender]=0;
      }
    }
    function setNewPotWinner() private {
      finalizeIfNecessary();
      if(initialized && msg.sender!=currentWinner){
        potDrainTime=lastBidTime.add(potDrainTime).sub(now).add(POT_DRAIN_INCREMENT);//time left plus one hour
        if(potDrainTime>POT_DRAIN_MAX){
          potDrainTime=POT_DRAIN_MAX;
        }
        lastBidTime=now;
        currentWinner=msg.sender;
      }
    }
    function isHatchOnCooldown() public view returns(bool){
      return lastHatch[msg.sender].add(hatchCooldown[msg.sender])<now;
    }
    function hatchEggs(address ref) public{
      require(isHatchOnCooldown());
      _hatchEggs(ref);
    }
    function _hatchEggs(address ref) private{
        require(initialized);

        uint256 eggsUsed=getMyEggs();
        uint256 newShrimp=SafeMath.div(eggsUsed,EGGS_TO_HATCH_1SHRIMP);
        hatcheryShrimp[msg.sender]=SafeMath.add(hatcheryShrimp[msg.sender],newShrimp);
        totalHatcheryShrimp=totalHatcheryShrimp.add(newShrimp);
        claimedEggs[msg.sender]=0;
        lastHatch[msg.sender]=now;
        hatchCooldown[msg.sender]=HATCH_COOLDOWN_MAX;
        //send referral eggs
        require(ref!=msg.sender);
        if(ref!=0){
          claimedEggs[ref]=claimedEggs[ref].add(eggsUsed.div(7));
        }
        //boost market to nerf shrimp hoarding
        marketEggs=SafeMath.add(marketEggs,SafeMath.div(eggsUsed,7));
    }
    function getHatchCooldown(uint eggs) public view returns(uint){
      uint targetEggs=marketEggs.div(50);
      if(eggs>=targetEggs){
        return HATCH_COOLDOWN_MAX;
      }
      return (HATCH_COOLDOWN_MAX.mul(eggs)).div(targetEggs);
    }
    function reduceHatchCooldown(address addr,uint eggs) private{
      uint reduction=getHatchCooldown(eggs);
      if(reduction>=hatchCooldown[addr]){
        hatchCooldown[addr]=0;
      }
      else{
        hatchCooldown[addr]=hatchCooldown[addr].sub(reduction);
      }
    }
    function sellEggs() public{
        require(initialized);
        finalizeIfNecessary();
        uint256 hasEggs=getMyEggs();
        uint256 eggValue=calculateEggSell(hasEggs);
        //uint256 fee=devFee(eggValue);
        uint potfee=potFee(eggValue);
        claimedEggs[msg.sender]=0;
        lastHatch[msg.sender]=now;
        marketEggs=SafeMath.add(marketEggs,hasEggs);
        //ceoAddress.transfer(fee);
        prizeEth=prizeEth.add(potfee);
        msg.sender.transfer(eggValue.sub(potfee));
    }
    function buyEggs() public payable{
        require(initialized);
        uint256 eggsBought=calculateEggBuy(msg.value,SafeMath.sub(this.balance,msg.value));
        eggsBought=eggsBought.sub(devFee(eggsBought));
        eggsBought=eggsBought.sub(devFee2(eggsBought));
        ceoAddress.transfer(devFee(msg.value));
        dev2.transfer(devFee2(msg.value));
        claimedEggs[msg.sender]=SafeMath.add(claimedEggs[msg.sender],eggsBought);
        reduceHatchCooldown(msg.sender,eggsBought); //reduce the hatching cooldown based on eggs bought

        //steal the pot if bought enough
        uint potEggCost=getPotCost().mul(EGGS_TO_HATCH_1SHRIMP);//the equivalent number of eggs to the pot cost in shrimp
        if(eggsBought>potEggCost){
          //hatcheryShrimp[msg.sender]=hatcheryShrimp[msg.sender].add(getPotCost());//to compensate for the shrimp that will be lost when calling the following
          //stealPot();
          setNewPotWinner();
        }
    }
    //magic trade balancing algorithm
    function calculateTrade(uint256 rt,uint256 rs, uint256 bs) public view returns(uint256){
        //(PSN*bs)/(PSNH+((PSN*rs+PSNH*rt)/rt));
        return SafeMath.div(SafeMath.mul(PSN,bs),SafeMath.add(PSNH,SafeMath.div(SafeMath.add(SafeMath.mul(PSN,rs),SafeMath.mul(PSNH,rt)),rt)));
    }
    function calculateEggSell(uint256 eggs) public view returns(uint256){
        return calculateTrade(eggs,marketEggs,this.balance.sub(prizeEth));
    }
    function calculateEggBuy(uint256 eth,uint256 contractBalance) public view returns(uint256){
        return calculateTrade(eth,contractBalance.sub(prizeEth),marketEggs);
    }
    function calculateEggBuySimple(uint256 eth) public view returns(uint256){
        return calculateEggBuy(eth,this.balance);
    }
    function potFee(uint amount) public view returns(uint){
        return SafeMath.div(SafeMath.mul(amount,20),100);
    }
    function devFee(uint256 amount) public view returns(uint256){
        return SafeMath.div(SafeMath.mul(amount,4),100);
    }
    function devFee2(uint256 amount) public view returns(uint256){
        return SafeMath.div(amount,100);
    }
    function seedMarket(uint256 eggs) public payable{
        require(msg.sender==ceoAddress);
        require(!initialized);
        //require(marketEggs==0);
        initialized=true;
        marketEggs=eggs;
        lastBidTime=now;
    }
    //Tokens are exchanged for shrimp by sending them to this contract with ApproveAndCall
    function receiveApproval(address from, uint256 tokens, address token, bytes data) public{
        require(!initialized);
        require(msg.sender==vrfAddress);
        require(ethVerify.verifiedUsers(from));//you must now be verified for this
        require(claimedEggs[from].add(tokens.div(VRF_EGG_COST))<=1001*EGGS_TO_HATCH_1SHRIMP);//you may now trade for a max of 1000 eggs
        vrfcontract.transferFrom(from,this,tokens);
        claimedEggs[from]=claimedEggs[from].add(tokens.div(VRF_EGG_COST));
    }
    //allow sending eth to the contract
    function () public payable {}

    function claimFreeEggs() public{
//  RE ENABLE THIS BEFORE DEPLOYING MAINNET
        require(ethVerify.verifiedUsers(msg.sender));
        require(initialized);
        require(!hasClaimedFree[msg.sender]);
        claimedEggs[msg.sender]=claimedEggs[msg.sender].add(getFreeEggs());
        _hatchEggs(0);
        hatchCooldown[msg.sender]=0;
        hasClaimedFree[msg.sender]=true;
        //require(hatcheryShrimp[msg.sender]==0);
        //lastHatch[msg.sender]=now;
        //hatcheryShrimp[msg.sender]=hatcheryShrimp[msg.sender].add(STARTING_SHRIMP);
    }
    function getFreeEggs() public view returns(uint){
        return min(calculateEggBuySimple(this.balance.div(400)),calculateEggBuySimple(0.01 ether));
    }
    function getBalance() public view returns(uint256){
        return this.balance;
    }
    function getMyShrimp() public view returns(uint256){
        return hatcheryShrimp[msg.sender];
    }
    function getMyEggs() public view returns(uint256){
        return SafeMath.add(claimedEggs[msg.sender],getEggsSinceLastHatch(msg.sender));
    }
    function getEggsSinceLastHatch(address adr) public view returns(uint256){
        uint256 secondsPassed=min(EGGS_TO_HATCH_1SHRIMP,SafeMath.sub(now,lastHatch[adr]));
        return SafeMath.mul(secondsPassed,hatcheryShrimp[adr]);
    }
    function min(uint256 a, uint256 b) private pure returns (uint256) {
        return a < b ? a : b;
    }
}

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"hasClaimedFree","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"POT_DRAIN_MAX","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethVerify","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ceoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"prizeEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"initialized","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"potEth","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"rt","type":"uint256"},{"name":"rs","type":"uint256"},{"name":"bs","type":"uint256"}],"name":"calculateTrade","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getFreeEggs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPotCost","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"eth","type":"uint256"},{"name":"contractBalance","type":"uint256"}],"name":"calculateEggBuy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isHatchOnCooldown","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketEggs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"potDrainTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sellEggs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"eggs","type":"uint256"}],"name":"seedMarket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"amount","type":"uint256"}],"name":"devFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"ref","type":"address"}],"name":"hatchEggs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"stealPot","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMyEggs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lastHatch","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buyEggs","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"eggs","type":"uint256"}],"name":"getHatchCooldown","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastBidTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalHatcheryShrimp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"claimedEggs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"EGGS_TO_HATCH_1SHRIMP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"hatcheryShrimp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"eth","type":"uint256"}],"name":"calculateEggBuySimple","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"dev2","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"VRF_EGG_COST","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"eggs","type":"uint256"}],"name":"calculateEggSell","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"tokens","type":"uint256"},{"name":"token","type":"address"},{"name":"data","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentWinner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimFreeEggs","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"POT_DRAIN_INCREMENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"hatchCooldown","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMyShrimp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"amount","type":"uint256"}],"name":"potFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalizeIfNecessary","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"adr","type":"address"}],"name":"getEggsSinceLastHatch","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"HATCH_COOLDOWN_MAX","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"amount","type":"uint256"}],"name":"devFee2","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"STARTING_SHRIMP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

  Contract Creation Code Switch To Opcodes View
608060405260008054600160a060020a0319908116735bd574410f3a2da202babba1609330db02ad64c217808355600180548316600160a060020a0390921691909117905562015180600255660c55f7bc23038e60035561012c600455655af3107a4000600555652d79883d2000600655611c20600755610e106008556203f480600955615460600a55600b805460ff1916905560138054909116731c307a39511c16f74783fcd0091a921ec29a0b51179055601681905560178190556018553480156100cb57600080fd5b50600b805461010060a860020a03191633610100810291909117909155600c80547395096780efd48fa66483bc197677e89f37ca0cb5600160a060020a031991821617909155426014556015805490911690911790556113ce806101306000396000f3006080604052600436106102245763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302b8230c81146102265780630618e0511461025b57806308722e78146102825780630a0f8168146102b35780630ec0692a146102c857806312065fe0146102dd578063158ef93e146102f25780632029e96f14610307578063229824c41461031c57806322e585571461033a57806323d7e0891461034f57806326fd8422146103645780632b9fd4461461037f5780632e9392bb14610394578063349a5205146103a95780633955f0fe146103be5780633b653755146103d35780633bc0461a146103de5780633ec862a8146103f6578063421a57271461041757806343ce74221461042c578063467ece79146104415780634f74acfe146104625780635616f7df1461046a578063642ab4b1146104825780636bc46fb21461049757806372670361146104ac578063732e77d0146104cd5780637e2cb974146104e25780637e56fde5146105035780638013f3a71461051b57806388af6534146105305780638e316327146105455780638f4ffcb11461055d578063aabe2fe3146105cd578063ae20bf15146105e2578063b1a8158c146105f7578063b24612d01461060c578063c2127e031461062d578063ce8883af14610642578063cf99d9351461065a578063d7c8843b1461066f578063e83aafd214610690578063ea3f190e146106a5578063fb05594f146106bd575b005b34801561023257600080fd5b50610247600160a060020a03600435166106d2565b604080519115158252519081900360200190f35b34801561026757600080fd5b506102706106e7565b60408051918252519081900360200190f35b34801561028e57600080fd5b506102976106ed565b60408051600160a060020a039092168252519081900360200190f35b3480156102bf57600080fd5b506102976106fc565b3480156102d457600080fd5b50610270610710565b3480156102e957600080fd5b50610270610716565b3480156102fe57600080fd5b5061024761071b565b34801561031357600080fd5b50610270610724565b34801561032857600080fd5b5061027060043560243560443561072a565b34801561034657600080fd5b50610270610777565b34801561035b57600080fd5b506102706107b1565b34801561037057600080fd5b506102706004356024356107c8565b34801561038b57600080fd5b506102476107f2565b3480156103a057600080fd5b50610270610825565b3480156103b557600080fd5b5061027061082b565b3480156103ca57600080fd5b50610224610831565b6102246004356108f9565b3480156103ea57600080fd5b5061027060043561093b565b34801561040257600080fd5b50610224600160a060020a0360043516610958565b34801561042357600080fd5b50610224610977565b34801561043857600080fd5b506102706109fb565b34801561044d57600080fd5b50610270600160a060020a0360043516610a1b565b610224610a2d565b34801561047657600080fd5b50610270600435610b71565b34801561048e57600080fd5b50610270610bcb565b3480156104a357600080fd5b50610270610bd1565b3480156104b857600080fd5b50610270600160a060020a0360043516610bd7565b3480156104d957600080fd5b50610270610be9565b3480156104ee57600080fd5b50610270600160a060020a0360043516610bef565b34801561050f57600080fd5b50610270600435610c01565b34801561052757600080fd5b50610297610c0e565b34801561053c57600080fd5b50610270610c1d565b34801561055157600080fd5b50610270600435610c23565b34801561056957600080fd5b50604080516020601f60643560048181013592830184900484028501840190955281845261022494600160a060020a03813581169560248035966044359093169536956084949201918190840183828082843750949750610c509650505050505050565b3480156105d957600080fd5b50610297610e65565b3480156105ee57600080fd5b50610224610e74565b34801561060357600080fd5b50610270610fab565b34801561061857600080fd5b50610270600160a060020a0360043516610fb1565b34801561063957600080fd5b50610270610fc3565b34801561064e57600080fd5b50610270600435610fd6565b34801561066657600080fd5b50610224610fe6565b34801561067b57600080fd5b50610270600160a060020a036004351661104c565b34801561069c57600080fd5b506102706110ab565b3480156106b157600080fd5b506102706004356110b1565b3480156106c957600080fd5b506102706110be565b60116020526000908152604090205460ff1681565b60095481565b601354600160a060020a031681565b600b546101009004600160a060020a031681565b60185481565b303190565b600b5460ff1681565b60165481565b600061076f61073b600554846110c4565b61076a60065461075f6107646107536005548a6110c4565b61075f6006548c6110c4565b6110fa565b89611109565b611109565b949350505050565b60006107ac610797610792303161019063ffffffff61110916565b610c01565b6107a7662386f26fc10000610c01565b611120565b905090565b6017546000906107ac90606463ffffffff61110916565b60006107eb836107e36018548561113690919063ffffffff16565b60125461072a565b9392505050565b336000908152600d60209081526040808320546010909252822054429161081f919063ffffffff6110fa16565b10905090565b60125481565b60075481565b600b546000908190819060ff16151561084957600080fd5b610851610fe6565b6108596109fb565b925061086483610c23565b915061086f82610fd6565b336000908152600f602090815260408083208390556010909152902042905560125490915061089e90846110fa565b6012556018546108b4908263ffffffff6110fa16565b601855336108fc6108cb848463ffffffff61113616565b6040518115909202916000818181858888f193505050501580156108f3573d6000803e3d6000fd5b50505050565b600b546101009004600160a060020a0316331461091557600080fd5b600b5460ff161561092557600080fd5b600b805460ff1916600117905560125542601455565b600061095261094b8360046110c4565b6064611109565b92915050565b6109606107f2565b151561096b57600080fd5b61097481611148565b50565b600b5460009060ff16156109745761098f6000611148565b6109976107b1565b336000908152600e60205260409020549091506109ba908263ffffffff61113616565b336000908152600e60205260409020556017546109dd908263ffffffff61113616565b6017556109e8611272565b336000908152600d602052604081205550565b336000818152600f602052604081205490916107ac919061075f9061104c565b60106020526000908152604090205481565b600b54600090819060ff161515610a4357600080fd5b610a5734610a52303182611136565b6107c8565b9150610a72610a658361093b565b839063ffffffff61113616565b9150610a80610a65836110b1565b600b549092506101009004600160a060020a03166108fc610aa03461093b565b6040518115909202916000818181858888f19350505050158015610ac8573d6000803e3d6000fd5b50600c54600160a060020a03166108fc610ae1346110b1565b6040518115909202916000818181858888f19350505050158015610b09573d6000803e3d6000fd5b50336000908152600f6020526040902054610b2490836110fa565b336000818152600f6020526040902091909155610b41908361130f565b610b5b600254610b4f6107b1565b9063ffffffff6110c416565b905080821115610b6d57610b6d611272565b5050565b600080610b8a603260125461110990919063ffffffff16565b9050808310610b9d57600a549150610bc5565b610bc281610bb685600a546110c490919063ffffffff16565b9063ffffffff61110916565b91505b50919050565b60145481565b60175481565b600f6020526000908152604090205481565b60025481565b600e6020526000908152604090205481565b60006109528230316107c8565b600c54600160a060020a031681565b60035481565b600061095282601254610c4b60185430600160a060020a03163161113690919063ffffffff16565b61072a565b600b5460ff1615610c6057600080fd5b600054600160a060020a03163314610c7757600080fd5b601354604080517fe35fe366000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660048301529151919092169163e35fe3669160248083019260209291908290030181600087803b158015610cdf57600080fd5b505af1158015610cf3573d6000803e3d6000fd5b505050506040513d6020811015610d0957600080fd5b50511515610d1657600080fd5b6002546103e902610d5a610d356003548661110990919063ffffffff16565b600160a060020a0387166000908152600f60205260409020549063ffffffff6110fa16565b1115610d6557600080fd5b600154604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015230602483015260448201879052915191909216916323b872dd9160648083019260209291908290030181600087803b158015610dda57600080fd5b505af1158015610dee573d6000803e3d6000fd5b505050506040513d6020811015610e0457600080fd5b5050600354610e4390610e1e90859063ffffffff61110916565b600160a060020a0386166000908152600f60205260409020549063ffffffff6110fa16565b600160a060020a039094166000908152600f6020526040902093909355505050565b601554600160a060020a031681565b601354604080517fe35fe3660000000000000000000000000000000000000000000000000000000081523360048201529051600160a060020a039092169163e35fe366916024808201926020929091908290030181600087803b158015610eda57600080fd5b505af1158015610eee573d6000803e3d6000fd5b505050506040513d6020811015610f0457600080fd5b50511515610f1157600080fd5b600b5460ff161515610f2257600080fd5b3360009081526011602052604090205460ff1615610f3f57600080fd5b610f66610f4a610777565b336000908152600f60205260409020549063ffffffff6110fa16565b336000908152600f6020526040812091909155610f8290611148565b336000908152600d6020908152604080832083905560119091529020805460ff19166001179055565b60085481565b600d6020526000908152604090205481565b336000908152600e602052604090205490565b600061095261094b8360146110c4565b42610ffe6007546014546110fa90919063ffffffff16565b101561104a57601554604051600160a060020a0390911690303180156108fc02916000818181858888f1935050505015801561103e573d6000803e3d6000fd5b50600b805460ff191690555b565b6000806110846002546107a7426010600088600160a060020a0316600160a060020a0316815260200190815260200160002054611136565b600160a060020a0384166000908152600e6020526040902054909150610bc29082906110c4565b600a5481565b6000610952826064611109565b60045481565b6000808315156110d757600091506110f3565b508282028284828115156110e757fe5b04146110ef57fe5b8091505b5092915050565b6000828201838110156110ef57fe5b600080828481151561111757fe5b04949350505050565b600081831061112f57816107eb565b5090919050565b60008282111561114257fe5b50900390565b600b54600090819060ff16151561115e57600080fd5b6111666109fb565b915061117482600254611109565b336000908152600e602052604090205490915061119190826110fa565b336000908152600e60205260409020556017546111b4908263ffffffff6110fa16565b601755336000818152600f6020908152604080832083905560108252808320429055600a54600d90925290912055600160a060020a03841614156111f757600080fd5b600160a060020a038316156112595761123f61121a83600763ffffffff61110916565b600160a060020a0385166000908152600f60205260409020549063ffffffff6110fa16565b600160a060020a0384166000908152600f60205260409020555b61126a60125461075f846007611109565b601255505050565b61127a610fe6565b600b5460ff1680156112975750601554600160a060020a03163314155b1561104a576112d56008546112c9426112bd6007546014546110fa90919063ffffffff16565b9063ffffffff61113616565b9063ffffffff6110fa16565b600781905560095410156112ea576009546007555b426014556015805473ffffffffffffffffffffffffffffffffffffffff191633179055565b600061131a82610b71565b600160a060020a0384166000908152600d6020526040902054909150811061135a57600160a060020a0383166000908152600d602052604081205561139d565b600160a060020a0383166000908152600d6020526040902054611383908263ffffffff61113616565b600160a060020a0384166000908152600d60205260409020555b5050505600a165627a7a723058208f7f05e68bd9178d17deb4edc9414caa906b96ab5d0e1f0dc60a2fb682cc302e0029

   Swarm Source:
bzzr://8f7f05e68bd9178d17deb4edc9414caa906b96ab5d0e1f0dc60a2fb682cc302e

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.