Goerli Testnet

Contract

0x9ee101eB4941d8D7A665fe71449360CEF3C8Bb87
Source Code

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
0x61012034100381342023-11-13 19:58:48107 days 9 hrs ago1699905528IN
 Create: SpeedJumpIrm
0 ETH0.001669233.00000001

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
104363492024-01-26 10:54:0033 days 18 hrs ago1706266440
0x9ee101...F3C8Bb87
0 ETH
104363412024-01-26 10:51:4833 days 18 hrs ago1706266308
0x9ee101...F3C8Bb87
0 ETH
104363382024-01-26 10:50:4833 days 19 hrs ago1706266248
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
104301652024-01-25 7:08:0034 days 22 hrs ago1706166480
0x9ee101...F3C8Bb87
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SpeedJumpIrm

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : SpeedJumpIrm.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import {IIrm} from "../lib/morpho-blue/src/interfaces/IIrm.sol";

import {MathLib} from "./libraries/MathLib.sol";
import {UtilsLib} from "./libraries/UtilsLib.sol";
import {ErrorsLib} from "./libraries/ErrorsLib.sol";
import {MarketParamsLib} from "../lib/morpho-blue/src/libraries/MarketParamsLib.sol";
import {Id, MarketParams, Market} from "../lib/morpho-blue/src/interfaces/IMorpho.sol";
import {WAD, MathLib as MorphoMathLib} from "../lib/morpho-blue/src/libraries/MathLib.sol";

struct MarketIrm {
    // Previous final borrow rate. Scaled by WAD.
    uint128 prevBorrowRate;
    // Previous error. Scaled by WAD.
    int128 prevErr;
}

/// @title SpeedJumpIrm
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Interest rate model.
contract SpeedJumpIrm is IIrm {
    using MathLib for int256;
    using MathLib for uint256;
    using UtilsLib for uint256;
    using MorphoMathLib for uint128;
    using MorphoMathLib for uint256;
    using MarketParamsLib for MarketParams;

    /* EVENTS */

    /// @notice Emitted when a borrow rate is updated.
    event BorrowRateUpdate(Id indexed id, int128 err, uint128 newBorrowRate, uint256 avgBorrowRate);

    /* CONSTANTS */

    /// @notice Maximum rate per second (scaled by WAD) (1B% APR).
    uint256 public constant MAX_RATE = uint256(1e7 ether) / 365 days;
    /// @notice Mininimum rate per second (scaled by WAD) (0.1% APR).
    uint256 public constant MIN_RATE = uint256(0.001 ether) / 365 days;
    /// @notice Address of Morpho.
    address public immutable MORPHO;
    /// @notice Ln of the jump factor (scaled by WAD).
    uint256 public immutable LN_JUMP_FACTOR;
    /// @notice Speed factor (scaled by WAD).
    /// @dev The speed is per second, so the rate moves at a speed of SPEED_FACTOR * err each second (while being
    /// continuously compounded). A typical value for the SPEED_FACTOR would be 10 ethers / 365 days.
    uint256 public immutable SPEED_FACTOR;
    /// @notice Target utilization (scaled by WAD).
    uint256 public immutable TARGET_UTILIZATION;
    /// @notice Initial rate (scaled by WAD).
    uint128 public immutable INITIAL_RATE;

    /* STORAGE */

    /// @notice IRM storage for each market.
    mapping(Id => MarketIrm) public marketIrm;

    /* CONSTRUCTOR */

    /// @notice Constructor.
    /// @param morpho The address of Morpho.
    /// @param lnJumpFactor The log of the jump factor (scaled by WAD).
    /// @param speedFactor The speed factor (scaled by WAD).
    /// @param targetUtilization The target utilization (scaled by WAD). Should be strictly between 0 and 1.
    /// @param initialRate The initial rate (scaled by WAD).
    constructor(
        address morpho,
        uint256 lnJumpFactor,
        uint256 speedFactor,
        uint256 targetUtilization,
        uint128 initialRate
    ) {
        require(lnJumpFactor <= uint256(type(int256).max), ErrorsLib.INPUT_TOO_LARGE);
        require(speedFactor <= uint256(type(int256).max), ErrorsLib.INPUT_TOO_LARGE);
        require(targetUtilization < WAD, ErrorsLib.INPUT_TOO_LARGE);
        require(targetUtilization > 0, ErrorsLib.ZERO_INPUT);

        MORPHO = morpho;
        LN_JUMP_FACTOR = lnJumpFactor;
        SPEED_FACTOR = speedFactor;
        TARGET_UTILIZATION = targetUtilization;
        INITIAL_RATE = initialRate;
    }

    /* BORROW RATES */

    /// @inheritdoc IIrm
    function borrowRateView(MarketParams memory marketParams, Market memory market) external view returns (uint256) {
        (,, uint256 avgBorrowRate) = _borrowRate(marketParams.id(), market);
        return avgBorrowRate;
    }

    /// @inheritdoc IIrm
    function borrowRate(MarketParams memory marketParams, Market memory market) external returns (uint256) {
        require(msg.sender == MORPHO, ErrorsLib.NOT_MORPHO);

        Id id = marketParams.id();

        (int128 err, uint128 newBorrowRate, uint256 avgBorrowRate) = _borrowRate(id, market);

        marketIrm[id].prevErr = err;
        marketIrm[id].prevBorrowRate = newBorrowRate;

        emit BorrowRateUpdate(id, err, newBorrowRate, avgBorrowRate);

        return avgBorrowRate;
    }

    /// @dev Returns err, newBorrowRate and avgBorrowRate.
    function _borrowRate(Id id, Market memory market) private view returns (int128, uint128, uint128) {
        uint256 utilization =
            market.totalSupplyAssets > 0 ? market.totalBorrowAssets.wDivDown(market.totalSupplyAssets) : 0;

        uint256 errNormFactor = utilization > TARGET_UTILIZATION ? WAD - TARGET_UTILIZATION : TARGET_UTILIZATION;
        // Safe "unchecked" int128 cast because |err| <= WAD.
        // Safe "unchecked" int256 casts because utilization <= WAD, TARGET_UTILIZATION < WAD and errNormFactor <= WAD.
        int128 err = int128((int256(utilization) - int256(TARGET_UTILIZATION)).wDivDown(int256(errNormFactor)));

        MarketIrm storage irm = marketIrm[id];
        if (irm.prevBorrowRate == 0) return (err, INITIAL_RATE, INITIAL_RATE);

        // errDelta = err - prevErr.
        // errDelta is between -1 and 1, scaled by WAD.
        int256 errDelta = err - irm.prevErr;

        // Safe "unchecked" cast because LN_JUMP_FACTOR <= type(int256).max.
        uint256 jumpMultiplier = MathLib.wExp(errDelta.wMulDown(int256(LN_JUMP_FACTOR)));
        // Safe "unchecked" cast because SPEED_FACTOR <= type(int256).max.
        int256 speed = int256(SPEED_FACTOR).wMulDown(err);
        uint256 elapsed = block.timestamp - market.lastUpdate;
        // Safe "unchecked" cast because elapsed <= block.timestamp.
        int256 linearVariation = speed * int256(elapsed);
        uint256 variationMultiplier = MathLib.wExp(linearVariation);

        // newBorrowRate = prevBorrowRate * jumpMultiplier * variationMultiplier.
        uint256 borrowRateAfterJump = irm.prevBorrowRate.wMulDown(jumpMultiplier);
        uint256 newBorrowRate = borrowRateAfterJump.wMulDown(variationMultiplier);

        // Then we compute the average rate over the period (this is what Morpho needs to accrue the interest).
        // avgBorrowRate = 1 / elapsed * ∫ borrowRateAfterJump * exp(speed * t) dt between 0 and elapsed
        //               = borrowRateAfterJump * (exp(linearVariation) - 1) / linearVariation
        //               = (newBorrowRate - borrowRateAfterJump) / linearVariation
        // And avgBorrowRate ~ borrowRateAfterJump for linearVariation around zero.
        uint256 avgBorrowRate;
        if (linearVariation == 0) avgBorrowRate = borrowRateAfterJump;
        // Safe "unchecked" cast to uint256 because linearVariation < 0 <=> newBorrowRate <= borrowRateAfterJump.
        else avgBorrowRate = uint256((int256(newBorrowRate) - int256(borrowRateAfterJump)).wDivDown(linearVariation));

        // We bound both newBorrowRate and avgBorrowRate between MIN_RATE and MAX_RATE.
        return (err, uint128(newBorrowRate.bound(MIN_RATE, MAX_RATE)), uint128(avgBorrowRate.bound(MIN_RATE, MAX_RATE)));
    }
}

