ETH Price: $3,409.80 (+3.31%)

Contract

0x39246c4F3F6592C974EBC44F80bA6dC69b817c71
 

Overview

ETH Balance

0.001801288474472006 ETH

Eth Value

$6.14 (@ $3,409.80/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy O Tokens153136772022-08-10 9:52:07836 days ago1660125127IN
Opyn: Options Exchange
0.00085312 ETH0.0011873413.14681112
Buy O Tokens152486512022-07-31 6:34:30846 days ago1659249270IN
Opyn: Options Exchange
0.00022483 ETH0.00027093
Buy O Tokens151970202022-07-23 5:20:15854 days ago1658553615IN
Opyn: Options Exchange
0.00007493 ETH0.000451375
Sell O Tokens151523602022-07-16 7:26:33861 days ago1657956393IN
Opyn: Options Exchange
0 ETH0.001359299.62931611
Sell O Tokens151523282022-07-16 7:20:05861 days ago1657956005IN
Opyn: Options Exchange
0 ETH0.0019684513.94466047
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.01217275 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00808967 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00008039 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.0001608 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00064347 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00080444 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00403222 ETH0.0016327518.08109646
Buy O Tokens146460472022-04-24 7:05:38944 days ago1650783938IN
Opyn: Options Exchange
0.00646352 ETH0.0016327518.08109646
Buy O Tokens141465372022-02-05 14:29:151022 days ago1644071355IN
Opyn: Options Exchange
0.00122652 ETH0.0032623136.13757059
Buy O Tokens138134572021-12-16 2:14:011073 days ago1639620841IN
Opyn: Options Exchange
0.00107864 ETH0.0060741167.25554501
Buy O Tokens138134572021-12-16 2:14:011073 days ago1639620841IN
Opyn: Options Exchange
0.00101973 ETH0.0060741167.25554501
Buy O Tokens137501672021-12-06 4:25:221083 days ago1638764722IN
Opyn: Options Exchange
0.00007214 ETH0.0078561665
Buy O Tokens136987232021-11-27 22:29:381091 days ago1638052178IN
Opyn: Options Exchange
0.00007184 ETH0.0074347355
Buy O Tokens136987232021-11-27 22:29:381091 days ago1638052178IN
Opyn: Options Exchange
0.00007884 ETH0.0074347355
Buy O Tokens136987182021-11-27 22:29:101091 days ago1638052150IN
Opyn: Options Exchange
0.00007384 ETH0.0075699156
Buy O Tokens136987182021-11-27 22:29:101091 days ago1638052150IN
Opyn: Options Exchange
0.00007514 ETH0.0075699156
Buy O Tokens136987182021-11-27 22:29:101091 days ago1638052150IN
Opyn: Options Exchange
0.00007284 ETH0.0075969456.2
Buy O Tokens136987182021-11-27 22:29:101091 days ago1638052150IN
Opyn: Options Exchange
0.00007384 ETH0.0051456757
Buy O Tokens136647062021-11-22 13:16:471097 days ago1637587007IN
Opyn: Options Exchange
0.00015214 ETH0.00820708112.15696121
Buy O Tokens136485382021-11-19 23:40:591099 days ago1637365259IN
Opyn: Options Exchange
0.00007784 ETH0.0062289769
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
151970202022-07-23 5:20:15854 days ago1658553615
Opyn: Options Exchange
0.00004337 ETH
141465372022-02-05 14:29:151022 days ago1644071355
Opyn: Options Exchange
0.00013163 ETH
136987182021-11-27 22:29:101091 days ago1638052150
Opyn: Options Exchange
0.00003247 ETH
136647062021-11-22 13:16:471097 days ago1637587007
Opyn: Options Exchange
0.00001071 ETH
136485382021-11-19 23:40:591099 days ago1637365259
Opyn: Options Exchange
0.00000533 ETH
136485382021-11-19 23:40:591099 days ago1637365259
Opyn: Options Exchange
0.00000319 ETH
136453052021-11-19 11:23:201100 days ago1637321000
Opyn: Options Exchange
0.00000212 ETH
136453052021-11-19 11:23:201100 days ago1637321000
Opyn: Options Exchange
0.00000151 ETH
136124622021-11-14 6:50:571105 days ago1636872657
Opyn: Options Exchange
0.00000113 ETH
136089192021-11-13 17:15:281105 days ago1636823728
Opyn: Options Exchange
0.00000088 ETH
134653132021-10-22 4:25:591128 days ago1634876759
Opyn: Options Exchange
0.21577329 ETH
134350012021-10-17 10:56:491133 days ago1634468209
Opyn: Options Exchange
0.00000078 ETH
134349652021-10-17 10:50:271133 days ago1634467827
Opyn: Options Exchange
0.00000078 ETH
134226132021-10-15 12:22:571135 days ago1634300577
Opyn: Options Exchange
0.00118133 ETH
134225712021-10-15 12:12:431135 days ago1634299963
Opyn: Options Exchange
0.05295086 ETH
134203782021-10-15 3:53:491135 days ago1634270029
Opyn: Options Exchange
0.58684293 ETH
134194732021-10-15 0:25:141135 days ago1634257514
Opyn: Options Exchange
0.06240007 ETH
134194282021-10-15 0:15:321135 days ago1634256932
Opyn: Options Exchange
0.30984772 ETH
134192772021-10-14 23:36:231135 days ago1634254583
Opyn: Options Exchange
0.75491804 ETH
134192622021-10-14 23:32:341135 days ago1634254354
Opyn: Options Exchange
0.24705017 ETH
134190602021-10-14 22:45:391135 days ago1634251539
Opyn: Options Exchange
0.00000439 ETH
134188372021-10-14 21:58:221135 days ago1634248702
Opyn: Options Exchange
1.7228998 ETH
134187132021-10-14 21:27:341135 days ago1634246854
Opyn: Options Exchange
0.1785035 ETH
134186942021-10-14 21:22:151135 days ago1634246535
Opyn: Options Exchange
0.47673002 ETH
134170972021-10-14 15:22:401136 days ago1634224960
Opyn: Options Exchange
0.01007781 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OptionsExchange

Compiler Version
v0.5.10+commit.5a6ea5b1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-03-16
*/

// File: @openzeppelin/contracts/GSN/Context.sol

pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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);
}

