Contract 0x87209686d0f085fD35B084410B99241Dbc03fb4f

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4b96cf263b368140ddc9f04f6f82ad21067be8705b84ac533ad11b1c3efb5cf3Update Volatilit...51690162022-01-28 12:25:3426 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000844459571 ETH
0x76fd89e120b62a2b2db32dd8ec7726a8350208f7f9f1fa3dabbc8748acb6cfaaUpdate Volatilit...51677182022-01-28 11:25:201 hr 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.00085974548 ETH
0x917ccbe665af68e40cb28d18ce1ca83456a593d6653191813a00503e51a34082Update Volatilit...51665552022-01-28 10:24:332 hrs 27 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000873346443 ETH
0x545624fb44488defb3a3e14fe20a1077085370b0e70f451a0d97db17b8cefdcfUpdate Volatilit...51652782022-01-28 9:24:103 hrs 27 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000873346443 ETH
0x369b7e4c301bf89aec23aba48af4b4cf6ef691edfddb28093a883b2f577a5199Update Volatilit...51637082022-01-28 8:25:244 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000898068978 ETH
0xd78536c4a2f3562a38bd03637e47e9d666d16e6fb131029b24bc23fd9415678fUpdate Volatilit...51618252022-01-28 7:25:455 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000896222864 ETH
0x9163337ae5b3ac4ed03107f57108ad2d86521b74bab64078ae3620b8e7b88769Update Volatilit...51604462022-01-28 6:25:076 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000915897307 ETH
0x0a5227e38d73d3e083ba4ba97c46f386d43fd7186cb4bde8e86f7855702769dfUpdate Volatilit...51592862022-01-28 5:25:027 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000915897307 ETH
0xc25cc73d0c7e4857b84905c30bd3970381c78ddd07c6c56dab414841372e2a48Update Volatilit...51579972022-01-28 4:25:448 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000917783948 ETH
0x39913d6f4cc93d0383bb78126a824a2732ad225fd39c017353841abd1e344be4Update Volatilit...51565012022-01-28 3:25:319 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000918629251 ETH
0xbad4ff3fcb4d221610cf93032248302b7e91cc71bcf6f77cb3ccacdbfda92c18Update Volatilit...51549692022-01-28 2:25:2510 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000916736982 ETH
0xdc33279daa3263b646ec04530204986cfc91887ad350f8defb99c06871497cd3Update Volatilit...51534332022-01-28 1:25:4311 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.00092052152 ETH
0x925156d78399eaeedff47061b3aeda9d25411fb9dc1754eb353e1167dcf4c8b6Update Volatilit...51519902022-01-28 0:25:1312 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000912802088 ETH
0xacebc961ab6f018b8756b5e8b3da1b2dabfb810f02089fa76c762a0c9b719f9eUpdate Volatilit...51499932022-01-27 23:25:3913 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000900166774 ETH
0x532e97b3080bdfb3bf6edb6e83ba906d1837758c9db2f34b067661c95a51f878Update Volatilit...51477212022-01-27 22:25:3914 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.00086614774 ETH
0x8ef5172d710269185db4e8f8415a3798196a1fb764f9ff347ca0ab11fff6bd4bUpdate Volatilit...51451002022-01-27 21:24:5415 hrs 27 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000843960311 ETH
0x4e28776da5da044292dfbbcf77229948cbe148c67e8fbe60347ffead599773eeUpdate Volatilit...51429292022-01-27 20:25:3816 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000845698771 ETH
0x3ae0172f797d7e588d0ccce84d2e2024b596093214c123386f479fa39002ea7dUpdate Volatilit...51411212022-01-27 19:24:1717 hrs 27 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000825232979 ETH
0x48f3c1d41538e366c6669b4cf0304b2e1759d3605dcd8000206309bd7e7e5055Update Volatilit...51392522022-01-27 18:25:2218 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.00082473843 ETH
0xef080849c60e780c575fa3c8e2b5d12a0f845480122fdf588e4f3caad659d465Update Volatilit...51372782022-01-27 17:25:1319 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000810691477 ETH
0x5a13ea6cec749c69e1e48d03fc415c91685144e142bf5ffc0b7c16f696b47c08Update Volatilit...51351132022-01-27 16:25:3920 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000809748499 ETH
0x0b125c99521588b80a8052ae72a207ce16fb122b98e10ce5209c945fd8d3be9eUpdate Volatilit...51327672022-01-27 15:25:1021 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000809748499 ETH
0xec06d857c772e4f1d707df5fd9d930929dc4e2064a0f141cdee0df59b2c029afUpdate Volatilit...51306142022-01-27 14:25:0322 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.00079168431 ETH
0x46bcfe55d39f9e8e634ad4e4ce3a18bfde5eb32ada3134d69eff3f6de7869460Update Volatilit...51287182022-01-27 13:25:4423 hrs 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000803735083 ETH
0x5aecaa3442b34d9a2d2db936bb9bf0652c832554529128c8410a17831df72655Update Volatilit...51271362022-01-27 12:25:481 day 26 mins ago0x5cb56dcf87790a94871874011ae68d534f41a628 IN  0x87209686d0f085fd35b084410b99241dbc03fb4f0 ETH0.000818694729 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHVolatilityOracle

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual 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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 2 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.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 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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 3 of 4 : IETHVolatilityOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

