ETH Price: $3,829.69 (+4.96%)

Contract

0xd828F7029CC58C4E9Cab3B1E0726CEFab411bc65
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Age:90D
Amount:Between 1-100
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Update your filters to view other transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
JumpRateModel

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-12-28
*/

pragma solidity ^0.6.0;


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract ContextUpgradeSafe is Initializable {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.

    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {


    }


    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }

    uint256[50] private __gap;
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */

    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {


        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);

    }


    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[49] private __gap;
}

// https://github.com/compound-finance/compound-protocol/blob/master/contracts/InterestRateModel.sol
//Copyright 2020 Compound Labs, Inc.
//Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
//2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
//3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/**
  * @title wepiggy's IInterestRateModel Interface
  * @author wepiggy
  */
interface IInterestRateModel {
    /**
      * @notice Calculates the current borrow interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @return The borrow rate per block (as a percentage, and scaled by 1e18)
      */
    function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);

    /**
      * @notice Calculates the current supply interest rate per block
      * @param cash The total amount of cash the market has
      * @param borrows The total amount of borrows the market has outstanding
      * @param reserves The total amount of reserves the market has
      * @param reserveFactorMantissa The current reserve factor the market has
      * @return The supply rate per block (as a percentage, and scaled by 1e18)
      */
    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external view returns (uint);

}

// COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/BaseJumpRateModelV2.sol
//Copyright 2020 Compound Labs, Inc.
//Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
//2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
//3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/**
  * @title Logic for Compound's JumpRateModel Contract V2.
  * @author Compound (modified by Dharma Labs, refactored by Arr00)
  * @notice Version 2 modifies Version 1 by enabling updateable parameters.
  */
contract BaseJumpRateModel is IInterestRateModel, OwnableUpgradeSafe {
    using SafeMath for uint;

    event NewInterestParams(uint baseRatePerBlock, uint multiplierPerBlock, uint jumpMultiplierPerBlock, uint kink);

    /**
     * @notice The approximate number of blocks per year that is assumed by the interest rate model
     */
    uint public constant blocksPerYear = 2102400;

    /**
     * @notice The multiplier of utilization rate that gives the slope of the interest rate
     */
    uint public multiplierPerBlock;

    /**
     * @notice The base interest rate which is the y-intercept when utilization rate is 0
     */
    uint public baseRatePerBlock;

    /**
     * @notice The multiplierPerBlock after hitting a specified utilization point
     */
    uint public jumpMultiplierPerBlock;

    /**
     * @notice The utilization point at which the jump multiplier is applied
     */
    uint public kink;

    /**
     * @notice Update the parameters of the interest rate model (only callable by owner, i.e. Timelock)
     * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)
     * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)
     * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point
     * @param kink_ The utilization point at which the jump multiplier is applied
     */
    function updateJumpRateModel(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) external {
        updateJumpRateModelInternal(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_);
    }

    /**
     * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`
     * @param cash The amount of cash in the market
     * @param borrows The amount of borrows in the market
     * @param reserves The amount of reserves in the market (currently unused)
     * @return The utilization rate as a mantissa between [0, 1e18]
     */
    function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {
        // Utilization rate is 0 when there are no borrows
        if (borrows == 0) {
            return 0;
        }

        return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));
    }

    /**
     * @notice Calculates the current borrow rate per block, with the error code expected by the market
     * @param cash The amount of cash in the market
     * @param borrows The amount of borrows in the market
     * @param reserves The amount of reserves in the market
     * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)
     */
    function getBorrowRateInternal(uint cash, uint borrows, uint reserves) internal view returns (uint) {
        uint util = utilizationRate(cash, borrows, reserves);

        if (util <= kink) {
            return util.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);
        } else {
            uint normalRate = kink.mul(multiplierPerBlock).div(1e18).add(baseRatePerBlock);
            uint excessUtil = util.sub(kink);
            return excessUtil.mul(jumpMultiplierPerBlock).div(1e18).add(normalRate);
        }
    }

    /**
     * @notice Calculates the current borrow rate per block
     * @param cash The amount of cash in the market
     * @param borrows The amount of borrows in the market
     * @param reserves The amount of reserves in the market
     * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)
     */
    function getBorrowRate(uint cash, uint borrows, uint reserves) external virtual override view returns (uint) {
        return getBorrowRateInternal(cash, borrows, reserves);
    }


    function getSupplyRateInternal(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) internal view returns (uint) {
        uint oneMinusReserveFactor = uint(1e18).sub(reserveFactorMantissa);
        uint borrowRate = getBorrowRateInternal(cash, borrows, reserves);
        uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);
        return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);
    }
    /**
     * @notice Calculates the current supply rate per block
     * @param cash The amount of cash in the market
     * @param borrows The amount of borrows in the market
     * @param reserves The amount of reserves in the market
     * @param reserveFactorMantissa The current reserve factor for the market
     * @return The supply rate percentage per block as a mantissa (scaled by 1e18)
     */
    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external virtual override view returns (uint) {
        return getSupplyRateInternal(cash, borrows, reserves, reserveFactorMantissa);
    }

    /**
     * @notice Internal function to update the parameters of the interest rate model
     * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)
     * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)
     * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point
     * @param kink_ The utilization point at which the jump multiplier is applied
     */
    function updateJumpRateModelInternal(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) internal onlyOwner {
        baseRatePerBlock = baseRatePerYear.div(blocksPerYear);
        multiplierPerBlock = (multiplierPerYear.mul(1e18)).div(blocksPerYear.mul(kink_));
        jumpMultiplierPerBlock = jumpMultiplierPerYear.div(blocksPerYear);
        kink = kink_;

        emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);
    }
}