// File: @openzeppelin/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.5.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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 returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public 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 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 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 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 {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _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 {
        require(account != address(0), "ERC20: mint to the zero address");

        _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 {
        require(account != address(0), "ERC20: burn from the zero address");

        _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 {
        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 Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }
}

// File: contracts/lib/CompoundOracleInterface.sol

pragma solidity ^0.5.0;
// AT MAINNET ADDRESS: 0x02557a5E05DeFeFFD4cAe6D83eA3d173B272c904

contract CompoundOracleInterface {
    // returns asset:eth -- to get USDC:eth, have to do 10**24/result,


    constructor() public {
    }

    /**
  * @notice retrieves price of an asset
  * @dev function to get price for an asset
  * @param asset Asset for which to get the price
  * @return uint mantissa of asset price (scaled by 1e18) or zero if unset or contract paused
  */
    function getPrice(address asset) public view returns (uint);
    function getUnderlyingPrice(ERC20 cToken) public view returns (uint);
    // function getPrice(address asset) public view returns (uint) {
    //     return 527557000000000;
    // }

}

// File: contracts/lib/UniswapExchangeInterface.sol

pragma solidity 0.5.10;


// Solidity Interface
contract 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;
}

// File: contracts/lib/UniswapFactoryInterface.sol

pragma solidity 0.5.10;


// Solidity Interface
contract UniswapFactoryInterface {
    // Public Variables
    address public exchangeTemplate;
    uint256 public tokenCount;
    // // Create Exchange
    function createExchange(address token) external returns (address exchange);
    // Get Exchange and Token Info
    function getExchange(address token) external view returns (address exchange);
    function getToken(address exchange) external view returns (address token);
    function getTokenWithId(uint256 tokenId) external view returns (address token);
    // Never use
    function initializeFactory(address template) external;
    // function createExchange(address token) external returns (address exchange) {
    //     return 0x06D014475F84Bb45b9cdeD1Cf3A1b8FE3FbAf128;
    // }
    // // Get Exchange and Token Info
    // function getExchange(address token) external view returns (address exchange){
    //     return 0x06D014475F84Bb45b9cdeD1Cf3A1b8FE3FbAf128;
    // }
    // function getToken(address exchange) external view returns (address token) {
    //     return 0x06D014475F84Bb45b9cdeD1Cf3A1b8FE3FbAf128;
    // }
    // function getTokenWithId(uint256 tokenId) external view returns (address token) {
    //     return 0x06D014475F84Bb45b9cdeD1Cf3A1b8FE3FbAf128;
    // }
}

// File: contracts/OptionsUtils.sol

pragma solidity 0.5.10;





contract OptionsUtils {
    // defauls are for mainnet
    UniswapFactoryInterface public UNISWAP_FACTORY;

    CompoundOracleInterface public COMPOUND_ORACLE;

    constructor(address _uniswapFactory, address _compoundOracle) public {
        UNISWAP_FACTORY = UniswapFactoryInterface(_uniswapFactory);
        COMPOUND_ORACLE = CompoundOracleInterface(_compoundOracle);
    }

    // TODO: for now gets Uniswap, later update to get other exchanges
    function getExchange(address _token)
        public
        view
        returns (UniswapExchangeInterface)
    {
        if (address(UNISWAP_FACTORY.getExchange(_token)) == address(0)) {
            revert("No payout exchange");
        }

        UniswapExchangeInterface exchange = UniswapExchangeInterface(
            UNISWAP_FACTORY.getExchange(_token)
        );

        return exchange;
    }

    function isETH(IERC20 _ierc20) public pure returns (bool) {
        return _ierc20 == IERC20(0);
    }
}

// File: contracts/OptionsExchange.sol

pragma solidity 0.5.10;






