Latest 25 txns from a total Of 7151 transactions View All

TxHash Block Age From To Value [TxFee]
0xb16aae02fc0370490abf07dd5c658db6e1d36f6580e8006a59e225f00317aa0233133025 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x2bcbca63848c42fc84ed0bc68aa00d9a57ae2c2a4ed02c7328fcf1c57cb51ed7331323510 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x45a8ff189d91f7522480eb9f92f065ec95650001cdf33c4ed2d51fec079012fc331317015 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x7e9f7a8aa838c7d02c8ec3cb6a26b25938fedeba8827d8ef60d6384bbeaf7e8d331310220 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.007617
0x7bc15d797674c301eb2ff95d763daeb508e37fa329a03f637471ca809865cf3c331303525 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.007617
0x3edd5a7dce3ac30c2d5feaa6073ebcf152b1e763f054628515a3517be9eff840331296930 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x559538567cae33f180f073ac8a166280667870246d1b801c14c10efca641511d331290235 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x5bdd673ac8d316c12dad9cbd453f2ffde9d01bebd4bd5f91d3da5197d81325e1331283540 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xd98a10fb081d8933d34180dca704457f3654e85e3d90bce999b68b04b162c752331276945 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x40f3176a7bc2d94b5584ce3a8982407f1ab656fb84603bedc563f250dc56d19e331270250 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x8bf23a1bf8dda8048467701f494f3f55c74bdf236ea3284635ec1449e9c07cc8331263555 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x93ae0a77a29f76f46386ff501d7b2bc03956cc56bbc8589ceef7bb742052cbc233125691 hr ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x381bc76348098916f394526e39a573951d4a1e87364178420b595b086da566de33125021 hr 5 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xb833f2493a2079a796601a049de6f663cee8c56dbfb4b81c42afe6413687c0fa33124351 hr 10 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xa322f61dcf7f3b3c9c5586472e3e2a6e65c6266ed11d0cdad396f7d2bbc1c66333123691 hr 15 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xfe741553361c97dbaf0549f22e2d14ddce4f0007b2fccc8c5ac220a6bd66e04333123021 hr 20 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xd1baa9c62a4b1c648c4cd443e5ddea8135d6942432cb0fc07c963803d973ade733122351 hr 25 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xdd32499e78867169cdf617d86a38ff5a687e11da1f8683cd839d5df7cbd6844a33121691 hr 30 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x4a731ce24e1799680f8e379f1f7a15c6888464b74ad7384faea2bbe42775701333121021 hr 35 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xe689110055aac5bb5f7efab3d2d55cc3bf9c1d92b4afb12512b282ac3418364233120351 hr 40 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x57d64ba0ac1a698ba26d2b9f03fb0ebde826038ded034d009d9227206b918d8633119691 hr 45 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x183c86216bcc2033cf5cc40e49cf478be3740e00e6d63b21bf99a5636e20b14833119021 hr 50 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x1f7765b45b5ea9aebc698c1b593fdd3c635338d38cfe405f8e4cf337c789703e33118351 hr 55 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x22ce1074b228e752d02831ddf07606b3e4b3cf34995784ee3036d4670718a2d233117692 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x97ecd6a712a498c1c822d3ffc12a322939c49a97026b27fe74251b5fa59ac5a133117022 hrs 5 mins ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
[ 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
0x80125679ed4c4057a2793c50900c21cc7707e7a9282fe0469d73fc236a383011330074315 hrs 47 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x150e6401d1d89204795493bd0bd52861846b5f880.0000000000036 Ether
0x909de82ebd89f45846b13ff03f0779c2acc8668f5bb65960799b18400a18699b330073915 hrs 47 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x2099100fae02c7312d747f33ce4620490259c05c0.0199999999964 Ether
0x6a505f9104542649be2a236ad0954cc1fc51e2dbe5b92510680b7ba5763dcf6b330071515 hrs 49 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.02 Ether
0xc65531fd7187449df1a88bbd3338c706df148b138c86b7b337ae1d3568229629330002316 hrs 41 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x150e6401d1d89204795493bd0bd52861846b5f880.06 Ether
0xeb9cf97b637e6587989ab32d08c56822d91b02ec727ff925f4a2a199cebb6fe9330001416 hrs 41 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.04 Ether
0x85be83afecd114a9773c1b63dbf2e2a6b16be523d296be62d3be9fde6cb4dd30329998716 hrs 43 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.02 Ether
0x212dd140611bc6c55fcf7d1bc44d6b0d5b0c71ccd89fc794fe2bdf22f6783965329990316 hrs 50 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x150e6401d1d89204795493bd0bd52861846b5f880.01 Ether
0xe7b3988df7c11bbf7c8974e6d3b627363e5e4978f0f87c5ed3d988faa018e442329987516 hrs 52 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x8d90d9334a45ba875e0b99f24f23777863a3bdbc09c3c9b35397179e60bd04aa329734320 hrs 2 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x150e6401d1d89204795493bd0bd52861846b5f880.1 Ether
0xbc8693c3b7fd6bf08fa495a681fca863aed2e2a7732be4c31073e1e5e996eb0d329733720 hrs 2 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0x29addc5e340118e16318adac350acf7c1f01c1d399dd8b6548d9b118d87c78b5329670320 hrs 50 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x150e6401d1d89204795493bd0bd52861846b5f880.657867034150600002 Ether
0x7a1cb1af0d28884098acafa885d6b3e751082b112e0a87adec597b4ac2d9dd2c329630521 hrs 20 mins ago0x150e6401d1d89204795493bd0bd52861846b5f880x60860ce9688f4200e87e61b9a9a171cee1dc5f652 wei
0x6887d0ca118d738b81ef4551319e9d2373e088dac2be86378e949475d1b112e732931211 day 1 hr ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x0aa597ea5cca7c668beaad7974b056950853383b0.000854 Ether
0xe247128757c509cf83bd45ba909ea17e8a91fd79287775594e92fc2ed18163c332931061 day 1 hr ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650x0aa597ea5cca7c668beaad7974b056950853383b0.89914 Ether
0xc61e2490882120427207924e2f72ac6ea9ed7ce35b61c17a89d8f59ef8172ff432826601 day 14 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.3 Ether
0xed9622d9a50df712598b9da9bc1619a11d22840c1c10e0055b58ba12149c153d32790921 day 18 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.12 Ether
0x4cf008537482f0179e0d73732b0487b53f06eb0d22c2001ed907561b36e8e28b32790861 day 18 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xd16286f5fe12494835bbb5d80b261ffa2d91f25e784792daf2d5e2ebcd253af932788741 day 19 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xff08dd3b984eeebff9f88923f0d987ec690099360.0545693658494 Ether
0x843650a418f5c361518e071cc2fcdf2311ba98a35fbf791f1c97c7e1938f09f732788541 day 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xf46c361fd7887270858f7493c1299d10aea0559b3f1c76b3a0c32376cd3643f132788451 day 19 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xff08dd3b984eeebff9f88923f0d987ec690099360.0976 Ether
0x14f4e138616f05e328aac810d7337af47f4754abca13ff2f1ee9006f7edf66d332788021 day 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0x4df589e258540bfbe1396d933333eb206efb4d0e9403eb4cd7da40e1817e092732787921 day 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.1 Ether
0xc6291f969c7b36698b3d86ad892507950147fe925679fab7f24cd2185b181a6c32783871 day 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.000025 Ether
0x8b43b3b5d0476b27bf4780fc7c213e237cd3b695db9f216b27e75782bfd706f932783761 day 19 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.04 Ether
0x52a6d640b1fea63cf55ee250163d87d5dcd9bf300761f72843f38899b39915c032778441 day 20 hrs ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to DelegateCallReturnValue (low-severity), ECRecoverMalformedInput (medium-severity), SkipEmptyStringLiteral (low-severity) Solidity compiler bugs.

Contract Source Code Verified
Contract Name: KyberReserve
Compiler Version: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  0



  Contract Source Code   Find Similiar Contracts
pragma solidity ^0.4.8;

// https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
    function totalSupply() constant returns (uint totalSupply);
    function balanceOf(address _owner) constant returns (uint balance);
    function transfer(address _to, uint _value) returns (bool success);
    function transferFrom(address _from, address _to, uint _value) returns (bool success);
    function approve(address _spender, uint _value) returns (bool success);
    function allowance(address _owner, address _spender) constant returns (uint remaining);
    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);
}



