ETH Price: $3,256.40 (-2.69%)

Contract

0x98A741591049B6a92d7266a0668A26Aaf61A1b5e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Report Tx80207842019-06-24 12:47:271968 days ago1561380447IN
BancorX: Old Contract
0 ETH0.0006583624
Report Tx80207822019-06-24 12:46:571968 days ago1561380417IN
BancorX: Old Contract
0 ETH0.0006583624
Report Tx80207822019-06-24 12:46:571968 days ago1561380417IN
BancorX: Old Contract
0 ETH0.0006583624
X Transfer71169512019-01-24 3:21:512119 days ago1548300111IN
BancorX: Old Contract
0 ETH0.0002380310
X Transfer71162542019-01-24 0:03:312120 days ago1548288211IN
BancorX: Old Contract
0 ETH0.0002380310
X Transfer71155792019-01-23 20:51:552120 days ago1548276715IN
BancorX: Old Contract
0 ETH0.000190428
Withdraw Tokens71146312019-01-23 16:25:592120 days ago1548260759IN
BancorX: Old Contract
0 ETH0.0020661849
Enable X Transfe...71146192019-01-23 16:21:162120 days ago1548260476IN
BancorX: Old Contract
0 ETH0.001369449
Report Tx71145522019-01-23 16:04:002120 days ago1548259440IN
BancorX: Old Contract
0 ETH0.000183842
Report Tx71145522019-01-23 16:04:002120 days ago1548259440IN
BancorX: Old Contract
0 ETH0.000113612
Report Tx71145522019-01-23 16:04:002120 days ago1548259440IN
BancorX: Old Contract
0 ETH0.000232712
X Transfer71144662019-01-23 15:41:322120 days ago1548258092IN
BancorX: Old Contract
0 ETH0.0007951210
X Transfer71143892019-01-23 15:23:142120 days ago1548256994IN
BancorX: Old Contract
0 ETH0.0007938410
X Transfer71143462019-01-23 15:11:572120 days ago1548256317IN
BancorX: Old Contract
0 ETH0.0007944810
Accept Ownership71143142019-01-23 15:01:092120 days ago1548255669IN
BancorX: Old Contract
0 ETH0.0017055949
Report Tx71141092019-01-23 14:02:572120 days ago1548252177IN
BancorX: Old Contract
0 ETH0.000486835.3
Report Tx71141092019-01-23 14:02:572120 days ago1548252177IN
BancorX: Old Contract
0 ETH0.000300745.3
Report Tx71141092019-01-23 14:02:572120 days ago1548252177IN
BancorX: Old Contract
0 ETH0.000616355.3
Report Tx71136122019-01-23 11:30:532120 days ago1548243053IN
BancorX: Old Contract
0 ETH0.000275953
Report Tx71136112019-01-23 11:30:462120 days ago1548243046IN
BancorX: Old Contract
0 ETH0.000170613
Report Tx71136112019-01-23 11:30:462120 days ago1548243046IN
BancorX: Old Contract
0 ETH0.000349263
X Transfer71133762019-01-23 10:25:242120 days ago1548239124IN
BancorX: Old Contract
0 ETH0.0007944810
Report Tx71126752019-01-23 7:10:522120 days ago1548227452IN
BancorX: Old Contract
0 ETH0.000687827.5
Report Tx71126752019-01-23 7:10:522120 days ago1548227452IN
BancorX: Old Contract
0 ETH0.000426067.5
Report Tx71126752019-01-23 7:10:522120 days ago1548227452IN
BancorX: Old Contract
0 ETH0.000872687.5
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BancorX

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-10-30
*/

pragma solidity ^0.4.24;

// File: contracts/bancorx/interfaces/IBancorXUpgrader.sol

/*
    Bancor X Upgrader interface
*/
contract IBancorXUpgrader {
    function upgrade(uint16 _version, address[] _reporters) public;
}

// File: contracts/ContractIds.sol

/**
    Id definitions for bancor contracts

    Can be used in conjunction with the contract registry to get contract addresses
*/
contract ContractIds {
    // generic
    bytes32 public constant CONTRACT_FEATURES = "ContractFeatures";
    bytes32 public constant CONTRACT_REGISTRY = "ContractRegistry";

    // bancor logic
    bytes32 public constant BANCOR_NETWORK = "BancorNetwork";
    bytes32 public constant BANCOR_FORMULA = "BancorFormula";
    bytes32 public constant BANCOR_GAS_PRICE_LIMIT = "BancorGasPriceLimit";
    bytes32 public constant BANCOR_CONVERTER_UPGRADER = "BancorConverterUpgrader";
    bytes32 public constant BANCOR_CONVERTER_FACTORY = "BancorConverterFactory";

    // BNT core
    bytes32 public constant BNT_TOKEN = "BNTToken";
    bytes32 public constant BNT_CONVERTER = "BNTConverter";

    // BancorX
    bytes32 public constant BANCOR_X = "BancorX";
    bytes32 public constant BANCOR_X_UPGRADER = "BancorXUpgrader";
}

// File: contracts/token/interfaces/IERC20Token.sol

/*
    ERC20 Standard Token interface
*/
contract IERC20Token {
    // these functions aren't abstract since the compiler emits automatically generated getter functions as external
    function name() public view returns (string) {}
    function symbol() public view returns (string) {}
    function decimals() public view returns (uint8) {}
    function totalSupply() public view returns (uint256) {}
    function balanceOf(address _owner) public view returns (uint256) { _owner; }
    function allowance(address _owner, address _spender) public view returns (uint256) { _owner; _spender; }

    function transfer(address _to, uint256 _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
    function approve(address _spender, uint256 _value) public returns (bool success);
}

// File: contracts/utility/interfaces/IWhitelist.sol

/*
    Whitelist interface
*/
contract IWhitelist {
    function isWhitelisted(address _address) public view returns (bool);
}

// File: contracts/converter/interfaces/IBancorConverter.sol

/*
    Bancor Converter interface
*/
contract IBancorConverter {
    function getReturn(IERC20Token _fromToken, IERC20Token _toToken, uint256 _amount) public view returns (uint256, uint256);
    function convert(IERC20Token _fromToken, IERC20Token _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256);
    function conversionWhitelist() public view returns (IWhitelist) {}
    function conversionFee() public view returns (uint32) {}
    function connectors(address _address) public view returns (uint256, uint32, bool, bool, bool) { _address; }
    function getConnectorBalance(IERC20Token _connectorToken) public view returns (uint256);
    function claimTokens(address _from, uint256 _amount) public;
    // deprecated, backward compatibility
    function change(IERC20Token _fromToken, IERC20Token _toToken, uint256 _amount, uint256 _minReturn) public returns (uint256);
}

// File: contracts/utility/interfaces/IContractRegistry.sol

/*
    Contract Registry interface
*/
contract IContractRegistry {
    function addressOf(bytes32 _contractName) public view returns (address);

    // deprecated, backward compatibility
    function getAddress(bytes32 _contractName) public view returns (address);
}

// File: contracts/utility/interfaces/IOwned.sol

/*
    Owned contract interface
*/
contract IOwned {
    // this function isn't abstract since the compiler emits automatically generated getter functions as external
    function owner() public view returns (address) {}

    function transferOwnership(address _newOwner) public;
    function acceptOwnership() public;
}

// File: contracts/utility/Owned.sol

/*
    Provides support and utilities for contract ownership
*/
contract Owned is IOwned {
    address public owner;
    address public newOwner;

    event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner);

    /**
        @dev constructor
    */
    constructor() public {
        owner = msg.sender;
    }

    // allows execution by the owner only
    modifier ownerOnly {
        require(msg.sender == owner);
        _;
    }

    /**
        @dev allows transferring the contract ownership
        the new owner still needs to accept the transfer
        can only be called by the contract owner

        @param _newOwner    new contract owner
    */
    function transferOwnership(address _newOwner) public ownerOnly {
        require(_newOwner != owner);
        newOwner = _newOwner;
    }

    /**
        @dev used by a new owner to accept an ownership transfer
    */
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        emit OwnerUpdate(owner, newOwner);
        owner = newOwner;
        newOwner = address(0);
    }
}

