Latest 25 txns from a total Of 12618 transactions View All

TxHash Age From To Value [TxFee]
0x92807a339f0c28885700164d90f966b63206c174e55b14c48598274edac4ed5639 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x3c96899ca93bef13487561856fa7bf19b93150b74caed619913db1382480417e39 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.007617
0xefd719ea8bdbf6c75f5cb02606aaeb2186983d73e704d24dc87b3b6e24be0bae39 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x5cf1ba45eae52d2e81a6e6e3f5097e7735a31e2d62fd323d691e0d49748db64739 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xeae014f856071280b52e3073b7f6d9afc5584a24f31b662097cb048e8791f41639 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x9356945b11fd0146d18ab756b822a49f730bab97a1f510ffac7de29f2b4fff6539 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0xf89ed19d0aa6a8971523a5965b675a72be14c1362ae43f6b087a46f6ec9f95fb39 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x3fbf71697678be4c44f64b5a95ab8f78624c05332b452cee8458dfa6d20bcd6539 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x40e571876a1f8b5bb35f1de4ca52aaf56717d5214d73152a33c1caf643e46dff39 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xfee9cca62923b7183912a3fe7258ab601782ead137cc76b4fd7657cec456a87439 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x8963e6e887282b38e4b53646b275fdce744291a5f4cd159cb7695c22bc6a7fe439 days 10 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x8073e7a75093883ea8468f6a798a9ba60eb5279179f48b3b13f8ab81c298dda439 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x0e33b08034fa454265fe414fbe5ad69d6f43571333e8d73046619824487b3dc339 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x2a7c1ebd109bdde9a9f78c2bfc0dd64377c6c266b9c314bbe9d81e1f8e04fe2939 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762084
0x41409dd78e822c97855073f6dd46e8c366bf1a2630804be28228f6f61ac4c5ec39 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x0d3d7ec9cbea436135f85b4fef1bc20d7cc0eb393b19d6a915c31a8fac64a43a39 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xd1e5ae542493d630e7db88b09e4cc242c90a6a34bcac1aa47edd4f24ecfff63939 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x90a4179da50899eee32e05df6f7804e4d47695dc541e17532327b237b8cc8cd339 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x1837ce4538ec41c979cf4b8e01fac4b3cb37980814a9423ef0f78ff450f4c9a539 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x0649fe976b3c7f0ca74c5c83e1a07eaee510a02e9771f9871ac7ec6b8698bfaa39 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0x864eca7187b6826e74e324060da29058d1447241c119b49b0932f98aebbc9c1239 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x5d1be56071f61e4c0f64bab1ee1f83b0ee401a374f67578b792caefeb7ba8a1e39 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0xbe6674170d0206a84cd31df9af6afb3cd54e1016a0d44ca738f48461431a8cce39 days 11 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762468
0xfb9e1c2e53df26fede9b467d6dd136f61023d54a6b6ad8184218aac7b5dd0a6839 days 12 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
0x57ece66fc83790eba08647d79940ffd943cdd24d8816200b26bb11488348439539 days 12 hrs ago0x3be3be3e21d72c36bca6b5dee3797ed26369219e  IN   0x60860ce9688f4200e87e61b9a9a171cee1dc5f650 Ether0.00762852
[ 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
0x9219cb12ef917128b70878cdf4d4cb58f18cfe2217680e0548d6cab69884bfe144332672 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xb2815f82b2d2f1e49930c6aebbedbb9fb97d12111db7fac381475e2b9243124344332592 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.0000967220452 Ether
0x5ba6d915778ef498c868bbecbfda2ff1b9df989987412d3955fe751ce3ba60e444332473 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00000967220452 Ether
0xbce214e39134f7ebdf7213382ddedc5e881ed11c64ea296764eec92eccd3277b443306919 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xc0219564c831bd2832494bba5b1d694be0d0d2906bb58ef7a2101205ff691d1c443304920 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x26767633bab4ce04f61b9a82de1116f5f562f2c27926e7273b9d9d7ab8ce3b09443302722 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x4d6bdbfbbf91d6ce9f1753b9f25712f1f856d2439714303b0b44f8bc33c10863443299825 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x866ebbdb4dd5fab836b322c5084e94513a4f9c482a4c70363094a3d7556d8ae744323331 hr 22 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xedc3a061de909c5e4020a71aafcd1463f38f810971eac3a45a3548b282f5d30544318902 hrs ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.000421865099353 Ether
0xf77d28c41db608ba75636c7b4f0df90008f9ebc98ecbc03c32fd40baf546fc9344318732 hrs 1 min ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x44ec1cda715880927a43dbda9e81d32a2e73e9e4a65a18f23fb5f00ea275cc3244318452 hrs 3 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x1723b9dc665cf65a5a91c0ccb65dc2cb229a057975cc4a50253be079d9bfde6d44317912 hrs 8 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x0544470980be74b1239ac027b3ea1d633f5bf52ad433d8a82d5d45f5fa7ba40e44315792 hrs 26 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x6b1b4a820969d0334f73b12ca3a26f3be801f1c9bf1cd213c2115f32d0ead2c944315642 hrs 28 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.001 Ether
0x9d33e967fe7f2cd6d16cf20525d0a5b2efb7fdd784d82b9b88ae8def19cab8e444315412 hrs 30 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.001 Ether
0xe4175a62eeb1c5ce2d827230aceb2c64052742f6926c49df9d7619c438b1962544315142 hrs 32 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0x3619c762cb2e8d4a9d38c367793b50e4ff1487920f4bc0f2f83097b9589567d144314592 hrs 37 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xee15842c1b2e40c144cee78a946819280b179f697288d68d68d6ece319825dd844314442 hrs 38 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.000421865099353 Ether
0x3ccb05c38fe953e538d202ea3db9e36ecd29e6d0155b80b08ab44e8afb4d217744314292 hrs 39 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00421865099353 Ether
0x5e994cc0cd821a8cb459b7da1cfddc4ac489083171774c1cab8afa2df149065e44313522 hrs 46 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xae42fff78b5e573a1daddf8ffa6e8ac818d0ecbb2fcc708bd640f0b515ed71a944313382 hrs 47 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00000967220452 Ether
0x4f6d2a4bc857448b0047ef63dadd7cd85ce22b3c82865af864b4f39954b650b344312922 hrs 51 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00001934440904 Ether
0x45c35a7355a4bda0dedf8e360b0ca95b20b48db1f357942863367ee5e3e26dd244312922 hrs 51 mins ago0x11542d7807dfb2b44937f756b9092c76e814f8ed0x60860ce9688f4200e87e61b9a9a171cee1dc5f650.01 Ether
0xe1f0b18b0a0ec461a737215cc4664b3ce9fa0ada33e5385b965f8eb99aacafb244312682 hrs 53 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00000967220452 Ether
0xd4a8e8650230e230eb503e226528e99486db92918eee93a6bb50bfb9fcca963344312222 hrs 57 mins ago0x60860ce9688f4200e87e61b9a9a171cee1dc5f650xe86e95e15d94b5ab8e8fd9e56052220872fe099f0.00000967220452 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity), 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 is the last bytes of the Contract Creation Code 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