ETH Price: $2,656.93 (-2.96%)

Contract

0xA2C77163B1a00A153A224F3f0b6b0e5cd19524ed
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer115522982020-12-30 1:15:071511 days ago1609290907IN
0xA2C77163...cd19524ed
0 ETH0.00573036159
Withdraw106616482020-08-15 1:22:421648 days ago1597454562IN
0xA2C77163...cd19524ed
0 ETH0.00371358112
Withdraw102676592020-06-15 2:34:321709 days ago1592188472IN
0xA2C77163...cd19524ed
0 ETH0.0013366820
Withdraw102291042020-06-09 3:28:501715 days ago1591673330IN
0xA2C77163...cd19524ed
0 ETH0.0022723534
Withdraw102290732020-06-09 3:19:371715 days ago1591672777IN
0xA2C77163...cd19524ed
0 ETH0.0022043333.00000269
Withdraw101912762020-06-03 6:37:541721 days ago1591166274IN
0xA2C77163...cd19524ed
0 ETH0.0012096918.1
Withdraw101875772020-06-02 16:52:411722 days ago1591116761IN
0xA2C77163...cd19524ed
0 ETH0.0028654535
Withdraw101850532020-06-02 7:37:301722 days ago1591083450IN
0xA2C77163...cd19524ed
0 ETH0.0009984330
Withdraw101850532020-06-02 7:37:301722 days ago1591083450IN
0xA2C77163...cd19524ed
0 ETH0.0019392329.00000123
Withdraw101850252020-06-02 7:30:331722 days ago1591083033IN
0xA2C77163...cd19524ed
0 ETH0.0019385329
Withdraw101841482020-06-02 4:12:081722 days ago1591071128IN
0xA2C77163...cd19524ed
0 ETH0.0026074639
Withdraw101807192020-06-01 15:08:051723 days ago1591024085IN
0xA2C77163...cd19524ed
0 ETH0.0013480220.16606498
Withdraw101798122020-06-01 11:49:441723 days ago1591012184IN
0xA2C77163...cd19524ed
0 ETH0.0019640124
Withdraw101796732020-06-01 11:19:211723 days ago1591010361IN
0xA2C77163...cd19524ed
0 ETH0.0014706122
Withdraw101748742020-05-31 17:19:431724 days ago1590945583IN
0xA2C77163...cd19524ed
0 ETH0.0015572323.3
Provide101421062020-05-26 15:16:051729 days ago1590506165IN
0xA2C77163...cd19524ed
0 ETH0.0031278135
Withdraw101195302020-05-23 2:59:061732 days ago1590202746IN
0xA2C77163...cd19524ed
0 ETH0.0008689913
Withdraw101091292020-05-21 12:05:021734 days ago1590062702IN
0xA2C77163...cd19524ed
0 ETH0.0036765355
Provide101005072020-05-20 3:51:411735 days ago1589946701IN
0xA2C77163...cd19524ed
0 ETH0.0025783624.705
Withdraw101004482020-05-20 3:37:461735 days ago1589945866IN
0xA2C77163...cd19524ed
0 ETH0.0018045127
Provide100757262020-05-16 7:09:541739 days ago1589612994IN
0xA2C77163...cd19524ed
0 ETH0.0020975120.1
Withdraw100700942020-05-15 10:04:111740 days ago1589537051IN
0xA2C77163...cd19524ed
0 ETH0.0024553830
Withdraw100665312020-05-14 21:04:221741 days ago1589490262IN
0xA2C77163...cd19524ed
0 ETH0.0006651420
Withdraw100665072020-05-14 20:57:591741 days ago1589489879IN
0xA2C77163...cd19524ed
0 ETH0.0013369220
Withdraw100561042020-05-13 6:09:031742 days ago1589350143IN
0xA2C77163...cd19524ed
0 ETH0.0022059133
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
100278572020-05-08 20:49:111747 days ago1588970951  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HegicERCPool

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-05-08
*/

pragma solidity ^0.6.6;

library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
  }
library SafeMath {
     /**
      * @dev Returns the addition of two unsigned integers, reverting on
      * overflow.
      *
      * Counterpart to Solidity's `+` operator.
      *
      * Requirements:
      * - Addition cannot overflow.
      */
     function add(uint256 a, uint256 b) internal pure returns (uint256) {
         uint256 c = a + b;
         require(c >= a, "SafeMath: addition overflow");

         return c;
     }

     /**
      * @dev Returns the subtraction of two unsigned integers, reverting on
      * overflow (when the result is negative).
      *
      * Counterpart to Solidity's `-` operator.
      *
      * Requirements:
      * - Subtraction cannot overflow.
      */
     function sub(uint256 a, uint256 b) internal pure returns (uint256) {
         return sub(a, b, "SafeMath: subtraction overflow");
     }

     /**
      * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
      * overflow (when the result is negative).
      *
      * Counterpart to Solidity's `-` operator.
      *
      * Requirements:
      * - Subtraction cannot overflow.
      */
     function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b <= a, errorMessage);
         uint256 c = a - b;

         return c;
     }

     /**
      * @dev Returns the multiplication of two unsigned integers, reverting on
      * overflow.
      *
      * Counterpart to Solidity's `*` operator.
      *
      * Requirements:
      * - Multiplication cannot overflow.
      */
     function mul(uint256 a, uint256 b) internal pure returns (uint256) {
         // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
         // benefit is lost if 'b' is also tested.
         // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
         if (a == 0) {
             return 0;
         }

         uint256 c = a * b;
         require(c / a == b, "SafeMath: multiplication overflow");

         return c;
     }

     /**
      * @dev Returns the integer division of two unsigned integers. Reverts on
      * division by zero. The result is rounded towards zero.
      *
      * Counterpart to Solidity's `/` operator. Note: this function uses a
      * `revert` opcode (which leaves remaining gas untouched) while Solidity
      * uses an invalid opcode to revert (consuming all remaining gas).
      *
      * Requirements:
      * - The divisor cannot be zero.
      */
     function div(uint256 a, uint256 b) internal pure returns (uint256) {
         return div(a, b, "SafeMath: division by zero");
     }

     /**
      * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
      * division by zero. The result is rounded towards zero.
      *
      * Counterpart to Solidity's `/` operator. Note: this function uses a
      * `revert` opcode (which leaves remaining gas untouched) while Solidity
      * uses an invalid opcode to revert (consuming all remaining gas).
      *
      * Requirements:
      * - The divisor cannot be zero.
      */
     function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         // Solidity only automatically asserts when dividing by 0
         require(b > 0, errorMessage);
         uint256 c = a / b;
         // assert(a == b * c + a % b); // There is no case in which this doesn't hold

         return c;
     }

     /**
      * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
      * Reverts when dividing by zero.
      *
      * Counterpart to Solidity's `%` operator. This function uses a `revert`
      * opcode (which leaves remaining gas untouched) while Solidity uses an
      * invalid opcode to revert (consuming all remaining gas).
      *
      * Requirements:
      * - The divisor cannot be zero.
      */
     function mod(uint256 a, uint256 b) internal pure returns (uint256) {
         return mod(a, b, "SafeMath: modulo by zero");
     }

     /**
      * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
      * Reverts with custom message when dividing by zero.
      *
      * Counterpart to Solidity's `%` operator. This function uses a `revert`
      * opcode (which leaves remaining gas untouched) while Solidity uses an
      * invalid opcode to revert (consuming all remaining gas).
      *
      * Requirements:
      * - The divisor cannot be zero.
      */
     function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
         require(b != 0, errorMessage);
         return a % b;
     }
 }
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
  }
interface AggregatorInterface {
  function latestAnswer() external view returns (int256);
  function latestTimestamp() external view returns (uint256);
  function latestRound() external view returns (uint256);
  function getAnswer(uint256 roundId) external view returns (int256);
  function getTimestamp(uint256 roundId) external view returns (uint256);

  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
  event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}
interface IUniswapFactory {
    function getExchange(IERC20 token)  external view returns (UniswapExchangeInterface exchange);
}
interface UniswapExchangeInterface {
    // // Address of ERC20 token sold on this exchange
    // function tokenAddress() external view returns (address token);
    // // Address of Uniswap Factory
    // function factoryAddress() external view returns (address factory);
    // // Provide Liquidity
    // function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable returns (uint256);
    // function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external returns (uint256, uint256);
    // // Get Prices
    function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought);
    // function getEthToTokenOutputPrice(uint256 tokens_bought) external view returns (uint256 eth_sold);
    function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought);
    // function getTokenToEthOutputPrice(uint256 eth_bought) external view returns (uint256 tokens_sold);
    // // Trade ETH to ERC20
    // function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256  tokens_bought);
    function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable returns (uint256  tokens_bought);
    // function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable returns (uint256  eth_sold);
    // function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable returns (uint256  eth_sold);
    // // Trade ERC20 to ETH
    // function tokenToEthSwapInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline) external returns (uint256  eth_bought);
    function tokenToEthTransferInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient) external returns (uint256  eth_bought);
    // function tokenToEthSwapOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline) external returns (uint256  tokens_sold);
    // function tokenToEthTransferOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient) external returns (uint256  tokens_sold);
    // // Trade ERC20 to ERC20
    // function tokenToTokenSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr) external returns (uint256  tokens_bought);
    // function tokenToTokenTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr) external returns (uint256  tokens_bought);
    // function tokenToTokenSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr) external returns (uint256  tokens_sold);
    // function tokenToTokenTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr) external returns (uint256  tokens_sold);
    // // Trade ERC20 to Custom Pool
    // function tokenToExchangeSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr) external returns (uint256  tokens_bought);
    // function tokenToExchangeTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr) external returns (uint256  tokens_bought);
    // function tokenToExchangeSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr) external returns (uint256  tokens_sold);
    // function tokenToExchangeTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr) external returns (uint256  tokens_sold);
    // // ERC20 comaptibility for liquidity tokens
    // bytes32 public name;
    // bytes32 public symbol;
    // uint256 public decimals;
    // function transfer(address _to, uint256 _value) external returns (bool);
    // function transferFrom(address _from, address _to, uint256 value) external returns (bool);
    // function approve(address _spender, uint256 _value) external returns (bool);
    // function allowance(address _owner, address _spender) external view returns (uint256);
    // function balanceOf(address _owner) external view returns (uint256);
    // function totalSupply() external view returns (uint256);
    // // Never use
    // function setup(address token_addr) external;
}
interface ILiquidityPool {
    event Withdraw(address indexed account, uint amount, uint writeAmount);
    event Provide (address indexed account, uint amount, uint writeAmount);
    function totalBalance() external view returns (uint amount);
    function lock(uint amount) external;
    function unlock(uint amount) external;
    function send(address payable account, uint amount) external;
}
interface IERCLiquidityPool is ILiquidityPool {
    function token() external view returns(IERC20);
}
interface ERC20Incorrect { // for the future
  function balanceOf(address who) external view returns (uint);
  function transfer(address to, uint value) external;
  function allowance(address owner, address spender) external view returns (uint);
  function transferFrom(address from, address to, uint value) external;
  function approve(address spender, uint value) external;