File 2 of 8 : IIrm.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import {MarketParams, Market} from "./IMorpho.sol";

/// @title IIrm
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Interface that Interest Rate Models (IRMs) used by Morpho must implement.
interface IIrm {
    /// @notice Returns the borrow rate of the market `marketParams`.
    /// @param marketParams The MarketParams struct of the market.
    /// @param market The Market struct of the market.
    function borrowRate(MarketParams memory marketParams, Market memory market) external returns (uint256);

    /// @notice Returns the borrow rate of the market `marketParams` without modifying any storage.
    /// @param marketParams The MarketParams struct of the market.
    /// @param market The Market struct of the market.
    function borrowRateView(MarketParams memory marketParams, Market memory market) external view returns (uint256);
}

File 3 of 8 : MathLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {ErrorsLib} from "./ErrorsLib.sol";
import {WAD} from "../../lib/morpho-blue/src/libraries/MathLib.sol";

int256 constant WAD_INT = int256(WAD);

/// @title MathLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library to manage fixed-point arithmetic and approximate the exponential function.
library MathLib {
    using MathLib for uint128;
    using MathLib for uint256;
    using {wDivDown} for int256;
    using {wMulDown} for int256;

    /// @dev ln(2).
    int256 private constant LN2_INT = 0.693147180559945309 ether;

    /// @dev Returns an approximation of exp.
    function wExp(int256 x) internal pure returns (uint256) {
        unchecked {
            // Revert if x > ln(2^256-1) ~ 177.
            require(x <= 177.44567822334599921 ether, ErrorsLib.WEXP_OVERFLOW);
            // Revert if x < -(2**255-1) + (ln(2)/2).
            require(x >= type(int256).min + LN2_INT / 2, ErrorsLib.WEXP_UNDERFLOW);

            // Decompose x as x = q * ln(2) + r with q an integer and -ln(2)/2 <= r <= ln(2)/2.
            // q = x / ln(2) rounded half toward zero.
            int256 roundingAdjustment = (x < 0) ? -(LN2_INT / 2) : (LN2_INT / 2);
            // Safe unchecked because x is bounded.
            int256 q = (x + roundingAdjustment) / LN2_INT;
            // Safe unchecked because |q * LN2_INT| <= |x|.
            int256 r = x - q * LN2_INT;

            // Compute e^r with a 2nd-order Taylor polynomial.
            // Safe unchecked because |r| < 1, expR < 2 and the sum is positive.
            uint256 expR = uint256(WAD_INT + r + r.wMulDown(r) / 2);

            // Return e^x = 2^q * e^r.
            if (q >= 0) return expR << uint256(q);
            else return expR >> uint256(-q);
        }
    }

    function wMulDown(int256 a, int256 b) internal pure returns (int256) {
        return a * b / WAD_INT;
    }

    function wDivDown(int256 a, int256 b) internal pure returns (int256) {
        return a * WAD_INT / b;
    }
}

File 4 of 8 : UtilsLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title UtilsLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library exposing helpers.
library UtilsLib {
    /// @dev Bounds `x` between `low` and `high`.
    /// @dev Assumes that `low` <= `high`. If it is not the case it returns `low`.
    function bound(uint256 x, uint256 low, uint256 high) internal pure returns (uint256 z) {
        assembly {
            // z = min(x, high).
            z := xor(x, mul(xor(x, high), lt(high, x)))
            // z = max(z, low).
            z := xor(z, mul(xor(z, low), gt(low, z)))
        }
    }
}

File 5 of 8 : ErrorsLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title ErrorsLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library exposing error messages.
library ErrorsLib {
    /// @dev Thrown when the input is too large to fit in the expected type.
    string internal constant INPUT_TOO_LARGE = "input too large";

    /// @dev Thrown when passing the zero input.
    string internal constant ZERO_INPUT = "zero input";

    /// @dev Thrown when wExp underflows.
    string internal constant WEXP_UNDERFLOW = "wExp underflow";

    /// @dev Thrown when wExp overflows.
    string internal constant WEXP_OVERFLOW = "wExp overflow";

    /// @dev Thrown when the caller is not Morpho.
    string internal constant NOT_MORPHO = "not Morpho";
}