// File: contracts/utility/SafeMath.sol

/*
    Library for basic math operations with overflow/underflow protection
*/
library SafeMath {
    /**
        @dev returns the sum of _x and _y, asserts if the calculation overflows

        @param _x   value 1
        @param _y   value 2

        @return sum
    */
    function add(uint256 _x, uint256 _y) internal pure returns (uint256) {
        uint256 z = _x + _y;
        assert(z >= _x);
        return z;
    }

    /**
        @dev returns the difference of _x minus _y, asserts if the calculation underflows

        @param _x   minuend
        @param _y   subtrahend

        @return difference
    */
    function sub(uint256 _x, uint256 _y) internal pure returns (uint256) {
        assert(_x >= _y);
        return _x - _y;
    }

    /**
        @dev returns the product of multiplying _x by _y, asserts if the calculation overflows

        @param _x   factor 1
        @param _y   factor 2

        @return product
    */
    function mul(uint256 _x, uint256 _y) internal pure returns (uint256) {
        // gas optimization
        if (_x == 0)
            return 0;

        uint256 z = _x * _y;
        assert(z / _x == _y);
        return z;
    }
}

// File: contracts/utility/Utils.sol

/*
    Utilities & Common Modifiers
*/
contract Utils {
    /**
        constructor
    */
    constructor() public {
    }

    // verifies that an amount is greater than zero
    modifier greaterThanZero(uint256 _amount) {
        require(_amount > 0);
        _;
    }

    // validates an address - currently only checks that it isn't null
    modifier validAddress(address _address) {
        require(_address != address(0));
        _;
    }

    // verifies that the address is different than this contract address
    modifier notThis(address _address) {
        require(_address != address(this));
        _;
    }

    // Overflow protected math functions

    /**
        @dev returns the sum of _x and _y, asserts if the calculation overflows

        @param _x   value 1
        @param _y   value 2

        @return sum
    */
    function safeAdd(uint256 _x, uint256 _y) internal pure returns (uint256) {
        uint256 z = _x + _y;
        assert(z >= _x);
        return z;
    }

    /**
        @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number

        @param _x   minuend
        @param _y   subtrahend

        @return difference
    */
    function safeSub(uint256 _x, uint256 _y) internal pure returns (uint256) {
        assert(_x >= _y);
        return _x - _y;
    }

    /**
        @dev returns the product of multiplying _x by _y, asserts if the calculation overflows

        @param _x   factor 1
        @param _y   factor 2

        @return product
    */
    function safeMul(uint256 _x, uint256 _y) internal pure returns (uint256) {
        uint256 z = _x * _y;
        assert(_x == 0 || z / _x == _y);
        return z;
    }
}

// File: contracts/utility/interfaces/ITokenHolder.sol

/*
    Token Holder interface
*/
contract ITokenHolder is IOwned {
    function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public;
}

// File: contracts/utility/TokenHolder.sol

/*
    We consider every contract to be a 'token holder' since it's currently not possible
    for a contract to deny receiving tokens.

    The TokenHolder's contract sole purpose is to provide a safety mechanism that allows
    the owner to send tokens that were sent to the contract by mistake back to their sender.
*/
contract TokenHolder is ITokenHolder, Owned, Utils {
    /**
        @dev constructor
    */
    constructor() public {
    }

    /**
        @dev withdraws tokens held by the contract and sends them to an account
        can only be called by the owner

        @param _token   ERC20 token contract address
        @param _to      account to receive the new amount
        @param _amount  amount to withdraw
    */
    function withdrawTokens(IERC20Token _token, address _to, uint256 _amount)
        public
        ownerOnly
        validAddress(_token)
        validAddress(_to)
        notThis(_to)
    {
        assert(_token.transfer(_to, _amount));
    }
}

// File: contracts/token/interfaces/ISmartToken.sol

/*
    Smart Token interface
*/
contract ISmartToken is IOwned, IERC20Token {
    function disableTransfers(bool _disable) public;
    function issue(address _to, uint256 _amount) public;
    function destroy(address _from, uint256 _amount) public;
}

// File: contracts/bancorx/BancorX.sol

