ETH Price: $3,410.59 (+2.93%)

Contract

0x09b25D760B6e9D434F85557642c9d622535fAd70
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Next Round D...209787102024-10-16 14:26:1168 days ago1729088771IN
0x09b25D76...2535fAd70
0 ETH0.0010526924.21167754
Add Next Round D...201548732024-06-23 14:05:47183 days ago1719151547IN
0x09b25D76...2535fAd70
0 ETH0.00034642.88054449
Add Next Round D...201477262024-06-22 14:05:11184 days ago1719065111IN
0x09b25D76...2535fAd70
0 ETH0.000440423.66241105
Add Next Round D...201405812024-06-21 14:05:35185 days ago1718978735IN
0x09b25D76...2535fAd70
0 ETH0.000786156.53732798
Add Next Round D...201334222024-06-20 14:05:23186 days ago1718892323IN
0x09b25D76...2535fAd70
0 ETH0.0018726415.57219085
Add Next Round D...201262732024-06-19 14:06:35187 days ago1718805995IN
0x09b25D76...2535fAd70
0 ETH0.001104069.18093901
Add Next Round D...201191222024-06-18 14:05:35188 days ago1718719535IN
0x09b25D76...2535fAd70
0 ETH0.0032265726.83091178
Add Next Round D...201119922024-06-17 14:05:59189 days ago1718633159IN
0x09b25D76...2535fAd70
0 ETH0.001153119.58881038
Add Next Round D...201048352024-06-16 14:04:47190 days ago1718546687IN
0x09b25D76...2535fAd70
0 ETH0.000589294.90036723
Add Next Round D...200976722024-06-15 14:05:11191 days ago1718460311IN
0x09b25D76...2535fAd70
0 ETH0.000873567.26417371
Add Next Round D...200905282024-06-14 14:05:11192 days ago1718373911IN
0x09b25D76...2535fAd70
0 ETH0.0014943112.42614229
Add Next Round D...200833842024-06-13 14:05:35193 days ago1718287535IN
0x09b25D76...2535fAd70
0 ETH0.0019222415.98458873
Add Next Round D...200762282024-06-12 14:04:59194 days ago1718201099IN
0x09b25D76...2535fAd70
0 ETH0.0033700428.02395055
Add Next Round D...200690632024-06-11 14:04:23195 days ago1718114663IN
0x09b25D76...2535fAd70
0 ETH0.0030009724.95489975
Add Next Round D...200619082024-06-10 14:04:23196 days ago1718028263IN
0x09b25D76...2535fAd70
0 ETH0.0023380219.44205184
Add Next Round D...200547642024-06-09 14:08:11197 days ago1717942091IN
0x09b25D76...2535fAd70
0 ETH0.001101429.15900101
Add Next Round D...200475902024-06-08 14:04:35198 days ago1717855475IN
0x09b25D76...2535fAd70
0 ETH0.000899547.48022897
Add Next Round D...200404332024-06-07 14:05:35199 days ago1717769135IN
0x09b25D76...2535fAd70
0 ETH0.0026919422.38509463
Add Next Round D...200332672024-06-06 14:05:23200 days ago1717682723IN
0x09b25D76...2535fAd70
0 ETH0.0037693531.34441662
Add Next Round D...200261132024-06-05 14:05:47201 days ago1717596347IN
0x09b25D76...2535fAd70
0 ETH0.0031666626.33272468
Add Next Round D...200189412024-06-04 14:05:47202 days ago1717509947IN
0x09b25D76...2535fAd70
0 ETH0.0015214512.65179895
Add Next Round D...200117802024-06-03 14:06:23203 days ago1717423583IN
0x09b25D76...2535fAd70
0 ETH0.0024695920.5361698
Add Next Round D...200046202024-06-02 14:05:47204 days ago1717337147IN
0x09b25D76...2535fAd70
0 ETH0.001159799.64435209
Add Next Round D...199974542024-06-01 14:05:59205 days ago1717250759IN
0x09b25D76...2535fAd70
0 ETH0.001248110.37873196
Add Next Round D...199902892024-05-31 14:04:47206 days ago1717164287IN
0x09b25D76...2535fAd70
0 ETH0.0030314125.20802163
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xf339024d...7dd5083dd
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Oracle

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : Oracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;