interface IETHVolatilityOracle {
    function getVolatility(uint256 strike) external returns (uint256);
}

File 4 of 4 : ETHVolatilityOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

// Contracts
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';

// Interfaces
import {IETHVolatilityOracle} from '../interfaces/IETHVolatilityOracle.sol';

contract ETHVolatilityOracle is Ownable, IETHVolatilityOracle {
    /*==== PUBLIC VARS ====*/

    mapping(uint256 => uint256) public strikeToVols;

    /*==== SETTER FUNCTIONS (ONLY OWNER) ====*/

    /**
     * @notice Updates the volatility
     * @param strikes strikes
     * @param vols volatilities
     */
    function updateVolatility(uint256[] memory strikes, uint256[] memory vols)
        external
        onlyOwner
    {
        require(
            strikes.length == vols.length,
            'ETHVolatilityOracle: Input lengths must match'
        );

        for (uint256 i = 0; i < strikes.length; i++) {
            require(vols[i] > 0, 'ETHVolatilityOracle: Volatility cannot be 0');
            strikeToVols[strikes[i]] = vols[i];
        }
    }

    /*==== VIEWS ====*/

    /**
     * @notice Gets the volatility of dpx
     * @return volatility
     */
    function getVolatility(uint256 strike)
        external
        view
        override
        returns (uint256)
    {
        require(
            strikeToVols[strike] != 0,
            'ETHVolatilityOracle: volatility == 0'
        );

        return strikeToVols[strike];
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"strike","type":"uint256"}],"name":"getVolatility","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"strikeToVols","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"strikes","type":"uint256[]"},{"internalType":"uint256[]","name":"vols","type":"uint256[]"}],"name":"updateVolatility","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6106208061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631e773f90146100675780632fe92c091461009a578063715018a6146100af5780638da5cb5b146100b7578063c189c19b146100d2578063f2fde38b146100e5575b600080fd5b610087610075366004610418565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100ad6100a83660046104e2565b6100f8565b005b6100ad61027d565b6000546040516001600160a01b039091168152602001610091565b6100876100e0366004610418565b6102b3565b6100ad6100f3366004610546565b61032d565b6000546001600160a01b0316331461012b5760405162461bcd60e51b815260040161012290610576565b60405180910390fd5b80518251146101925760405162461bcd60e51b815260206004820152602d60248201527f455448566f6c6174696c6974794f7261636c653a20496e707574206c656e677460448201526c0d0e640daeae6e840dac2e8c6d609b1b6064820152608401610122565b60005b82518110156102785760008282815181106101b2576101b26105ab565b60200260200101511161021b5760405162461bcd60e51b815260206004820152602b60248201527f455448566f6c6174696c6974794f7261636c653a20566f6c6174696c6974792060448201526a063616e6e6f7420626520360ac1b6064820152608401610122565b81818151811061022d5761022d6105ab565b60200260200101516001600085848151811061024b5761024b6105ab565b60200260200101518152602001908152602001600020819055508080610270906105c1565b915050610195565b505050565b6000546001600160a01b031633146102a75760405162461bcd60e51b815260040161012290610576565b6102b160006103c8565b565b60008181526001602052604081205461031a5760405162461bcd60e51b8152602060048201526024808201527f455448566f6c6174696c6974794f7261636c653a20766f6c6174696c6974792060448201526303d3d20360e41b6064820152608401610122565b5060009081526001602052604090205490565b6000546001600160a01b031633146103575760405162461bcd60e51b815260040161012290610576565b6001600160a01b0381166103bc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610122565b6103c5816103c8565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561042a57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261045857600080fd5b8135602067ffffffffffffffff8083111561047557610475610431565b8260051b604051601f19603f8301168101818110848211171561049a5761049a610431565b6040529384528581018301938381019250878511156104b857600080fd5b83870191505b848210156104d7578135835291830191908301906104be565b979650505050505050565b600080604083850312156104f557600080fd5b823567ffffffffffffffff8082111561050d57600080fd5b61051986838701610447565b9350602085013591508082111561052f57600080fd5b5061053c85828601610447565b9150509250929050565b60006020828403121561055857600080fd5b81356001600160a01b038116811461056f57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156105e357634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220b4b548c7e79001888410cda47e306b453ec13dce793be41b556550ab39de4ea064736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.