/*
    The BancorX contract allows cross chain token transfers.

    There are two processes that take place in the contract -
    - Initiate a cross chain transfer to a target blockchain (locks tokens from the caller account on Ethereum)
    - Report a cross chain transfer initiated on a source blockchain (releases tokens to an account on Ethereum)

    Reporting cross chain transfers works similar to standard multisig contracts, meaning that multiple
    callers are required to report a transfer before tokens are released to the target account.
*/
contract BancorX is Owned, TokenHolder, ContractIds {
    using SafeMath for uint256;

    // represents a transaction on another blockchain where BNT was destroyed/locked
    struct Transaction {
        uint256 amount;
        bytes32 fromBlockchain;
        address to;
        uint8 numOfReports;
        bool completed;
    }

    uint16 public version = 1;

    uint256 public maxLockLimit;            // the maximum amount of BNT that can be locked in one transaction
    uint256 public maxReleaseLimit;         // the maximum amount of BNT that can be released in one transaction
    uint256 public minLimit;                // the minimum amount of BNT that can be transferred in one transaction
    uint256 public prevLockLimit;           // the lock limit *after* the last transaction
    uint256 public prevReleaseLimit;        // the release limit *after* the last transaction
    uint256 public limitIncPerBlock;        // how much the limit increases per block
    uint256 public prevLockBlockNumber;     // the block number of the last lock transaction
    uint256 public prevReleaseBlockNumber;  // the block number of the last release transaction
    uint256 public minRequiredReports;      // minimum number of required reports to release tokens
    
    IContractRegistry public registry;      // contract registry
    IContractRegistry public prevRegistry;  // address of previous registry as security mechanism
    IBancorConverter public bntConverter;   // BNT converter
    ISmartToken public bntToken;            // BNT token

    bool public xTransfersEnabled = true;   // true if x transfers are enabled, false if not
    bool public reportingEnabled = true;    // true if reporting is enabled, false if not
    bool public allowRegistryUpdate = true; // allows the owner to prevent/allow the registry to be updated

    // txId -> Transaction
    mapping (uint256 => Transaction) public transactions;

    // txId -> reporter -> true if reporter already reported txId
    mapping (uint256 => mapping (address => bool)) public reportedTxs;

    // address -> true if address is reporter
    mapping (address => bool) public reporters;

    // triggered when BNT is locked in smart contract
    event TokensLock(
        address indexed _from,
        uint256 _amount
    );

    // triggered when BNT is released by the smart contract
    event TokensRelease(
        address indexed _to,
        uint256 _amount
    );

    // triggered when xTransfer is successfully called
    event XTransfer(
        address indexed _from,
        bytes32 _toBlockchain,
        bytes32 indexed _to,
        uint256 _amount
    );

    // triggered when report is successfully submitted
    event TxReport(
        address indexed _reporter,
        bytes32 _fromBlockchain,
        uint256 _txId,
        address _to,
        uint256 _amount
    );

    /**
        @dev constructor

        @param _maxLockLimit          maximum amount of BNT that can be locked in one transaction
        @param _maxReleaseLimit       maximum amount of BNT that can be released in one transaction
        @param _minLimit              minimum amount of BNT that can be transferred in one transaction
        @param _limitIncPerBlock      how much the limit increases per block
        @param _minRequiredReports    minimum number of reporters to report transaction before tokens can be released
        @param _registry              address of contract registry
     */
    constructor(
        uint256 _maxLockLimit,
        uint256 _maxReleaseLimit,
        uint256 _minLimit,
        uint256 _limitIncPerBlock,
        uint256 _minRequiredReports,
        address _registry
    )
        public
    {
        // the maximum limits, minimum limit, and limit increase per block
        maxLockLimit = _maxLockLimit;
        maxReleaseLimit = _maxReleaseLimit;
        minLimit = _minLimit;
        limitIncPerBlock = _limitIncPerBlock;
        minRequiredReports = _minRequiredReports;

        // previous limit is _maxLimit, and previous block number is current block number
        prevLockLimit = _maxLockLimit;
        prevReleaseLimit = _maxReleaseLimit;
        prevLockBlockNumber = block.number;
        prevReleaseBlockNumber = block.number;

        registry = IContractRegistry(_registry);
        prevRegistry = IContractRegistry(_registry);
        bntToken = ISmartToken(registry.addressOf(ContractIds.BNT_TOKEN));
        bntConverter = IBancorConverter(registry.addressOf(ContractIds.BNT_CONVERTER));
    }

    // validates that the caller is a reporter
    modifier isReporter {
        require(reporters[msg.sender]);
        _;
    }

    // allows execution only when x transfers are enabled
    modifier whenXTransfersEnabled {
        require(xTransfersEnabled);
        _;
    }

    // allows execution only when reporting is enabled
    modifier whenReportingEnabled {
        require(reportingEnabled);
        _;
    }

    /**
        @dev setter

        @param _maxLockLimit    new maxLockLimit
     */
    function setMaxLockLimit(uint256 _maxLockLimit) public ownerOnly {
        maxLockLimit = _maxLockLimit;
    }
    
    /**
        @dev setter

        @param _maxReleaseLimit    new maxReleaseLimit
     */
    function setMaxReleaseLimit(uint256 _maxReleaseLimit) public ownerOnly {
        maxReleaseLimit = _maxReleaseLimit;
    }
    
    /**
        @dev setter

        @param _minLimit    new minLimit
     */
    function setMinLimit(uint256 _minLimit) public ownerOnly {
        minLimit = _minLimit;
    }

    /**
        @dev setter

        @param _limitIncPerBlock    new limitIncPerBlock
     */
    function setLimitIncPerBlock(uint256 _limitIncPerBlock) public ownerOnly {
        limitIncPerBlock = _limitIncPerBlock;
    }

    /**
        @dev setter

        @param _minRequiredReports    new minRequiredReports
     */
    function setMinRequiredReports(uint256 _minRequiredReports) public ownerOnly {
        minRequiredReports = _minRequiredReports;
    }

    /**
        @dev allows the owner to set/remove reporters

        @param _reporter    reporter whos status is to be set
        @param _active      true if the reporter is approved, false otherwise
     */
    function setReporter(address _reporter, bool _active) public ownerOnly {
        reporters[_reporter] = _active;
    }

    /**
        @dev allows the owner enable/disable the xTransfer method

        @param _enable     true to enable, false to disable
     */
    function enableXTransfers(bool _enable) public ownerOnly {
        xTransfersEnabled = _enable;
    }

    /**
        @dev allows the owner enable/disable the reportTransaction method

        @param _enable     true to enable, false to disable
     */
    function enableReporting(bool _enable) public ownerOnly {
        reportingEnabled = _enable;
    }

    /**
        @dev disables the registry update functionality
        this is a safety mechanism in case of a emergency
        can only be called by the manager or owner

        @param _disable    true to disable registry updates, false to re-enable them
    */
    function disableRegistryUpdate(bool _disable) public ownerOnly {
        allowRegistryUpdate = !_disable;
    }

    /**
        @dev allows the owner to set the BNT converters address to wherever the
        contract registry currently points to
     */
    function setBNTConverterAddress() public ownerOnly {
        bntConverter = IBancorConverter(registry.addressOf(ContractIds.BNT_CONVERTER));
    }

    /**
        @dev sets the contract registry to whichever address the current registry is pointing to
     */
    function updateRegistry() public {
        // require that upgrading is allowed or that the caller is the owner
        require(allowRegistryUpdate || msg.sender == owner);

        // get the address of whichever registry the current registry is pointing to
        address newRegistry = registry.addressOf(ContractIds.CONTRACT_REGISTRY);

        // if the new registry hasn't changed or is the zero address, revert
        require(newRegistry != address(registry) && newRegistry != address(0));

        // set the previous registry as current registry and current registry as newRegistry
        prevRegistry = registry;
        registry = IContractRegistry(newRegistry);
    }

    /**
        @dev security mechanism allowing the converter owner to revert to the previous registry,
        to be used in emergency scenario
    */
    function restoreRegistry() public ownerOnly {
        // set the registry as previous registry
        registry = prevRegistry;

        // after a previous registry is restored, only the owner can allow future updates
        allowRegistryUpdate = false;
    }

    /**
        @dev upgrades the contract to the latest version
        can only be called by the owner
        note that the owner needs to call acceptOwnership on the new contract after the upgrade

        @param _reporters    new list of reporters
    */
    function upgrade(address[] _reporters) public ownerOnly {
        IBancorXUpgrader bancorXUpgrader = IBancorXUpgrader(registry.addressOf(ContractIds.BANCOR_X_UPGRADER));

        transferOwnership(bancorXUpgrader);
        bancorXUpgrader.upgrade(version, _reporters);
        acceptOwnership();
    }

    /**
        @dev claims BNT from msg.sender to be converted to BNT on another blockchain

        @param _toBlockchain    blockchain BNT will be issued on
        @param _to              address to send the BNT to
        @param _amount          the amount to transfer
     */
    function xTransfer(bytes32 _toBlockchain, bytes32 _to, uint256 _amount) public whenXTransfersEnabled {
        // get the current lock limit
        uint256 currentLockLimit = getCurrentLockLimit();

        // require that; minLimit <= _amount <= currentLockLimit
        require(_amount >= minLimit && _amount <= currentLockLimit);
        
        lockTokens(_amount);

        // set the previous lock limit and block number
        prevLockLimit = currentLockLimit.sub(_amount);
        prevLockBlockNumber = block.number;

        emit XTransfer(msg.sender, _toBlockchain, _to, _amount);
    }

    /**
        @dev allows reporter to report transaction which occured on another blockchain

        @param _fromBlockchain  blockchain BNT was destroyed in
        @param _txId            transactionId of transaction thats being reported
        @param _to              address to receive BNT
        @param _amount          amount of BNT destroyed on another blockchain
     */
    function reportTx(
        bytes32 _fromBlockchain,
        uint256 _txId,
        address _to,
        uint256 _amount    
    )
        public
        isReporter
        whenReportingEnabled
    {
        // require that the transaction has not been reported yet by the reporter
        require(!reportedTxs[_txId][msg.sender]);

        // set reported as true
        reportedTxs[_txId][msg.sender] = true;

        Transaction storage txn = transactions[_txId];

        // If the caller is the first reporter, set the transaction details
        if (txn.numOfReports == 0) {
            txn.to = _to;
            txn.amount = _amount;
            txn.fromBlockchain = _fromBlockchain;
        } else {
            // otherwise, verify transaction details
            require(txn.to == _to && txn.amount == _amount && txn.fromBlockchain == _fromBlockchain);
        }
        
        // increment the number of reports
        txn.numOfReports++;

        emit TxReport(msg.sender, _fromBlockchain, _txId, _to, _amount);

        // if theres enough reports, try to release tokens
        if (txn.numOfReports >= minRequiredReports) {
            require(!transactions[_txId].completed);

            // set the transaction as completed
            transactions[_txId].completed = true;

            releaseTokens(_to, _amount);
        }
    }

    /**
        @dev method for calculating current lock limit

        @return the current maximum limit of BNT that can be locked
     */
    function getCurrentLockLimit() public view returns (uint256) {
        // prevLockLimit + ((currBlockNumber - prevLockBlockNumber) * limitIncPerBlock)
        uint256 currentLockLimit = prevLockLimit.add(((block.number).sub(prevLockBlockNumber)).mul(limitIncPerBlock));
        if (currentLockLimit > maxLockLimit)
            return maxLockLimit;
        return currentLockLimit;
    }
 
    /**
        @dev method for calculating current release limit

        @return the current maximum limit of BNT that can be released
     */
    function getCurrentReleaseLimit() public view returns (uint256) {
        // prevReleaseLimit + ((currBlockNumber - prevReleaseBlockNumber) * limitIncPerBlock)
        uint256 currentReleaseLimit = prevReleaseLimit.add(((block.number).sub(prevReleaseBlockNumber)).mul(limitIncPerBlock));
        if (currentReleaseLimit > maxReleaseLimit)
            return maxReleaseLimit;
        return currentReleaseLimit;
    }

    /**
        @dev claims and locks BNT from msg.sender to be converted to BNT on another blockchain

        @param _amount  the amount to lock
     */
    function lockTokens(uint256 _amount) private {
        // lock the BNT from msg.sender in this contract
        bntConverter.claimTokens(msg.sender, _amount);

        emit TokensLock(msg.sender, _amount);
    }

    /**
        @dev private method to release BNT the contract holds

        @param _to      the address to release BNT to
        @param _amount  the amount to release
     */
    function releaseTokens(address _to, uint256 _amount) private {
        // get the current release limit
        uint256 currentReleaseLimit = getCurrentReleaseLimit();

        require(_amount >= minLimit && _amount <= currentReleaseLimit);
        
        // update the previous release limit and block number
        prevReleaseLimit = currentReleaseLimit.sub(_amount);
        prevReleaseBlockNumber = block.number;

        // no need to require, reverts on failure
        bntToken.transfer(_to, _amount);

        emit TokensRelease(_to, _amount);
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"bntConverter","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_reporters","type":"address[]"}],"name":"upgrade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_CONVERTER_UPGRADER","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"prevLockLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentLockLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"prevLockBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_fromBlockchain","type":"bytes32"},{"name":"_txId","type":"uint256"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"reportTx","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"BNT_TOKEN","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCurrentReleaseLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allowRegistryUpdate","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CONTRACT_REGISTRY","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"reporters","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_toBlockchain","type":"bytes32"},{"name":"_to","type":"bytes32"},{"name":"_amount","type":"uint256"}],"name":"xTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"updateRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setBNTConverterAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"prevReleaseBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maxReleaseLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_CONVERTER_FACTORY","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"prevRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BNT_CONVERTER","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_FORMULA","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_minLimit","type":"uint256"}],"name":"setMinLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"limitIncPerBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CONTRACT_FEATURES","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"reportedTxs","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_NETWORK","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_GAS_PRICE_LIMIT","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reportingEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"transactions","outputs":[{"name":"amount","type":"uint256"},{"name":"fromBlockchain","type":"bytes32"},{"name":"to","type":"address"},{"name":"numOfReports","type":"uint8"},{"name":"completed","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_limitIncPerBlock","type":"uint256"}],"name":"setLimitIncPerBlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_enable","type":"bool"}],"name":"enableXTransfers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxLockLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxLockLimit","type":"uint256"}],"name":"setMaxLockLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bntToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"restoreRegistry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxReleaseLimit","type":"uint256"}],"name":"setMaxReleaseLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_X","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minRequiredReports","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BANCOR_X_UPGRADER","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_minRequiredReports","type":"uint256"}],"name":"setMinRequiredReports","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_reporter","type":"address"},{"name":"_active","type":"bool"}],"name":"setReporter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_enable","type":"bool"}],"name":"enableReporting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"prevReleaseLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_disable","type":"bool"}],"name":"disableRegistryUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"xTransfersEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_maxLockLimit","type":"uint256"},{"name":"_maxReleaseLimit","type":"uint256"},{"name":"_minLimit","type":"uint256"},{"name":"_limitIncPerBlock","type":"uint256"},{"name":"_minRequiredReports","type":"uint256"},{"name":"_registry","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"TokensLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"TokensRelease","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_toBlockchain","type":"bytes32"},{"indexed":true,"name":"_to","type":"bytes32"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"XTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_reporter","type":"address"},{"indexed":false,"name":"_fromBlockchain","type":"bytes32"},{"indexed":false,"name":"_txId","type":"uint256"},{"indexed":false,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"TxReport","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_prevOwner","type":"address"},{"indexed":true,"name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"}]

