ETH Price: $2,741.50 (-0.02%)

Contract

0x0266445Ea652F8467cbaA344Fcf531FF8f3d6462
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Internal Transactions found.

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218880902025-02-20 14:13:2313 hrs ago1740060803
0x0266445E...F8f3d6462
0 ETH
218787532025-02-19 6:54:4745 hrs ago1739948087
0x0266445E...F8f3d6462
0 ETH
218787532025-02-19 6:54:4745 hrs ago1739948087
0x0266445E...F8f3d6462
0 ETH
218787532025-02-19 6:54:4745 hrs ago1739948087
0x0266445E...F8f3d6462
0 ETH
218787532025-02-19 6:54:4745 hrs ago1739948087
0x0266445E...F8f3d6462
0 ETH
218772852025-02-19 1:58:232 days ago1739930303
0x0266445E...F8f3d6462
0 ETH
218772852025-02-19 1:58:232 days ago1739930303
0x0266445E...F8f3d6462
0 ETH
218772852025-02-19 1:58:232 days ago1739930303
0x0266445E...F8f3d6462
0 ETH
218772852025-02-19 1:58:232 days ago1739930303
0x0266445E...F8f3d6462
0 ETH
218750332025-02-18 18:24:472 days ago1739903087
0x0266445E...F8f3d6462
0 ETH
218750332025-02-18 18:24:472 days ago1739903087
0x0266445E...F8f3d6462
0 ETH
218750332025-02-18 18:24:472 days ago1739903087
0x0266445E...F8f3d6462
0 ETH
218750332025-02-18 18:24:472 days ago1739903087
0x0266445E...F8f3d6462
0 ETH
218749482025-02-18 18:07:352 days ago1739902055
0x0266445E...F8f3d6462
0 ETH
218749482025-02-18 18:07:352 days ago1739902055
0x0266445E...F8f3d6462
0 ETH
218749482025-02-18 18:07:352 days ago1739902055
0x0266445E...F8f3d6462
0 ETH
218749482025-02-18 18:07:352 days ago1739902055
0x0266445E...F8f3d6462
0 ETH
218749182025-02-18 18:01:352 days ago1739901695
0x0266445E...F8f3d6462
0 ETH
218749182025-02-18 18:01:352 days ago1739901695
0x0266445E...F8f3d6462
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ConvexCurvePriceFeed

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : ConvexCurvePriceFeed.sol
pragma solidity ^0.8.13;