import { IAggregatorV3 } from "./interfaces/IAggregatorV3.sol";
import { ICegaState } from "./interfaces/ICegaState.sol";
import { RoundData } from "./Structs.sol";

contract Oracle is IAggregatorV3 {
    event OracleCreated(address indexed cegaState, uint8 decimals, string description);
    event RoundDataAdded(int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
    event RoundDataUpdated(uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

    uint8 public decimals;
    string public description;
    uint256 public version = 1;
    ICegaState public cegaState;
    RoundData[] public oracleData;
    uint80 public nextRoundId;

    /**
     * @notice Creates a new oracle for a given asset / data source pair
     * @param _cegaState is the address of the CegaState contract
     * @param _decimals is the number of decimals for the asset
     * @param _description is the aset
     */
    constructor(address _cegaState, uint8 _decimals, string memory _description) {
        cegaState = ICegaState(_cegaState);
        decimals = _decimals;
        description = _description;
        emit OracleCreated(_cegaState, _decimals, _description);
    }

    /**
     * @notice Asserts whether the sender has the SERVICE_ADMIN_ROLE
     */
    modifier onlyServiceAdmin() {
        require(cegaState.isServiceAdmin(msg.sender), "403:SA");
        _;
    }

    /**
     * @notice Asserts whether the sender has the DEFAULT_ADMIN_ROLE
     */
    modifier onlyDefaultAdmin() {
        require(cegaState.isDefaultAdmin(msg.sender), "403:DA");
        _;
    }

    /**
     * @notice Adds the pricing data for the next round
     * @param _roundData is the data to be added
     */
    function addNextRoundData(RoundData calldata _roundData) public onlyServiceAdmin {
        if (nextRoundId != 0) {
            (, , , uint256 updatedAt, ) = latestRoundData();
            require(updatedAt <= _roundData.startedAt, "400:P");
        }
        require(block.timestamp - 1 days <= _roundData.startedAt, "400:T"); // Within 1 days

        oracleData.push(_roundData);
        nextRoundId++;
        emit RoundDataAdded(_roundData.answer, _roundData.startedAt, _roundData.updatedAt, _roundData.answeredInRound);
    }

    /**
     * @notice Updates the pricing data for a given round
     * @param _roundData is the data to be updated
     */
    function updateRoundData(uint80 roundId, RoundData calldata _roundData) public onlyDefaultAdmin {
        oracleData[roundId] = _roundData;
        emit RoundDataUpdated(
            roundId,
            _roundData.answer,
            _roundData.startedAt,
            _roundData.updatedAt,
            _roundData.answeredInRound
        );
    }

    /**
     * @notice Gets the pricing data for a given round Id
     * @param _roundId is the id of the round
     */
    function getRoundData(
        uint80 _roundId
    )
        public
        view
        override
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        return (
            _roundId,
            oracleData[_roundId].answer,
            oracleData[_roundId].startedAt,
            oracleData[_roundId].updatedAt,
            oracleData[_roundId].answeredInRound
        );
    }

    /**
     * @notice Gets the pricing data for the latest round
     */
    function latestRoundData()
        public
        view
        override
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
    {
        uint80 _roundId = nextRoundId - 1;
        return (
            _roundId,
            oracleData[_roundId].answer,
            oracleData[_roundId].startedAt,
            oracleData[_roundId].updatedAt,
            oracleData[_roundId].answeredInRound
        );
    }
}

File 2 of 4 : IAggregatorV3.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

interface IAggregatorV3 {
    function decimals() external view returns (uint8);

    function description() external view returns (string memory);

    function version() external view returns (uint256);

    function getRoundData(
        uint80 _roundId
    )
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

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

interface ICegaState {
    function marketMakerAllowList(address marketMaker) external view returns (bool);

    function products(string memory productName) external view returns (address);

    function oracleAddresses(string memory oracleName) external view returns (address);

    function oracleNames() external view returns (string[] memory);

    function productNames() external view returns (string[] memory);

    function feeRecipient() external view returns (address);

    function isDefaultAdmin(address sender) external view returns (bool);

    function isTraderAdmin(address sender) external view returns (bool);

    function isOperatorAdmin(address sender) external view returns (bool);

    function isServiceAdmin(address sender) external view returns (bool);

    function getOracleNames() external view returns (string[] memory);

    function addOracle(string memory oracleName, address oracleAddress) external;

    function removeOracle(string memory oracleName) external;

    function getProductNames() external view returns (string[] memory);

    function addProduct(string memory productName, address product) external;

    function removeProduct(string memory productName) external;

    function updateMarketMakerPermission(address marketMaker, bool allow) external;

    function setFeeRecipient(address _feeRecipient) external;

    function moveAssetsToProduct(string memory productName, address vaultAddress, uint256 amount) external;
}

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

enum OptionBarrierType {
    None,
    KnockIn
}

struct Deposit {
    uint256 amount;
    address receiver;
}

struct Withdrawal {
    uint256 amountShares;
    address receiver;
}

enum VaultStatus {
    DepositsClosed,
    DepositsOpen,
    NotTraded,
    Traded,
    TradeExpired,
    PayoffCalculated,
    FeesCollected,
    WithdrawalQueueProcessed,
    Zombie
}

struct OptionBarrier {
    uint256 barrierBps;
    uint256 barrierAbsoluteValue;
    uint256 strikeBps;
    uint256 strikeAbsoluteValue;
    string asset;
    string oracleName;
    OptionBarrierType barrierType;
}

struct FCNVaultMetadata {
    uint256 vaultStart;
    uint256 tradeDate;
    uint256 tradeExpiry;
    uint256 aprBps;
    uint256 tenorInDays;
    uint256 underlyingAmount; // This is how many assets were ever deposited into the vault
    uint256 currentAssetAmount; // This is how many assets are currently allocated for the vault (not sent for trade)
    uint256 totalCouponPayoff;
    uint256 vaultFinalPayoff;
    uint256 queuedWithdrawalsSharesAmount;
    uint256 queuedWithdrawalsCount;
    uint256 optionBarriersCount;
    uint256 leverage;
    address vaultAddress;
    VaultStatus vaultStatus;
    bool isKnockedIn;
    OptionBarrier[] optionBarriers;
}

struct RoundData {
    int256 answer;
    uint256 startedAt;
    uint256 updatedAt;
    uint80 answeredInRound;
}

Settings
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 200,
    "details": {
      "yul": true
    }
  },
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_cegaState","type":"address"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"string","name":"_description","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"cegaState","type":"address"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"OracleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int256","name":"answer","type":"int256"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"},{"indexed":false,"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"name":"RoundDataAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint80","name":"roundId","type":"uint80"},{"indexed":false,"internalType":"int256","name":"answer","type":"int256"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"},{"indexed":false,"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"name":"RoundDataUpdated","type":"event"},{"inputs":[{"components":[{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"internalType":"struct RoundData","name":"_roundData","type":"tuple"}],"name":"addNextRoundData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cegaState","outputs":[{"internalType":"contract ICegaState","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextRoundId","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"oracleData","outputs":[{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"components":[{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"internalType":"struct RoundData","name":"_roundData","type":"tuple"}],"name":"updateRoundData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060408181526004918236101561001657600080fd5b600092833560e01c9182632f87045c146106fd57508163313ce567146106dd5781634002eda6146106b557816348c717af1461046c57816354fd4d501461044d5781637284e4161461030a5781639a6fc8f5146102a0578163aa4dea001461023a578163ebd0bb30146100c8575063feaf968c1461009357600080fd5b346100c457816003193601126100c4576100c0906100af61080d565b929593949190915195869586610775565b0390f35b5080fd5b919050346102365760a0366003190112610236576100e461075a565b6080366023190112610232576003548251632c9556a560e11b8152338582015290602090829060249082906001600160a01b03165afa9081156102285785916101fa575b50156101ce57610137816107a5565b9390936101bc5750602435918284556044358060018601556003606435958660028201550194608435916001600160501b038316938484036101b8577fce681dc19b73a559407cc81dcf28f71444f3d9d1c594f98cc28ced88903aa799976101b2956001600160501b03198254161790555195869586610775565b0390a180f35b8880fd5b634e487b7160e01b8552849052602484fd5b815162461bcd60e51b815260208185015260066024820152653430333a444160d01b6044820152606490fd5b61021b915060203d8111610221575b6102138183610722565b8101906107f5565b38610128565b503d610209565b83513d87823e3d90fd5b8380fd5b8280fd5b9050823461029d57602036600319011261029d578135915482101561029d5750610263906107a5565b508054600182015460028301546003909301549351918252602082015260408101919091526001600160501b039091166060820152608090f35b80fd5b82843461029d57602036600319011261029d57506102bc61075a565b6100c06102c8826107a5565b50549260016102d6846107a5565b50015460026102e4856107a5565b500154906001600160501b0360036102fb876107a5565b50015416925195869586610775565b82843461029d578060031936011261029d5781519080600180549081811c918181168015610443575b6020988985108214610430575091839189959388958652908160001461040f57506001146103b4575b505061036e9250959392950382610722565b82519382859384528251928382860152825b84811061039e57505050828201840152601f01601f19168101030190f35b8181018301518882018801528795508201610380565b8086527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69492508591905b8183106103f757508894505082010161036e8861035c565b855488840185015294850194879450918301916103df565b91505061036e94925060ff191682840152151560051b82010186928861035c565b634e487b7160e01b875260229052602486fd5b92607f1692610333565b5050346100c457816003193601126100c4576020906002549051908152f35b8383346100c45760803660031901126100c4576003548151633b9033c960e01b81523385820152602092916024919084908290849082906001600160a01b03165afa908115610228578591610698575b501561066e576001600160501b03918260055416610630575b6201517f1942019342851161061e5782358095116105f557508554680100000000000000008110156105e357806001610510920188556107a5565b9290926105d357863593848455856001850155600360443594856002820155019060643598818a1692838b036105cf576001600160501b0319938482541617905560055493828516918383146105be5750506001011691161760055551918252602082019290925260408101919091526001600160501b03929092166060830152907fe7ddf63c860421e83a9bedde9a44e9769a4e116a96f51ad2ecb8e0506bb4f1e69080608081016101b2565b634e487b7160e01b8b526011905289fd5b8980fd5b634e487b7160e01b865285875285fd5b634e487b7160e01b8652604187528286fd5b6064926005918893519362461bcd60e51b8552840152820152640d0c0c0e9560da1b6044820152fd5b634e487b7160e01b8652601187528286fd5b61063861080d565b5092505050823510156104d5576005606492858893519362461bcd60e51b85528401528201526403430303a560dc1b6044820152fd5b6006906064938693519362461bcd60e51b8552840152820152653430333a534160d01b6044820152fd5b6106af9150843d8611610221576102138183610722565b866104bc565b5050346100c457816003193601126100c4576020906001600160501b03600554169051908152f35b5050346100c457816003193601126100c45760ff60209254169051908152f35b8490346100c457816003193601126100c4576003546001600160a01b03168152602090f35b90601f8019910116810190811067ffffffffffffffff82111761074457604052565b634e487b7160e01b600052604160045260246000fd5b600435906001600160501b038216820361077057565b600080fd5b93608093969591929660a08601976001600160501b03809516875260208701526040860152606085015216910152565b6004548110156107df57600460005260021b7f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b634e487b7160e01b600052603260045260246000fd5b90816020910312610770575180151581036107705790565b6001600160501b03906000198260055416019180831161086857610830836107a5565b505492600161083e826107a5565b50015492600261084d836107a5565b50015492600361085c846107a5565b50015416919493929190565b634e487b7160e01b600052601160045260246000fdfea164736f6c6343000811000a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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