60806040526001805460a060020a61ffff02191674010000000000000000000000000000000000000000908117909155600e805460b060020a60ff021960a860020a60ff021960a060020a60ff0219909216909317167501000000000000000000000000000000000000000000179190911676010000000000000000000000000000000000000000000017905534801561009857600080fd5b5060405160c080611bd58339810160408181528251602080850151838601516060870151608088015160a09098015160008054600160a060020a0319908116331782556002889055600386905560048581556007859055600a8c905560058990556006879055436008819055600955600b8054600160a060020a03808716918516821792839055600c80549095169091179093557fbb34534c000000000000000000000000000000000000000000000000000000008c527f424e54546f6b656e000000000000000000000000000000000000000000000000918c01919091529851979a9599949893979596929593169363bb34534c936024808301949391928390030190829087803b1580156101ad57600080fd5b505af11580156101c1573d6000803e3d6000fd5b505050506040513d60208110156101d757600080fd5b5051600e8054600160a060020a031916600160a060020a03928316179055600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f424e54436f6e766572746572000000000000000000000000000000000000000060048201529051919092169163bb34534c9160248083019260209291908290030181600087803b15801561027357600080fd5b505af1158015610287573d6000803e3d6000fd5b505050506040513d602081101561029d57600080fd5b5051600d8054600160a060020a03909216600160a060020a0319909216919091179055505050505050611900806102d56000396000f30060806040526004361061027c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663011857d081146102815780630183592b146102b25780630c87355e1461030957806316c76c271461033057806319967439146103455780631aff29eb1461035a5780631bd3d4a51461036f5780631d000b61146103995780631e04a593146103ae5780631fd8088d146103c357806320d7d367146103d857806325f9bfef146104015780632cc1cd9e14610416578063492825381461043757806349d10b64146104555780634a453af11461046a5780634b3e475c1461047f57806352e94ce31461049457806354fd4d50146104a95780635a46f06c146104d55780635e35359e146104ea57806361cd756e1461051457806362614ae6146105295780636d7bd3fc1461053e5780636ec6d4a61461055357806372f43d191461056b57806379ba5097146105805780637b1039991461059557806383315b6e146105aa5780638544c52d146105bf5780638da5cb5b146105e35780639232494e146105f85780639249993a1461060d5780639390701c146106225780639ace38c214610637578063a50c326c14610687578063a5c670ca1461069f578063a8c36a90146106b9578063af2b9618146106ce578063af6c0f60146106e6578063b4a176d3146106fb578063bf28ece414610710578063c4a8598e14610728578063ca27e0111461073d578063cc97b38f14610752578063d4ee1d9014610767578063df68ab021461077c578063e1bb513314610794578063ed1d73a6146107ba578063f2fde38b146107d4578063f7385f76146107f5578063fa1c594e1461080a578063fbb2469214610824575b600080fd5b34801561028d57600080fd5b50610296610839565b60408051600160a060020a039092168252519081900360200190f35b3480156102be57600080fd5b5060408051602060048035808201358381028086018501909652808552610307953695939460249493850192918291850190849080828437509497506108489650505050505050565b005b34801561031557600080fd5b5061031e6109f3565b60408051918252519081900360200190f35b34801561033c57600080fd5b5061031e610a17565b34801561035157600080fd5b5061031e610a1d565b34801561036657600080fd5b5061031e610a77565b34801561037b57600080fd5b50610307600435602435600160a060020a0360443516606435610a7d565b3480156103a557600080fd5b5061031e610c9b565b3480156103ba57600080fd5b5061031e610cbf565b3480156103cf57600080fd5b5061031e610d05565b3480156103e457600080fd5b506103ed610d0b565b604080519115158252519081900360200190f35b34801561040d57600080fd5b5061031e610d2e565b34801561042257600080fd5b506103ed600160a060020a0360043516610d52565b34801561044357600080fd5b50610307600435602435604435610d67565b34801561046157600080fd5b50610307610e0e565b34801561047657600080fd5b50610307610f74565b34801561048b57600080fd5b5061031e61106b565b3480156104a057600080fd5b5061031e611071565b3480156104b557600080fd5b506104be611077565b6040805161ffff9092168252519081900360200190f35b3480156104e157600080fd5b5061031e611088565b3480156104f657600080fd5b50610307600160a060020a03600435811690602435166044356110ac565b34801561052057600080fd5b506102966111be565b34801561053557600080fd5b5061031e6111cd565b34801561054a57600080fd5b5061031e6111f1565b34801561055f57600080fd5b50610307600435611215565b34801561057757600080fd5b5061031e611231565b34801561058c57600080fd5b50610307611237565b3480156105a157600080fd5b506102966112bf565b3480156105b657600080fd5b5061031e6112ce565b3480156105cb57600080fd5b506103ed600435600160a060020a03602435166112f2565b3480156105ef57600080fd5b50610296611312565b34801561060457600080fd5b5061031e611321565b34801561061957600080fd5b5061031e611345565b34801561062e57600080fd5b506103ed611369565b34801561064357600080fd5b5061064f600435611379565b604080519586526020860194909452600160a060020a039092168484015260ff16606084015215156080830152519081900360a00190f35b34801561069357600080fd5b506103076004356113b9565b3480156106ab57600080fd5b5061030760043515156113d5565b3480156106c557600080fd5b5061031e61141b565b3480156106da57600080fd5b50610307600435611421565b3480156106f257600080fd5b5061029661143d565b34801561070757600080fd5b5061030761144c565b34801561071c57600080fd5b506103076004356114b4565b34801561073457600080fd5b5061031e6114d0565b34801561074957600080fd5b5061031e6114f4565b34801561075e57600080fd5b5061031e6114fa565b34801561077357600080fd5b5061029661151e565b34801561078857600080fd5b5061030760043561152d565b3480156107a057600080fd5b50610307600160a060020a03600435166024351515611549565b3480156107c657600080fd5b50610307600435151561158b565b3480156107e057600080fd5b50610307600160a060020a03600435166115d2565b34801561080157600080fd5b5061031e611633565b34801561081657600080fd5b506103076004351515611639565b34801561083057600080fd5b506103ed611691565b600d54600160a060020a031681565b60008054600160a060020a0316331461086057600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f42616e636f72585570677261646572000000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b1580156108e657600080fd5b505af11580156108fa573d6000803e3d6000fd5b505050506040513d602081101561091057600080fd5b5051905061091d816115d2565b600154604080517f546872cc00000000000000000000000000000000000000000000000000000000815260a060020a90920461ffff166004830181815260248401928352855160448501528551600160a060020a0386169463546872cc948893929091606401906020808601910280838360005b838110156109a9578181015183820152602001610991565b505050509050019350505050600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050506109ef611237565b5050565b7f42616e636f72436f6e766572746572557067726164657200000000000000000081565b60055481565b600080610a59610a4a600754610a3e600854436116a190919063ffffffff16565b9063ffffffff6116b316565b6005549063ffffffff6116e916565b9050600254811115610a6f576002549150610a73565b8091505b5090565b60085481565b3360009081526011602052604081205460ff161515610a9b57600080fd5b600e5460a860020a900460ff161515610ab357600080fd5b600084815260106020908152604080832033845290915290205460ff1615610ada57600080fd5b5060008381526010602090815260408083203384528252808320805460ff19166001179055858352600f9091529020600281015460a060020a900460ff161515610b575760028101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851617905581815560018101859055610b90565b6002810154600160a060020a038481169116148015610b765750805482145b8015610b855750600181015485145b1515610b9057600080fd5b600281018054600160ff60a060020a808404821692909201160274ff0000000000000000000000000000000000000000199091161790556040805186815260208101869052600160a060020a0385168183015260608101849052905133917f31927ab5615f4b14be043957c7f76b7425bc582a1d0bc9393433ada9df7a2c0c919081900360800190a2600a54600282015460a060020a900460ff1610610c94576000848152600f602052604090206002015460a860020a900460ff1615610c5657600080fd5b6000848152600f60205260409020600201805475ff000000000000000000000000000000000000000000191660a860020a179055610c9483836116f8565b5050505050565b7f424e54546f6b656e00000000000000000000000000000000000000000000000081565b600080610cef610ce0600754610a3e600954436116a190919063ffffffff16565b6006549063ffffffff6116e916565b9050600354811115610a6f576003549150610a73565b60045481565b600e54760100000000000000000000000000000000000000000000900460ff1681565b7f436f6e747261637452656769737472790000000000000000000000000000000081565b60116020526000908152604090205460ff1681565b600e5460009060a060020a900460ff161515610d8257600080fd5b610d8a610a1d565b90506004548210158015610d9e5750808211155b1515610da957600080fd5b610db282611817565b610dc2818363ffffffff6116a116565b6005554360085560408051858152602081018490528151859233927f75e2f0040f53a9c2fe9d30e9ed8a0c977b07631ba6fc9ec3b19bcdb930a7839c929081900390910190a350505050565b600e54600090760100000000000000000000000000000000000000000000900460ff1680610e465750600054600160a060020a031633145b1515610e5157600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f436f6e747261637452656769737472790000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b158015610ed757600080fd5b505af1158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b5051600b54909150600160a060020a03808316911614801590610f2c5750600160a060020a03811615155b1515610f3757600080fd5b600b8054600c8054600160a060020a0380841673ffffffffffffffffffffffffffffffffffffffff19928316179092559091169216919091179055565b600054600160a060020a03163314610f8b57600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f424e54436f6e766572746572000000000000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b15801561101157600080fd5b505af1158015611025573d6000803e3d6000fd5b505050506040513d602081101561103b57600080fd5b5051600d805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b60095481565b60035481565b60015460a060020a900461ffff1681565b7f42616e636f72436f6e766572746572466163746f72790000000000000000000081565b600054600160a060020a031633146110c357600080fd5b82600160a060020a03811615156110d957600080fd5b82600160a060020a03811615156110ef57600080fd5b83600160a060020a03811630141561110657600080fd5b85600160a060020a031663a9059cbb86866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561118257600080fd5b505af1158015611196573d6000803e3d6000fd5b505050506040513d60208110156111ac57600080fd5b505115156111b657fe5b505050505050565b600c54600160a060020a031681565b7f424e54436f6e766572746572000000000000000000000000000000000000000081565b7f42616e636f72466f726d756c610000000000000000000000000000000000000081565b600054600160a060020a0316331461122c57600080fd5b600455565b60075481565b600154600160a060020a0316331461124e57600080fd5b60015460008054604051600160a060020a0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600b54600160a060020a031681565b7f436f6e747261637446656174757265730000000000000000000000000000000081565b601060209081526000928352604080842090915290825290205460ff1681565b600054600160a060020a031681565b7f42616e636f724e6574776f726b0000000000000000000000000000000000000081565b7f42616e636f7247617350726963654c696d69740000000000000000000000000081565b600e5460a860020a900460ff1681565b600f60205260009081526040902080546001820154600290920154909190600160a060020a0381169060ff60a060020a820481169160a860020a90041685565b600054600160a060020a031633146113d057600080fd5b600755565b600054600160a060020a031633146113ec57600080fd5b600e805491151560a060020a0274ff000000000000000000000000000000000000000019909216919091179055565b60025481565b600054600160a060020a0316331461143857600080fd5b600255565b600e54600160a060020a031681565b600054600160a060020a0316331461146357600080fd5b600c54600b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055600e805476ff0000000000000000000000000000000000000000000019169055565b600054600160a060020a031633146114cb57600080fd5b600355565b7f42616e636f72580000000000000000000000000000000000000000000000000081565b600a5481565b7f42616e636f72585570677261646572000000000000000000000000000000000081565b600154600160a060020a031681565b600054600160a060020a0316331461154457600080fd5b600a55565b600054600160a060020a0316331461156057600080fd5b600160a060020a03919091166000908152601160205260409020805460ff1916911515919091179055565b600054600160a060020a031633146115a257600080fd5b600e805491151560a860020a0275ff00000000000000000000000000000000000000000019909216919091179055565b600054600160a060020a031633146115e957600080fd5b600054600160a060020a038281169116141561160457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065481565b600054600160a060020a0316331461165057600080fd5b600e805476ff000000000000000000000000000000000000000000001916911576010000000000000000000000000000000000000000000002919091179055565b600e5460a060020a900460ff1681565b6000818310156116ad57fe5b50900390565b6000808315156116c657600091506116e2565b508282028284828115156116d657fe5b04146116de57fe5b8091505b5092915050565b6000828201838110156116de57fe5b6000611702610cbf565b905060045482101580156117165750808211155b151561172157600080fd5b611731818363ffffffff6116a116565b60065543600955600e54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156117a757600080fd5b505af11580156117bb573d6000803e3d6000fd5b505050506040513d60208110156117d157600080fd5b5050604080518381529051600160a060020a038516917fbfdc1f3c02b4715077e0be4a262f967d53d4d0fcd76c6987fa2ad6e2257d7c8f919081900360200190a2505050565b600d54604080517ffe417fa5000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163fe417fa59160448082019260009290919082900301818387803b15801561188357600080fd5b505af1158015611897573d6000803e3d6000fd5b50506040805184815290513393507ff5d7535a395393675f56d066384113754ca9cf4abd37298469934e2e9c2ec90292509081900360200190a2505600a165627a7a72305820f3add7ccb1cb5e0e7f57344dcf4cdb05c6d9f649bb767f0d29209ac0d530f59b0029000000000000000000000000000000000000000000000878678326eac90000000000000000000000000000000000000000000000000010f0cf064dd5920000000000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000270801d946c940000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4