  event Approval(address indexed owner, address indexed spender, uint value);
  event Transfer(address indexed from, address indexed to, uint value);
}
interface SpreadLock {
  function highSpreadLockEnabled() external returns (bool);
}
contract Context {
  // Empty internal constructor, to prevent people from mistakenly deploying
  // an instance of this contract, which should be used via inheritance.
  constructor () internal { }
  
  function _msgSender() internal view virtual returns (address payable) {
    return msg.sender;
  }
  
  function _msgData() internal view virtual returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }
}
contract ERC20 is Context, IERC20 {
  using SafeMath for uint256;
  using Address for address;
  
  mapping (address => uint256) private _balances;
  
  mapping (address => mapping (address => uint256)) private _allowances;
  
  uint256 private _totalSupply;
  
  string private _name;
  string private _symbol;
  uint8 private _decimals;
  
  /**
  * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
  * a default value of 18.
  *
  * To select a different value for {decimals}, use {_setupDecimals}.
  *
  * All three of these values are immutable: they can only be set once during
  * construction.
  */
  constructor (string memory name, string memory symbol) public {
    _name = name;
    _symbol = symbol;
    _decimals = 18;
  }
  
  /**
  * @dev Returns the name of the token.
  */
  function name() public view returns (string memory) {
    return _name;
  }
  
  /**
  * @dev Returns the symbol of the token, usually a shorter version of the
  * name.
  */
  function symbol() public view returns (string memory) {
    return _symbol;
  }
  
  /**
  * @dev Returns the number of decimals used to get its user representation.
  * For example, if `decimals` equals `2`, a balance of `505` tokens should
  * be displayed to a user as `5,05` (`505 / 10 ** 2`).
  *
  * Tokens usually opt for a value of 18, imitating the relationship between
  * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
  * called.
  *
  * NOTE: This information is only used for _display_ purposes: it in
  * no way affects any of the arithmetic of the contract, including
  * {IERC20-balanceOf} and {IERC20-transfer}.
  */
  function decimals() public view returns (uint8) {
    return _decimals;
  }
  
  /**
  * @dev See {IERC20-totalSupply}.
  */
  function totalSupply() public view override returns (uint256) {
    return _totalSupply;
  }
  
  /**
  * @dev See {IERC20-balanceOf}.
  */
  function balanceOf(address account) public view override returns (uint256) {
    return _balances[account];
  }
  
  /**
  * @dev See {IERC20-transfer}.
  *
  * Requirements:
  *
  * - `recipient` cannot be the zero address.
  * - the caller must have a balance of at least `amount`.
  */
  function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
    _transfer(_msgSender(), recipient, amount);
    return true;
  }
  
  /**
  * @dev See {IERC20-allowance}.
  */
  function allowance(address owner, address spender) public view virtual override returns (uint256) {
    return _allowances[owner][spender];
  }
  
  /**
  * @dev See {IERC20-approve}.
  *
  * Requirements:
  *
  * - `spender` cannot be the zero address.
  */
  function approve(address spender, uint256 amount) public virtual override returns (bool) {
    _approve(_msgSender(), spender, amount);
    return true;
  }
  
  /**
  * @dev See {IERC20-transferFrom}.
  *
  * Emits an {Approval} event indicating the updated allowance. This is not
  * required by the EIP. See the note at the beginning of {ERC20};
  *
  * Requirements:
  * - `sender` and `recipient` cannot be the zero address.
  * - `sender` must have a balance of at least `amount`.
  * - the caller must have allowance for ``sender``'s tokens of at least
  * `amount`.
  */
  function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
    _transfer(sender, recipient, amount);
    _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
    return true;
  }
  
  /**
  * @dev Atomically increases the allowance granted to `spender` by the caller.
  *
  * This is an alternative to {approve} that can be used as a mitigation for
  * problems described in {IERC20-approve}.
  *
  * Emits an {Approval} event indicating the updated allowance.
  *
  * Requirements:
  *
  * - `spender` cannot be the zero address.
  */
  function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
    _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
    return true;
  }
  
  /**
  * @dev Atomically decreases the allowance granted to `spender` by the caller.
  *
  * This is an alternative to {approve} that can be used as a mitigation for
  * problems described in {IERC20-approve}.
  *
  * Emits an {Approval} event indicating the updated allowance.
  *
  * Requirements:
  *
  * - `spender` cannot be the zero address.
  * - `spender` must have allowance for the caller of at least
  * `subtractedValue`.
  */
  function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
    _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
    return true;
  }
  
  /**
  * @dev Moves tokens `amount` from `sender` to `recipient`.
  *
  * This is internal function is equivalent to {transfer}, and can be used to
  * e.g. implement automatic token fees, slashing mechanisms, etc.
  *
  * Emits a {Transfer} event.
  *
  * Requirements:
  *
  * - `sender` cannot be the zero address.
  * - `recipient` cannot be the zero address.
  * - `sender` must have a balance of at least `amount`.
  */
  function _transfer(address sender, address recipient, uint256 amount) internal virtual {
    require(sender != address(0), "ERC20: transfer from the zero address");
    require(recipient != address(0), "ERC20: transfer to the zero address");
    
    _beforeTokenTransfer(sender, recipient, amount);
    
    _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
    _balances[recipient] = _balances[recipient].add(amount);
    emit Transfer(sender, recipient, amount);
  }
  
  /** @dev Creates `amount` tokens and assigns them to `account`, increasing
  * the total supply.
  *
  * Emits a {Transfer} event with `from` set to the zero address.
  *
  * Requirements
  *
  * - `to` cannot be the zero address.
  */
  function _mint(address account, uint256 amount) internal virtual {
    require(account != address(0), "ERC20: mint to the zero address");
    
    _beforeTokenTransfer(address(0), account, amount);
    
    _totalSupply = _totalSupply.add(amount);
    _balances[account] = _balances[account].add(amount);
    emit Transfer(address(0), account, amount);
  }
  
  /**
  * @dev Destroys `amount` tokens from `account`, reducing the
  * total supply.
  *
  * Emits a {Transfer} event with `to` set to the zero address.
  *
  * Requirements
  *
  * - `account` cannot be the zero address.
  * - `account` must have at least `amount` tokens.
  */
  function _burn(address account, uint256 amount) internal virtual {
    require(account != address(0), "ERC20: burn from the zero address");
    
    _beforeTokenTransfer(account, address(0), amount);
    
    _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
    _totalSupply = _totalSupply.sub(amount);
    emit Transfer(account, address(0), amount);
  }
  
  /**
  * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
  *
  * This is internal function is equivalent to `approve`, and can be used to
  * e.g. set automatic allowances for certain subsystems, etc.
  *
  * Emits an {Approval} event.
  *
  * Requirements:
  *
  * - `owner` cannot be the zero address.
  * - `spender` cannot be the zero address.
  */
  function _approve(address owner, address spender, uint256 amount) internal virtual {
    require(owner != address(0), "ERC20: approve from the zero address");
    require(spender != address(0), "ERC20: approve to the zero address");
    
    _allowances[owner][spender] = amount;
    emit Approval(owner, spender, amount);
  }
  
  /**
  * @dev Sets {decimals} to a value other than the default one of 18.
  *
  * WARNING: This function should only be called from the constructor. Most
  * applications that interact with token contracts will not expect
  * {decimals} to ever change, and may work incorrectly if it does.
  */
  function _setupDecimals(uint8 decimals_) internal {
    _decimals = decimals_;
  }
  
  /**
  * @dev Hook that is called before any transfer of tokens. This includes
  * minting and burning.
  *
  * Calling conditions:
  *
  * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
  * will be to transferred to `to`.
  * - when `from` is zero, `amount` tokens will be minted for `to`.
  * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
  * - `from` and `to` are never both zero.
  *
  * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
  */
  function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

contract HegicETHPool is ILiquidityPool, Ownable, ERC20("Hegic ETH LP Token", "writeETH"){
    using SafeMath for uint256;
    uint public lockedAmount;
    mapping(address => uint) private lastProvideBlock;

    /*
     * @nonce Send premiums to the liquidity pool
     **/
    receive() external payable {}

    /*
     * @nonce Returns the available amount in ETH for withdrawals
     * @return balance Unlocked amount
     */
    function availableBalance() public view returns (uint balance) {
        balance = totalBalance().sub(lockedAmount);
    }

    /*
     * @nonce Returns the ETH total balance provided to the pool
     * @return balance Pool balance
     */
    function totalBalance() public override view returns (uint balance) {
        balance = address(this).balance;
    }

    /*
     * @nonce A provider supplies ETH to the pool and receives writeETH tokens
     * @param minMint Low limit tokens that should be received
     * @return mint Received tokens amount
     */
    function provide(uint minMint) public payable returns (uint mint) {
        mint = provide();
        require(mint >= minMint, "Pool: Mint limit is too large");
    }

    /*
     * @nonce A provider supplies ETH to the pool and receives writeETH tokens
     * @return mint Tokens amount received
     */
    function provide() public payable returns (uint mint) {
        lastProvideBlock[msg.sender] = block.number;
        require(!SpreadLock(owner()).highSpreadLockEnabled(), "Pool: Locked");
        if(totalSupply().mul(totalBalance()) == 0)
            mint = msg.value.mul(1000);
        else
            mint = msg.value.mul(totalSupply()).div(totalBalance().sub(msg.value));
        require(mint > 0, "Pool: Amount is too small");
        emit Provide(msg.sender, msg.value, mint);
        _mint(msg.sender, mint);
    }

    /*
     * @nonce Provider burns writeETH and receives ETH back from the pool
     * @param amount ETH amount to receive
     * @param maxBurn Upper limit tokens that can be burned
     * @return burn Tokens amount burnt
     */
    function withdraw(uint amount, uint maxBurn) public returns (uint burn) {
        burn = withdraw(amount);
        require(burn <= maxBurn, "Pool: Burn limit is too small");
    }

    /*
     * @nonce Provider burns writeETH and receives ETH back from the pool
     * @param amount ETH amount to receive
     * @return burn Tokens amount burnt
     */
    function withdraw(uint amount) public returns (uint burn) {
        require(
            lastProvideBlock[msg.sender] != block.number,
            "Pool: Provide & Withdraw in one block"
        );
        require(amount <= availableBalance(), "Pool: Insufficient unlocked funds");
        burn = amount.mul(totalSupply()).div(totalBalance());
        require(burn <= balanceOf(msg.sender), "Pool: Amount is too large");
        require(burn > 0, "Pool: Amount is too small");
        _burn(msg.sender, burn);
        emit Withdraw(msg.sender, amount, burn);
        msg.sender.transfer(amount);
    }

    /*
     * @nonce Returns a share of the privider in ETH
     * @param account User address
     * @return A share of the provider in ETH
     */
    function shareOf(address account) public view returns (uint share){
        if(totalBalance() > 0) share = totalBalance()
            .mul(balanceOf(account))
            .div(totalSupply());
    }

    /*
     * @nonce calls by HegicCallOptions to lock funds
     * @param amount Funds that should be locked
     */
    function lock(uint amount) public override onlyOwner {
        require(
            lockedAmount.add(amount).mul(10).div(totalBalance()) < 8,
            "Pool: Insufficient unlocked funds" );
        lockedAmount = lockedAmount.add(amount);
    }

    /*
     * @nonce calls by HegicCallOptions to unlock funds
     * @param amount Funds that should be unlocked
     */
    function unlock(uint amount) public override onlyOwner {
        require(lockedAmount >= amount, "Pool: Insufficient locked funds");
        lockedAmount = lockedAmount.sub(amount);
    }

    /*
     * @nonce calls by HegicCallOptions to send funds to the provider after an option is closed
     * @param to Provider
     * @param amount Funds that should be sent
     */
    function send(address payable to, uint amount) public override onlyOwner {
        require(lockedAmount >= amount, "Pool: Insufficient locked funds");
        lockedAmount -= amount;
        to.transfer(amount);
    }
  }
contract HegicERCPool is IERCLiquidityPool, Ownable, ERC20("Hegic DAI LP Token", "writeDAI"){
      using SafeMath for uint256;
      uint public lockedAmount;
      mapping(address => uint) private lastProvideBlock;
      IERC20 public override token;

      /*
       * @return _token DAI Address
       */
      constructor(IERC20 _token) public {
          token = _token;
      }

      /*
       * @nonce Returns the available amount in DAI for withdrawals
       * @return balance Unlocked amount
       */
      function availableBalance() public view returns (uint balance) {
          balance = totalBalance().sub(lockedAmount);
      }

      /*
       * @nonce Returns the DAI total balance provided to the pool
       * @return balance Pool balance
       */
      function totalBalance() public override view returns (uint balance) {
           balance = token.balanceOf(address(this));
      }

      /*
       * @nonce A provider supplies DAI to the pool and receives writeDAI tokens
       * @param amount Amount provided
       * @param minMint Low limit tokens that should be received
       * @return mint Received tokens amount
       */
      function provide(uint amount, uint minMint) public returns (uint mint) {
          mint = provide(amount);
          require(mint >= minMint, "Pool: Mint limit is too large");
      }

      /*
       * @nonce A provider supplies DAI to the pool and receives writeDAI tokens
       * @param amount Provided tokens
       * @return mint Tokens amount received
       */
      function provide(uint amount) public returns (uint mint) {
          lastProvideBlock[msg.sender] = block.number;
          require(!SpreadLock(owner()).highSpreadLockEnabled(), "Pool: Locked");
          if(totalSupply().mul(totalBalance()) == 0)
              mint = amount.mul(1000);
          else
              mint = amount.mul(totalSupply()).div(totalBalance());

          require(mint > 0, "Pool: Amount is too small");
          emit Provide(msg.sender, amount, mint);
          require(
              token.transferFrom(msg.sender, address(this), amount),
              "Insufficient funds"
          );
          _mint(msg.sender, mint);
      }

      /*
       * @nonce Provider burns writeDAI and receives DAI back from the pool
       * @param amount DAI amount to receive
       * @param maxBurn Upper limit tokens that can be burned
       * @return burn Tokens amount burnt
       */
      function withdraw(uint amount, uint maxBurn) public returns (uint burn) {
          burn = withdraw(amount);
          require(burn <= maxBurn, "Pool: Burn limit is too small");
      }

      /*
       * @nonce Provider burns writeDAI and receives DAI back from the pool
       * @param amount DAI amount to receive
       * @return mint Tokens amount burnt
       */
      function withdraw(uint amount) public returns (uint burn) {
          require(
              lastProvideBlock[msg.sender] != block.number,
              "Pool: Provide & Withdraw in one block"
          );
          require(amount <= availableBalance(), "Pool: Insufficient unlocked funds");
          burn = amount.mul(totalSupply()).div(totalBalance());
          require(burn <= balanceOf(msg.sender), "Pool: Amount is too large");
          require(burn > 0, "Pool: Amount is too small");
          _burn(msg.sender, burn);
          emit Withdraw(msg.sender, amount, burn);
          require(
              token.transfer(msg.sender, amount),
              "Insufficient funds"
          );
      }

      /*
       * @nonce Returns a share of the provider in DAI
       * @param account User address
       * @return A share of the provider in DAI
       */
      function shareOf(address user) public view returns (uint share){
          if(totalBalance() > 0)
              share = totalBalance().mul(balanceOf(user)).div(totalSupply());
      }

      /*
       * @nonce calls by HegicPutOptions to lock funds
       * @param amount Funds that should be locked
       */
      function lock(uint amount) public override onlyOwner {
          require(
              lockedAmount.add(amount).mul(10).div( totalBalance() ) < 8,
              "Pool: Insufficient unlocked funds"
          );
          lockedAmount = lockedAmount.add(amount);
      }

      /*
       * @nonce calls by HegicPutOptions to unlock funds
       * @param amount Funds that should be unlocked
       */
      function unlock(uint amount) public override onlyOwner {
          require(lockedAmount >= amount, "Pool: Insufficient locked funds");
          lockedAmount = lockedAmount.sub(amount);
      }

      /*
       * @nonce calls by HegicPutOptions to send funds to the provider after an option is closed
       * @param to Provider
       * @param amount Funds that should be sent
       */
      function send(address payable to, uint amount) public override onlyOwner {
          require(lockedAmount >= amount, "Pool: Insufficient locked funds");
          lockedAmount -= amount;
          require(
              token.transfer(to, amount),
              "Insufficient funds"
          );
      }
  }
