ETH Price: $3,667.78 (-1.62%)

Contract

0x2705472fBEBf0F7F1b15B3d74f9AEf40F5C0ea5b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Next Round D...213152952024-12-02 14:03:232 hrs ago1733148203IN
0x2705472f...0F5C0ea5b
0 ETH0.0026091221.7072148
Add Next Round D...213081332024-12-01 14:03:2326 hrs ago1733061803IN
0x2705472f...0F5C0ea5b
0 ETH0.0017246714.34886391
Add Next Round D...213009642024-11-30 14:03:232 days ago1732975403IN
0x2705472f...0F5C0ea5b
0 ETH0.00180415.0088425
Add Next Round D...212938212024-11-29 14:03:233 days ago1732889003IN
0x2705472f...0F5C0ea5b
0 ETH0.0020089916.71435069
Add Next Round D...212866692024-11-28 14:03:234 days ago1732802603IN
0x2705472f...0F5C0ea5b
0 ETH0.0014438512.01249274
Add Next Round D...212795642024-11-27 14:03:355 days ago1732716215IN
0x2705472f...0F5C0ea5b
0 ETH0.0019710716.39881471
Add Next Round D...212723942024-11-26 14:03:236 days ago1732629803IN
0x2705472f...0F5C0ea5b
0 ETH0.001757914.62533471
Add Next Round D...212652472024-11-25 14:03:477 days ago1732543427IN
0x2705472f...0F5C0ea5b
0 ETH0.0018700815.55866498
Add Next Round D...212580762024-11-24 14:03:238 days ago1732457003IN
0x2705472f...0F5C0ea5b
0 ETH0.001053768.76705429
Add Next Round D...212509152024-11-23 14:03:239 days ago1732370603IN
0x2705472f...0F5C0ea5b
0 ETH0.0020177716.78739497
Add Next Round D...212437442024-11-22 14:03:3510 days ago1732284215IN
0x2705472f...0F5C0ea5b
0 ETH0.0019630316.33192257
Add Next Round D...212365792024-11-21 14:03:2311 days ago1732197803IN
0x2705472f...0F5C0ea5b
0 ETH0.0040149533.40338617
Add Next Round D...212294232024-11-20 14:03:2312 days ago1732111403IN
0x2705472f...0F5C0ea5b
0 ETH0.00181715.11704974
Add Next Round D...212222522024-11-19 14:03:2313 days ago1732025003IN
0x2705472f...0F5C0ea5b
0 ETH0.0025470721.19101363
Add Next Round D...212150782024-11-18 14:03:2314 days ago1731938603IN
0x2705472f...0F5C0ea5b
0 ETH0.0017846814.84961012
Add Next Round D...212079002024-11-17 14:03:2315 days ago1731852203IN
0x2705472f...0F5C0ea5b
0 ETH0.001150519.57194939
Add Next Round D...212007312024-11-16 14:03:2316 days ago1731765803IN
0x2705472f...0F5C0ea5b
0 ETH0.0016407713.65080084
Add Next Round D...211935642024-11-15 14:03:2317 days ago1731679403IN
0x2705472f...0F5C0ea5b
0 ETH0.0040520333.71186364
Add Next Round D...211864062024-11-14 14:03:2318 days ago1731593003IN
0x2705472f...0F5C0ea5b
0 ETH0.0039924333.21600704
Add Next Round D...211792442024-11-13 14:03:1119 days ago1731506591IN
0x2705472f...0F5C0ea5b
0 ETH0.0083474369.44855301
Add Next Round D...211720762024-11-12 14:03:2320 days ago1731420203IN
0x2705472f...0F5C0ea5b
0 ETH0.0039393832.77471503
Add Next Round D...211649142024-11-11 14:03:2321 days ago1731333803IN
0x2705472f...0F5C0ea5b
0 ETH0.0019403816.14348028
Add Next Round D...211577422024-11-10 14:03:2322 days ago1731247403IN
0x2705472f...0F5C0ea5b
0 ETH0.0015508612.90280104
Add Next Round D...211505702024-11-09 14:03:2323 days ago1731161003IN
0x2705472f...0F5C0ea5b
0 ETH0.0017231714.33776821
Add Next Round D...211433942024-11-08 14:03:2324 days ago1731074603IN
0x2705472f...0F5C0ea5b
0 ETH0.0022468718.69343641
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.