interface IChainlinkFeed {
    function decimals() external view returns (uint8 decimals);
    function latestRoundData() external view returns (uint80 roundId, int256 crvUsdPrice, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

interface ICurvePool {
    function price_oracle() external view returns (uint256);
    function last_price() external view returns (uint256);
}

contract ConvexCurvePriceFeed is IChainlinkFeed {
    
    IChainlinkFeed public crvToUsd = IChainlinkFeed(0xCd627aA160A6fA45Eb793D19Ef54f5062F20f33f);
    ICurvePool public cvxCrvCrvPool = ICurvePool(0x971add32Ea87f10bD192671630be3BE8A11b8623);
    address public gov = 0x926dF14a23BE491164dCF93f4c468A50ef659D5B;
    address public guardian = 0xE3eD95e130ad9E15643f5A5f232a3daE980784cd;
    uint public minCrvPerCvxCrvRatio = 10**18 / 2;

    event NewMinCrvPerCvxCrvRatio(uint newMinRatio);

    function decimals() external view returns (uint8){
        return 18;
    }

    /**
     * @notice Retrieves the latest round data for the CvxCrv token price feed
     * @dev This function calculates the CvxCrv price in USD by combining the CRV to USD price from a Chainlink oracle and the CvxCrv to CRV ratio from a Curve pool
     * @return roundId The round ID of the Chainlink price feed for CRV to USD
     * @return cvxCrvUsdPrice The latest CvxCrv price in USD
     * @return startedAt The timestamp when the latest round of Chainlink price feed started
     * @return updatedAt The timestamp when the latest round of Chainlink price feed was updated
     * @return answeredInRound The round ID in which the answer was computed
     */
    function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80){
        (uint80 roundId,int256 crvUsdPrice,uint startedAt,uint updatedAt,uint80 answeredInRound) = crvToUsd.latestRoundData();
        uint crvPerCvxCrv = cvxCrvCrvPool.price_oracle();
        if(crvPerCvxCrv > 10 ** 18){
            //1 CRV can always be traded for 1 CvxCrv, so price for CvxCrv should never be higher than the price of CRV
            crvPerCvxCrv = 10**18;
        } else if (minCrvPerCvxCrvRatio > crvPerCvxCrv) {
            //If price of cvxCrv falls below a certain ratio, we assume something might have gone wrong with the EMA oracle
            //NOTE: This ratio floor is only meant as an intermediate protection, and should be removed as the EMA oracle gains lindy
            crvPerCvxCrv = minCrvPerCvxCrvRatio;
        }
        
        //Divide by 10**8 as crvUsdPrice is 8 decimals
        int256 cvxCrvUsdPrice = crvUsdPrice * int256(crvPerCvxCrv) / 10**8;
        return (roundId, cvxCrvUsdPrice, startedAt, updatedAt, answeredInRound);
    }

    /**
     * @notice Sets a new minimum CRV per CvxCrv ratio
     * @dev Can only be called by the gov or guardian addresses
     * @param newMinRatio The new minimum CRV per CvxCrv ratio
     */
    function setMinCrvPerCvxCrvRatio(uint newMinRatio) external {
        require(msg.sender == gov || msg.sender == guardian, "ONLY GOV OR GUARDIAN");
        require(newMinRatio <= 10**18, "RATIO CAN'T EXCEED 1");
        minCrvPerCvxCrvRatio = newMinRatio;
        emit NewMinCrvPerCvxCrvRatio(newMinRatio);
    }

    /**
     * @notice Sets a new guardian address
     * @dev Can only be called by the gov address
     * @param newGuardian The new guardian address
     */
    function setGuardian(address newGuardian) external {
        require(msg.sender == gov, "ONLY GOV");
        guardian = newGuardian;
    }

    /**
     * @notice Sets a new gov address
     * @dev Can only be called by the current gov address
     * @param newGov The new gov address
     */
    function setGov(address newGov) external {
        require(msg.sender == gov, "ONLY GOV");
        gov = newGov;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMinRatio","type":"uint256"}],"name":"NewMinCrvPerCvxCrvRatio","type":"event"},{"inputs":[],"name":"crvToUsd","outputs":[{"internalType":"contract IChainlinkFeed","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cvxCrvCrvPool","outputs":[{"internalType":"contract ICurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"","type":"uint80"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minCrvPerCvxCrvRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newGov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGuardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMinRatio","type":"uint256"}],"name":"setMinCrvPerCvxCrvRatio","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600080546001600160a01b031990811673cd627aa160a6fa45eb793d19ef54f5062f20f33f1790915560018054821673971add32ea87f10bd192671630be3be8a11b862317905560028054821673926df14a23be491164dcf93f4c468a50ef659d5b1790556003805490911673e3ed95e130ad9e15643f5a5f232a3dae980784cd1790556706f05b59d3b200006004553480156100a057600080fd5b506106b4806100b06000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638a0dac4a116100665780638a0dac4a1461011f5780639944a66e14610134578063ce00aa8b14610147578063cfad57a21461015a578063feaf968c1461016d57600080fd5b80630316fae4146100a357806312d43a51146100bf578063313ce567146100ea5780633e04495f146100f9578063452a93201461010c575b600080fd5b6100ac60045481565b6040519081526020015b60405180910390f35b6002546100d2906001600160a01b031681565b6040516001600160a01b0390911681526020016100b6565b604051601281526020016100b6565b6000546100d2906001600160a01b031681565b6003546100d2906001600160a01b031681565b61013261012d3660046104d6565b6101ac565b005b6001546100d2906001600160a01b031681565b610132610155366004610506565b610218565b6101326101683660046104d6565b610308565b61017561036f565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100b6565b6002546001600160a01b031633146101f65760405162461bcd60e51b815260206004820152600860248201526727a7262c9023a7ab60c11b60448201526064015b60405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633148061023b57506003546001600160a01b031633145b61027e5760405162461bcd60e51b815260206004820152601460248201527327a7262c9023a7ab1027a91023aaa0a92224a0a760611b60448201526064016101ed565b670de0b6b3a76400008111156102cd5760405162461bcd60e51b8152602060048201526014602482015273524154494f2043414e275420455843454544203160601b60448201526064016101ed565b60048190556040518181527fd62f7c4374a098774aaec73b2c8e46df5a1bd9aeb067fb91d8c988e8c8d062509060200160405180910390a150565b6002546001600160a01b0316331461034d5760405162461bcd60e51b815260206004820152600860248201526727a7262c9023a7ab60c11b60448201526064016101ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060008060008060008060008054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f3919061053e565b945094509450945094506000600160009054906101000a90046001600160a01b03166001600160a01b03166386fc88d36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610452573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610476919061058e565b9050670de0b6b3a76400008111156104975750670de0b6b3a76400006104a6565b8060045411156104a657506004545b60006305f5e1006104b783886105bd565b6104c19190610642565b969c969b509399509197509550929350505050565b6000602082840312156104e857600080fd5b81356001600160a01b03811681146104ff57600080fd5b9392505050565b60006020828403121561051857600080fd5b5035919050565b805169ffffffffffffffffffff8116811461053957600080fd5b919050565b600080600080600060a0868803121561055657600080fd5b61055f8661051f565b94506020860151935060408601519250606086015191506105826080870161051f565b90509295509295909350565b6000602082840312156105a057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160ff1b03818413828413808216868404861116156105e3576105e36105a7565b600160ff1b6000871282811687830589121615610602576106026105a7565b6000871292508782058712848416161561061e5761061e6105a7565b87850587128184161615610634576106346105a7565b505050929093029392505050565b60008261065f57634e487b7160e01b600052601260045260246000fd5b600160ff1b821460001984141615610679576106796105a7565b50059056fea264697066735822122085842e1a25a8bdad19c6aee365ce0a8e118689ec38c759de85a13c507ae6771964736f6c634300080d0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c80638a0dac4a116100665780638a0dac4a1461011f5780639944a66e14610134578063ce00aa8b14610147578063cfad57a21461015a578063feaf968c1461016d57600080fd5b80630316fae4146100a357806312d43a51146100bf578063313ce567146100ea5780633e04495f146100f9578063452a93201461010c575b600080fd5b6100ac60045481565b6040519081526020015b60405180910390f35b6002546100d2906001600160a01b031681565b6040516001600160a01b0390911681526020016100b6565b604051601281526020016100b6565b6000546100d2906001600160a01b031681565b6003546100d2906001600160a01b031681565b61013261012d3660046104d6565b6101ac565b005b6001546100d2906001600160a01b031681565b610132610155366004610506565b610218565b6101326101683660046104d6565b610308565b61017561036f565b6040805169ffffffffffffffffffff968716815260208101959095528401929092526060830152909116608082015260a0016100b6565b6002546001600160a01b031633146101f65760405162461bcd60e51b815260206004820152600860248201526727a7262c9023a7ab60c11b60448201526064015b60405180910390fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633148061023b57506003546001600160a01b031633145b61027e5760405162461bcd60e51b815260206004820152601460248201527327a7262c9023a7ab1027a91023aaa0a92224a0a760611b60448201526064016101ed565b670de0b6b3a76400008111156102cd5760405162461bcd60e51b8152602060048201526014602482015273524154494f2043414e275420455843454544203160601b60448201526064016101ed565b60048190556040518181527fd62f7c4374a098774aaec73b2c8e46df5a1bd9aeb067fb91d8c988e8c8d062509060200160405180910390a150565b6002546001600160a01b0316331461034d5760405162461bcd60e51b815260206004820152600860248201526727a7262c9023a7ab60c11b60448201526064016101ed565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008060008060008060008060008060008054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f3919061053e565b945094509450945094506000600160009054906101000a90046001600160a01b03166001600160a01b03166386fc88d36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610452573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610476919061058e565b9050670de0b6b3a76400008111156104975750670de0b6b3a76400006104a6565b8060045411156104a657506004545b60006305f5e1006104b783886105bd565b6104c19190610642565b969c969b509399509197509550929350505050565b6000602082840312156104e857600080fd5b81356001600160a01b03811681146104ff57600080fd5b9392505050565b60006020828403121561051857600080fd5b5035919050565b805169ffffffffffffffffffff8116811461053957600080fd5b919050565b600080600080600060a0868803121561055657600080fd5b61055f8661051f565b94506020860151935060408601519250606086015191506105826080870161051f565b90509295509295909350565b6000602082840312156105a057600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60006001600160ff1b03818413828413808216868404861116156105e3576105e36105a7565b600160ff1b6000871282811687830589121615610602576106026105a7565b6000871292508782058712848416161561061e5761061e6105a7565b87850587128184161615610634576106346105a7565b505050929093029392505050565b60008261065f57634e487b7160e01b600052601260045260246000fd5b600160ff1b821460001984141615610679576106796105a7565b50059056fea264697066735822122085842e1a25a8bdad19c6aee365ce0a8e118689ec38c759de85a13c507ae6771964736f6c634300080d0033

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

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.