File 6 of 8 : MarketParamsLib.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

import {Id, MarketParams} from "../interfaces/IMorpho.sol";

/// @title MarketParamsLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library to convert a market to its id.
library MarketParamsLib {
    /// @notice The length of the data used to compute the id of a market.
    /// @dev The length is 5 * 32 because `MarketParams` has 5 variables of 32 bytes each.
    uint256 internal constant MARKET_PARAMS_BYTES_LENGTH = 5 * 32;

    /// @notice Returns the id of the market `marketParams`.
    function id(MarketParams memory marketParams) internal pure returns (Id marketParamsId) {
        assembly ("memory-safe") {
            marketParamsId := keccak256(marketParams, MARKET_PARAMS_BYTES_LENGTH)
        }
    }
}

File 7 of 8 : IMorpho.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

type Id is bytes32;

struct MarketParams {
    address loanToken;
    address collateralToken;
    address oracle;
    address irm;
    uint256 lltv;
}

/// @dev Warning: For `feeRecipient`, `supplyShares` does not contain the accrued shares since the last interest
/// accrual.
struct Position {
    uint256 supplyShares;
    uint128 borrowShares;
    uint128 collateral;
}

/// @dev Warning: `totalSupplyAssets` does not contain the accrued interest since the last interest accrual.
/// @dev Warning: `totalBorrowAssets` does not contain the accrued interest since the last interest accrual.
/// @dev Warning: `totalSupplyShares` does not contain the additional shares accrued by `feeRecipient` since the last
/// interest accrual.
struct Market {
    uint128 totalSupplyAssets;
    uint128 totalSupplyShares;
    uint128 totalBorrowAssets;
    uint128 totalBorrowShares;
    uint128 lastUpdate;
    uint128 fee;
}

struct Authorization {
    address authorizer;
    address authorized;
    bool isAuthorized;
    uint256 nonce;
    uint256 deadline;
}

struct Signature {
    uint8 v;
    bytes32 r;
    bytes32 s;
}

/// @title IMorpho
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Interface of Morpho.
interface IMorpho {
    /// @notice The EIP-712 domain separator.
    /// @dev Warning: In case of a hardfork, every EIP-712 signed message based on this domain separator can be reused
    /// on the forked chain because the domain separator would be the same.
    function DOMAIN_SEPARATOR() external view returns (bytes32);

    /// @notice The owner of the contract.
    /// @dev It has the power to change the owner.
    /// @dev It has the power to set fees on markets and set the fee recipient.
    /// @dev It has the power to enable but not disable IRMs and LLTVs.
    function owner() external view returns (address);

    /// @notice The fee recipient of all markets.
    /// @dev The recipient receives the fees of a given market through a supply position on that market.
    function feeRecipient() external view returns (address);

    /// @notice The state of the position of `user` on the market corresponding to `id`.
    function position(Id id, address user)
        external
        view
        returns (uint256 supplyShares, uint128 borrowShares, uint128 collateral);

    /// @notice The state of the market corresponding to `id`.
    function market(Id id)
        external
        view
        returns (
            uint128 totalSupplyAssets,
            uint128 totalSupplyShares,
            uint128 totalBorrowAssets,
            uint128 totalBorrowShares,
            uint128 lastUpdate,
            uint128 fee
        );

    /// @notice Whether the `irm` is enabled.
    function isIrmEnabled(address irm) external view returns (bool);

    /// @notice Whether the `lltv` is enabled.
    function isLltvEnabled(uint256 lltv) external view returns (bool);

    /// @notice Whether `authorized` is authorized to modify `authorizer`'s positions.
    /// @dev Anyone is authorized to modify their own positions, regardless of this variable.
    function isAuthorized(address authorizer, address authorized) external view returns (bool);

    /// @notice The `authorizer`'s current nonce. Used to prevent replay attacks with EIP-712 signatures.
    function nonce(address authorizer) external view returns (uint256);

    /// @notice The market params corresponding to `id`.
    /// @dev This mapping is not used in Morpho. It is there to enable reducing the cost associated to calldata on layer
    /// 2s by creating a wrapper contract with functions that take `id` as input instead of `marketParams`.
    function idToMarketParams(Id id)
        external
        view
        returns (address loanToken, address collateralToken, address oracle, address irm, uint256 lltv);

    /// @notice Sets `newOwner` as owner of the contract.
    /// @dev Warning: No two-step transfer ownership.
    /// @dev Warning: The owner can be set to the zero address.
    function setOwner(address newOwner) external;

    /// @notice Enables `irm` as a possible IRM for market creation.
    /// @dev Warning: It is not possible to disable an IRM.
    function enableIrm(address irm) external;

    /// @notice Enables `lltv` as a possible LLTV for market creation.
    /// @dev Warning: It is not possible to disable a LLTV.
    function enableLltv(uint256 lltv) external;

    /// @notice Sets the `newFee` for the given market `marketParams`.
    /// @dev Warning: The recipient can be the zero address.
    function setFee(MarketParams memory marketParams, uint256 newFee) external;

    /// @notice Sets `newFeeRecipient` as recipient of the fee.
    /// @dev Warning: The fee recipient can be set to the zero address.
    /// @dev Warning: The fee to be accrued on each market won't belong to the old fee recipient after calling this
    /// function.
    function setFeeRecipient(address newFeeRecipient) external;

    /// @notice Creates the market `marketParams`.
    /// @dev Here is the list of assumptions on the market's dependencies (tokens, IRM and oracle) that guarantees
    /// Morpho behaves as expected:
    /// - The token should be ERC-20 compliant, except that it can omit return values on `transfer` and `transferFrom`.
    /// - The token balance of Morpho should only decrease on `transfer` and `transferFrom`. In particular, tokens with
    /// burn functions are not supported.
    /// - The token should not re-enter Morpho on `transfer` nor `transferFrom`.
    /// - The token balance of the sender (resp. receiver) should decrease (resp. increase) by exactly the given amount
    /// on `transfer` and `transferFrom`. In particular, tokens with fees on transfer are not supported.
    /// - The IRM should not re-enter Morpho.
    /// @dev Here is a list of properties on the market's dependencies that could break Morpho's liveness properties:
    /// - The token can revert on `transfer` and `transferFrom` for a reason other than an approval or balance issue.
    /// - A very high amount of assets (~1e35) supplied or borrowed can make the computation of `toSharesUp` and
    /// `toSharesDown` overflow.
    /// - The IRM can revert on `borrowRate`.
    /// - A very high borrow rate returned by the IRM can make the computation of `interest` in `_accrueInterest`
    /// overflow.
    /// - The oracle can revert on `price`. Note that this can be used to prevent `borrow`, `withdrawCollateral` and
    /// `liquidate` from being used under certain market conditions.
    /// - A very high price returned by the oracle can make the computation of `maxBorrow` in `_isHealthy` overflow, or
    /// the computation of `assetsRepaid` in `liquidate` overflow.
    function createMarket(MarketParams memory marketParams) external;

    /// @notice Supplies `assets` or `shares` on behalf of `onBehalf`, optionally calling back the caller's
    /// `onMorphoSupply` function with the given `data`.
    /// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
    /// is guaranteed to have `assets` tokens pulled from their balance, but the possibility to mint a specific amount
    /// of shares is given for full compatibility and precision.
    /// @dev Supplying a large amount can revert for overflow.
    /// @param marketParams The market to supply assets to.
    /// @param assets The amount of assets to supply.
    /// @param shares The amount of shares to mint.
    /// @param onBehalf The address that will own the increased supply position.
    /// @param data Arbitrary data to pass to the `onMorphoSupply` callback. Pass empty data if not needed.
    /// @return assetsSupplied The amount of assets supplied.
    /// @return sharesSupplied The amount of shares minted.
    function supply(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        bytes memory data
    ) external returns (uint256 assetsSupplied, uint256 sharesSupplied);

    /// @notice Withdraws `assets` or `shares` on behalf of `onBehalf` to `receiver`.
    /// @dev Either `assets` or `shares` should be zero. To withdraw max, pass the `shares`'s balance of `onBehalf`.
    /// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
    /// @dev Withdrawing an amount corresponding to more shares than supplied will revert for underflow.
    /// @param marketParams The market to withdraw assets from.
    /// @param assets The amount of assets to withdraw.
    /// @param shares The amount of shares to burn.
    /// @param onBehalf The address of the owner of the supply position.
    /// @param receiver The address that will receive the withdrawn assets.
    /// @return assetsWithdrawn The amount of assets withdrawn.
    /// @return sharesWithdrawn The amount of shares burned.
    function withdraw(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        address receiver
    ) external returns (uint256 assetsWithdrawn, uint256 sharesWithdrawn);

    /// @notice Borrows `assets` or `shares` on behalf of `onBehalf` to `receiver`.
    /// @dev Either `assets` or `shares` should be zero. Most usecases should rely on `assets` as an input so the caller
    /// is guaranteed to borrow `assets` of tokens, but the possibility to mint a specific amount of shares is given for
    /// full compatibility and precision.
    /// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
    /// @dev Borrowing a large amount can revert for overflow.
    /// @param marketParams The market to borrow assets from.
    /// @param assets The amount of assets to borrow.
    /// @param shares The amount of shares to mint.
    /// @param onBehalf The address that will own the increased borrow position.
    /// @param receiver The address that will receive the borrowed assets.
    /// @return assetsBorrowed The amount of assets borrowed.
    /// @return sharesBorrowed The amount of shares minted.
    function borrow(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        address receiver
    ) external returns (uint256 assetsBorrowed, uint256 sharesBorrowed);

    /// @notice Repays `assets` or `shares` on behalf of `onBehalf`, optionally calling back the caller's
    /// `onMorphoReplay` function with the given `data`.
    /// @dev Either `assets` or `shares` should be zero. To repay max, pass the `shares`'s balance of `onBehalf`.
    /// @dev Repaying an amount corresponding to more shares than borrowed will revert for underflow.
    /// @param marketParams The market to repay assets to.
    /// @param assets The amount of assets to repay.
    /// @param shares The amount of shares to burn.
    /// @param onBehalf The address of the owner of the debt position.
    /// @param data Arbitrary data to pass to the `onMorphoRepay` callback. Pass empty data if not needed.
    /// @return assetsRepaid The amount of assets repaid.
    /// @return sharesRepaid The amount of shares burned.
    function repay(
        MarketParams memory marketParams,
        uint256 assets,
        uint256 shares,
        address onBehalf,
        bytes memory data
    ) external returns (uint256 assetsRepaid, uint256 sharesRepaid);

    /// @notice Supplies `assets` of collateral on behalf of `onBehalf`, optionally calling back the caller's
    /// `onMorphoSupplyCollateral` function with the given `data`.
    /// @dev Interest are not accrued since it's not required and it saves gas.
    /// @dev Supplying a large amount can revert for overflow.
    /// @param marketParams The market to supply collateral to.
    /// @param assets The amount of collateral to supply.
    /// @param onBehalf The address that will own the increased collateral position.
    /// @param data Arbitrary data to pass to the `onMorphoSupplyCollateral` callback. Pass empty data if not needed.
    function supplyCollateral(MarketParams memory marketParams, uint256 assets, address onBehalf, bytes memory data)
        external;

    /// @notice Withdraws `assets` of collateral on behalf of `onBehalf` to `receiver`.
    /// @dev `msg.sender` must be authorized to manage `onBehalf`'s positions.
    /// @dev Withdrawing an amount corresponding to more collateral than supplied will revert for underflow.
    /// @param marketParams The market to withdraw collateral from.
    /// @param assets The amount of collateral to withdraw.
    /// @param onBehalf The address of the owner of the collateral position.
    /// @param receiver The address that will receive the collateral assets.
    function withdrawCollateral(MarketParams memory marketParams, uint256 assets, address onBehalf, address receiver)
        external;

    /// @notice Liquidates the given `repaidShares` of debt asset or seize the given `seizedAssets` of collateral on the
    /// given market `marketParams` of the given `borrower`'s position, optionally calling back the caller's
    /// `onMorphoLiquidate` function with the given `data`.
    /// @dev Either `seizedAssets` or `repaidShares` should be zero.
    /// @dev Seizing more than the collateral balance will underflow and revert without any error message.
    /// @dev Repaying more than the borrow balance will underflow and revert without any error message.
    /// @param marketParams The market of the position.
    /// @param borrower The owner of the position.
    /// @param seizedAssets The amount of collateral to seize.
    /// @param repaidShares The amount of shares to repay.
    /// @param data Arbitrary data to pass to the `onMorphoLiquidate` callback. Pass empty data if not needed.
    /// @return The amount of assets seized.
    /// @return The amount of assets repaid.
    function liquidate(
        MarketParams memory marketParams,
        address borrower,
        uint256 seizedAssets,
        uint256 repaidShares,
        bytes memory data
    ) external returns (uint256, uint256);

    /// @notice Executes a flash loan.
    /// @dev Flash loans have access to the whole balance of the contract (the liquidity and deposited collateral of all
    /// markets combined, plus donations).
    /// @param token The token to flash loan.
    /// @param assets The amount of assets to flash loan.
    /// @param data Arbitrary data to pass to the `onMorphoFlashLoan` callback.
    function flashLoan(address token, uint256 assets, bytes calldata data) external;

    /// @notice Sets the authorization for `authorized` to manage `msg.sender`'s positions.
    /// @param authorized The authorized address.
    /// @param newIsAuthorized The new authorization status.
    function setAuthorization(address authorized, bool newIsAuthorized) external;

    /// @notice Sets the authorization for `authorization.authorized` to manage `authorization.authorizer`'s positions.
    /// @dev Warning: Reverts if the signature has already been submitted.
    /// @dev The signature is malleable, but it has no impact on the security here.
    /// @dev The nonce is passed as argument to be able to revert with a different error message.
    /// @param authorization The `Authorization` struct.
    /// @param signature The signature.
    function setAuthorizationWithSig(Authorization calldata authorization, Signature calldata signature) external;

    /// @notice Returns the data stored on the different `slots`.
    function extSloads(bytes32[] memory slots) external view returns (bytes32[] memory);
}

File 8 of 8 : MathLib.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;

uint256 constant WAD = 1e18;

/// @title MathLib
/// @author Morpho Labs
/// @custom:contact [email protected]
/// @notice Library to manage fixed-point arithmetic.
library MathLib {
    /// @dev (x * y) / WAD rounded down.
    function wMulDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, y, WAD);
    }

    /// @dev (x * WAD) / y rounded down.
    function wDivDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, WAD, y);
    }

    /// @dev (x * WAD) / y rounded up.
    function wDivUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, WAD, y);
    }

    /// @dev (x * y) / d rounded down.
    function mulDivDown(uint256 x, uint256 y, uint256 d) internal pure returns (uint256) {
        return (x * y) / d;
    }

    /// @dev (x * y) / d rounded up.
    function mulDivUp(uint256 x, uint256 y, uint256 d) internal pure returns (uint256) {
        return (x * y + (d - 1)) / d;
    }

    /// @dev The sum of the first three non-zero terms of a Taylor expansion of e^(nx) - 1, to approximate a continuous
    /// compound interest rate.
    function wTaylorCompounded(uint256 x, uint256 n) internal pure returns (uint256) {
        uint256 firstTerm = x * n;
        uint256 secondTerm = mulDivDown(firstTerm, firstTerm, 2 * WAD);
        uint256 thirdTerm = mulDivDown(secondTerm, firstTerm, 3 * WAD);

        return firstTerm + secondTerm + thirdTerm;
    }
}

Settings
{
  "remappings": [
    "@morpho-blue-bundlers/=lib/morpho-blue-bundlers/src/",
    "solmate/=lib/morpho-blue-bundlers/lib/permit2/lib/solmate/",
    "@aave/core-v3/=lib/morpho-blue-bundlers/lib/morpho-utils/lib/aave-v3-core/",
    "@ds-test/=lib/metamorpho/lib/universal-rewards-distributor/lib/forge-std/lib/ds-test/src/",
    "@forge-std/=lib/metamorpho/lib/forge-std/src/",
    "@morpho-blue/=lib/metamorpho/lib/morpho-blue/src/",
    "@murky/=lib/metamorpho/lib/universal-rewards-distributor/lib/murky/",
    "@openzeppelin/=lib/metamorpho/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts/=lib/metamorpho/lib/openzeppelin-contracts/contracts/",
    "@solmate/=lib/metamorpho/lib/universal-rewards-distributor/lib/solmate/src/",
    "@universal-rewards-distributor/=lib/metamorpho/lib/universal-rewards-distributor/src/",
    "aave-v3-core/=lib/morpho-blue-bundlers/lib/morpho-utils/lib/aave-v3-core/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/metamorpho/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/morpho-blue-bundlers/lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "metamorpho/=lib/metamorpho/src/",
    "morpho-blue-bundlers/=lib/morpho-blue-bundlers/",
    "morpho-blue-irm/=lib/morpho-blue-irm/src/",
    "morpho-blue-oracles/=lib/morpho-blue-oracles/src/",
    "morpho-blue/=lib/morpho-blue/src/",
    "morpho-utils/=lib/morpho-blue-bundlers/lib/morpho-utils/src/",
    "murky/=lib/morpho-blue-bundlers/lib/murky/",
    "openzeppelin-contracts-upgradeable/=lib/morpho-blue-bundlers/lib/morpho-utils/lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/morpho-blue-bundlers/lib/openzeppelin-contracts/",
    "openzeppelin-upgradeable/=lib/morpho-blue-bundlers/lib/morpho-utils/lib/openzeppelin-contracts-upgradeable/contracts/",
    "openzeppelin/=lib/morpho-blue-bundlers/lib/openzeppelin-contracts/contracts/",
    "permit2/=lib/morpho-blue-bundlers/lib/permit2/",
    "src/=lib/metamorpho/src/",
    "test/=lib/metamorpho/test/",
    "universal-rewards-distributor/=lib/morpho-blue-bundlers/lib/universal-rewards-distributor/src/",
    "weird-erc20/=lib/morpho-blue-bundlers/lib/universal-rewards-distributor/lib/solmate/lib/weird-erc20/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"morpho","type":"address"},{"internalType":"uint256","name":"lnJumpFactor","type":"uint256"},{"internalType":"uint256","name":"speedFactor","type":"uint256"},{"internalType":"uint256","name":"targetUtilization","type":"uint256"},{"internalType":"uint128","name":"initialRate","type":"uint128"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"Id","name":"id","type":"bytes32"},{"indexed":false,"internalType":"int128","name":"err","type":"int128"},{"indexed":false,"internalType":"uint128","name":"newBorrowRate","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"avgBorrowRate","type":"uint256"}],"name":"BorrowRateUpdate","type":"event"},{"inputs":[],"name":"INITIAL_RATE","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LN_JUMP_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MORPHO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SPEED_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TARGET_UTILIZATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"address","name":"irm","type":"address"},{"internalType":"uint256","name":"lltv","type":"uint256"}],"internalType":"struct MarketParams","name":"marketParams","type":"tuple"},{"components":[{"internalType":"uint128","name":"totalSupplyAssets","type":"uint128"},{"internalType":"uint128","name":"totalSupplyShares","type":"uint128"},{"internalType":"uint128","name":"totalBorrowAssets","type":"uint128"},{"internalType":"uint128","name":"totalBorrowShares","type":"uint128"},{"internalType":"uint128","name":"lastUpdate","type":"uint128"},{"internalType":"uint128","name":"fee","type":"uint128"}],"internalType":"struct Market","name":"market","type":"tuple"}],"name":"borrowRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"address","name":"irm","type":"address"},{"internalType":"uint256","name":"lltv","type":"uint256"}],"internalType":"struct MarketParams","name":"marketParams","type":"tuple"},{"components":[{"internalType":"uint128","name":"totalSupplyAssets","type":"uint128"},{"internalType":"uint128","name":"totalSupplyShares","type":"uint128"},{"internalType":"uint128","name":"totalBorrowAssets","type":"uint128"},{"internalType":"uint128","name":"totalBorrowShares","type":"uint128"},{"internalType":"uint128","name":"lastUpdate","type":"uint128"},{"internalType":"uint128","name":"fee","type":"uint128"}],"internalType":"struct Market","name":"market","type":"tuple"}],"name":"borrowRateView","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"Id","name":"","type":"bytes32"}],"name":"marketIrm","outputs":[{"internalType":"uint128","name":"prevBorrowRate","type":"uint128"},{"internalType":"int128","name":"prevErr","type":"int128"}],"stateMutability":"view","type":"function"}]

6101203461019457601f610b2e38819003918201601f19168301916001600160401b038311848410176101995780849260a094604052833981010312610194578051906001600160a01b038216820361019457602081015160408201516060830151608090930151939091906001600160801b0385168503610194576100fc6100866101af565b600f81526e696e70757420746f6f206c6172676560881b60208201819052906100da906001600160ff1b03906100bf90828811156101ce565b6100c76101af565b90600f82528360208301528711156101ce565b6100e26101af565b90600f82526020820152670de0b6b3a764000086106101ce565b6101266101076101af565b600a8152691e995c9bc81a5b9c1d5d60b21b60208201528515156101ce565b60805260a05260c05260e0526101009081526040516108f89182610236833960805182818161017301526102a6015260a0518281816103270152610675015260c05182818161022c01526106ae015260e05182818160ea01526105b901525181818161026e01526107630152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b60408051919082016001600160401b0381118382101761019957604052565b156101d65750565b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061021c575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506101f956fe60806040818152600436101561001457600080fd5b600091823560e01c9081631d1d9bb71461031057508063362c1f90146102d55780633acb5624146102925780634dbac7331461024f578063811f88bd146102155780638c00bf6b146101e35780639451fed41461010d5780639a1a14d9146100d3578063c24dbebd146100b15763d819bfef1461009057600080fd5b346100ad57816003193601126100ad57602090516301e3da5f8152f35b5080fd5b50346100ad57816003193601126100ad57602090516704668ee0c6f02c298152f35b50346100ad57816003193601126100ad57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346100ad579060209160a07f605a8c88fa24d2d5eb99938fffafba9499b485745d9c64cc5fad2f3a60a6006260606101a261014836610380565b949061019a61015561034a565b600a8152696e6f74204d6f7270686f60b01b8b820152600180851b037f000000000000000000000000000000000000000000000000000000000000000016331461049e565b209384610574565b866001600160801b0380921698878152808b5220911690816001600160801b03198460801b16179055855191600f0b8252878201528585820152a251908152f35b50346100ad576020906001600160801b0361020a60a061020236610380565b919020610574565b939150505191168152f35b50346100ad57816003193601126100ad57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b50346100ad57816003193601126100ad57602090516001600160801b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100ad57816003193601126100ad57517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b50346100ad5760203660031901126100ad57809160043581528060205220548151906001600160801b038116825260801d600f0b6020820152f35b8390346100ad57816003193601126100ad576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b604051906040820182811067ffffffffffffffff82111761036a57604052565b634e487b7160e01b600052604160045260246000fd5b90600319820161016081126104995760a013610499576040805167ffffffffffffffff919060a081018381118282101761036a5782526001600160a01b0390600435828116810361049957815260243582811681036104995760208201526044358281168103610499578382015260643591821682036104995760c091606082015260843560808201529460a31901126104995780519160c083019081118382101761036a5781526001600160801b039060a435828116810361049957835260c435828116810361049957602084015260e435908282168203610499578301526101043581811681036104995760608301526101243581811681036104995760808301526101443590811681036104995760a082015290565b600080fd5b156104a65750565b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106104ec575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506104c9565b8181039291600013801582851316918412161761051e57565b634e487b7160e01b600052601160045260246000fd5b90670de0b6b3a76400009182810292818405149015171561051e57565b818102929160008212600160ff1b82141661051e57818405149015171561051e57565b916001600160801b03808351168015600081156000146107b257508260408601511690670de0b6b3a76400009182810292818404149015171561051e5761079c57045b7f0000000000000000000000000000000000000000000000000000000000000000908181111561078b57670de0b6b3a76400009180830392831161051e5761060661060b916106109493610505565b610534565b6108a7565b600f0b9360005260006020526040600020548181169081156107605760801d600f0b85036f7fffffffffffffffffffffffffffffff1981126f7fffffffffffffffffffffffffffffff82131761051e576106a361069d91670de0b6b3a76400009283917f000000000000000000000000000000000000000000000000000000000000000090600f0b610551565b056107cd565b94836080836106d28a7f0000000000000000000000000000000000000000000000000000000000000000610551565b059201511642039042821161051e576107026106f261070a938593610551565b976106fc896107cd565b956107ba565b0492836107ba565b04938061074b57505b6704668ee0c6f02c29938085108582180218938181109082180218816301e3da5f948086118682180218169381811190821802181690565b61060b61060661075b9387610505565b610713565b507f000000000000000000000000000000000000000000000000000000000000000093508392915050565b61060b610606836106109493610505565b634e487b7160e01b600052601260045260246000fd5b9150506105b7565b8181029291811591840414171561051e57565b6108046107d861034a565b600d81526c77457870206f766572666c6f7760981b602082015268099e8db03256ce5d6a83131561049e565b61084161080f61034a565b600e81526d7745787020756e646572666c6f7760901b60208201526704cf46d8192b672e600160ff1b0183121561049e565b6000811215610898576704cf46d8192b672d19905b67099e8db03256ce5d80928201059182029003670de0b6b3a7640000906002826108808380610551565b050501019060008112610891571b90565b6000031c90565b6704cf46d8192b672e90610856565b811561079c57600160ff1b811460001983141661051e57059056fea2646970667358221220726596d26033ef63f468f1123bb9ceb24dd51a44e9b48c69c5e0697e90ced33064736f6c6343000813003300000000000000000000000064c7044050ba0431252df24fed4d9635a275cb41000000000000000000000000000000000000000000000000099e8db03257a40000000000000000000000000000000000000000000000000000000040acd884710000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000000000012e687bf

Deployed Bytecode

0x60806040818152600436101561001457600080fd5b600091823560e01c9081631d1d9bb71461031057508063362c1f90146102d55780633acb5624146102925780634dbac7331461024f578063811f88bd146102155780638c00bf6b146101e35780639451fed41461010d5780639a1a14d9146100d3578063c24dbebd146100b15763d819bfef1461009057600080fd5b346100ad57816003193601126100ad57602090516301e3da5f8152f35b5080fd5b50346100ad57816003193601126100ad57602090516704668ee0c6f02c298152f35b50346100ad57816003193601126100ad57602090517f0000000000000000000000000000000000000000000000000b1a2bc2ec5000008152f35b50346100ad579060209160a07f605a8c88fa24d2d5eb99938fffafba9499b485745d9c64cc5fad2f3a60a6006260606101a261014836610380565b949061019a61015561034a565b600a8152696e6f74204d6f7270686f60b01b8b820152600180851b037f00000000000000000000000064c7044050ba0431252df24fed4d9635a275cb4116331461049e565b209384610574565b866001600160801b0380921698878152808b5220911690816001600160801b03198460801b16179055855191600f0b8252878201528585820152a251908152f35b50346100ad576020906001600160801b0361020a60a061020236610380565b919020610574565b939150505191168152f35b50346100ad57816003193601126100ad57602090517f00000000000000000000000000000000000000000000000000000040acd884718152f35b50346100ad57816003193601126100ad57602090516001600160801b037f0000000000000000000000000000000000000000000000000000000012e687bf168152f35b50346100ad57816003193601126100ad57517f00000000000000000000000064c7044050ba0431252df24fed4d9635a275cb416001600160a01b03168152602090f35b50346100ad5760203660031901126100ad57809160043581528060205220548151906001600160801b038116825260801d600f0b6020820152f35b8390346100ad57816003193601126100ad576020907f000000000000000000000000000000000000000000000000099e8db03257a4008152f35b604051906040820182811067ffffffffffffffff82111761036a57604052565b634e487b7160e01b600052604160045260246000fd5b90600319820161016081126104995760a013610499576040805167ffffffffffffffff919060a081018381118282101761036a5782526001600160a01b0390600435828116810361049957815260243582811681036104995760208201526044358281168103610499578382015260643591821682036104995760c091606082015260843560808201529460a31901126104995780519160c083019081118382101761036a5781526001600160801b039060a435828116810361049957835260c435828116810361049957602084015260e435908282168203610499578301526101043581811681036104995760608301526101243581811681036104995760808301526101443590811681036104995760a082015290565b600080fd5b156104a65750565b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106104ec575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506104c9565b8181039291600013801582851316918412161761051e57565b634e487b7160e01b600052601160045260246000fd5b90670de0b6b3a76400009182810292818405149015171561051e57565b818102929160008212600160ff1b82141661051e57818405149015171561051e57565b916001600160801b03808351168015600081156000146107b257508260408601511690670de0b6b3a76400009182810292818404149015171561051e5761079c57045b7f0000000000000000000000000000000000000000000000000b1a2bc2ec500000908181111561078b57670de0b6b3a76400009180830392831161051e5761060661060b916106109493610505565b610534565b6108a7565b600f0b9360005260006020526040600020548181169081156107605760801d600f0b85036f7fffffffffffffffffffffffffffffff1981126f7fffffffffffffffffffffffffffffff82131761051e576106a361069d91670de0b6b3a76400009283917f000000000000000000000000000000000000000000000000099e8db03257a40090600f0b610551565b056107cd565b94836080836106d28a7f00000000000000000000000000000000000000000000000000000040acd88471610551565b059201511642039042821161051e576107026106f261070a938593610551565b976106fc896107cd565b956107ba565b0492836107ba565b04938061074b57505b6704668ee0c6f02c29938085108582180218938181109082180218816301e3da5f948086118682180218169381811190821802181690565b61060b61060661075b9387610505565b610713565b507f0000000000000000000000000000000000000000000000000000000012e687bf93508392915050565b61060b610606836106109493610505565b634e487b7160e01b600052601260045260246000fd5b9150506105b7565b8181029291811591840414171561051e57565b6108046107d861034a565b600d81526c77457870206f766572666c6f7760981b602082015268099e8db03256ce5d6a83131561049e565b61084161080f61034a565b600e81526d7745787020756e646572666c6f7760901b60208201526704cf46d8192b672e600160ff1b0183121561049e565b6000811215610898576704cf46d8192b672d19905b67099e8db03256ce5d80928201059182029003670de0b6b3a7640000906002826108808380610551565b050501019060008112610891571b90565b6000031c90565b6704cf46d8192b672e90610856565b811561079c57600160ff1b811460001983141661051e57059056fea2646970667358221220726596d26033ef63f468f1123bb9ceb24dd51a44e9b48c69c5e0697e90ced33064736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000064c7044050ba0431252df24fed4d9635a275cb41000000000000000000000000000000000000000000000000099e8db03257a40000000000000000000000000000000000000000000000000000000040acd884710000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000000000012e687bf