contract KyberReserve {
    address public reserveOwner;
    address public kyberNetwork;
    ERC20 constant public ETH_TOKEN_ADDRESS = ERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee);
    uint  constant PRECISION = (10**18);
    bool public tradeEnabled;

    struct ConversionRate {
        uint rate;
        uint expirationBlock;
    }
    
    mapping(bytes32=>ConversionRate) pairConversionRate;
    

    function KyberReserve( address _kyberNetwork, address _reserveOwner ) {
        kyberNetwork = _kyberNetwork;
        reserveOwner = _reserveOwner;
        tradeEnabled = true;
    }
    
    
    function isPairListed( ERC20 source, ERC20 dest, uint blockNumber ) internal constant returns(bool) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        if( rateInfo.rate == 0 ) return false;
        return rateInfo.expirationBlock >= blockNumber;
    }
    
    function getConversionRate( ERC20 source, ERC20 dest, uint blockNumber ) internal constant returns(uint) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        if( rateInfo.rate == 0 ) return 0;
        if( rateInfo.expirationBlock < blockNumber ) return 0;
        return rateInfo.rate;
    }
    
    event ErrorReport( address indexed origin, uint error, uint errorInfo );
    event DoTrade( address indexed origin, address source, uint sourceAmount, address destToken, uint destAmount, address destAddress );
    
    function doTrade( ERC20 sourceToken,
                      uint sourceAmount,
                      ERC20 destToken,
                      address destAddress,
                      bool validate ) internal returns(bool) {

        // can skip validation if done at kyber network level        
        if( validate ) {
            if( ! isPairListed( sourceToken, destToken, block.number ) ) {
                // pair is not listed
                ErrorReport( tx.origin, 0x800000001, 0 );
                return false;
                
            }
            if( sourceToken == ETH_TOKEN_ADDRESS ) {
                if( msg.value != sourceAmount ) {
                    // msg.value != sourceAmmount
                    ErrorReport( tx.origin, 0x800000002, msg.value );
                    return false;
                }
            }
            else if( msg.value > 0 ) {
                // msg.value must be 0
                ErrorReport( tx.origin, 0x800000003, msg.value );
                return false;
            }
            else if( sourceToken.allowance(msg.sender, this ) < sourceAmount ) {
                // allowance is not enough
                ErrorReport( tx.origin, 0x800000004, sourceToken.allowance(msg.sender, this ) );
                return false;
            }
        }
        
        uint conversionRate = getConversionRate( sourceToken, destToken, block.number );
        // TODO - safe multiplication
        uint destAmount = (conversionRate * sourceAmount) / PRECISION;

        // sanity check            
        if( destAmount == 0 ) {
            // unexpected error: dest amount is 0
            ErrorReport( tx.origin, 0x800000005, 0 );
            return false;
        }
        
        // check for sufficient balance
        if( destToken == ETH_TOKEN_ADDRESS ) {
            if( this.balance < destAmount ) {
                // insufficient ether balance
                ErrorReport( tx.origin, 0x800000006, destAmount );
                return false;
            }
        }
        else {
            if( destToken.balanceOf(this) < destAmount ) {
                // insufficient token balance
                ErrorReport( tx.origin, 0x800000007, uint(destToken) );
                return false;
            }
        }
        
        // collect source tokens
        if( sourceToken != ETH_TOKEN_ADDRESS ) {
            if( ! sourceToken.transferFrom(msg.sender,this,sourceAmount) ) {
                // transfer from source token failed
                ErrorReport( tx.origin, 0x800000008, uint(sourceToken) );
                return false;
            }
        }
        
        // send dest tokens
        if( destToken == ETH_TOKEN_ADDRESS ) {
            if( ! destAddress.send(destAmount) ) {
                // transfer ether to dest failed
                ErrorReport( tx.origin, 0x800000009, uint(destAddress) );
                return false;
            }
        }
        else {
            if( ! destToken.transfer(destAddress, destAmount) ) {
                // transfer token to dest failed
                ErrorReport( tx.origin, 0x80000000a, uint(destAddress) );
                return false;
            }
        }
        
        DoTrade( tx.origin, sourceToken, sourceAmount, destToken, destAmount, destAddress );        
        
        return true;
    }
    
    function trade( ERC20 sourceToken,
                    uint sourceAmount,
                    ERC20 destToken,
                    address destAddress,
                    bool validate ) payable returns(bool) {

        if( ! tradeEnabled ) {
            // trade is not enabled
            ErrorReport( tx.origin, 0x810000000, 0 );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }

        if( msg.sender != kyberNetwork ) {
            // sender must be kyber network
            ErrorReport( tx.origin, 0x810000001, uint(msg.sender) );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            
            return false;
        }
        
        if( ! doTrade( sourceToken, sourceAmount, destToken, destAddress, validate ) ) {
            // do trade failed
            ErrorReport( tx.origin, 0x810000002, 0 );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }
        
        ErrorReport( tx.origin, 0, 0 );
        return true;
    }
    
    event SetRate( ERC20 source, ERC20 dest, uint rate, uint expiryBlock );
    function setRate( ERC20[] sources, ERC20[] dests, uint[] conversionRates, uint[] expiryBlocks, bool vaildate ) returns(bool) {
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x820000000, uint(msg.sender) );
            return false;
        }
        
        if( vaildate ) {
            if( ( sources.length != dests.length ) ||
                ( sources.length != conversionRates.length ) ||
                ( sources.length != expiryBlocks.length ) ) {
                // arrays length are not identical
                ErrorReport( tx.origin, 0x820000001, 0 );
                return false;
            }
        }
        
        for( uint i = 0 ; i < sources.length ; i++ ) {
            SetRate( sources[i], dests[i], conversionRates[i], expiryBlocks[i] );
            pairConversionRate[sha3(sources[i],dests[i])] = ConversionRate( conversionRates[i], expiryBlocks[i] );               
        }
        
        ErrorReport( tx.origin, 0, 0 );
        return true;
    }

    event EnableTrade( bool enable );
    function enableTrade( bool enable ) returns(bool){
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x830000000, uint(msg.sender) );
            return false;
        }
        
        tradeEnabled = enable;
        ErrorReport( tx.origin, 0, 0 );
        EnableTrade( enable );
        
        return true;
    }

    event DepositToken( ERC20 token, uint amount );
    function() payable {
        DepositToken( ETH_TOKEN_ADDRESS, msg.value );        
    }
    function depositEther( ) payable returns(bool) {
        /*
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x840000000, uint(msg.sender) );
            if( msg.value > 0 ) {
                if( ! msg.sender.send(msg.value) ) throw;
            }
            return false;
        }*/
        
        ErrorReport( tx.origin, 0, 0 );        
        
        DepositToken( ETH_TOKEN_ADDRESS, msg.value );
        return true;
    }
    
    function depositToken( ERC20 token, uint amount ) returns(bool) {
        /*
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x850000000, uint(msg.sender) );
            return false;
        }*/

        if( token.allowance( msg.sender, this ) < amount ) {
            // allowence is smaller then amount
            ErrorReport( tx.origin, 0x850000001, token.allowance( msg.sender, this ) );
            return false;
        }
        
        if( ! token.transferFrom(msg.sender, this, amount ) ) {
            // transfer from failed
            ErrorReport( tx.origin, 0x850000002, uint(token) );
            return false;
        }
        
        DepositToken( token, amount );
        return true;
    }
    
    
    event Withdraw( ERC20 token, uint amount, address destination );
    function withdraw( ERC20 token, uint amount, address destination ) returns(bool) {
        if( msg.sender != reserveOwner ) {
            // sender must be reserve owner
            ErrorReport( tx.origin, 0x860000000, uint(msg.sender) );
            return false;
        }
        
        if( token == ETH_TOKEN_ADDRESS ) {
            if( ! destination.send(amount) ) throw;
        }
        else if( ! token.transfer(destination,amount) ) {
            // transfer to reserve owner failed
            ErrorReport( tx.origin, 0x860000001, uint(token) );
            return false;
        }
        
        ErrorReport( tx.origin, 0, 0 );
        Withdraw( token, amount, destination );
    }
    
    
    ////////////////////////////////////////////////////////////////////////////
    /// status functions ///////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////
    
    // returns (rate, block expiration, balance of dest)    
    function getPairInfo( ERC20 source, ERC20 dest ) constant returns(uint rate, uint expBlock, uint balance) {
        ConversionRate memory rateInfo = pairConversionRate[sha3(source,dest)];
        balance = 0;
        if( dest == ETH_TOKEN_ADDRESS ) balance = this.balance;
        else balance = dest.balanceOf(this);
        
        expBlock = rateInfo.expirationBlock;
        rate = rateInfo.rate;
    }
    
    function getBalance( ERC20 token ) constant returns(uint){
        if( token == ETH_TOKEN_ADDRESS ) return this.balance;
        else return token.balanceOf(this);
    }
}

  Contract ABI  
