Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xDEB8979D94268FcBA2059d6a5f2bF23f37b11607
Balance 0 ETH
Nonce 1
Code Size 484 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

484 bytes
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806338d52e0f1461005c5780637dc0d1d014610080578063963672901461008857806398d5fdca146100a7578063eec377c0146100c1575b600080fd5b610064610103565b604080516001600160a01b039092168252519081900360200190f35b610064610112565b6100a56004803603602081101561009e57600080fd5b5035610121565b005b6100af61019b565b60408051918252519081900360200190f35b6100ea600480360360208110156100d757600080fd5b503569ffffffffffffffffffff166101a3565b6040805192835260208301919091528051918290030190f35b6001546001600160a01b031681565b6000546001600160a01b031681565b600080546001546040805163ee53140960e01b81526001600160a01b039283166004820152602481018690526305f5e10060448201529051919092169263ee531409926064808201939182900301818387803b15801561018057600080fd5b505af1158015610194573d6000803e3d6000fd5b5050505050565b6305f5e10090565b6305f5e1004291509156fea264697066735822122080c6c504bc9abe8b9b4b83c957345e60791d2d9696fffed0466f6da259c3339464736f6c634300060a0033

Verified Source Code Full Match

Compiler: v0.6.10+commit.00c0fcaf EVM: istanbul Optimization: Yes (200 runs)
OracleInterface.sol 44 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;

interface OracleInterface {
    function isLockingPeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);

    function isDisputePeriodOver(address _asset, uint256 _expiryTimestamp) external view returns (bool);

    function getExpiryPrice(address _asset, uint256 _expiryTimestamp) external view returns (uint256, bool);

    function getDisputer() external view returns (address);

    function getPricer(address _asset) external view returns (address);

    function getPrice(address _asset) external view returns (uint256);

    function getPricerLockingPeriod(address _pricer) external view returns (uint256);

    function getPricerDisputePeriod(address _pricer) external view returns (uint256);

    function getChainlinkRoundData(address _asset, uint80 _roundId) external view returns (uint256, uint256);

    // Non-view function

    function setAssetPricer(address _asset, address _pricer) external;

    function setLockingPeriod(address _pricer, uint256 _lockingPeriod) external;

    function setDisputePeriod(address _pricer, uint256 _disputePeriod) external;

    function setExpiryPrice(
        address _asset,
        uint256 _expiryTimestamp,
        uint256 _price
    ) external;

    function disputeExpiryPrice(
        address _asset,
        uint256 _expiryTimestamp,
        uint256 _price
    ) external;

    function setDisputer(address _disputer) external;
}
ChainlinkStablePricer.sol 56 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;

import {OracleInterface} from "../interfaces/OracleInterface.sol";
import {OpynPricerInterface} from "../interfaces/OpynPricerInterface.sol";

/**
 * @notice A Pricer contract to push stable USDC price (1:1 to USD)
 */
contract ChainlinkStablePricer is OpynPricerInterface {

    /// @notice the opyn oracle address
    OracleInterface public oracle;

    /// @notice asset that this pricer will a get price for
    address public asset;

    /**
     * @param _asset asset that this pricer will get a price for
     * @param _oracle Opyn Oracle address
     */
    constructor(
        address _asset,
        address _oracle
    ) public {
        require(_oracle != address(0), "ChainLinkPricer: Cannot set 0 address as oracle");

        oracle = OracleInterface(_oracle);
        asset = _asset;
    }

    /**
     * @notice set the expiry price in the oracle, always 1e8
     * @param _expiryTimestamp expiry to set a price for
     */
    function setExpiryPriceInOracle(uint256 _expiryTimestamp) external {
        oracle.setExpiryPrice(asset, _expiryTimestamp, uint256(1e8));
    }

    /**
     * @notice get the live price for the asset
     * @dev overides the getPrice function in OpynPricerInterface
     * @return price of the asset in USD, scaled by 1e8
     */
    function getPrice() external view override returns (uint256) {
        return uint256(1e8);
    }

    /**
     * @notice get historical USDC price (always 1e8)
     * @return round price and timestamp
     */
    function getHistoricalPrice(uint80 /*_roundId*/) external view override returns (uint256, uint256) {
        return ((uint256(1e8)), block.timestamp);
    }
}
OpynPricerInterface.sol 8 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.6.10;

interface OpynPricerInterface {
    function getPrice() external view returns (uint256);

    function getHistoricalPrice(uint80 _roundId) external view returns (uint256, uint256);
}

Read Contract

asset 0x38d52e0f → address
getHistoricalPrice 0xeec377c0 → uint256, uint256
getPrice 0x98d5fdca → uint256
oracle 0x7dc0d1d0 → address

Write Contract 1 functions

These functions modify contract state and require a wallet transaction to execute.

setExpiryPriceInOracle 0x96367290
uint256 _expiryTimestamp

Recent Transactions

No transactions found for this address