contract OptionsExchange {
    uint256 constant LARGE_BLOCK_SIZE = 1651753129000;
    uint256 constant LARGE_APPROVAL_NUMBER = 10**30;

    UniswapFactoryInterface public UNISWAP_FACTORY;

    constructor(address _uniswapFactory) public {
        UNISWAP_FACTORY = UniswapFactoryInterface(_uniswapFactory);
    }

    /*** Events ***/
    event SellOTokens(
        address seller,
        address payable receiver,
        address oTokenAddress,
        address payoutTokenAddress,
        uint256 oTokensToSell,
        uint256 payoutTokensReceived
    );
    event BuyOTokens(
        address buyer,
        address payable receiver,
        address oTokenAddress,
        address paymentTokenAddress,
        uint256 oTokensToBuy,
        uint256 premiumPaid
    );

    /**
    * @notice This function sells oTokens on Uniswap and sends back payoutTokens to the receiver
    * @param receiver The address to send the payout tokens back to
    * @param oTokenAddress The address of the oToken to sell
    * @param payoutTokenAddress The address of the token to receive the premiums in
    * @param oTokensToSell The number of oTokens to sell
    */
    function sellOTokens(
        address payable receiver,
        address oTokenAddress,
        address payoutTokenAddress,
        uint256 oTokensToSell
    ) public {
        // @note: first need to bootstrap the uniswap exchange to get the address.
        IERC20 oToken = IERC20(oTokenAddress);
        IERC20 payoutToken = IERC20(payoutTokenAddress);
        oToken.transferFrom(msg.sender, address(this), oTokensToSell);
        uint256 payoutTokensReceived = uniswapSellOToken(
            oToken,
            payoutToken,
            oTokensToSell,
            receiver
        );

        emit SellOTokens(
            msg.sender,
            receiver,
            oTokenAddress,
            payoutTokenAddress,
            oTokensToSell,
            payoutTokensReceived
        );
    }

    /**
    * @notice This function buys oTokens on Uniswap and using paymentTokens from the receiver
    * @param receiver The address to send the oTokens back to
    * @param oTokenAddress The address of the oToken to buy
    * @param paymentTokenAddress The address of the token to pay the premiums in
    * @param oTokensToBuy The number of oTokens to buy
    */
    function buyOTokens(
        address payable receiver,
        address oTokenAddress,
        address paymentTokenAddress,
        uint256 oTokensToBuy
    ) public payable {
        IERC20 oToken = IERC20(oTokenAddress);
        IERC20 paymentToken = IERC20(paymentTokenAddress);
        uniswapBuyOToken(paymentToken, oToken, oTokensToBuy, receiver);
    }

    /**
    * @notice This function calculates the amount of premiums that the seller
    * will receive if they sold oTokens on Uniswap
    * @param oTokenAddress The address of the oToken to sell
    * @param payoutTokenAddress The address of the token to receive the premiums in
    * @param oTokensToSell The number of oTokens to sell
    */
    function premiumReceived(
        address oTokenAddress,
        address payoutTokenAddress,
        uint256 oTokensToSell
    ) public view returns (uint256) {
        // get the amount of ETH that will be paid out if oTokensToSell is sold.
        UniswapExchangeInterface oTokenExchange = getExchange(oTokenAddress);
        uint256 ethReceived = oTokenExchange.getTokenToEthInputPrice(
            oTokensToSell
        );

        if (!isETH(IERC20(payoutTokenAddress))) {
            // get the amount of payout tokens that will be received if the ethRecieved is sold.
            UniswapExchangeInterface payoutExchange = getExchange(
                payoutTokenAddress
            );
            return payoutExchange.getEthToTokenInputPrice(ethReceived);
        }
        return ethReceived;

    }

    /**
    * @notice This function calculates the premiums to be paid if a buyer wants to
    * buy oTokens on Uniswap
    * @param oTokenAddress The address of the oToken to buy
    * @param paymentTokenAddress The address of the token to pay the premiums in
    * @param oTokensToBuy The number of oTokens to buy
    */
    function premiumToPay(
        address oTokenAddress,
        address paymentTokenAddress,
        uint256 oTokensToBuy
    ) public view returns (uint256) {
        // get the amount of ETH that needs to be paid for oTokensToBuy.
        UniswapExchangeInterface oTokenExchange = getExchange(oTokenAddress);
        uint256 ethToPay = oTokenExchange.getEthToTokenOutputPrice(
            oTokensToBuy
        );

        if (!isETH(IERC20(paymentTokenAddress))) {
            // get the amount of paymentTokens that needs to be paid to get the desired ethToPay.
            UniswapExchangeInterface paymentTokenExchange = getExchange(
                paymentTokenAddress
            );
            return paymentTokenExchange.getTokenToEthOutputPrice(ethToPay);
        }

        return ethToPay;
    }

    function uniswapSellOToken(
        IERC20 oToken,
        IERC20 payoutToken,
        uint256 _amt,
        address payable _transferTo
    ) internal returns (uint256) {
        require(!isETH(oToken), "Can only sell oTokens");
        UniswapExchangeInterface exchange = getExchange(address(oToken));

        if (isETH(payoutToken)) {
            //Token to ETH
            oToken.approve(address(exchange), _amt);
            return
                exchange.tokenToEthTransferInput(
                    _amt,
                    1,
                    LARGE_BLOCK_SIZE,
                    _transferTo
                );
        } else {
            //Token to Token
            oToken.approve(address(exchange), _amt);
            return
                exchange.tokenToTokenTransferInput(
                    _amt,
                    1,
                    1,
                    LARGE_BLOCK_SIZE,
                    _transferTo,
                    address(payoutToken)
                );
        }
    }

    function uniswapBuyOToken(
        IERC20 paymentToken,
        IERC20 oToken,
        uint256 _amt,
        address payable _transferTo
    ) public returns (uint256) {
        require(!isETH(oToken), "Can only buy oTokens");

        if (!isETH(paymentToken)) {
            UniswapExchangeInterface exchange = getExchange(
                address(paymentToken)
            );

            uint256 paymentTokensToTransfer = premiumToPay(
                address(oToken),
                address(paymentToken),
                _amt
            );
            paymentToken.transferFrom(
                msg.sender,
                address(this),
                paymentTokensToTransfer
            );

            // Token to Token
            paymentToken.approve(address(exchange), LARGE_APPROVAL_NUMBER);

            emit BuyOTokens(
                msg.sender,
                _transferTo,
                address(oToken),
                address(paymentToken),
                _amt,
                paymentTokensToTransfer
            );

            return
                exchange.tokenToTokenTransferInput(
                    paymentTokensToTransfer,
                    1,
                    1,
                    LARGE_BLOCK_SIZE,
                    _transferTo,
                    address(oToken)
                );
        } else {
            // ETH to Token
            UniswapExchangeInterface exchange = UniswapExchangeInterface(
                UNISWAP_FACTORY.getExchange(address(oToken))
            );

            uint256 ethToTransfer = exchange.getEthToTokenOutputPrice(_amt);

            emit BuyOTokens(
                msg.sender,
                _transferTo,
                address(oToken),
                address(paymentToken),
                _amt,
                ethToTransfer
            );

            return
                exchange.ethToTokenTransferOutput.value(ethToTransfer)(
                    _amt,
                    LARGE_BLOCK_SIZE,
                    _transferTo
                );
        }
    }

    function getExchange(address _token)
        internal
        view
        returns (UniswapExchangeInterface)
    {
        UniswapExchangeInterface exchange = UniswapExchangeInterface(
            UNISWAP_FACTORY.getExchange(_token)
        );

        if (address(exchange) == address(0)) {
            revert("No payout exchange");
        }

        return exchange;
    }

    function isETH(IERC20 _ierc20) internal pure returns (bool) {
        return _ierc20 == IERC20(0);
    }

    function() external payable {
        // to get ether from uniswap exchanges
    }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"oTokenAddress","type":"address"},{"name":"payoutTokenAddress","type":"address"},{"name":"oTokensToSell","type":"uint256"}],"name":"premiumReceived","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"receiver","type":"address"},{"name":"oTokenAddress","type":"address"},{"name":"payoutTokenAddress","type":"address"},{"name":"oTokensToSell","type":"uint256"}],"name":"sellOTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"receiver","type":"address"},{"name":"oTokenAddress","type":"address"},{"name":"paymentTokenAddress","type":"address"},{"name":"oTokensToBuy","type":"uint256"}],"name":"buyOTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"oTokenAddress","type":"address"},{"name":"paymentTokenAddress","type":"address"},{"name":"oTokensToBuy","type":"uint256"}],"name":"premiumToPay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"UNISWAP_FACTORY","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"paymentToken","type":"address"},{"name":"oToken","type":"address"},{"name":"_amt","type":"uint256"},{"name":"_transferTo","type":"address"}],"name":"uniswapBuyOToken","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_uniswapFactory","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"seller","type":"address"},{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"oTokenAddress","type":"address"},{"indexed":false,"name":"payoutTokenAddress","type":"address"},{"indexed":false,"name":"oTokensToSell","type":"uint256"},{"indexed":false,"name":"payoutTokensReceived","type":"uint256"}],"name":"SellOTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"buyer","type":"address"},{"indexed":false,"name":"receiver","type":"address"},{"indexed":false,"name":"oTokenAddress","type":"address"},{"indexed":false,"name":"paymentTokenAddress","type":"address"},{"indexed":false,"name":"oTokensToBuy","type":"uint256"},{"indexed":false,"name":"premiumPaid","type":"uint256"}],"name":"BuyOTokens","type":"event"}]