[{"constant":false,"inputs":[{"name":"sourceToken","type":"address"},{"name":"sourceAmount","type":"uint256"},{"name":"destToken","type":"address"},{"name":"destAddress","type":"address"},{"name":"validate","type":"bool"}],"name":"trade","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"ETH_TOKEN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"}],"name":"depositToken","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"source","type":"address"},{"name":"dest","type":"address"}],"name":"getPairInfo","outputs":[{"name":"rate","type":"uint256"},{"name":"expBlock","type":"uint256"},{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"},{"name":"destination","type":"address"}],"name":"withdraw","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"depositEther","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"kyberNetwork","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"enable","type":"bool"}],"name":"enableTrade","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tradeEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"sources","type":"address[]"},{"name":"dests","type":"address[]"},{"name":"conversionRates","type":"uint256[]"},{"name":"expiryBlocks","type":"uint256[]"},{"name":"vaildate","type":"bool"}],"name":"setRate","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"reserveOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_kyberNetwork","type":"address"},{"name":"_reserveOwner","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"origin","type":"address"},{"indexed":false,"name":"error","type":"uint256"},{"indexed":false,"name":"errorInfo","type":"uint256"}],"name":"ErrorReport","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"origin","type":"address"},{"indexed":false,"name":"source","type":"address"},{"indexed":false,"name":"sourceAmount","type":"uint256"},{"indexed":false,"name":"destToken","type":"address"},{"indexed":false,"name":"destAmount","type":"uint256"},{"indexed":false,"name":"destAddress","type":"address"}],"name":"DoTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"source","type":"address"},{"indexed":false,"name":"dest","type":"address"},{"indexed":false,"name":"rate","type":"uint256"},{"indexed":false,"name":"expiryBlock","type":"uint256"}],"name":"SetRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"enable","type":"bool"}],"name":"EnableTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"DepositToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"destination","type":"address"}],"name":"Withdraw","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b6040516040806119198339810160405280516020909101515b6001805460008054600160a060020a03858116600160a060020a03199283161790925560a060020a60ff021991861692169190911716740100000000000000000000000000000000000000001790555b50505b611892806100876000396000f3006060604052361561009e5763ffffffff60e060020a6000350416630363b1e181146100dd5780631878d1f11461011a578063338b5dea14610146578063400f7a1e1461017957806369328dec146101b957806398ea5fca146101f3578063b78b842d1461020f578063c00f04d11461023b578063d621e81314610264578063da6dfea714610288578063e61b65571461039b578063f8b2cb4f146103c7575b6100db5b6040805160008051602061182783398151915281523460208201528151600080516020611807833981519152929181900390910190a15b565b005b610106600160a060020a03600435811690602435906044358116906064351660843515156103f5565b604080519115158252519081900360200190f35b341561012257fe5b61012a6105dd565b60408051600160a060020a039092168252519081900360200190f35b341561014e57fe5b610106600160a060020a03600435166024356105ef565b604080519115158252519081900360200190f35b341561018157fe5b61019b600160a060020a0360043581169060243516610852565b60408051938452602084019290925282820152519081900360600190f35b34156101c157fe5b610106600160a060020a036004358116906024359060443516610968565b604080519115158252519081900360200190f35b610106610b5e565b604080519115158252519081900360200190f35b341561021757fe5b61012a610bd6565b60408051600160a060020a039092168252519081900360200190f35b341561024357fe5b6101066004351515610be5565b604080519115158252519081900360200190f35b341561026c57fe5b610106610cc6565b604080519115158252519081900360200190f35b341561029057fe5b610106600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750506040805187358901803560208181028481018201909552818452989a998901989297509082019550935083925085019084908082843750949650505050913515159150610cd69050565b604080519115158252519081900360200190f35b34156103a357fe5b61012a610f69565b60408051600160a060020a039092168252519081900360200190f35b34156103cf57fe5b6103e3600160a060020a0360043516610f78565b60408051918252519081900360200190f35b60015460009060a060020a900460ff16151561048357604080516408100000008152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b60015433600160a060020a0390811691161461051457604080516408100000018152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b610521868686868661102d565b151561059f57604080516408100000028152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600034111561047a57604051600160a060020a033316903480156108fc02916000818181858888f19350505050151561047a5760006000fd5b5b5060006105d4565b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a25060015b95945050505050565b60008051602061182783398151915281565b60008183600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561066c57fe5b6102c65a03f1151561067a57fe5b5050506040518051905010156107575732600160a060020a031660008051602061184783398151915264085000000185600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561072357fe5b6102c65a03f1151561073157fe5b5050604080518051938152602081019390935280519283900301919050a250600061084c565b6040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0333811660048301523081166024830152604482018790529351938716936323b872dd9360648084019491938390030190829087803b15156107b957fe5b6102c65a03f115156107c757fe5b5050604051511515905061081657604080516408500000028152600160a060020a03858116602083015282513290911692600080516020611847833981519152928290030190a250600061084c565b60408051600160a060020a0385168152602081018490528151600080516020611807833981519152929181900390910190a15060015b92915050565b6000600060006108606117ef565b505060408051606060020a600160a060020a0380881682028352861690810260148301528251918290036028018220600090815260026020908152848220848601909552845484526001909401549383019390935260008051602061182783398151915214156108dc5730600160a060020a0316319150610954565b84600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561093c57fe5b6102c65a03f1151561094a57fe5b5050604051519250505b60208101518151945092505b509250925092565b6000805433600160a060020a039081169116146109c057604080516408600000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2506000610b57565b600160a060020a0384166000805160206118278339815191521415610a1557604051600160a060020a0383169084156108fc029085906000818181858888f193505050501515610a105760006000fd5b610ada565b83600160a060020a031663a9059cbb83856000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b1515610a7d57fe5b6102c65a03f11515610a8b57fe5b50506040515115159050610ada57604080516408600000018152600160a060020a03868116602083015282513290911692600080516020611847833981519152928290030190a2506000610b57565b5b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a260408051600160a060020a0380871682526020820186905284168183015290517f56c54ba9bd38d8fd62012e42c7ee564519b09763c426d331b3661b537ead19b29181900360600190a15b9392505050565b600032600160a060020a031660008051602061184783398151915260006000604051808381526020018281526020019250505060405180910390a26040805160008051602061182783398151915281523460208201528151600080516020611807833981519152929181900390910190a15060015b90565b600154600160a060020a031681565b6000805433600160a060020a03908116911614610c3d57604080516408300000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a2506000610cc1565b6001805460a060020a60ff02191660a060020a841515021790556040805160008082526020820152815132600160a060020a031692600080516020611847833981519152928290030190a260408051831515815290517fcd2a11befb642d27dc40a029a06248cc8f351c694afdf524dbcdd619526fd9f29181900360200190a15060015b919050565b60015460a060020a900460ff1681565b60008054819033600160a060020a03908116911614610d3157604080516408200000008152600160a060020a03338116602083015282513290911692600080516020611847833981519152928290030190a260009150610f5f565b8215610d9b5785518751141580610d4a57508451875114155b80610d5757508351875114155b15610d9b57604080516408200000018152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a260009150610f5f565b5b5060005b8651811015610f29577ffb173712efe345dcd1cbd1d51dd337765fbb3a609e67b2dae515a937adedcc968782815181101515610dd857fe5b906020019060200201518783815181101515610df057fe5b906020019060200201518784815181101515610e0857fe5b906020019060200201518785815181101515610e2057fe5b602090810290910181015160408051600160a060020a039687168152949095169184019190915282840191909152606082015290519081900360800190a16040604051908101604052808683815181101515610e7857fe5b9060200190602002015181526020018583815181101515610e9557fe5b90602001906020020151815250600260008984815181101515610eb457fe5b906020019060200201518985815181101515610ecc57fe5b602090810290910181015160408051606060020a600160a060020a0395861681028252949092169093026014820152825190819003602801902083528281019390935201600020825181559101516001909101555b600101610da0565b60408051600080825260208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600191505b5095945050505050565b600054600160a060020a031681565b6000600160a060020a0382166000805160206118278339815191521415610faa5750600160a060020a03301631610cc1565b81600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b151561100a57fe5b6102c65a03f1151561101857fe5b5050604051519150610cc19050565b5b919050565b60006000600083156112a0576110448887436116e4565b151561108957604080516408000000018152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b600160a060020a03881660008051602061182783398151915214156110f2573487146110ed576040805164080000000281523460208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b6112a0565b6000341115611139576040805164080000000381523460208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b8688600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b15156111b457fe5b6102c65a03f115156111c257fe5b5050506040518051905010156112a05732600160a060020a03166000805160206118478339815191526408000000048a600160a060020a031663dd62ed3e33306000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182600160a060020a0316600160a060020a0316815260200192505050602060405180830381600087803b151561126b57fe5b6102c65a03f1151561127957fe5b5050604080518051938152602081019390935280519283900301919050a2600092506116d9565b5b5b5b6112ae888743611762565b9150670de0b6b3a76400008783025b04905080151561130657604080516408000000058152600060208201528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b600160a060020a038616600080516020611827833981519152141561137b578030600160a060020a031631101561137657604080516408000000068152602081018390528151600160a060020a03321692600080516020611847833981519152928290030190a2600092506116d9565b61143c565b8086600160a060020a03166370a08231306000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b15156113dc57fe5b6102c65a03f115156113ea57fe5b50505060405180519050101561143c57604080516408000000078152600160a060020a03888116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b600160a060020a0388166000805160206118278339815191521461151b576040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0333811660048301523081166024830152604482018c90529351938c16936323b872dd9360648084019491938390030190829087803b15156114bd57fe5b6102c65a03f115156114cb57fe5b5050604051511515905061151b57604080516408000000088152600160a060020a038a8116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b600160a060020a03861660008051602061182783398151915214156115ad57604051600160a060020a0386169082156108fc029083906000818181858888f1935050505015156115a857604080516408000000098152600160a060020a03878116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b611673565b85600160a060020a031663a9059cbb86836000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b151561161557fe5b6102c65a03f1151561162357fe5b50506040515115159050611673576040805164080000000a8152600160a060020a03878116602083015282513290911692600080516020611847833981519152928290030190a2600092506116d9565b5b60408051600160a060020a038a81168252602082018a90528881168284015260608201849052878116608083015291513292909216917fea83add4cfea01dd7d3aae33782a37a6b98fe4b92ff715371be191def51cad0d9181900360a00190a2600192505b505095945050505050565b60006116ee6117ef565b5060408051606060020a600160a060020a0380881682028352861602601482015281519081900360280181206000908152600260209081529083902082840190935282548083526001909301549082015290151561174f576000915061175a565b828160200151101591505b509392505050565b600061176c6117ef565b5060408051606060020a600160a060020a038088168202835286160260148201528151908190036028018120600090815260026020908152908390208284019093528254808352600190930154908201529015156117cd576000915061175a565b82816020015110156117e2576000915061175a565b805191505b509392505050565b60408051808201909152600080825260208201529056002d0c0a8842b9944ece1495eb61121621b5e36bd6af3bba0318c695f525aef79f000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee05d2f3e2f3e0a781082873c332729f77c49ee05d757ef3d1e5058fa0d883f36fa165627a7a72305820946af58bc885323e5a152e86acd03ef7ed05f8a294152778df66091ceb861976002900000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e

    Constructor Arguments (ABI-encoded and appended to the ByteCode above)
00000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e

-----Decoded View---------------
Found 2 constructor arguments :
Arg [0] : 00000000000000000000000011542d7807dfb2b44937f756b9092c76e814f8ed
Arg [1] : 0000000000000000000000003be3be3e21d72c36bca6b5dee3797ed26369219e


   Swarm Source:
bzzr://946af58bc885323e5a152e86acd03ef7ed05f8a294152778df66091ceb861976
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward