ETH Price: $1,907.99 (-5.97%)
Gas: 0.46 Gwei

Contract

0x11af58f13419fD3ce4d3A90372200c80Bc62f140
 

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

Please try again later

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 0x7D35cd22...664D5681d
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
RETHExchangeRateOracle

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 2 : RETHExchangeRateOracle.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;

import { IPriceSource } from "./interfaces/IPriceSource.sol";

interface IRocketPoolStakedEth {
    function getExchangeRate() external view returns (uint256);
}

/**
 *  @title RETHExchangeRateOracle
 *  @dev   Provides rETH / USD by multiplying the rETH exchange rate by ETH / USD.
 *         This provides a "non-market" price. Any depeg event will be ignored.
 */
contract RETHExchangeRateOracle {

    /// @notice RocketPool staked eth token contract.
    IRocketPoolStakedEth public immutable reth;

    /// @notice The price source for ETH / USD.
    IPriceSource public immutable ethSource;

    constructor(address _reth, address _ethSource) {
        // 8 decimals required as AaveOracle assumes this
        require(IPriceSource(_ethSource).decimals() == 8, "RETHExchangeRateOracle/invalid-decimals");
        
        reth      = IRocketPoolStakedEth(_reth);
        ethSource = IPriceSource(_ethSource);
    }

    function latestAnswer() external view returns (int256) {
        int256 ethUsd       = ethSource.latestAnswer();
        int256 exchangeRate = int256(reth.getExchangeRate());

        if (ethUsd <= 0 || exchangeRate <= 0) {
            return 0;
        }

        return exchangeRate * ethUsd / 1e18;
    }

    function decimals() external pure returns (uint8) {
        return 8;
    }

}

File 2 of 2 : IPriceSource.sol
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.0;

interface IPriceSource {
    function latestAnswer() external view returns (int256);
    function decimals() external view returns (uint8);
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc20-helpers/=lib/erc20-helpers/src/",
    "forge-std/=lib/forge-std/src/",
    "sparklend-v1-core/=lib/sparklend-v1-core/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "sparklend-address-registry/=lib/sparklend-address-registry/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_reth","type":"address"},{"internalType":"address","name":"_ethSource","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"ethSource","outputs":[{"internalType":"contract IPriceSource","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reth","outputs":[{"internalType":"contract IRocketPoolStakedEth","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063313ce5671461005157806350d25bcd146100655780635b7312a21461007b578063f5a991d7146100ba575b600080fd5b604051600881526020015b60405180910390f35b61006d6100e1565b60405190815260200161005c565b6100a27f00000000000000000000000069115a2826eb47fe9dfd1d5ca8d8642697c8b68a81565b6040516001600160a01b03909116815260200161005c565b6100a27f000000000000000000000000ae78736cd615f374d3085123a210448e74fc639381565b6000807f00000000000000000000000069115a2826eb47fe9dfd1d5ca8d8642697c8b68a6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610142573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101669190610231565b905060007f000000000000000000000000ae78736cd615f374d3085123a210448e74fc63936001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ec9190610231565b90506000821315806101ff575060008113155b1561020d5760009250505090565b670de0b6b3a76400006102208383610260565b61022a9190610296565b9250505090565b60006020828403121561024357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b80820260008212600160ff1b8414161561027c5761027c61024a565b81810583148215176102905761029061024a565b92915050565b6000826102b357634e487b7160e01b600052601260045260246000fd5b600160ff1b8214600019841416156102cd576102cd61024a565b50059056fea26469706673582212205dc9c77892614ed0148abc2bfdae4a500b9230a09e8a087c85e788d9431a13a664736f6c63430008140033

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
Loading...
Loading
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.