ETH Price: $2,739.64 (-7.19%)

Contract

0xC0f7311227684A400dD9b0D91979B8f21B9C3137

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
159329762025-05-08 5:15:35267 days ago1746681335  Contract Creation0 ETH

Cross-Chain Transactions
Loading...
Loading

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

Contract Name:
IRMLinearKink

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 20000 runs

Other Settings:
cancun EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity ^0.8.0;

import "./IIRM.sol";

/// @title IRMLinearKink
/// @custom:security-contact [email protected]
/// @author Euler Labs (https://www.eulerlabs.com/)
/// @notice Implementation of an interest rate model, where interest rate grows linearly with utilization, and spikes
/// after reaching kink
contract IRMLinearKink is IIRM {
    /// @notice Base interest rate applied when utilization is equal zero
    uint256 public immutable baseRate;
    /// @notice Slope of the function before the kink
    uint256 public immutable slope1;
    /// @notice Slope of the function after the kink
    uint256 public immutable slope2;
    /// @notice Utilization at which the slope of the interest rate function changes. In type(uint32).max scale.
    uint256 public immutable kink;

    constructor(uint256 baseRate_, uint256 slope1_, uint256 slope2_, uint32 kink_) {
        baseRate = baseRate_;
        slope1 = slope1_;
        slope2 = slope2_;
        kink = kink_;
    }

    /// @inheritdoc IIRM
    function computeInterestRate(address vault, uint256 cash, uint256 borrows)
        external
        view
        override
        returns (uint256)
    {
        if (msg.sender != vault) revert E_IRMUpdateUnauthorized();

        return computeInterestRateInternal(vault, cash, borrows);
    }

    /// @inheritdoc IIRM
    function computeInterestRateView(address vault, uint256 cash, uint256 borrows)
        external
        view
        override
        returns (uint256)
    {
        return computeInterestRateInternal(vault, cash, borrows);
    }

    function computeInterestRateInternal(address, uint256 cash, uint256 borrows) internal view returns (uint256) {
        uint256 totalAssets = cash + borrows;

        uint32 utilization = totalAssets == 0
            ? 0 // empty pool arbitrarily given utilization of 0
            : uint32(borrows * type(uint32).max / totalAssets);

        uint256 ir = baseRate;

        if (utilization <= kink) {
            ir += utilization * slope1;
        } else {
            ir += kink * slope1;

            uint256 utilizationOverKink;
            unchecked {
                utilizationOverKink = utilization - kink;
            }
            ir += slope2 * utilizationOverKink;
        }

        return ir;
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later

pragma solidity >=0.8.0;

/// @title IIRM
/// @custom:security-contact [email protected]
/// @author Euler Labs (https://www.eulerlabs.com/)
/// @notice Interface of the interest rate model contracts used by EVault
interface IIRM {
    error E_IRMUpdateUnauthorized();

    /// @notice Perform potentially state mutating computation of the new interest rate
    /// @param vault Address of the vault to compute the new interest rate for
    /// @param cash Amount of assets held directly by the vault
    /// @param borrows Amount of assets lent out to borrowers by the vault
    /// @return Then new interest rate in second percent yield (SPY), scaled by 1e27
    function computeInterestRate(address vault, uint256 cash, uint256 borrows) external returns (uint256);

    /// @notice Perform computation of the new interest rate without mutating state
    /// @param vault Address of the vault to compute the new interest rate for
    /// @param cash Amount of assets held directly by the vault
    /// @param borrows Amount of assets lent out to borrowers by the vault
    /// @return Then new interest rate in second percent yield (SPY), scaled by 1e27
    function computeInterestRateView(address vault, uint256 cash, uint256 borrows) external view returns (uint256);
}

Settings
{
  "remappings": [
    "lib/euler-price-oracle:@openzeppelin/contracts/=lib/euler-price-oracle/lib/openzeppelin-contracts/contracts/",
    "lib/euler-earn:@openzeppelin/=lib/euler-earn/lib/openzeppelin-contracts/",
    "lib/euler-earn:@openzeppelin-upgradeable/=lib/euler-earn/lib/openzeppelin-contracts-upgradeable/contracts/",
    "lib/euler-earn:ethereum-vault-connector/=lib/euler-earn/lib/ethereum-vault-connector/src/",
    "lib/layerzero-devtools/packages/oft-evm/contracts:@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts/contracts/",
    "lib/layerzero-devtools/packages/oft-evm-upgradeable/contracts:@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "lib/layerzero-devtools/packages/oapp-evm-upgradeable/contracts:@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@layerzerolabs/oft-evm/=lib/layerzero-devtools/packages/oft-evm/",
    "@layerzerolabs/oapp-evm/=lib/layerzero-devtools/packages/oapp-evm/",
    "@layerzerolabs/oapp-evm-upgradeable/=lib/layerzero-devtools/packages/oapp-evm-upgradeable/",
    "@layerzerolabs/lz-evm-protocol-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/protocol/",
    "@layerzerolabs/lz-evm-messagelib-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/messagelib/",
    "@layerzerolabs/lz-evm-oapp-v2/=lib/layerzero-v2/packages/layerzero-v2/evm/oapp/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "ethereum-vault-connector/=lib/ethereum-vault-connector/src/",
    "evc/=lib/ethereum-vault-connector/src/",
    "evk/=lib/euler-vault-kit/src/",
    "evk-test/=lib/euler-vault-kit/test/",
    "euler-price-oracle/=lib/euler-price-oracle/src/",
    "euler-price-oracle-test/=lib/euler-price-oracle/test/",
    "fee-flow/=lib/fee-flow/src/",
    "reward-streams/=lib/reward-streams/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "euler-earn/=lib/euler-earn/src/",
    "layerzero/oft-evm/=lib/layerzero-devtools/packages/oft-evm/contracts/",
    "layerzero/oft-evm-upgradeable/=lib/layerzero-devtools/packages/oft-evm-upgradeable/contracts/",
    "solidity-bytes-utils/=lib/solidity-bytes-utils/",
    "@openzeppelin-upgradeable/=lib/euler-earn/lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@pendle/core-v2/=lib/euler-price-oracle/lib/pendle-core-v2-public/contracts/",
    "@pyth/=lib/euler-price-oracle/lib/pyth-sdk-solidity/",
    "@redstone/evm-connector/=lib/euler-price-oracle/lib/redstone-oracles-monorepo/packages/evm-connector/contracts/",
    "@solady/=lib/euler-price-oracle/lib/solady/src/",
    "@uniswap/v3-core/=lib/euler-price-oracle/lib/v3-core/",
    "@uniswap/v3-periphery/=lib/euler-price-oracle/lib/v3-periphery/",
    "ERC4626/=lib/euler-earn/lib/properties/lib/ERC4626/contracts/",
    "crytic-properties/=lib/euler-earn/lib/properties/contracts/",
    "ds-test/=lib/ethereum-vault-connector/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "euler-vault-kit/=lib/euler-vault-kit/",
    "forge-gas-snapshot/=lib/euler-vault-kit/lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
    "layerzero-devtools/=lib/layerzero-devtools/packages/toolbox-foundry/src/",
    "layerzero-v2/=lib/layerzero-v2/",
    "openzeppelin/=lib/ethereum-vault-connector/lib/openzeppelin-contracts/contracts/",
    "pendle-core-v2-public/=lib/euler-price-oracle/lib/pendle-core-v2-public/contracts/",
    "permit2/=lib/euler-vault-kit/lib/permit2/",
    "properties/=lib/euler-earn/lib/properties/contracts/",
    "pyth-sdk-solidity/=lib/euler-price-oracle/lib/pyth-sdk-solidity/",
    "redstone-oracles-monorepo/=lib/euler-price-oracle/lib/",
    "solady/=lib/euler-price-oracle/lib/solady/src/",
    "solmate/=lib/fee-flow/lib/solmate/src/",
    "v3-core/=lib/euler-price-oracle/lib/v3-core/contracts/",
    "v3-periphery/=lib/euler-price-oracle/lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"baseRate_","type":"uint256"},{"internalType":"uint256","name":"slope1_","type":"uint256"},{"internalType":"uint256","name":"slope2_","type":"uint256"},{"internalType":"uint32","name":"kink_","type":"uint32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"E_IRMUpdateUnauthorized","type":"error"},{"inputs":[],"name":"baseRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"cash","type":"uint256"},{"internalType":"uint256","name":"borrows","type":"uint256"}],"name":"computeInterestRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"cash","type":"uint256"},{"internalType":"uint256","name":"borrows","type":"uint256"}],"name":"computeInterestRateView","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kink","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slope1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slope2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

0x610100604052348015610010575f80fd5b5060405161054138038061054183398101604081905261002f9161004c565b60809390935260a09190915260c05263ffffffff1660e052610092565b5f805f806080858703121561005f575f80fd5b845193506020850151925060408501519150606085015163ffffffff81168114610087575f80fd5b939692955090935050565b60805160a05160c05160e05161044e6100f35f395f81816101250152818161020c0152818161029e01526102d001525f818160fe01526102fd01525f818160c40152818161023c015261027d01525f8181607801526101eb015261044e5ff3fe608060405234801561000f575f80fd5b506004361061006f575f3560e01c8063bca02c131161004d578063bca02c13146100e6578063d0134cb7146100f9578063fd2da33914610120575f80fd5b80631f68f20a146100735780632e34c872146100ac578063a62b75a8146100bf575b5f80fd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200160405180910390f35b61009a6100ba366004610339565b610147565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61009a6100f4366004610339565b61015b565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b5f6101538484846101b2565b949350505050565b5f3373ffffffffffffffffffffffffffffffffffffffff8516146101ab576040517f35a4399400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101538484845b5f806101be83856103b0565b90505f81156101e557816101d663ffffffff866103c9565b6101e091906103e0565b6101e7565b5f5b90507f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000063ffffffff831611610278576102677f000000000000000000000000000000000000000000000000000000000000000063ffffffff84166103c9565b61027190826103b0565b905061032f565b6102c27f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006103c9565b6102cc90826103b0565b90507f000000000000000000000000000000000000000000000000000000000000000063ffffffff831603610321817f00000000000000000000000000000000000000000000000000000000000000006103c9565b61032b90836103b0565b9150505b9695505050505050565b5f805f6060848603121561034b575f80fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461036e575f80fd5b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156103c3576103c3610383565b92915050565b80820281158282048414176103c3576103c3610383565b5f82610413577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212204ce72d68cd9590d6dfe208e07805d344c7aa9cfa04bab9eb060482ef35b1504c64736f6c634300081800330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ad20ec600000000000000000000000000000000000000000000000000000004a12bdd4400000000000000000000000000000000000000000000000000000000cccccccc

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061006f575f3560e01c8063bca02c131161004d578063bca02c13146100e6578063d0134cb7146100f9578063fd2da33914610120575f80fd5b80631f68f20a146100735780632e34c872146100ac578063a62b75a8146100bf575b5f80fd5b61009a7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200160405180910390f35b61009a6100ba366004610339565b610147565b61009a7f000000000000000000000000000000000000000000000000000000001ad20ec681565b61009a6100f4366004610339565b61015b565b61009a7f00000000000000000000000000000000000000000000000000000004a12bdd4481565b61009a7f00000000000000000000000000000000000000000000000000000000cccccccc81565b5f6101538484846101b2565b949350505050565b5f3373ffffffffffffffffffffffffffffffffffffffff8516146101ab576040517f35a4399400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101538484845b5f806101be83856103b0565b90505f81156101e557816101d663ffffffff866103c9565b6101e091906103e0565b6101e7565b5f5b90507f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000cccccccc63ffffffff831611610278576102677f000000000000000000000000000000000000000000000000000000001ad20ec663ffffffff84166103c9565b61027190826103b0565b905061032f565b6102c27f000000000000000000000000000000000000000000000000000000001ad20ec67f00000000000000000000000000000000000000000000000000000000cccccccc6103c9565b6102cc90826103b0565b90507f00000000000000000000000000000000000000000000000000000000cccccccc63ffffffff831603610321817f00000000000000000000000000000000000000000000000000000004a12bdd446103c9565b61032b90836103b0565b9150505b9695505050505050565b5f805f6060848603121561034b575f80fd5b833573ffffffffffffffffffffffffffffffffffffffff8116811461036e575f80fd5b95602085013595506040909401359392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808201808211156103c3576103c3610383565b92915050565b80820281158282048414176103c3576103c3610383565b5f82610413577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b50049056fea26469706673582212204ce72d68cd9590d6dfe208e07805d344c7aa9cfa04bab9eb060482ef35b1504c64736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.