608060405234801561001057600080fd5b50604051610da7380380610da78339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610d42806100656000396000f3fe6080604052600436106100555760003560e01c80633ed9c978146100575780637dafae59146100ac57806390a21dbf146100f5578063bec165e714610131578063c74c0fac14610174578063ec769d88146101a5575b005b34801561006357600080fd5b5061009a6004803603606081101561007a57600080fd5b506001600160a01b038135811691602081013590911690604001356101ee565b60408051918252519081900360200190f35b3480156100b857600080fd5b50610055600480360360808110156100cf57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610310565b6100556004803603608081101561010b57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610410565b34801561013d57600080fd5b5061009a6004803603606081101561015457600080fd5b506001600160a01b03813581169160208101359091169060400135610427565b34801561018057600080fd5b50610189610507565b604080516001600160a01b039092168252519081900360200190f35b3480156101b157600080fd5b5061009a600480360360808110156101c857600080fd5b506001600160a01b03813581169160208101358216916040820135916060013516610516565b6000806101fa85610993565b90506000816001600160a01b03166395b68fe7856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561024257600080fd5b505afa158015610256573d6000803e3d6000fd5b505050506040513d602081101561026c57600080fd5b5051905061027985610a68565b61030557600061028886610993565b9050806001600160a01b031663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b5051935061030992505050565b9150505b9392505050565b604080516323b872dd60e01b8152336004820152306024820152604481018390529051849184916001600160a01b038416916323b872dd9160648083019260209291908290030181600087803b15801561036957600080fd5b505af115801561037d573d6000803e3d6000fd5b505050506040513d602081101561039357600080fd5b50600090506103a48383868a610a75565b604080513381526001600160a01b03808b166020830152808a1682840152881660608201526080810187905260a0810183905290519192507fab8c5af285e82a3bf952b92a12f6a2f6a469e8d78f739df3df0a28a686940c83919081900360c00190a150505050505050565b828261041e81838589610516565b50505050505050565b60008061043385610993565b90506000816001600160a01b03166359e94862856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561047b57600080fd5b505afa15801561048f573d6000803e3d6000fd5b505050506040513d60208110156104a557600080fd5b505190506104b285610a68565b6103055760006104c186610993565b9050806001600160a01b0316632640f62c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102ce57600080fd5b6000546001600160a01b031681565b600061052184610a68565b1561056a576040805162461bcd60e51b815260206004820152601460248201527343616e206f6e6c7920627579206f546f6b656e7360601b604482015290519081900360640190fd5b61057385610a68565b6107ab57600061058286610993565b90506000610591868887610427565b604080516323b872dd60e01b81523360048201523060248201526044810183905290519192506001600160a01b038916916323b872dd916064808201926020929091908290030181600087803b1580156105ea57600080fd5b505af11580156105fe573d6000803e3d6000fd5b505050506040513d602081101561061457600080fd5b50506040805163095ea7b360e01b81526001600160a01b0384811660048301526c0c9f2c9cd04674edea40000000602483015291519189169163095ea7b3916044808201926020929091908290030181600087803b15801561067557600080fd5b505af1158015610689573d6000803e3d6000fd5b505050506040513d602081101561069f57600080fd5b5050604080513381526001600160a01b03808716602083015280891682840152891660608201526080810187905260a0810183905290517f12afd2904be5509dbc82f87a13cc9703686d0c11e2680354fcf908b18eaaddd79181900360c00190a16040805163f552d91b60e01b81526004810183905260016024820181905260448201526501809428942860648201526001600160a01b03868116608483015288811660a483015291519184169163f552d91b9160c4808201926020929091908290030181600087803b15801561077557600080fd5b505af1158015610789573d6000803e3d6000fd5b505050506040513d602081101561079f57600080fd5b5051925061098b915050565b60008054604080516303795fb160e11b81526001600160a01b038881166004830152915191909216916306f2bf62916024808301926020929190829003018186803b1580156107f957600080fd5b505afa15801561080d573d6000803e3d6000fd5b505050506040513d602081101561082357600080fd5b505160408051632cf4a43160e11b81526004810187905290519192506000916001600160a01b038416916359e94862916024808301926020929190829003018186803b15801561087257600080fd5b505afa158015610886573d6000803e3d6000fd5b505050506040513d602081101561089c57600080fd5b5051604080513381526001600160a01b038088166020830152808a16828401528a1660608201526080810188905260a0810183905290519192507f12afd2904be5509dbc82f87a13cc9703686d0c11e2680354fcf908b18eaaddd7919081900360c00190a16040805163016ae6c760e31b8152600481018790526501809428942860248201526001600160a01b038681166044830152915191841691630b573638918491606480830192602092919082900301818588803b15801561096057600080fd5b505af1158015610974573d6000803e3d6000fd5b50505050506040513d602081101561079f57600080fd5b949350505050565b60008054604080516303795fb160e11b81526001600160a01b0385811660048301529151849392909216916306f2bf6291602480820192602092909190829003018186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b505190506001600160a01b038116610a62576040805162461bcd60e51b81526020600482015260126024820152714e6f207061796f75742065786368616e676560701b604482015290519081900360640190fd5b92915050565b6001600160a01b03161590565b6000610a8085610a68565b15610aca576040805162461bcd60e51b815260206004820152601560248201527443616e206f6e6c792073656c6c206f546f6b656e7360581b604482015290519081900360640190fd5b6000610ad586610993565b9050610ae085610a68565b15610c0c57856001600160a01b031663095ea7b382866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610b4557600080fd5b505af1158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b505060408051637237e03160e01b815260048101869052600160248201526501809428942860448201526001600160a01b038581166064830152915191831691637237e031916084808201926020929091908290030181600087803b158015610bd757600080fd5b505af1158015610beb573d6000803e3d6000fd5b505050506040513d6020811015610c0157600080fd5b5051915061098b9050565b856001600160a01b031663095ea7b382866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610c6c57600080fd5b505af1158015610c80573d6000803e3d6000fd5b505050506040513d6020811015610c9657600080fd5b50506040805163f552d91b60e01b81526004810186905260016024820181905260448201526501809428942860648201526001600160a01b03858116608483015287811660a483015291519183169163f552d91b9160c4808201926020929091908290030181600087803b158015610bd757600080fdfea265627a7a72305820fd6275a3a8cfbd1de9bf362c2894014045f3dd1668b86f714ec99f707a99b55064736f6c634300050a0032000000000000000000000000c0a47dfe034b400b47bdad5fecda2621de6c4d95