-----Decoded View---------------
Arg [0] : morpho (address): 0x64c7044050Ba0431252df24fEd4d9635a275CB41
Arg [1] : lnJumpFactor (uint256): 693147180560000000
Arg [2] : speedFactor (uint256): 277777777777
Arg [3] : targetUtilization (uint256): 800000000000000000
Arg [4] : initialRate (uint128): 317097919

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000064c7044050ba0431252df24fed4d9635a275cb41
Arg [1] : 000000000000000000000000000000000000000000000000099e8db03257a400
Arg [2] : 00000000000000000000000000000000000000000000000000000040acd88471
Arg [3] : 0000000000000000000000000000000000000000000000000b1a2bc2ec500000
Arg [4] : 0000000000000000000000000000000000000000000000000000000012e687bf


Deployed Bytecode Sourcemap

822:6195:4:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:43;822:6195;;;;;;;;;;;;4101:55;761:12:5;3970:23:4;822:6195;;;:::i;:::-;;;3811:51;822:6195;;:::i;:::-;;;;-1:-1:-1;;;822:6195:4;;;;;;;;;3833:6;822:6195;3819:10;:20;3811:51;:::i;:::-;696:118:2;3970:23:4;;;:::i;:::-;822:6195;-1:-1:-1;;;;;822:6195:4;;;;;;;;;;;;;761:12:5;;-1:-1:-1;;;;;761:12:5;;;;;;;;822:6195:4;;;;;;;761:12:5;;;822:6195:4;761:12:5;;;;822:6195:4;4101:55;822:6195;;;;;;;;;;;;-1:-1:-1;;;;;3592:38:4;696:118:2;822:6195:4;;;:::i;:::-;696:118:2;;;3592:38:4;:::i;:::-;822:6195;;;;;;;;;;;;;;;;;;;;;;;;;;1979:37;822:6195;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2169:37:4;822:6195;;;;;;;;;;;;;;;;;;1580:31;-1:-1:-1;;;;;822:6195:4;;;;;;;;;;;;;-1:-1:-1;;822:6195:4;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;822:6195:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;1672:39;;822:6195;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;-1:-1:-1;;822:6195:4;;;;;;;;-1:-1:-1;822:6195:4;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;822:6195:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;822:6195:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;-1:-1:-1;822:6195:4;;761:12:5;;;;;:::o;:::-;822:6195:4;;761:12:5;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;761:12:5;;;;;;;;;;;;-1:-1:-1;761:12:5;;;;;;822:6195:4;;;;;;761:12:5;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;761:12:5;;93:4:3;;;;;;;-1:-1:-1;93:4:3;;;;;;;;;;;;;:::o;:::-;822:6195:4;;;93:4:3;822:6195:4;;;;;93:4:3;822:6195:4;93:4:3;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;-1:-1:-1;;;93:4:3;;;;;;;;;;;;;;;:::o;4259:2756:4:-;;-1:-1:-1;;;;;822:6195:4;;;;4401:28;;-1:-1:-1;4401:28:4;;:94;:28;;;4432:24;;;;;822:6195;;93:4:3;;822:6195:4;;;;;;;;;;;;;;;;;;4401:94;4544:18;;4530:32;;;;;;93:4:3;;;;;;;;;;4823:48:4;2032:11:6;4530:80:4;2032:15:6;4530:80:4;;4823:48;:::i;:::-;2032:11:6;:::i;:::-;:15;:::i;:::-;822:6195:4;;;-1:-1:-1;822:6195:4;-1:-1:-1;822:6195:4;;;-1:-1:-1;822:6195:4;;;;;4967:23;;;4963:69;;822:6195;;;;93:4:3;;-1:-1:-1;;93:4:3;;;;;;;;5284:55:4;1918:5:6;93:4:3;;5322:14:4;;;;822:6195;;;1918:5:6;:::i;:::-;822:6195:4;5284:55;:::i;:::-;5446:12;;822:6195;5446:12;1918:5:6;5446:12:4;;1918:5:6;:::i;:::-;822:6195:4;5519:17;;822:6195;;5501:15;93:4:3;5501:15:4;;93:4:3;;;;887:5;5640:23:4;887:5:3;5640:23:4;;;;:::i;:::-;5703:29;;;;:::i;:::-;887:5:3;;:::i;:::-;822:6195:4;887:5:3;;;:::i;:::-;822:6195:4;;6507:20;;;6529:35;6503:294;822:6195;432:195:7;;;;;;;;;;;;;;;;;;822:6195:4;;432:195:7;;;;;;;;;822:6195:4;432:195:7;;;;;;;;;822:6195:4;4259:2756;:::o;6503:294::-;2032:11:6;6718:51:4;2032:15:6;6718:51:4;;;:::i;2032:15:6:-;6503:294:4;;4963:69;-1:-1:-1;5005:12:4;;-1:-1:-1;5005:12:4;;;-1:-1:-1;;4992:40:4:o;4530:80::-;2032:11:6;4823:48:4;4530:80;2032:15:6;4530:80:4;;4823:48;:::i;822:6195::-;;;;-1:-1:-1;822:6195:4;;;;;-1:-1:-1;822:6195:4;4401:94;;;;;;822:6195;;;;;;;;;;;;;;;;:::o;672:1154:6:-;810:66;822:6195:4;;:::i;:::-;;;;-1:-1:-1;;;822:6195:4;;;;823:27:6;818:32;;;810:66;:::i;:::-;944:70;822:6195:4;;:::i;:::-;593:26:6;822:6195:4;;-1:-1:-1;;;822:6195:4;593:26:6;;;-1:-1:-1;;;;;952:35:6;;;944:70;:::i;:::-;-1:-1:-1;1209:5:6;;-1:-1:-1;;;;;545:16:5;1208:40:6;593:26;;;;;;545:16:5;;;;;93:4:3;1918:5:6;986:1;1918:5;;;;;:::i;:::-;822:6195:4;593:26:6;;;;-1:-1:-1;1731:6:6;;-1:-1:-1;;196:11:6;1739:25;:::o;1727:82::-;-1:-1:-1;545:16:5;196:11:6;1783:26;:::o;1208:40::-;593:26;1208:40;;;822:6195:4;;;;;-1:-1:-1;;;822:6195:4;;-1:-1:-1;;822:6195:4;;;;;;;:::o

Swarm Source

ipfs://726596d26033ef63f468f1123bb9ceb24dd51a44e9b48c69c5e0697e90ced330

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.