/**
  * @title Compound's JumpRateModel Contract V2 for V2 cTokens
  * @author Arr00
  * @notice Supports only for V2 cTokens
  */
contract JumpRateModel is BaseJumpRateModel {

    function initialize(uint baseRatePerYear, uint multiplierPerYear, uint jumpMultiplierPerYear, uint kink_) public initializer {
        super.__Ownable_init();
        super.updateJumpRateModelInternal(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_);
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"baseRatePerBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"multiplierPerBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"jumpMultiplierPerBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"kink","type":"uint256"}],"name":"NewInterestParams","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"baseRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocksPerYear","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"cash","type":"uint256"},{"internalType":"uint256","name":"borrows","type":"uint256"},{"internalType":"uint256","name":"reserves","type":"uint256"}],"name":"getBorrowRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"cash","type":"uint256"},{"internalType":"uint256","name":"borrows","type":"uint256"},{"internalType":"uint256","name":"reserves","type":"uint256"},{"internalType":"uint256","name":"reserveFactorMantissa","type":"uint256"}],"name":"getSupplyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"baseRatePerYear","type":"uint256"},{"internalType":"uint256","name":"multiplierPerYear","type":"uint256"},{"internalType":"uint256","name":"jumpMultiplierPerYear","type":"uint256"},{"internalType":"uint256","name":"kink_","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"jumpMultiplierPerBlock","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":"multiplierPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"baseRatePerYear","type":"uint256"},{"internalType":"uint256","name":"multiplierPerYear","type":"uint256"},{"internalType":"uint256","name":"jumpMultiplierPerYear","type":"uint256"},{"internalType":"uint256","name":"kink_","type":"uint256"}],"name":"updateJumpRateModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cash","type":"uint256"},{"internalType":"uint256","name":"borrows","type":"uint256"},{"internalType":"uint256","name":"reserves","type":"uint256"}],"name":"utilizationRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80638da5cb5b1161008c578063b9f9850a11610066578063b9f9850a14610203578063f14039de1461020b578063f2fde38b14610213578063fd2da33914610239576100cf565b80638da5cb5b146101a8578063a385fb96146101cc578063b8168816146101d4576100cf565b806315f24053146100d45780632037f3e71461010f57806360a2da44146101405780636e71e2d81461016f578063715018a6146101985780638726bb89146101a0575b600080fd5b6100fd600480360360608110156100ea57600080fd5b5080359060208101359060400135610241565b60408051918252519081900360200190f35b61013e6004803603608081101561012557600080fd5b5080359060208101359060408101359060600135610258565b005b61013e6004803603608081101561015657600080fd5b508035906020810135906040810135906060013561026a565b6100fd6004803603606081101561018557600080fd5b5080359060208101359060400135610324565b61013e610362565b6100fd610416565b6101b061041c565b604080516001600160a01b039092168252519081900360200190f35b6100fd61042b565b6100fd600480360360808110156101ea57600080fd5b5080359060208101359060408101359060600135610432565b6100fd610449565b6100fd61044f565b61013e6004803603602081101561022957600080fd5b50356001600160a01b0316610455565b6100fd610560565b600061024e848484610566565b90505b9392505050565b61026484848484610629565b50505050565b600054610100900460ff16806102835750610283610722565b80610291575060005460ff16155b6102cc5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c68602e913960400191505060405180910390fd5b600054610100900460ff161580156102f7576000805460ff1961ff0019909116610100171660011790555b6102ff610728565b61030b85858585610629565b801561031d576000805461ff00191690555b5050505050565b60008261033357506000610251565b61024e61034a8361034487876107da565b9061083d565b61035c85670de0b6b3a764000061087f565b906108d8565b61036a61091a565b6065546001600160a01b039081169116146103cc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b60975481565b6065546001600160a01b031690565b6220148081565b60006104408585858561091e565b95945050505050565b60995481565b60985481565b61045d61091a565b6065546001600160a01b039081169116146104bf576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166105045760405162461bcd60e51b8152600401808060200182810382526026815260200180610c216026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b609a5481565b600080610574858585610324565b9050609a5481116105b4576105ac6098546105a6670de0b6b3a764000061035c6097548661087f90919063ffffffff16565b906107da565b915050610251565b60006105df6098546105a6670de0b6b3a764000061035c609754609a5461087f90919063ffffffff16565b905060006105f8609a548461083d90919063ffffffff16565b905061061f826105a6670de0b6b3a764000061035c6099548661087f90919063ffffffff16565b9350505050610251565b61063161091a565b6065546001600160a01b03908116911614610693576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6106a084622014806108d8565b6098556106b361034a622014808361087f565b6097556106c382622014806108d8565b6099819055609a829055609854609754604080519283526020830191909152818101929092526060810183905290517f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9181900360800190a150505050565b303b1590565b600054610100900460ff16806107415750610741610722565b8061074f575060005460ff16155b61078a5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c68602e913960400191505060405180910390fd5b600054610100900460ff161580156107b5576000805460ff1961ff0019909116610100171660011790555b6107bd61098b565b6107c5610a2b565b80156107d7576000805461ff00191690555b50565b600082820183811015610834576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600061083483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610b24565b60008261088e57506000610837565b8282028284828161089b57fe5b04146108345760405162461bcd60e51b8152600401808060200182810382526021815260200180610c476021913960400191505060405180910390fd5b600061083483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610bbb565b3390565b600080610933670de0b6b3a76400008461083d565b90506000610942878787610566565b9050600061095c670de0b6b3a764000061035c848661087f565b905061097f670de0b6b3a764000061035c836109798c8c8c610324565b9061087f565b98975050505050505050565b600054610100900460ff16806109a457506109a4610722565b806109b2575060005460ff16155b6109ed5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c68602e913960400191505060405180910390fd5b600054610100900460ff161580156107c5576000805460ff1961ff00199091166101001716600117905580156107d7576000805461ff001916905550565b600054610100900460ff1680610a445750610a44610722565b80610a52575060005460ff16155b610a8d5760405162461bcd60e51b815260040180806020018281038252602e815260200180610c68602e913960400191505060405180910390fd5b600054610100900460ff16158015610ab8576000805460ff1961ff0019909116610100171660011790555b6000610ac261091a565b606580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156107d7576000805461ff001916905550565b60008184841115610bb35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b78578181015183820152602001610b60565b50505050905090810190601f168015610ba55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610c0a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b78578181015183820152602001610b60565b506000838581610c1657fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a264697066735822122077a398f42a422828645a5a7dfad60739905666af4a79d83e7150fe14eb0e69f464736f6c634300060c0033