Deployed Bytecode

0x6080604052600436106100555760003560e01c80633ed9c978146100575780637dafae59146100ac57806390a21dbf146100f5578063bec165e714610131578063c74c0fac14610174578063ec769d88146101a5575b005b34801561006357600080fd5b5061009a6004803603606081101561007a57600080fd5b506001600160a01b038135811691602081013590911690604001356101ee565b60408051918252519081900360200190f35b3480156100b857600080fd5b50610055600480360360808110156100cf57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610310565b6100556004803603608081101561010b57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135610410565b34801561013d57600080fd5b5061009a6004803603606081101561015457600080fd5b506001600160a01b03813581169160208101359091169060400135610427565b34801561018057600080fd5b50610189610507565b604080516001600160a01b039092168252519081900360200190f35b3480156101b157600080fd5b5061009a600480360360808110156101c857600080fd5b506001600160a01b03813581169160208101358216916040820135916060013516610516565b6000806101fa85610993565b90506000816001600160a01b03166395b68fe7856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561024257600080fd5b505afa158015610256573d6000803e3d6000fd5b505050506040513d602081101561026c57600080fd5b5051905061027985610a68565b61030557600061028886610993565b9050806001600160a01b031663cd7724c3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102ce57600080fd5b505afa1580156102e2573d6000803e3d6000fd5b505050506040513d60208110156102f857600080fd5b5051935061030992505050565b9150505b9392505050565b604080516323b872dd60e01b8152336004820152306024820152604481018390529051849184916001600160a01b038416916323b872dd9160648083019260209291908290030181600087803b15801561036957600080fd5b505af115801561037d573d6000803e3d6000fd5b505050506040513d602081101561039357600080fd5b50600090506103a48383868a610a75565b604080513381526001600160a01b03808b166020830152808a1682840152881660608201526080810187905260a0810183905290519192507fab8c5af285e82a3bf952b92a12f6a2f6a469e8d78f739df3df0a28a686940c83919081900360c00190a150505050505050565b828261041e81838589610516565b50505050505050565b60008061043385610993565b90506000816001600160a01b03166359e94862856040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561047b57600080fd5b505afa15801561048f573d6000803e3d6000fd5b505050506040513d60208110156104a557600080fd5b505190506104b285610a68565b6103055760006104c186610993565b9050806001600160a01b0316632640f62c836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156102ce57600080fd5b6000546001600160a01b031681565b600061052184610a68565b1561056a576040805162461bcd60e51b815260206004820152601460248201527343616e206f6e6c7920627579206f546f6b656e7360601b604482015290519081900360640190fd5b61057385610a68565b6107ab57600061058286610993565b90506000610591868887610427565b604080516323b872dd60e01b81523360048201523060248201526044810183905290519192506001600160a01b038916916323b872dd916064808201926020929091908290030181600087803b1580156105ea57600080fd5b505af11580156105fe573d6000803e3d6000fd5b505050506040513d602081101561061457600080fd5b50506040805163095ea7b360e01b81526001600160a01b0384811660048301526c0c9f2c9cd04674edea40000000602483015291519189169163095ea7b3916044808201926020929091908290030181600087803b15801561067557600080fd5b505af1158015610689573d6000803e3d6000fd5b505050506040513d602081101561069f57600080fd5b5050604080513381526001600160a01b03808716602083015280891682840152891660608201526080810187905260a0810183905290517f12afd2904be5509dbc82f87a13cc9703686d0c11e2680354fcf908b18eaaddd79181900360c00190a16040805163f552d91b60e01b81526004810183905260016024820181905260448201526501809428942860648201526001600160a01b03868116608483015288811660a483015291519184169163f552d91b9160c4808201926020929091908290030181600087803b15801561077557600080fd5b505af1158015610789573d6000803e3d6000fd5b505050506040513d602081101561079f57600080fd5b5051925061098b915050565b60008054604080516303795fb160e11b81526001600160a01b038881166004830152915191909216916306f2bf62916024808301926020929190829003018186803b1580156107f957600080fd5b505afa15801561080d573d6000803e3d6000fd5b505050506040513d602081101561082357600080fd5b505160408051632cf4a43160e11b81526004810187905290519192506000916001600160a01b038416916359e94862916024808301926020929190829003018186803b15801561087257600080fd5b505afa158015610886573d6000803e3d6000fd5b505050506040513d602081101561089c57600080fd5b5051604080513381526001600160a01b038088166020830152808a16828401528a1660608201526080810188905260a0810183905290519192507f12afd2904be5509dbc82f87a13cc9703686d0c11e2680354fcf908b18eaaddd7919081900360c00190a16040805163016ae6c760e31b8152600481018790526501809428942860248201526001600160a01b038681166044830152915191841691630b573638918491606480830192602092919082900301818588803b15801561096057600080fd5b505af1158015610974573d6000803e3d6000fd5b50505050506040513d602081101561079f57600080fd5b949350505050565b60008054604080516303795fb160e11b81526001600160a01b0385811660048301529151849392909216916306f2bf6291602480820192602092909190829003018186803b1580156109e457600080fd5b505afa1580156109f8573d6000803e3d6000fd5b505050506040513d6020811015610a0e57600080fd5b505190506001600160a01b038116610a62576040805162461bcd60e51b81526020600482015260126024820152714e6f207061796f75742065786368616e676560701b604482015290519081900360640190fd5b92915050565b6001600160a01b03161590565b6000610a8085610a68565b15610aca576040805162461bcd60e51b815260206004820152601560248201527443616e206f6e6c792073656c6c206f546f6b656e7360581b604482015290519081900360640190fd5b6000610ad586610993565b9050610ae085610a68565b15610c0c57856001600160a01b031663095ea7b382866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610b4557600080fd5b505af1158015610b59573d6000803e3d6000fd5b505050506040513d6020811015610b6f57600080fd5b505060408051637237e03160e01b815260048101869052600160248201526501809428942860448201526001600160a01b038581166064830152915191831691637237e031916084808201926020929091908290030181600087803b158015610bd757600080fd5b505af1158015610beb573d6000803e3d6000fd5b505050506040513d6020811015610c0157600080fd5b5051915061098b9050565b856001600160a01b031663095ea7b382866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610c6c57600080fd5b505af1158015610c80573d6000803e3d6000fd5b505050506040513d6020811015610c9657600080fd5b50506040805163f552d91b60e01b81526004810186905260016024820181905260448201526501809428942860648201526001600160a01b03858116608483015287811660a483015291519183169163f552d91b9160c4808201926020929091908290030181600087803b158015610bd757600080fdfea265627a7a72305820fd6275a3a8cfbd1de9bf362c2894014045f3dd1668b86f714ec99f707a99b55064736f6c634300050a0032

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