Deployed Bytecode

0x60806040526004361061027c5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663011857d081146102815780630183592b146102b25780630c87355e1461030957806316c76c271461033057806319967439146103455780631aff29eb1461035a5780631bd3d4a51461036f5780631d000b61146103995780631e04a593146103ae5780631fd8088d146103c357806320d7d367146103d857806325f9bfef146104015780632cc1cd9e14610416578063492825381461043757806349d10b64146104555780634a453af11461046a5780634b3e475c1461047f57806352e94ce31461049457806354fd4d50146104a95780635a46f06c146104d55780635e35359e146104ea57806361cd756e1461051457806362614ae6146105295780636d7bd3fc1461053e5780636ec6d4a61461055357806372f43d191461056b57806379ba5097146105805780637b1039991461059557806383315b6e146105aa5780638544c52d146105bf5780638da5cb5b146105e35780639232494e146105f85780639249993a1461060d5780639390701c146106225780639ace38c214610637578063a50c326c14610687578063a5c670ca1461069f578063a8c36a90146106b9578063af2b9618146106ce578063af6c0f60146106e6578063b4a176d3146106fb578063bf28ece414610710578063c4a8598e14610728578063ca27e0111461073d578063cc97b38f14610752578063d4ee1d9014610767578063df68ab021461077c578063e1bb513314610794578063ed1d73a6146107ba578063f2fde38b146107d4578063f7385f76146107f5578063fa1c594e1461080a578063fbb2469214610824575b600080fd5b34801561028d57600080fd5b50610296610839565b60408051600160a060020a039092168252519081900360200190f35b3480156102be57600080fd5b5060408051602060048035808201358381028086018501909652808552610307953695939460249493850192918291850190849080828437509497506108489650505050505050565b005b34801561031557600080fd5b5061031e6109f3565b60408051918252519081900360200190f35b34801561033c57600080fd5b5061031e610a17565b34801561035157600080fd5b5061031e610a1d565b34801561036657600080fd5b5061031e610a77565b34801561037b57600080fd5b50610307600435602435600160a060020a0360443516606435610a7d565b3480156103a557600080fd5b5061031e610c9b565b3480156103ba57600080fd5b5061031e610cbf565b3480156103cf57600080fd5b5061031e610d05565b3480156103e457600080fd5b506103ed610d0b565b604080519115158252519081900360200190f35b34801561040d57600080fd5b5061031e610d2e565b34801561042257600080fd5b506103ed600160a060020a0360043516610d52565b34801561044357600080fd5b50610307600435602435604435610d67565b34801561046157600080fd5b50610307610e0e565b34801561047657600080fd5b50610307610f74565b34801561048b57600080fd5b5061031e61106b565b3480156104a057600080fd5b5061031e611071565b3480156104b557600080fd5b506104be611077565b6040805161ffff9092168252519081900360200190f35b3480156104e157600080fd5b5061031e611088565b3480156104f657600080fd5b50610307600160a060020a03600435811690602435166044356110ac565b34801561052057600080fd5b506102966111be565b34801561053557600080fd5b5061031e6111cd565b34801561054a57600080fd5b5061031e6111f1565b34801561055f57600080fd5b50610307600435611215565b34801561057757600080fd5b5061031e611231565b34801561058c57600080fd5b50610307611237565b3480156105a157600080fd5b506102966112bf565b3480156105b657600080fd5b5061031e6112ce565b3480156105cb57600080fd5b506103ed600435600160a060020a03602435166112f2565b3480156105ef57600080fd5b50610296611312565b34801561060457600080fd5b5061031e611321565b34801561061957600080fd5b5061031e611345565b34801561062e57600080fd5b506103ed611369565b34801561064357600080fd5b5061064f600435611379565b604080519586526020860194909452600160a060020a039092168484015260ff16606084015215156080830152519081900360a00190f35b34801561069357600080fd5b506103076004356113b9565b3480156106ab57600080fd5b5061030760043515156113d5565b3480156106c557600080fd5b5061031e61141b565b3480156106da57600080fd5b50610307600435611421565b3480156106f257600080fd5b5061029661143d565b34801561070757600080fd5b5061030761144c565b34801561071c57600080fd5b506103076004356114b4565b34801561073457600080fd5b5061031e6114d0565b34801561074957600080fd5b5061031e6114f4565b34801561075e57600080fd5b5061031e6114fa565b34801561077357600080fd5b5061029661151e565b34801561078857600080fd5b5061030760043561152d565b3480156107a057600080fd5b50610307600160a060020a03600435166024351515611549565b3480156107c657600080fd5b50610307600435151561158b565b3480156107e057600080fd5b50610307600160a060020a03600435166115d2565b34801561080157600080fd5b5061031e611633565b34801561081657600080fd5b506103076004351515611639565b34801561083057600080fd5b506103ed611691565b600d54600160a060020a031681565b60008054600160a060020a0316331461086057600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f42616e636f72585570677261646572000000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b1580156108e657600080fd5b505af11580156108fa573d6000803e3d6000fd5b505050506040513d602081101561091057600080fd5b5051905061091d816115d2565b600154604080517f546872cc00000000000000000000000000000000000000000000000000000000815260a060020a90920461ffff166004830181815260248401928352855160448501528551600160a060020a0386169463546872cc948893929091606401906020808601910280838360005b838110156109a9578181015183820152602001610991565b505050509050019350505050600060405180830381600087803b1580156109cf57600080fd5b505af11580156109e3573d6000803e3d6000fd5b505050506109ef611237565b5050565b7f42616e636f72436f6e766572746572557067726164657200000000000000000081565b60055481565b600080610a59610a4a600754610a3e600854436116a190919063ffffffff16565b9063ffffffff6116b316565b6005549063ffffffff6116e916565b9050600254811115610a6f576002549150610a73565b8091505b5090565b60085481565b3360009081526011602052604081205460ff161515610a9b57600080fd5b600e5460a860020a900460ff161515610ab357600080fd5b600084815260106020908152604080832033845290915290205460ff1615610ada57600080fd5b5060008381526010602090815260408083203384528252808320805460ff19166001179055858352600f9091529020600281015460a060020a900460ff161515610b575760028101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03851617905581815560018101859055610b90565b6002810154600160a060020a038481169116148015610b765750805482145b8015610b855750600181015485145b1515610b9057600080fd5b600281018054600160ff60a060020a808404821692909201160274ff0000000000000000000000000000000000000000199091161790556040805186815260208101869052600160a060020a0385168183015260608101849052905133917f31927ab5615f4b14be043957c7f76b7425bc582a1d0bc9393433ada9df7a2c0c919081900360800190a2600a54600282015460a060020a900460ff1610610c94576000848152600f602052604090206002015460a860020a900460ff1615610c5657600080fd5b6000848152600f60205260409020600201805475ff000000000000000000000000000000000000000000191660a860020a179055610c9483836116f8565b5050505050565b7f424e54546f6b656e00000000000000000000000000000000000000000000000081565b600080610cef610ce0600754610a3e600954436116a190919063ffffffff16565b6006549063ffffffff6116e916565b9050600354811115610a6f576003549150610a73565b60045481565b600e54760100000000000000000000000000000000000000000000900460ff1681565b7f436f6e747261637452656769737472790000000000000000000000000000000081565b60116020526000908152604090205460ff1681565b600e5460009060a060020a900460ff161515610d8257600080fd5b610d8a610a1d565b90506004548210158015610d9e5750808211155b1515610da957600080fd5b610db282611817565b610dc2818363ffffffff6116a116565b6005554360085560408051858152602081018490528151859233927f75e2f0040f53a9c2fe9d30e9ed8a0c977b07631ba6fc9ec3b19bcdb930a7839c929081900390910190a350505050565b600e54600090760100000000000000000000000000000000000000000000900460ff1680610e465750600054600160a060020a031633145b1515610e5157600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f436f6e747261637452656769737472790000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b158015610ed757600080fd5b505af1158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b5051600b54909150600160a060020a03808316911614801590610f2c5750600160a060020a03811615155b1515610f3757600080fd5b600b8054600c8054600160a060020a0380841673ffffffffffffffffffffffffffffffffffffffff19928316179092559091169216919091179055565b600054600160a060020a03163314610f8b57600080fd5b600b54604080517fbb34534c0000000000000000000000000000000000000000000000000000000081527f424e54436f6e766572746572000000000000000000000000000000000000000060048201529051600160a060020a039092169163bb34534c916024808201926020929091908290030181600087803b15801561101157600080fd5b505af1158015611025573d6000803e3d6000fd5b505050506040513d602081101561103b57600080fd5b5051600d805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055565b60095481565b60035481565b60015460a060020a900461ffff1681565b7f42616e636f72436f6e766572746572466163746f72790000000000000000000081565b600054600160a060020a031633146110c357600080fd5b82600160a060020a03811615156110d957600080fd5b82600160a060020a03811615156110ef57600080fd5b83600160a060020a03811630141561110657600080fd5b85600160a060020a031663a9059cbb86866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561118257600080fd5b505af1158015611196573d6000803e3d6000fd5b505050506040513d60208110156111ac57600080fd5b505115156111b657fe5b505050505050565b600c54600160a060020a031681565b7f424e54436f6e766572746572000000000000000000000000000000000000000081565b7f42616e636f72466f726d756c610000000000000000000000000000000000000081565b600054600160a060020a0316331461122c57600080fd5b600455565b60075481565b600154600160a060020a0316331461124e57600080fd5b60015460008054604051600160a060020a0393841693909116917f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600b54600160a060020a031681565b7f436f6e747261637446656174757265730000000000000000000000000000000081565b601060209081526000928352604080842090915290825290205460ff1681565b600054600160a060020a031681565b7f42616e636f724e6574776f726b0000000000000000000000000000000000000081565b7f42616e636f7247617350726963654c696d69740000000000000000000000000081565b600e5460a860020a900460ff1681565b600f60205260009081526040902080546001820154600290920154909190600160a060020a0381169060ff60a060020a820481169160a860020a90041685565b600054600160a060020a031633146113d057600080fd5b600755565b600054600160a060020a031633146113ec57600080fd5b600e805491151560a060020a0274ff000000000000000000000000000000000000000019909216919091179055565b60025481565b600054600160a060020a0316331461143857600080fd5b600255565b600e54600160a060020a031681565b600054600160a060020a0316331461146357600080fd5b600c54600b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03909216919091179055600e805476ff0000000000000000000000000000000000000000000019169055565b600054600160a060020a031633146114cb57600080fd5b600355565b7f42616e636f72580000000000000000000000000000000000000000000000000081565b600a5481565b7f42616e636f72585570677261646572000000000000000000000000000000000081565b600154600160a060020a031681565b600054600160a060020a0316331461154457600080fd5b600a55565b600054600160a060020a0316331461156057600080fd5b600160a060020a03919091166000908152601160205260409020805460ff1916911515919091179055565b600054600160a060020a031633146115a257600080fd5b600e805491151560a860020a0275ff00000000000000000000000000000000000000000019909216919091179055565b600054600160a060020a031633146115e957600080fd5b600054600160a060020a038281169116141561160457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065481565b600054600160a060020a0316331461165057600080fd5b600e805476ff000000000000000000000000000000000000000000001916911576010000000000000000000000000000000000000000000002919091179055565b600e5460a060020a900460ff1681565b6000818310156116ad57fe5b50900390565b6000808315156116c657600091506116e2565b508282028284828115156116d657fe5b04146116de57fe5b8091505b5092915050565b6000828201838110156116de57fe5b6000611702610cbf565b905060045482101580156117165750808211155b151561172157600080fd5b611731818363ffffffff6116a116565b60065543600955600e54604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156117a757600080fd5b505af11580156117bb573d6000803e3d6000fd5b505050506040513d60208110156117d157600080fd5b5050604080518381529051600160a060020a038516917fbfdc1f3c02b4715077e0be4a262f967d53d4d0fcd76c6987fa2ad6e2257d7c8f919081900360200190a2505050565b600d54604080517ffe417fa5000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a039092169163fe417fa59160448082019260009290919082900301818387803b15801561188357600080fd5b505af1158015611897573d6000803e3d6000fd5b50506040805184815290513393507ff5d7535a395393675f56d066384113754ca9cf4abd37298469934e2e9c2ec90292509081900360200190a2505600a165627a7a72305820f3add7ccb1cb5e0e7f57344dcf4cdb05c6d9f649bb767f0d29209ac0d530f59b0029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000878678326eac90000000000000000000000000000000000000000000000000010f0cf064dd5920000000000000000000000000000000000000000000000000000056bc75e2d6310000000000000000000000000000000000000000000000000000270801d946c940000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4

-----Decoded View---------------
Arg [0] : _maxLockLimit (uint256): 40000000000000000000000
Arg [1] : _maxReleaseLimit (uint256): 80000000000000000000000
Arg [2] : _minLimit (uint256): 100000000000000000000
Arg [3] : _limitIncPerBlock (uint256): 45000000000000000000
Arg [4] : _minRequiredReports (uint256): 3
Arg [5] : _registry (address): 0x52Ae12ABe5D8BD778BD5397F99cA900624CfADD4

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000878678326eac9000000
Arg [1] : 0000000000000000000000000000000000000000000010f0cf064dd592000000
Arg [2] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [3] : 00000000000000000000000000000000000000000000000270801d946c940000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 00000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4


Swarm Source

bzzr://f3add7ccb1cb5e0e7f57344dcf4cdb05c6d9f649bb767f0d29209ac0d530f59b

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.