Deployed Bytecode Sourcemap

21802:332:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19360:181;;;;;;;;;;;;;;;;-1:-1:-1;19360:181:0;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;17166:236;;;;;;;;;;;;;;;;-1:-1:-1;17166:236:0;;;;;;;;;;;;;;;;;:::i;:::-;;21855:276;;;;;;;;;;;;;;;;-1:-1:-1;21855:276:0;;;;;;;;;;;;;;;;;:::i;17792:297::-;;;;;;;;;;;;;;;;-1:-1:-1;17792:297:0;;;;;;;;;;;;:::i;10527:148::-;;;:::i;16207:30::-;;;:::i;9885:79::-;;;:::i;:::-;;;;-1:-1:-1;;;;;9885:79:0;;;;;;;;;;;;;;16043:44;;;:::i;20420:232::-;;;;;;;;;;;;;;;;-1:-1:-1;20420:232:0;;;;;;;;;;;;;;;;;:::i;16493:34::-;;;:::i;16355:28::-;;;:::i;10830:244::-;;;;;;;;;;;;;;;;-1:-1:-1;10830:244:0;-1:-1:-1;;;;;10830:244:0;;:::i;16632:16::-;;;:::i;19360:181::-;19463:4;19487:46;19509:4;19515:7;19524:8;19487:21;:46::i;:::-;19480:53;;19360:181;;;;;;:::o;17166:236::-;17301:93;17329:15;17346:17;17365:21;17388:5;17301:27;:93::i;:::-;17166:236;;;;:::o;21855:276::-;6349:12;;;;;;;;:31;;;6365:15;:13;:15::i;:::-;6349:47;;;-1:-1:-1;6385:11:0;;;;6384:12;6349:47;6341:106;;;;-1:-1:-1;;;6341:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6456:19;6479:12;;;;;;6478:13;6498:83;;;;6527:12;:19;;-1:-1:-1;;;;6527:19:0;;;;;6555:18;6542:4;6555:18;;;6498:83;21991:22:::1;:20;:22::i;:::-;22024:99;22058:15;22075:17;22094:21;22117:5;22024:33;:99::i;:::-;6603:14:::0;6599:57;;;6643:5;6628:20;;-1:-1:-1;;6628:20:0;;;6599:57;21855:276;;;;;:::o;17792:297::-;17878:4;17959:12;17955:53;;-1:-1:-1;17995:1:0;17988:8;;17955:53;18027:54;18049:31;18071:8;18049:17;:4;18058:7;18049:8;:17::i;:::-;:21;;:31::i;:::-;18027:17;:7;18039:4;18027:11;:17::i;:::-;:21;;:54::i;10527:148::-;10107:12;:10;:12::i;:::-;10097:6;;-1:-1:-1;;;;;10097:6:0;;;:22;;;10089:67;;;;;-1:-1:-1;;;10089:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10618:6:::1;::::0;10597:40:::1;::::0;10634:1:::1;::::0;-1:-1:-1;;;;;10618:6:0::1;::::0;10597:40:::1;::::0;10634:1;;10597:40:::1;10648:6;:19:::0;;-1:-1:-1;;;;;;10648:19:0::1;::::0;;10527:148::o;16207:30::-;;;;:::o;9885:79::-;9950:6;;-1:-1:-1;;;;;9950:6:0;9885:79;:::o;16043:44::-;16080:7;16043:44;:::o;20420:232::-;20551:4;20575:69;20597:4;20603:7;20612:8;20622:21;20575;:69::i;:::-;20568:76;20420:232;-1:-1:-1;;;;;20420:232:0:o;16493:34::-;;;;:::o;16355:28::-;;;;:::o;10830:244::-;10107:12;:10;:12::i;:::-;10097:6;;-1:-1:-1;;;;;10097:6:0;;;:22;;;10089:67;;;;;-1:-1:-1;;;10089:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;10919:22:0;::::1;10911:73;;;;-1:-1:-1::0;;;10911:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11021:6;::::0;11000:38:::1;::::0;-1:-1:-1;;;;;11000:38:0;;::::1;::::0;11021:6:::1;::::0;11000:38:::1;::::0;11021:6:::1;::::0;11000:38:::1;11049:6;:17:::0;;-1:-1:-1;;;;;;11049:17:0::1;-1:-1:-1::0;;;;;11049:17:0;;;::::1;::::0;;;::::1;::::0;;10830:244::o;16632:16::-;;;;:::o;18477:539::-;18571:4;18588:9;18600:40;18616:4;18622:7;18631:8;18600:15;:40::i;:::-;18588:52;;18665:4;;18657;:12;18653:356;;18693:60;18736:16;;18693:38;18726:4;18693:28;18702:18;;18693:4;:8;;:28;;;;:::i;:38::-;:42;;:60::i;:::-;18686:67;;;;;18653:356;18786:15;18804:60;18847:16;;18804:38;18837:4;18804:28;18813:18;;18804:4;;:8;;:28;;;;:::i;:60::-;18786:78;;18879:15;18897:14;18906:4;;18897;:8;;:14;;;;:::i;:::-;18879:32;;18933:64;18986:10;18933:48;18976:4;18933:38;18948:22;;18933:10;:14;;:38;;;;:::i;:64::-;18926:71;;;;;;;21150:507;10107:12;:10;:12::i;:::-;10097:6;;-1:-1:-1;;;;;10097:6:0;;;:22;;;10089:67;;;;;-1:-1:-1;;;10089:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21322:34:::1;:15:::0;16080:7:::1;21322:19;:34::i;:::-;21303:16;:53:::0;21388:59:::1;21422:24;16080:7;21440:5:::0;21422:17:::1;:24::i;21388:59::-;21367:18;:80:::0;21483:40:::1;:21:::0;16080:7:::1;21483:25;:40::i;:::-;21458:22;:65:::0;;;21534:4:::1;:12:::0;;;21582:16:::1;::::0;21600:18:::1;::::0;21564:85:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;::::1;::::0;;;;;;;::::1;21150:507:::0;;;;:::o;6750:508::-;7167:4;7213:17;7245:7;6750:508;:::o;9463:129::-;6349:12;;;;;;;;:31;;;6365:15;:13;:15::i;:::-;6349:47;;;-1:-1:-1;6385:11:0;;;;6384:12;6349:47;6341:106;;;;-1:-1:-1;;;6341:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6456:19;6479:12;;;;;;6478:13;6498:83;;;;6527:12;:19;;-1:-1:-1;;;;6527:19:0;;;;;6555:18;6542:4;6555:18;;;6498:83;9521:26:::1;:24;:26::i;:::-;9558;:24;:26::i;:::-;6603:14:::0;6599:57;;;6643:5;6628:20;;-1:-1:-1;;6628:20:0;;;6599:57;9463:129;:::o;861:181::-;919:7;951:5;;;975:6;;;;967:46;;;;;-1:-1:-1;;;967:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1033:1;-1:-1:-1;861:181:0;;;;;:::o;1317:136::-;1375:7;1402:43;1406:1;1409;1402:43;;;;;;;;;;;;;;;;;:3;:43::i;2191:471::-;2249:7;2494:6;2490:47;;-1:-1:-1;2524:1:0;2517:8;;2490:47;2561:5;;;2565:1;2561;:5;:1;2585:5;;;;;:10;2577:56;;;;-1:-1:-1;;;2577:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3130:132;3188:7;3215:39;3219:1;3222;3215:39;;;;;;;;;;;;;;;;;:3;:39::i;8272:106::-;8360:10;8272:106;:::o;19551:448::-;19673:4;;19719:37;19724:4;19734:21;19719:14;:37::i;:::-;19690:66;;19767:15;19785:46;19807:4;19813:7;19822:8;19785:21;:46::i;:::-;19767:64;-1:-1:-1;19842:15:0;19860:47;19902:4;19860:37;19767:64;19875:21;19860:14;:37::i;:47::-;19842:65;;19925:66;19986:4;19925:56;19970:10;19925:40;19941:4;19947:7;19956:8;19925:15;:40::i;:::-;:44;;:56::i;:66::-;19918:73;19551:448;-1:-1:-1;;;;;;;;19551:448:0:o;8193:69::-;6349:12;;;;;;;;:31;;;6365:15;:13;:15::i;:::-;6349:47;;;-1:-1:-1;6385:11:0;;;;6384:12;6349:47;6341:106;;;;-1:-1:-1;;;6341:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6456:19;6479:12;;;;;;6478:13;6498:83;;;;6527:12;:19;;-1:-1:-1;;;;6527:19:0;;;;;6555:18;6542:4;6555:18;;;6603:14;6599:57;;;6643:5;6628:20;;-1:-1:-1;;6628:20:0;;;8193:69;:::o;9600:202::-;6349:12;;;;;;;;:31;;;6365:15;:13;:15::i;:::-;6349:47;;;-1:-1:-1;6385:11:0;;;;6384:12;6349:47;6341:106;;;;-1:-1:-1;;;6341:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6456:19;6479:12;;;;;;6478:13;6498:83;;;;6527:12;:19;;-1:-1:-1;;;;6527:19:0;;;;;6555:18;6542:4;6555:18;;;6498:83;9672:17:::1;9692:12;:10;:12::i;:::-;9715:6;:18:::0;;-1:-1:-1;;;;;;9715:18:0::1;-1:-1:-1::0;;;;;9715:18:0;::::1;::::0;;::::1;::::0;;;9749:43:::1;::::0;9715:18;;-1:-1:-1;9715:18:0;-1:-1:-1;;9749:43:0::1;::::0;-1:-1:-1;;9749:43:0::1;6589:1;6603:14:::0;6599:57;;;6643:5;6628:20;;-1:-1:-1;;6628:20:0;;;9600:202;:::o;1748:192::-;1834:7;1870:12;1862:6;;;;1854:29;;;;-1:-1:-1;;;1854:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1906:5:0;;;1748:192::o;3750:345::-;3836:7;3938:12;3931:5;3923:28;;;;-1:-1:-1;;;3923:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3962:9;3978:1;3974;:5;;;;;;;3750:345;-1:-1:-1;;;;;3750:345:0:o

Swarm Source

ipfs://77a398f42a422828645a5a7dfad60739905666af4a79d83e7150fe14eb0e69f4

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.