000000000000000000000000c0a47dfe034b400b47bdad5fecda2621de6c4d95

-----Decoded View---------------
Arg [0] : _uniswapFactory (address): 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c0a47dfe034b400b47bdad5fecda2621de6c4d95


Deployed Bytecode Sourcemap

25850:8906:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28973:828;;8:9:-1;5:2;;;30:1;27;20:12;5:2;28973:828:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;28973:828:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;27042:821;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27042:821:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;27042:821:0;;;;;;;;;;;;;;;;;;;;;;:::i;28245:367::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;28245:367:0;;;;;;;;;;;;;;;;;;;;;;:::i;30139:824::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30139:824:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;30139:824:0;;;;;;;;;;;;;;;;;:::i;25994:46::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25994:46:0;;;:::i;:::-;;;;-1:-1:-1;;;;;25994:46:0;;;;;;;;;;;;;;32025:2122;;8:9:-1;5:2;;;30:1;27;20:12;5:2;32025:2122:0;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;32025:2122:0;;;;;;;;;;;;;;;;;;;;;;:::i;28973:828::-;29127:7;29229:39;29271:26;29283:13;29271:11;:26::i;:::-;29229:68;;29308:19;29330:14;-1:-1:-1;;;;;29330:38:0;;29383:13;29330:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29330:77:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29330:77:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29330:77:0;;-1:-1:-1;29425:33:0;29438:18;29425:5;:33::i;:::-;29420:343;;29573:39;29615:63;29645:18;29615:11;:63::i;:::-;29573:105;;29700:14;-1:-1:-1;;;;;29700:38:0;;29739:11;29700:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29700:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;29700:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;29700:51:0;;-1:-1:-1;29693:58:0;;-1:-1:-1;;;29693:58:0;29420:343;29780:11;-1:-1:-1;;28973:828:0;;;;;;:::o;27042:821::-;27414:61;;;-1:-1:-1;;;27414:61:0;;27434:10;27414:61;;;;27454:4;27414:61;;;;;;;;;;;;27331:13;;27384:18;;-1:-1:-1;;;;;27414:19:0;;;;;:61;;;;;;;;;;;;;;27308:13;27414:19;:61;;;5:2:-1;;;;30:1;27;20:12;5:2;27414:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;27414:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;27486:28:0;;-1:-1:-1;27517:126:0;27549:6;27570:11;27596:13;27624:8;27517:17;:126::i;:::-;27661:194;;;27687:10;27661:194;;-1:-1:-1;;;;;27661:194:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27486:157;;-1:-1:-1;27661:194:0;;;;;;;;;;27042:821;;;;;;;:::o;28245:367::-;28457:13;28511:19;28542:62;28511:19;28457:13;28581:12;28595:8;28542:16;:62::i;:::-;;28245:367;;;;;;:::o;30139:824::-;30290:7;30384:39;30426:26;30438:13;30426:11;:26::i;:::-;30384:68;;30463:16;30482:14;-1:-1:-1;;;;;30482:39:0;;30536:12;30482:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30482:77:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30482:77:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;30482:77:0;;-1:-1:-1;30577:34:0;30590:19;30577:5;:34::i;:::-;30572:356;;30727:45;30775:64;30805:19;30775:11;:64::i;:::-;30727:112;;30861:20;-1:-1:-1;;;;;30861:45:0;;30907:8;30861:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;25994:46:0;;;-1:-1:-1;;;;;25994:46:0;;:::o;32025:2122::-;32189:7;32218:13;32224:6;32218:5;:13::i;:::-;32217:14;32209:47;;;;;-1:-1:-1;;;32209:47:0;;;;;;;;;;;;-1:-1:-1;;;32209:47:0;;;;;;;;;;;;;;;32274:19;32280:12;32274:5;:19::i;:::-;32269:1871;;32310:33;32346:66;32384:12;32346:11;:66::i;:::-;32310:102;;32429:31;32463:124;32502:6;32536:12;32568:4;32463:12;:124::i;:::-;32602:143;;;-1:-1:-1;;;32602:143:0;;32646:10;32602:143;;;;32683:4;32602:143;;;;;;;;;;;;32429:158;;-1:-1:-1;;;;;;32602:25:0;;;;;:143;;;;;;;;;;;;;;;-1:-1:-1;32602:25:0;:143;;;5:2:-1;;;;30:1;27;20:12;5:2;32602:143:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32602:143:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;32793:62:0;;;-1:-1:-1;;;32793:62:0;;-1:-1:-1;;;;;32793:62:0;;;;;;;25979:6;32793:62;;;;;;:20;;;;;;:62;;;;;32602:143;;32793:62;;;;;;;;-1:-1:-1;32793:20:0;:62;;;5:2:-1;;;;30:1;27;20:12;5:2;32793:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32793:62:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;32877:223:0;;;32906:10;32877:223;;-1:-1:-1;;;;;32877:223:0;;;32793:62;32877:223;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33141:258;;;-1:-1:-1;;;33141:258:0;;;;;;;;33244:1;33141:258;;;;;;;;;;25918:13;33141:258;;;;-1:-1:-1;;;;;33141:258:0;;;;;;;;;;;;;;;;:34;;;;;;:258;;;;;;;;;;;;;;;-1:-1:-1;33141:34:0;:258;;;5:2:-1;;;;30:1;27;20:12;5:2;33141:258:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33141:258:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33141:258:0;;-1:-1:-1;33117:282:0;;-1:-1:-1;;33117:282:0;32269:1871;33461:33;33540:15;;:44;;;-1:-1:-1;;;33540:44:0;;-1:-1:-1;;;;;33540:44:0;;;;;;;;;:15;;;;;:27;;:44;;;;;;;;;;;;;;:15;:44;;;5:2:-1;;;;30:1;27;20:12;5:2;33540:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33540:44:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33540:44:0;33640:39;;;-1:-1:-1;;;33640:39:0;;;;;;;;;;33540:44;;-1:-1:-1;33616:21:0;;-1:-1:-1;;;;;33640:33:0;;;;;:39;;;;;33540:44;;33640:39;;;;;;;:33;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;33640:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33640:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33640:39:0;33701:213;;;33730:10;33701:213;;-1:-1:-1;;;;;33701:213:0;;;33640:39;33701:213;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33640:39;;-1:-1:-1;33701:213:0;;;;;;;;;;33955:173;;;-1:-1:-1;;;33955:173:0;;;;;;;;25918:13;33955:173;;;;-1:-1:-1;;;;;33955:173:0;;;;;;;;;:33;;;;;;33995:13;;33955:173;;;;;;;;;;;;;;33995:13;33955:33;:173;;;5:2:-1;;;;30:1;27;20:12;5:2;33955:173:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33955:173:0;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;32269:1871:0;32025:2122;;;;;;:::o;34155:390::-;34242:24;34359:15;;:35;;;-1:-1:-1;;;34359:35:0;;-1:-1:-1;;;;;34359:35:0;;;;;;;;;34242:24;;34359:15;;;;;:27;;:35;;;;;;;;;;;;;;;:15;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;34359:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34359:35:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;34359:35:0;;-1:-1:-1;;;;;;34422:31:0;;34418:92;;34470:28;;;-1:-1:-1;;;34470:28:0;;;;;;;;;;;;-1:-1:-1;;;34470:28:0;;;;;;;;;;;;;;34418:92;34529:8;34155:390;-1:-1:-1;;34155:390:0:o;34553:106::-;-1:-1:-1;;;;;34631:20:0;;;34553:106::o;30971:1046::-;31137:7;31166:13;31172:6;31166:5;:13::i;:::-;31165:14;31157:48;;;;;-1:-1:-1;;;31157:48:0;;;;;;;;;;;;-1:-1:-1;;;31157:48:0;;;;;;;;;;;;;;;31216:33;31252:28;31272:6;31252:11;:28::i;:::-;31216:64;;31297:18;31303:11;31297:5;:18::i;:::-;31293:717;;;31360:6;-1:-1:-1;;;;;31360:14:0;;31383:8;31394:4;31360:39;;;;;;;;;;;;;-1:-1:-1;;;;;31360:39:0;-1:-1:-1;;;;;31360:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31360:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31360:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;31438:175:0;;;-1:-1:-1;;;31438:175:0;;;;;;;;31520:1;31438:175;;;;25918:13;31438:175;;;;-1:-1:-1;;;;;31438:175:0;;;;;;;;;:32;;;;;;:175;;;;;31360:39;;31438:175;;;;;;;;-1:-1:-1;31438:32:0;:175;;;5:2:-1;;;;30:1;27;20:12;5:2;31438:175:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31438:175:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31438:175:0;;-1:-1:-1;31414:199:0;;-1:-1:-1;31414:199:0;31293:717;31676:6;-1:-1:-1;;;;;31676:14:0;;31699:8;31710:4;31676:39;;;;;;;;;;;;;-1:-1:-1;;;;;31676:39:0;-1:-1:-1;;;;;31676:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31676:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31676:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;31754:244:0;;;-1:-1:-1;;;31754:244:0;;;;;;;;31838:1;31754:244;;;;;;;;;;25918:13;31754:244;;;;-1:-1:-1;;;;;31754:244:0;;;;;;;;;;;;;;;;:34;;;;;;:244;;;;;31676:39;;31754:244;;;;;;;;-1:-1:-1;31754:34:0;:244;;;5:2:-1;;;;30:1;27;20:12

Swarm Source

bzzr://fd6275a3a8cfbd1de9bf362c2894014045f3dd1668b86f714ec99f707a99b550

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.