abstract contract HegicOptions is Ownable, SpreadLock {
      using SafeMath for uint;

      Option[] public options;
      uint public impliedVolRate = 18000;
      uint public maxSpread = 95;//%
      uint constant priceDecimals = 1e8;
      uint constant activationTime = 15 minutes;
      AggregatorInterface public priceProvider;
      IUniswapFactory public exchanges;
      IERC20 token;
      ILiquidityPool public pool;
      OptionType private optionType;
      bool public override highSpreadLockEnabled;

      event Create (uint indexed id, address indexed account, uint settlementFee, uint totalFee);
      event Exercise (uint indexed id, uint exchangeAmount);
      event Expire (uint indexed id);
      enum State { Active, Exercised, Expired }
      enum OptionType { Put, Call }
      struct Option {
          State state;
          address payable holder;
          uint strikeAmount;
          uint amount;
          uint expiration;
          uint activation;
      }

      /**
       * @param DAI The address of the DAI token
       * @param pp The address of the ChainLink ETH/USD price feed contract
       * @param ex The address of the Uniswap Factory
       * @param _type Put or call contract type
       */
      constructor(IERC20 DAI, AggregatorInterface pp, IUniswapFactory ex, OptionType _type) public {
          token = DAI;
          priceProvider = pp;
          exchanges = ex;
          optionType = _type;
      }

      /**
       * @notice Used to adjust prices
       * @param value New IVRate value
       */
      function setImpliedVolRate(uint value) public onlyOwner {
          require(value >= 10000, "ImpliedVolRate limit is too small");
          impliedVolRate = value;
      }

      /**
       * @notice Used to adjust the spread limit
       * @param value New maxSpread value
       */
      function setMaxSpread(uint value) public onlyOwner {
          require(value <= 95, "Spread limit is too large");
          maxSpread = value;
      }

      /**
       * @notice Used to get actual option's prices
       * @param period Option period in seconds (1 days <= period <= 8 weeks)
       * @param amount Option amount
       * @param strike Strike price of the option
       * @return total Total price needs to be paid
       * @return settlementFee Amount to be distributed between the HEGIC token holders
       * @return strikeFee Amount that covers the price difference in the ITM options
       * @return slippageFee Compensates the slippage during the exercising process
       * @return periodFee Option period fee
       */
      function fees(
          uint period,
          uint amount,
          uint strike
      )
          public
          view
          returns (
              uint total,
              uint settlementFee,
              uint strikeFee,
              uint slippageFee,
              uint periodFee
          )
      {
          uint currentPrice = uint(priceProvider.latestAnswer());
          settlementFee = getSettlementFee(amount);
          periodFee = getPeriodFee(amount, period, strike, currentPrice);
          slippageFee = getSlippageFee(amount);
          strikeFee = getStrikeFee(amount, strike, currentPrice);
          total = periodFee.add(slippageFee).add(strikeFee);
      }
      /**
       * @notice Creates ATM option
       * @param period Option period in seconds (1 days <= period <= 8 weeks)
       * @param amount Option amount
       * @return optionID Created option's ID
       */
      function createATM(uint period, uint amount) public payable returns (uint optionID) {
          return create(period, amount, uint(priceProvider.latestAnswer()));
      }

      /**
       * @notice Creates a new option
       * @param period Option period in sconds (1 days <= period <= 8 weeks)
       * @param amount Option amount
       * @param strike Strike price of an option
       * @return optionID Created option's ID
       */
      function create(uint period, uint amount, uint strike) public payable returns (uint optionID) {
          (uint total, uint settlementFee,,,) = fees(period, amount, strike);
          uint strikeAmount = strike.mul(amount) / priceDecimals;

          require(strikeAmount > 0,"Amount is too small");
          require(settlementFee < total,  "Premium is too small");
          require(period >= 1 days,"Period is too short");
          require(period <= 8 weeks,"Period is too long");
          require(msg.value == total, "Wrong value");
          payable( owner() ).transfer(settlementFee);

          optionID = options.length;
          options.push(
              Option(
                  State.Active,
                  msg.sender,
                  strikeAmount,
                  amount,
                  now + period,
                  now + activationTime
              )
          );

          sendPremium(total.sub(settlementFee));
          lockFunds(options[optionID]);
          emit Create(optionID, msg.sender, settlementFee, total);
      }

      /**
       * @notice Exercise your active option
       * @param optionID ID of your option
       */
      function exercise(uint optionID) public payable {
          Option storage option = options[optionID];

          require(option.expiration >= now, 'Option has expired');
          require(option.activation <= now, 'Option has not been activated yet');
          require(option.holder == msg.sender, "Wrong msg.sender");
          require(option.state == State.Active, "Wrong state");

          option.state = State.Exercised;
          swapFunds(option);

          uint amount = exchange();
          emit Exercise(optionID, amount);
      }

      /**
       * @notice Unlock array of options
       * @param optionIDs array of options
       */
      function unlockAll(uint[] memory optionIDs) public {
          for(uint i; i < optionIDs.length; unlock(optionIDs[i++])){}
      }

      /**
       * @notice Unlock funds locked in the expired options
       * @param optionID ID of the option
       */
      function unlock(uint optionID) public {
          Option storage option = options[optionID];
          require(option.expiration < now, "Option has not expired yet");
          require(option.state == State.Active, "Option is not active");
          option.state = State.Expired;
          unlockFunds(option);
          emit Expire(optionID);
      }

      /**
       * @notice Counts settlementFee
       * @param amount Option amount
       * @return fee Settlment fee amount
       */
      function getSettlementFee(uint amount) internal pure returns (uint fee) {
          fee = amount / 100;
      }

      /**
       * @notice Counts periodFee
       * @param amount Option amount
       * @param period Option period in seconds (1 days <= period <= 8 weeks)
       * @param strike Strike price of the option
       * @param currentPrice Current ETH price
       * @return fee Period fee amount
       */
      function getPeriodFee(
          uint amount,
          uint period,
          uint strike,
          uint currentPrice
      )
          internal
          view
          returns (uint fee)
      {
          if(optionType == OptionType.Put)
              fee = amount.mul(sqrt(period / 10)).mul(impliedVolRate)
                  .mul(strike).div(currentPrice).div(1e8);
          else
              fee = amount.mul(sqrt(period / 10)).mul(impliedVolRate)
                  .mul(currentPrice).div(strike).div(1e8);
      }

      /**
       * @notice Calculates slippageFee
       * @param amount Option amount
       * @return fee Slippage fee amount
       */
      function getSlippageFee(uint amount) internal pure returns (uint fee){
          if(amount > 10 ether) fee = amount.mul(amount) / 1e22;
      }

      /**
       * @notice Counts strikeFee
       * @param amount Option amount
       * @param strike Strike price of the option
       * @param currentPrice Current ether price
       * @return fee Strike fee amount
       */
      function getStrikeFee(
          uint amount,
          uint strike,
          uint currentPrice
      )
          internal
          view
          returns (uint fee)
      {
          if(strike > currentPrice && optionType == OptionType.Put)
              fee = (strike - currentPrice).mul(amount).div(currentPrice);
          if(strike < currentPrice && optionType == OptionType.Call)
              fee = (currentPrice - strike).mul(amount).div(currentPrice);
      }

      function exchange() public virtual returns (uint exchangedAmount);
      function sendPremium(uint amount) internal virtual;
      function lockFunds(Option memory option)  internal virtual;
      function swapFunds(Option memory option)  internal virtual;
      function unlockFunds(Option memory option) internal virtual;

      /**
       * @return res Square root of the number
       */
      function sqrt(uint x) private pure returns (uint res) {
          res = x;
          uint z = (x + 1) / 2;
          while (z < res) (res, z) = (z, (x / z + z) / 2);
      }
}
contract HegicCallOptions is HegicOptions {
    /**
     * @param DAI The address of the DAI token
     * @param priceProvider The address of the ChainLink ETH/USD price feed contract
     * @param uniswap The address of the Uniswap Factory
     */
    constructor(
        IERC20 DAI,
        AggregatorInterface priceProvider,
        IUniswapFactory uniswap
    )
        public
        HegicOptions(DAI, priceProvider, uniswap, HegicOptions.OptionType.Call)
    {
        pool = new HegicETHPool();
        approve();
    }

    /**
     * @notice Allows the Uniswap pool to swap the assets
     */
    function approve() public {
        token.approve(address(exchanges.getExchange(token)), uint(-1));
    }

    /**
     * @notice Swap a specific amount of DAI tokens for ETH and send it to the ETH liquidity pool
     * @return exchangedAmount An amount to receive from the Uniswap pool
     */
    function exchange() public override returns (uint exchangedAmount) {
        return exchange( token.balanceOf(address(this)) );
    }

    /**
     * @notice Swap a specific amount of DAI tokens for ETH and send it to the ETH liquidity pool
     * @param amount A specific amount to swap
     * @return exchangedAmount An amount that was received from the Uniswap pool
     */
    function exchange(uint amount) public returns (uint exchangedAmount) {
      UniswapExchangeInterface ex = exchanges.getExchange(token);
      uint exShare =  ex.getTokenToEthInputPrice(
          uint(priceProvider.latestAnswer()).mul(1e10)
      );
      if(exShare > maxSpread.mul(0.01 ether)){
          highSpreadLockEnabled = false;
          exchangedAmount = ex.tokenToEthTransferInput(
              amount,
              1,
              now + 1 minutes,
              address(pool)
          );
      } else {
          highSpreadLockEnabled = true;
      }
    }

    /**
     * @notice Distributes the premiums between the liquidity providers
     * @param amount Premiums amount that will be sent to the pool
     */
    function sendPremium(uint amount) override internal {
        payable(address(pool)).transfer(amount);
    }

    /**
     * @notice Locks the amount required for an option
     * @param option A specific option contract
     */
    function lockFunds(Option memory option) override internal {
        pool.lock(option.amount);
    }

    /**
     * @notice Receives DAI tokens from the user and sends ETH from the pool
     * @param option A specific option contract
     */
    function swapFunds(Option memory option) override internal {
        require(msg.value == 0, "Wrong msg.value");
        require(
            token.transferFrom(option.holder, address(this), option.strikeAmount),
            "Insufficient funds"
        );
        pool.send(option.holder, option.amount);
    }

    /**
     * @notice Locks the amount required for an option contract
     * @param option A specific option contract
     */
    function unlockFunds(Option memory option) override internal {
        pool.unlock(option.amount);
    }
}
contract HegicPutOptions is HegicOptions {
    /**
     * @param DAI The address of the DAI token
     * @param priceProvider The address of the ChainLink ETH/USD price feed contract
     * @param uniswap The address of the Uniswap Factory
     */
    constructor(
        IERC20 DAI,
        AggregatorInterface priceProvider,
        IUniswapFactory uniswap
    )
        public
        HegicOptions(DAI, priceProvider, uniswap, HegicOptions.OptionType.Put)
    {
        pool = new HegicERCPool(DAI);
    }

    /**
     * @notice Swaps ETH for DAI tokens and sends to the DAI liquidity pool
     * @return exchangedAmount Amount that is received from the Uniswap pool
     */
    function exchange() public override returns (uint) {
        return exchange(address(this).balance);
    }

    /**
     * @notice Swap a specific amount of ETH for DAI tokens and send it to the DAI liquidity pool
     * @param amount A specific amount to swap
     * @return exchangedAmount An amount to receive from the Uniswap pool
     */
    function exchange(uint amount) public returns (uint exchangedAmount) {
        UniswapExchangeInterface ex = exchanges.getExchange(token);
        uint exShare = ex.getEthToTokenInputPrice(1 ether);
        if(exShare > maxSpread.mul(uint(priceProvider.latestAnswer())).mul(1e8)) {
            highSpreadLockEnabled = false;
            exchangedAmount = ex.ethToTokenTransferInput {value: amount} (
                1,
                now + 1 minutes,
                address(pool)
            );
        } else {
            highSpreadLockEnabled = true;
        }
    }

    /**
     * @notice Distributes the premiums between the liquidity providers
     */
    function sendPremium(uint) override internal {
        exchange();
    }

    /**
     * @notice Locks the amount required for an option
     * @param option A specific option contract
     */
    function lockFunds(Option memory option) override internal {
        pool.lock(option.strikeAmount);
    }

    /**
     * @notice Receives ETH from the user and sends DAI tokens from the pool
     * @param option A specific option contract
     */
    function swapFunds(Option memory option) override internal {
        require(option.amount == msg.value, "Wrong msg.value");
        pool.send(option.holder, option.strikeAmount);
    }

    /**
     * @notice Locks the amount required for an option contract
     * @param option A specific option contract
     */
    function unlockFunds(Option memory option) override internal {
        pool.unlock(option.strikeAmount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"writeAmount","type":"uint256"}],"name":"Provide","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"writeAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"provide","outputs":[{"internalType":"uint256","name":"mint","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minMint","type":"uint256"}],"name":"provide","outputs":[{"internalType":"uint256","name":"mint","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"shareOf","outputs":[{"internalType":"uint256","name":"share","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"burn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxBurn","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"burn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001e0438038062001e04833981810160405260208110156200003757600080fd5b505160408051808201825260128152712432b3b4b1902220a4902628102a37b5b2b760711b60208281019190915282518084019093526008835267777269746544414960c01b90830152906000620000976001600160e01b036200014316565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508151620000f690600490602085019062000148565b5080516200010c90600590602084019062000148565b50506006805460ff1916601217905550600980546001600160a01b039092166001600160a01b0319909216919091179055620001ea565b335b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200018b57805160ff1916838001178555620001bb565b82800160010185558215620001bb579182015b82811115620001bb5782518255916020019190600101906200019e565b50620001c9929150620001cd565b5090565b6200014591905b80821115620001c95760008155600101620001d4565b611c0a80620001fa6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063715018a6116100de578063ad7a672f11610097578063dd62ed3e11610071578063dd62ed3e1461049f578063e8c3c54f146104cd578063f2fde38b146104f0578063fc0c546a146105165761018e565b8063ad7a672f1461044e578063d0679d3414610456578063dd467064146104825761018e565b8063715018a6146103ba5780638da5cb5b146103c257806395d89b41146103e6578063a457c2d7146103ee578063a9059cbb1461041a578063ab2f0e51146104465761018e565b80632e2ebe061161014b578063441a3e7011610125578063441a3e701461034a5780636198e3391461036d5780636ab28bc81461038c57806370a08231146103945761018e565b80632e2ebe06146102e3578063313ce56714610300578063395093511461031e5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd1461025057806321e5e2c41461026a57806323b872dd146102905780632e1a7d4d146102c6575b600080fd5b61019b61051e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b0381351690602001356105b4565b604080519115158252519081900360200190f35b6102586105d2565b60408051918252519081900360200190f35b6102586004803603602081101561028057600080fd5b50356001600160a01b03166105d8565b61023c600480360360608110156102a657600080fd5b506001600160a01b03813581169160208101359091169060400135610628565b610258600480360360208110156102dc57600080fd5b50356106b5565b610258600480360360208110156102f957600080fd5b5035610926565b610308610b86565b6040805160ff9092168252519081900360200190f35b61023c6004803603604081101561033457600080fd5b506001600160a01b038135169060200135610b8f565b6102586004803603604081101561036057600080fd5b5080359060200135610be3565b61038a6004803603602081101561038357600080fd5b5035610c45565b005b610258610d0d565b610258600480360360208110156103aa57600080fd5b50356001600160a01b0316610d13565b61038a610d2e565b6103ca610dd0565b604080516001600160a01b039092168252519081900360200190f35b61019b610ddf565b61023c6004803603604081101561040457600080fd5b506001600160a01b038135169060200135610e40565b61023c6004803603604081101561043057600080fd5b506001600160a01b038135169060200135610eae565b610258610ec2565b610258610ee3565b61038a6004803603604081101561046c57600080fd5b506001600160a01b038135169060200135610f5f565b61038a6004803603602081101561049857600080fd5b50356110e3565b610258600480360360408110156104b557600080fd5b506001600160a01b03813581169160200135166111b1565b610258600480360360408110156104e357600080fd5b50803590602001356111dc565b61038a6004803603602081101561050657600080fd5b50356001600160a01b031661123e565b6103ca611336565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105aa5780601f1061057f576101008083540402835291602001916105aa565b820191906000526020600020905b81548152906001019060200180831161058d57829003601f168201915b5050505050905090565b60006105c86105c1611345565b8484611349565b5060015b92915050565b60035490565b6000806105e3610ee3565b1115610623576106206105f46105d2565b61061461060085610d13565b610608610ee3565b9063ffffffff61143516565b9063ffffffff61149516565b90505b919050565b60006106358484846114d7565b6106ab84610641611345565b6106a685604051806060016040528060288152602001611afe602891396001600160a01b038a1660009081526002602052604081209061067f611345565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61164016565b611349565b5060019392505050565b336000908152600860205260408120544314156107035760405162461bcd60e51b8152600401808060200182810382526025815260200180611ab86025913960400191505060405180910390fd5b61070b610ec2565b8211156107495760405162461bcd60e51b8152600401808060200182810382526021815260200180611a296021913960400191505060405180910390fd5b61076c610754610ee3565b61061461075f6105d2565b859063ffffffff61143516565b905061077733610d13565b8111156107cb576040805162461bcd60e51b815260206004820152601960248201527f506f6f6c3a20416d6f756e7420697320746f6f206c6172676500000000000000604482015290519081900360640190fd5b6000811161081c576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b61082633826116d7565b6040805183815260208101839052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a26009546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156108b457600080fd5b505af11580156108c8573d6000803e3d6000fd5b505050506040513d60208110156108de57600080fd5b5051610623576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b336000908152600860205260408120439055610940610dd0565b6001600160a01b031663c322b60f6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561097a57600080fd5b505af115801561098e573d6000803e3d6000fd5b505050506040513d60208110156109a457600080fd5b5051156109e7576040805162461bcd60e51b815260206004820152600c60248201526b141bdbdb0e88131bd8dad95960a21b604482015290519081900360640190fd5b6109fa6109f2610ee3565b6106086105d2565b610a1757610a10826103e863ffffffff61143516565b9050610a25565b610a22610754610ee3565b90505b60008111610a76576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b6040805183815260208101839052815133927f4089141ea5e4c16575f5ebf65f1786497ea07c175846fc7745ef8d8986a4ff65928290030190a2600954604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b505050506040513d6020811015610b3457600080fd5b5051610b7c576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b61062333826117df565b60065460ff1690565b60006105c8610b9c611345565b846106a68560026000610bad611345565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6118dd16565b6000610bee836106b5565b9050818111156105cc576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204275726e206c696d697420697320746f6f20736d616c6c000000604482015290519081900360640190fd5b610c4d611345565b6000546001600160a01b03908116911614610c9d576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b806007541015610cf4576040805162461bcd60e51b815260206004820152601f60248201527f506f6f6c3a20496e73756666696369656e74206c6f636b65642066756e647300604482015290519081900360640190fd5b600754610d07908263ffffffff61193716565b60075550565b60075481565b6001600160a01b031660009081526001602052604090205490565b610d36611345565b6000546001600160a01b03908116911614610d86576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105aa5780601f1061057f576101008083540402835291602001916105aa565b60006105c8610e4d611345565b846106a685604051806060016040528060258152602001611bb06025913960026000610e77611345565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61164016565b60006105c8610ebb611345565b84846114d7565b6000610ede600754610ed2610ee3565b9063ffffffff61193716565b905090565b600954604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f2e57600080fd5b505afa158015610f42573d6000803e3d6000fd5b505050506040513d6020811015610f5857600080fd5b5051919050565b610f67611345565b6000546001600160a01b03908116911614610fb7576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b80600754101561100e576040805162461bcd60e51b815260206004820152601f60248201527f506f6f6c3a20496e73756666696369656e74206c6f636b65642066756e647300604482015290519081900360640190fd5b6007805482900390556009546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561106d57600080fd5b505af1158015611081573d6000803e3d6000fd5b505050506040513d602081101561109757600080fd5b50516110df576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b5050565b6110eb611345565b6000546001600160a01b0390811691161461113b576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b6008611162611148610ee3565b610614600a610608866007546118dd90919063ffffffff16565b1061119e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611a296021913960400191505060405180910390fd5b600754610d07908263ffffffff6118dd16565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006111e783610926565b9050818110156105cc576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204d696e74206c696d697420697320746f6f206c61726765000000604482015290519081900360640190fd5b611246611345565b6000546001600160a01b03908116911614611296576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b6001600160a01b0381166112db5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a4a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b031681565b3390565b6001600160a01b03831661138e5760405162461bcd60e51b8152600401808060200182810382526024815260200180611b8c6024913960400191505060405180910390fd5b6001600160a01b0382166113d35760405162461bcd60e51b8152600401808060200182810382526022815260200180611a706022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082611444575060006105cc565b8282028284828161145157fe5b041461148e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611add6021913960400191505060405180910390fd5b9392505050565b600061148e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611979565b6001600160a01b03831661151c5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b676025913960400191505060405180910390fd5b6001600160a01b0382166115615760405162461bcd60e51b81526004018080602001828103825260238152602001806119e46023913960400191505060405180910390fd5b61156c8383836119de565b6115af81604051806060016040528060268152602001611a92602691396001600160a01b038616600090815260016020526040902054919063ffffffff61164016565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546115e4908263ffffffff6118dd16565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156116cf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561169457818101518382015260200161167c565b50505050905090810190601f1680156116c15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661171c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611b466021913960400191505060405180910390fd5b611728826000836119de565b61176b81604051806060016040528060228152602001611a07602291396001600160a01b038516600090815260016020526040902054919063ffffffff61164016565b6001600160a01b038316600090815260016020526040902055600354611797908263ffffffff61193716565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b03821661183a576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611846600083836119de565b600354611859908263ffffffff6118dd16565b6003556001600160a01b038216600090815260016020526040902054611885908263ffffffff6118dd16565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561148e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061148e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611640565b600081836119c85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561169457818101518382015260200161167c565b5060008385816119d457fe5b0495945050505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365506f6f6c3a20496e73756666696369656e7420756e6c6f636b65642066756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365506f6f6c3a2050726f76696465202620576974686472617720696e206f6e6520626c6f636b536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220820f7064258253a624b376569be7610fab92b329e13953034c6f332b73f415f164736f6c634300060600330000000000000000000000006b175474e89094c44da98b954eedeac495271d0f

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063715018a6116100de578063ad7a672f11610097578063dd62ed3e11610071578063dd62ed3e1461049f578063e8c3c54f146104cd578063f2fde38b146104f0578063fc0c546a146105165761018e565b8063ad7a672f1461044e578063d0679d3414610456578063dd467064146104825761018e565b8063715018a6146103ba5780638da5cb5b146103c257806395d89b41146103e6578063a457c2d7146103ee578063a9059cbb1461041a578063ab2f0e51146104465761018e565b80632e2ebe061161014b578063441a3e7011610125578063441a3e701461034a5780636198e3391461036d5780636ab28bc81461038c57806370a08231146103945761018e565b80632e2ebe06146102e3578063313ce56714610300578063395093511461031e5761018e565b806306fdde0314610193578063095ea7b31461021057806318160ddd1461025057806321e5e2c41461026a57806323b872dd146102905780632e1a7d4d146102c6575b600080fd5b61019b61051e565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101d55781810151838201526020016101bd565b50505050905090810190601f1680156102025780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61023c6004803603604081101561022657600080fd5b506001600160a01b0381351690602001356105b4565b604080519115158252519081900360200190f35b6102586105d2565b60408051918252519081900360200190f35b6102586004803603602081101561028057600080fd5b50356001600160a01b03166105d8565b61023c600480360360608110156102a657600080fd5b506001600160a01b03813581169160208101359091169060400135610628565b610258600480360360208110156102dc57600080fd5b50356106b5565b610258600480360360208110156102f957600080fd5b5035610926565b610308610b86565b6040805160ff9092168252519081900360200190f35b61023c6004803603604081101561033457600080fd5b506001600160a01b038135169060200135610b8f565b6102586004803603604081101561036057600080fd5b5080359060200135610be3565b61038a6004803603602081101561038357600080fd5b5035610c45565b005b610258610d0d565b610258600480360360208110156103aa57600080fd5b50356001600160a01b0316610d13565b61038a610d2e565b6103ca610dd0565b604080516001600160a01b039092168252519081900360200190f35b61019b610ddf565b61023c6004803603604081101561040457600080fd5b506001600160a01b038135169060200135610e40565b61023c6004803603604081101561043057600080fd5b506001600160a01b038135169060200135610eae565b610258610ec2565b610258610ee3565b61038a6004803603604081101561046c57600080fd5b506001600160a01b038135169060200135610f5f565b61038a6004803603602081101561049857600080fd5b50356110e3565b610258600480360360408110156104b557600080fd5b506001600160a01b03813581169160200135166111b1565b610258600480360360408110156104e357600080fd5b50803590602001356111dc565b61038a6004803603602081101561050657600080fd5b50356001600160a01b031661123e565b6103ca611336565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105aa5780601f1061057f576101008083540402835291602001916105aa565b820191906000526020600020905b81548152906001019060200180831161058d57829003601f168201915b5050505050905090565b60006105c86105c1611345565b8484611349565b5060015b92915050565b60035490565b6000806105e3610ee3565b1115610623576106206105f46105d2565b61061461060085610d13565b610608610ee3565b9063ffffffff61143516565b9063ffffffff61149516565b90505b919050565b60006106358484846114d7565b6106ab84610641611345565b6106a685604051806060016040528060288152602001611afe602891396001600160a01b038a1660009081526002602052604081209061067f611345565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61164016565b611349565b5060019392505050565b336000908152600860205260408120544314156107035760405162461bcd60e51b8152600401808060200182810382526025815260200180611ab86025913960400191505060405180910390fd5b61070b610ec2565b8211156107495760405162461bcd60e51b8152600401808060200182810382526021815260200180611a296021913960400191505060405180910390fd5b61076c610754610ee3565b61061461075f6105d2565b859063ffffffff61143516565b905061077733610d13565b8111156107cb576040805162461bcd60e51b815260206004820152601960248201527f506f6f6c3a20416d6f756e7420697320746f6f206c6172676500000000000000604482015290519081900360640190fd5b6000811161081c576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b61082633826116d7565b6040805183815260208101839052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a26009546040805163a9059cbb60e01b81523360048201526024810185905290516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b1580156108b457600080fd5b505af11580156108c8573d6000803e3d6000fd5b505050506040513d60208110156108de57600080fd5b5051610623576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b336000908152600860205260408120439055610940610dd0565b6001600160a01b031663c322b60f6040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561097a57600080fd5b505af115801561098e573d6000803e3d6000fd5b505050506040513d60208110156109a457600080fd5b5051156109e7576040805162461bcd60e51b815260206004820152600c60248201526b141bdbdb0e88131bd8dad95960a21b604482015290519081900360640190fd5b6109fa6109f2610ee3565b6106086105d2565b610a1757610a10826103e863ffffffff61143516565b9050610a25565b610a22610754610ee3565b90505b60008111610a76576040805162461bcd60e51b8152602060048201526019602482015278141bdbdb0e88105b5bdd5b9d081a5cc81d1bdbc81cdb585b1b603a1b604482015290519081900360640190fd5b6040805183815260208101839052815133927f4089141ea5e4c16575f5ebf65f1786497ea07c175846fc7745ef8d8986a4ff65928290030190a2600954604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b505050506040513d6020811015610b3457600080fd5b5051610b7c576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b61062333826117df565b60065460ff1690565b60006105c8610b9c611345565b846106a68560026000610bad611345565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6118dd16565b6000610bee836106b5565b9050818111156105cc576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204275726e206c696d697420697320746f6f20736d616c6c000000604482015290519081900360640190fd5b610c4d611345565b6000546001600160a01b03908116911614610c9d576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b806007541015610cf4576040805162461bcd60e51b815260206004820152601f60248201527f506f6f6c3a20496e73756666696369656e74206c6f636b65642066756e647300604482015290519081900360640190fd5b600754610d07908263ffffffff61193716565b60075550565b60075481565b6001600160a01b031660009081526001602052604090205490565b610d36611345565b6000546001600160a01b03908116911614610d86576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105aa5780601f1061057f576101008083540402835291602001916105aa565b60006105c8610e4d611345565b846106a685604051806060016040528060258152602001611bb06025913960026000610e77611345565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61164016565b60006105c8610ebb611345565b84846114d7565b6000610ede600754610ed2610ee3565b9063ffffffff61193716565b905090565b600954604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f2e57600080fd5b505afa158015610f42573d6000803e3d6000fd5b505050506040513d6020811015610f5857600080fd5b5051919050565b610f67611345565b6000546001600160a01b03908116911614610fb7576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b80600754101561100e576040805162461bcd60e51b815260206004820152601f60248201527f506f6f6c3a20496e73756666696369656e74206c6f636b65642066756e647300604482015290519081900360640190fd5b6007805482900390556009546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561106d57600080fd5b505af1158015611081573d6000803e3d6000fd5b505050506040513d602081101561109757600080fd5b50516110df576040805162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b604482015290519081900360640190fd5b5050565b6110eb611345565b6000546001600160a01b0390811691161461113b576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b6008611162611148610ee3565b610614600a610608866007546118dd90919063ffffffff16565b1061119e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611a296021913960400191505060405180910390fd5b600754610d07908263ffffffff6118dd16565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b60006111e783610926565b9050818110156105cc576040805162461bcd60e51b815260206004820152601d60248201527f506f6f6c3a204d696e74206c696d697420697320746f6f206c61726765000000604482015290519081900360640190fd5b611246611345565b6000546001600160a01b03908116911614611296576040805162461bcd60e51b81526020600482018190526024820152600080516020611b26833981519152604482015290519081900360640190fd5b6001600160a01b0381166112db5760405162461bcd60e51b8152600401808060200182810382526026815260200180611a4a6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6009546001600160a01b031681565b3390565b6001600160a01b03831661138e5760405162461bcd60e51b8152600401808060200182810382526024815260200180611b8c6024913960400191505060405180910390fd5b6001600160a01b0382166113d35760405162461bcd60e51b8152600401808060200182810382526022815260200180611a706022913960400191505060405180910390fd5b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082611444575060006105cc565b8282028284828161145157fe5b041461148e5760405162461bcd60e51b8152600401808060200182810382526021815260200180611add6021913960400191505060405180910390fd5b9392505050565b600061148e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611979565b6001600160a01b03831661151c5760405162461bcd60e51b8152600401808060200182810382526025815260200180611b676025913960400191505060405180910390fd5b6001600160a01b0382166115615760405162461bcd60e51b81526004018080602001828103825260238152602001806119e46023913960400191505060405180910390fd5b61156c8383836119de565b6115af81604051806060016040528060268152602001611a92602691396001600160a01b038616600090815260016020526040902054919063ffffffff61164016565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546115e4908263ffffffff6118dd16565b6001600160a01b0380841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156116cf5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561169457818101518382015260200161167c565b50505050905090810190601f1680156116c15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661171c5760405162461bcd60e51b8152600401808060200182810382526021815260200180611b466021913960400191505060405180910390fd5b611728826000836119de565b61176b81604051806060016040528060228152602001611a07602291396001600160a01b038516600090815260016020526040902054919063ffffffff61164016565b6001600160a01b038316600090815260016020526040902055600354611797908263ffffffff61193716565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6001600160a01b03821661183a576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611846600083836119de565b600354611859908263ffffffff6118dd16565b6003556001600160a01b038216600090815260016020526040902054611885908263ffffffff6118dd16565b6001600160a01b03831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561148e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061148e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611640565b600081836119c85760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561169457818101518382015260200161167c565b5060008385816119d457fe5b0495945050505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365506f6f6c3a20496e73756666696369656e7420756e6c6f636b65642066756e64734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365506f6f6c3a2050726f76696465202620576974686472617720696e206f6e6520626c6f636b536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220820f7064258253a624b376569be7610fab92b329e13953034c6f332b73f415f164736f6c63430006060033

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

0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f

-----Decoded View---------------
Arg [0] : _token (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f


Deployed Bytecode Sourcemap

32454:5256:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;32454:5256:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;17923:77:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;17923:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19867:159;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;19867:159:0;;-1:-1:-1;;;;;19867:159:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;18923:94;;;:::i;:::-;;;;;;;;;;;;;;;;36248:186;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36248:186:0;-1:-1:-1;;;;;36248:186:0;;:::i;20465:307::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;20465:307:0;;;;;;;;;;;;;;;;;:::i;35356:718::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35356:718:0;;:::i;34039:672::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34039:672:0;;:::i;18789:77::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;21146:208;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;21146:208:0;;-1:-1:-1;;;;;21146:208:0;;;;;;:::i;34971:188::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34971:188:0;;;;;;;:::i;36991:196::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36991:196:0;;:::i;:::-;;32590:24;;;:::i;19072:113::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;19072:113:0;-1:-1:-1;;;;;19072:113:0;;:::i;27300:148::-;;;:::i;26658:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;26658:79:0;;;;;;;;;;;;;;18108:81;;;:::i;21816:259::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;21816:259:0;;-1:-1:-1;;;;;21816:259:0;;;;;;:::i;19375:165::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;19375:165:0;;-1:-1:-1;;;;;19375:165:0;;;;;;:::i;32991:128::-;;;:::i;33257:132::-;;;:::i;37395:310::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;37395:310:0;;-1:-1:-1;;;;;37395:310:0;;;;;;:::i;36573:275::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;36573:275:0;;:::i;19595:145::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;19595:145:0;;;;;;;;;;:::i;33654:186::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;33654:186:0;;;;;;;:::i;27603:244::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;27603:244:0;-1:-1:-1;;;;;27603:244:0;;:::i;32681:28::-;;;:::i;17923:77::-;17989:5;17982:12;;;;;;;;;;;;;-1:-1:-1;;17982:12:0;;;;;;;;;;;;;;;;;;;;;;;;;;17960:13;;17982:12;;17989:5;;17982:12;;;17989:5;17982:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17923:77;:::o;19867:159::-;19950:4;19963:39;19972:12;:10;:12::i;:::-;19986:7;19995:6;19963:8;:39::i;:::-;-1:-1:-1;20016:4:0;19867:159;;;;;:::o;18923:94::-;18999:12;;18923:94;:::o;36248:186::-;36300:10;36344:1;36327:14;:12;:14::i;:::-;:18;36324:100;;;36370:54;36410:13;:11;:13::i;:::-;36370:35;36389:15;36399:4;36389:9;:15::i;:::-;36370:14;:12;:14::i;:::-;:18;:35;:18;:35;:::i;:::-;:39;:54;:39;:54;:::i;:::-;36362:62;;36324:100;36248:186;;;:::o;20465:307::-;20571:4;20584:36;20594:6;20602:9;20613:6;20584:9;:36::i;:::-;20627:121;20636:6;20644:12;:10;:12::i;:::-;20658:89;20696:6;20658:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20658:19:0;;;;;;:11;:19;;;;;;20678:12;:10;:12::i;:::-;-1:-1:-1;;;;;20658:33:0;;;;;;;;;;;;-1:-1:-1;20658:33:0;;;;:37;:89::i;:::-;20627:8;:121::i;:::-;-1:-1:-1;20762:4:0;20465:307;;;;;:::o;35356:718::-;35468:10;35403:9;35451:28;;;:16;:28;;;;;;35483:12;35451:44;;35427:137;;;;-1:-1:-1;;;35427:137:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35595:18;:16;:18::i;:::-;35585:6;:28;;35577:74;;;;-1:-1:-1;;;35577:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35671:45;35701:14;:12;:14::i;:::-;35671:25;35682:13;:11;:13::i;:::-;35671:6;;:25;:10;:25;:::i;:45::-;35664:52;;35745:21;35755:10;35745:9;:21::i;:::-;35737:4;:29;;35729:67;;;;;-1:-1:-1;;;35729:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;35824:1;35817:4;:8;35809:46;;;;;-1:-1:-1;;;35809:46:0;;;;;;;;;;;;-1:-1:-1;;;35809:46:0;;;;;;;;;;;;;;;35868:23;35874:10;35886:4;35868:5;:23::i;:::-;35909:34;;;;;;;;;;;;;;35918:10;;35909:34;;;;;;;;35980:5;;:34;;;-1:-1:-1;;;35980:34:0;;35995:10;35980:34;;;;;;;;;;;;-1:-1:-1;;;;;35980:5:0;;;;-1:-1:-1;;35980:34:0;;;;;;;;;;;;;;;-1:-1:-1;35980:5:0;:34;;;2:2:-1;;;;27:1;24;17:12;2:2;35980:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;35980:34:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;35980:34:0;35956:108;;;;;-1:-1:-1;;;35956:108:0;;;;;;;;;;;;-1:-1:-1;;;35956:108:0;;;;;;;;;;;;;;34039:672;34126:10;34085:9;34109:28;;;:16;:28;;;;;34140:12;34109:43;;34185:7;:5;:7::i;:::-;-1:-1:-1;;;;;34174:41:0;;:43;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;34174:43:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34174:43:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34174:43:0;34173:44;34165:69;;;;;-1:-1:-1;;;34165:69:0;;;;;;;;;;;;-1:-1:-1;;;34165:69:0;;;;;;;;;;;;;;;34250:33;34268:14;:12;:14::i;:::-;34250:13;:11;:13::i;:33::-;34247:166;;34312:16;:6;34323:4;34312:16;:10;:16;:::i;:::-;34305:23;;34247:166;;;34368:45;34398:14;:12;:14::i;34368:45::-;34361:52;;34247:166;34443:1;34436:4;:8;34428:46;;;;;-1:-1:-1;;;34428:46:0;;;;;;;;;;;;-1:-1:-1;;;34428:46:0;;;;;;;;;;;;;;;34492:33;;;;;;;;;;;;;;34500:10;;34492:33;;;;;;;;34562:5;;:53;;;-1:-1:-1;;;34562:53:0;;34581:10;34562:53;;;;34601:4;34562:53;;;;;;;;;;;;-1:-1:-1;;;;;34562:5:0;;;;-1:-1:-1;;34562:53:0;;;;;;;;;;;;;;;-1:-1:-1;34562:5:0;:53;;;2:2:-1;;;;27:1;24;17:12;2:2;34562:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34562:53:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;34562:53:0;34538:127;;;;;-1:-1:-1;;;34538:127:0;;;;;;;;;;;;-1:-1:-1;;;34538:127:0;;;;;;;;;;;;;;;34678:23;34684:10;34696:4;34678:5;:23::i;18789:77::-;18851:9;;;;18789:77;:::o;21146:208::-;21234:4;21247:83;21256:12;:10;:12::i;:::-;21270:7;21279:50;21318:10;21279:11;:25;21291:12;:10;:12::i;:::-;-1:-1:-1;;;;;21279:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;21279:25:0;;;:34;;;;;;;;;;;:38;:50::i;34971:188::-;35032:9;35063:16;35072:6;35063:8;:16::i;:::-;35056:23;;35108:7;35100:4;:15;;35092:57;;;;;-1:-1:-1;;;35092:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;36991:196;26880:12;:10;:12::i;:::-;26870:6;;-1:-1:-1;;;;;26870:22:0;;;:6;;:22;26862:67;;;;;-1:-1:-1;;;26862:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26862:67:0;;;;;;;;;;;;;;;37083:6:::1;37067:12;;:22;;37059:66;;;::::0;;-1:-1:-1;;;37059:66:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;37153:12;::::0;:24:::1;::::0;37170:6;37153:24:::1;:16;:24;:::i;:::-;37138:12;:39:::0;-1:-1:-1;36991:196:0:o;32590:24::-;;;;:::o;19072:113::-;-1:-1:-1;;;;;19161:18:0;19138:7;19161:18;;;-1:-1:-1;19161:18:0;;;;;;;19072:113::o;27300:148::-;26880:12;:10;:12::i;:::-;26870:6;;-1:-1:-1;;;;;26870:22:0;;;:6;;:22;26862:67;;;;;-1:-1:-1;;;26862:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26862:67:0;;;;;;;;;;;;;;;27407:1:::1;27391:6:::0;;27370:40:::1;::::0;-1:-1:-1;;;;;27391:6:0;;::::1;::::0;27370:40:::1;::::0;27407:1;;27370:40:::1;27438:1;27421:19:::0;;-1:-1:-1;;;;;;27421:19:0::1;::::0;;27300:148::o;26658:79::-;26696:7;26723:6;-1:-1:-1;;;;;26723:6:0;;26658:79::o;18108:81::-;18176:7;18169:14;;;;;;;;;;;;;-1:-1:-1;;18169:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;18147:13;;18169:14;;18176:7;;18169:14;;;18176:7;18169:14;;;;;;;;;;;;;;;;;;;;;;;;21816:259;21909:4;21922:129;21931:12;:10;:12::i;:::-;21945:7;21954:96;21993:15;21954:96;;;;;;;;;;;;;;;;;:11;:25;21966:12;:10;:12::i;:::-;-1:-1:-1;;;;;21954:25:0;;;;;;;;;;;;;;;;;-1:-1:-1;21954:25:0;;;:34;;;;;;;;;;;;:38;:96::i;19375:165::-;19461:4;19474:42;19484:12;:10;:12::i;:::-;19498:9;19509:6;19474:9;:42::i;32991:128::-;33040:12;33077:32;33096:12;;33077:14;:12;:14::i;:::-;:18;:32;:18;:32;:::i;:::-;33067:42;;32991:128;:::o;33257:132::-;33349:5;;:30;;;-1:-1:-1;;;33349:30:0;;33373:4;33349:30;;;;;;-1:-1:-1;;;;;;;33349:5:0;;-1:-1:-1;;33349:30:0;;;;;;;;;;;;;;:5;:30;;;2:2:-1;;;;27:1;24;17:12;2:2;33349:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33349:30:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;33349:30:0;;33257:132;-1:-1:-1;33257:132:0:o;37395:310::-;26880:12;:10;:12::i;:::-;26870:6;;-1:-1:-1;;;;;26870:22:0;;;:6;;:22;26862:67;;;;;-1:-1:-1;;;26862:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26862:67:0;;;;;;;;;;;;;;;37505:6:::1;37489:12;;:22;;37481:66;;;::::0;;-1:-1:-1;;;37481:66:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;37560:12;:22:::0;;;;::::1;::::0;;37619:5:::1;::::0;:26:::1;::::0;;-1:-1:-1;;;37619:26:0;;-1:-1:-1;;;;;37619:26:0;;::::1;;::::0;::::1;::::0;;;;;;;;;:5;;;::::1;::::0;-1:-1:-1;;37619:26:0;;;;;::::1;::::0;;;;;;;;-1:-1:-1;37619:5:0;:26;::::1;;2:2:-1::0;::::1;;;27:1;24::::0;17:12:::1;2:2;37619:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39::::0;24:38:::1;77:16;74:1;67:27;5:2;37619:26:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;37619:26:0;37595:100:::1;;;::::0;;-1:-1:-1;;;37595:100:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;37595:100:0;;;;;;;;;;;;;::::1;;37395:310:::0;;:::o;36573:275::-;26880:12;:10;:12::i;:::-;26870:6;;-1:-1:-1;;;;;26870:22:0;;;:6;;:22;26862:67;;;;;-1:-1:-1;;;26862:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26862:67:0;;;;;;;;;;;;;;;36720:1:::1;36663:54;36701:14;:12;:14::i;:::-;36663:32;36692:2;36663:24;36680:6;36663:12;;:16;;:24;;;;:::i;:54::-;:58;36639:147;;;;-1:-1:-1::0;;;36639:147:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36814:12;::::0;:24:::1;::::0;36831:6;36814:24:::1;:16;:24;:::i;19595:145::-:0;-1:-1:-1;;;;;19707:18:0;;;19684:7;19707:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;19595:145::o;33654:186::-;33714:9;33745:15;33753:6;33745:7;:15::i;:::-;33738:22;;33789:7;33781:4;:15;;33773:57;;;;;-1:-1:-1;;;33773:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;27603:244;26880:12;:10;:12::i;:::-;26870:6;;-1:-1:-1;;;;;26870:22:0;;;:6;;:22;26862:67;;;;;-1:-1:-1;;;26862:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;26862:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;27692:22:0;::::1;27684:73;;;;-1:-1:-1::0;;;27684:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27794:6;::::0;;27773:38:::1;::::0;-1:-1:-1;;;;;27773:38:0;;::::1;::::0;27794:6;::::1;::::0;27773:38:::1;::::0;::::1;27822:6;:17:::0;;-1:-1:-1;;;;;;27822:17:0::1;-1:-1:-1::0;;;;;27822:17:0;;;::::1;::::0;;;::::1;::::0;;27603:244::o;32681:28::-;;;-1:-1:-1;;;;;32681:28:0;;:::o;16737:100::-;16821:10;16737:100;:::o;24770:332::-;-1:-1:-1;;;;;24868:19:0;;24860:68;;;;-1:-1:-1;;;24860:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24943:21:0;;24935:68;;;;-1:-1:-1;;;24935:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25016:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;25064:32;;;;;;;;;;;;;;;;;24770:332;;;:::o;4230:481::-;4288:7;4537:6;4533:49;;-1:-1:-1;4568:1:0;4561:8;;4533:49;4607:5;;;4611:1;4607;:5;:1;4632:5;;;;;:10;4624:56;;;;-1:-1:-1;;;4624:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4701:1;4230:481;-1:-1:-1;;;4230:481:0:o;5191:134::-;5249:7;5277:39;5281:1;5284;5277:39;;;;;;;;;;;;;;;;;:3;:39::i;22524:521::-;-1:-1:-1;;;;;22626:20:0;;22618:70;;;;-1:-1:-1;;;22618:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22703:23:0;;22695:71;;;;-1:-1:-1;;;22695:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22779:47;22800:6;22808:9;22819:6;22779:20;:47::i;:::-;22859:71;22881:6;22859:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22859:17:0;;;;;;-1:-1:-1;22859:17:0;;;;;;;;:21;:71::i;:::-;-1:-1:-1;;;;;22839:17:0;;;;;;;-1:-1:-1;22839:17:0;;;;;;:91;;;;22960:20;;;;;;;:32;;22985:6;22960:24;:32::i;:::-;-1:-1:-1;;;;;22937:20:0;;;;;;;-1:-1:-1;22937:20:0;;;;;;;;;:55;;;;23004:35;;;;;;;22937:20;;23004:35;;;;;;;;;;;;;22524:521;;;:::o;3773:196::-;3859:7;3896:12;3888:6;;;;3880:29;;;;-1:-1:-1;;;3880:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;3880:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3933:5:0;;;3773:196::o;23964:404::-;-1:-1:-1;;;;;24044:21:0;;24036:67;;;;-1:-1:-1;;;24036:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24116:49;24137:7;24154:1;24158:6;24116:20;:49::i;:::-;24199:68;24222:6;24199:68;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24199:18:0;;;;;;-1:-1:-1;24199:18:0;;;;;;;;:22;:68::i;:::-;-1:-1:-1;;;;;24178:18:0;;;;;;-1:-1:-1;24178:18:0;;;;;:89;24289:12;;:24;;24306:6;24289:16;:24::i;:::-;24274:12;:39;24325:37;;;;;;;;24351:1;;-1:-1:-1;;;;;24325:37:0;;;;;;;;;;;;23964:404;;:::o;23300:364::-;-1:-1:-1;;;;;23380:21:0;;23372:65;;;;;-1:-1:-1;;;23372:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;23450:49;23479:1;23483:7;23492:6;23450:20;:49::i;:::-;23527:12;;:24;;23544:6;23527:24;:16;:24;:::i;:::-;23512:12;:39;-1:-1:-1;;;;;23579:18:0;;;;;;-1:-1:-1;23579:18:0;;;;;;:30;;23602:6;23579:22;:30::i;:::-;-1:-1:-1;;;;;23558:18:0;;;;;;-1:-1:-1;23558:18:0;;;;;;;;:51;;;;23621:37;;;;;;;23558:18;;;;23621:37;;;;;;;;;;23300:364;;:::o;2860:185::-;2918:7;2951:5;;;2976:6;;;;2968:46;;;;;-1:-1:-1;;;2968:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;3330:138;3388:7;3416:43;3420:1;3423;3416:43;;;;;;;;;;;;;;;;;:3;:43::i;5825:351::-;5911:7;6015:12;6008:5;6000:28;;;;-1:-1:-1;;;6000:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27:10;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;6000:28:0;;6040:9;6056:1;6052;:5;;;;;;;5825:351;-1:-1:-1;;;;;5825:351:0:o;26060:92::-;;;;:::o

Swarm Source

ipfs://820f7064258253a624b376569be7610fab92b329e13953034c6f332b73f415f1

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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