Contract 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e 2

Contract Overview

Balance:
0 BNB
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8d2034693b57cc765676d8b3a33042abf87d5de4c4422bb544dffa35eb78aff30x60806040106901792021-07-18 5:18:26131 days 23 hrs ago0xbee397129374d0b4db7bf1654936951e5bdfe5a6 IN  Contract Creation0 BNB0.01264864
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x36fa094635ca8f4b602c8923646ba9dd66dc1cecab8a10f172f803a89c2654b1139894422021-11-10 10:40:0216 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x3a68a1ac07b41976d8711c444f1c934d97b8eb8e485c64d5eee6105ab31fb79a139894132021-11-10 10:38:3516 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xad99e7a18b69c423a21658ea3d55b7f365c40160ea6ffa9bc80c71117c0fbea9139893832021-11-10 10:37:0516 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x9dd604f726a7383c4c730bf366e05b8ba4b3c55452b8f7afe7c87b0d132057b2139893582021-11-10 10:35:5016 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x082c881b9644922dddb7e0826b30bd67ae1c3f7c2e7b42c32d3fa4203fe747fc139893412021-11-10 10:34:5916 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x74d0e219c40f473269e5f29a67f47ed5a0957bda2cfd95bedf3873aebc1d7541139893162021-11-10 10:33:4416 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x08c4cd2413bffd5cc79ee8675bdf63949fe52bcb905597f5a1948bd16a15737e139893012021-11-10 10:32:5916 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xcef7a16d0172e1f1c5d94500e4df3f34471a43d5a4dddc91dc99b1b9da8deebf139892652021-11-10 10:31:1116 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x91d1509ceaedb3ef496a29d73dbdb7abe570e202c319d123212dc16ab1e3abd3139892512021-11-10 10:30:2916 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x3948a17e06fcbcacd41d884e85792fe1fc9eaf0feb807e2c6bfcf225efd4926c139316312021-11-08 10:26:1018 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xa935c6e1d9aec3e7cd1149819db7d1bca6f40369666c26a120a25c1c553e0ba2139316122021-11-08 10:25:1318 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xa80e74ece9d06b1c50385c99027e8df8a07808b3b0ee60ad1af276ab3c76fa4a139315982021-11-08 10:24:3118 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x2e34748e15af6977688079a34a983fc4efadeb0870827d7d906bc4754afa539f139315752021-11-08 10:23:2218 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xd438593a7683a9f646bcc659184d4e7174bd82e2085782f643cb8baf7edc3494139315302021-11-08 10:21:0718 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x557c8c7c97dd9d682798848b6d696e2d4eeabece06b95336aa23a3004eed6a49139314602021-11-08 10:17:3718 days 18 hrs ago 0xc5a8e838cb146586701021eec4b1e0a0a7b3285e 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xf65daef59dfcfd2129c1e3d3231e7ccf33b36977cc732bb31d36b822ed6d56ba138631282021-11-06 0:52:5321 days 4 hrs ago 0x33df721de015ce010beee46d181d13999e9cdb01 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x2262b6fa63e9b09be14774993f2c9b56377831bfb42510f6dc38d508e350fd69138631192021-11-06 0:52:2621 days 4 hrs ago 0x33df721de015ce010beee46d181d13999e9cdb01 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x776404e16fd250282c2a046b4a2d8c13d24209ce21cd1e1e7d21bbdabc22b624138630972021-11-06 0:51:2021 days 4 hrs ago 0x17b7163cf1dbd286e262ddc68b553d899b93f526 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x01f66a81cc1f521a4ad23f3933669404df4fd8fc98658dc75f42589f4b1f95d9138630742021-11-06 0:50:1121 days 4 hrs ago 0x1b2965c21f1c02c2f369d38dc461d52691766dc5 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x01f66a81cc1f521a4ad23f3933669404df4fd8fc98658dc75f42589f4b1f95d9138630742021-11-06 0:50:1121 days 4 hrs ago 0x17b7163cf1dbd286e262ddc68b553d899b93f526 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x01f66a81cc1f521a4ad23f3933669404df4fd8fc98658dc75f42589f4b1f95d9138630742021-11-06 0:50:1121 days 4 hrs ago 0x33df721de015ce010beee46d181d13999e9cdb01 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x7d14ef0a21022860118464a259c4d32f2a13714cdb1d26e38072a727a87c83e5138630572021-11-06 0:49:2021 days 4 hrs ago 0x1b2965c21f1c02c2f369d38dc461d52691766dc5 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x7d14ef0a21022860118464a259c4d32f2a13714cdb1d26e38072a727a87c83e5138630572021-11-06 0:49:2021 days 4 hrs ago 0x17b7163cf1dbd286e262ddc68b553d899b93f526 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0x7d14ef0a21022860118464a259c4d32f2a13714cdb1d26e38072a727a87c83e5138630572021-11-06 0:49:2021 days 4 hrs ago 0x33df721de015ce010beee46d181d13999e9cdb01 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
0xceed4a4b814a48856c927174d63728b094a5fbf88f258c659d1f53a8b19ddef4138629692021-11-06 0:44:5621 days 4 hrs ago 0x1b2965c21f1c02c2f369d38dc461d52691766dc5 0xc08c67d35ccf5221852948c6ce90a661f8c5da0e0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RateModelSlope

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : RateModelSlope.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

/*
      ___       ___       ___       ___       ___
     /\  \     /\__\     /\  \     /\  \     /\  \
    /::\  \   /:/ _/_   /::\  \   _\:\  \    \:\  \
    \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\   /::\__\
     \::/  / \:\/:/  / \:\::/  / \::/\/__/  /:/\/__/
     /:/  /   \::/  /   \::/  /   \:\__\    \/__/
     \/__/     \/__/     \/__/     \/__/

*
* MIT License
* ===========
*
* Copyright (c) 2021 QubitFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "../../interfaces/IRateModel.sol";


contract RateModelSlope is IRateModel, OwnableUpgradeable {
    using SafeMath for uint;

    uint private baseRatePerYear;
    uint private slopePerYearFirst;
    uint private slopePerYearSecond;
    uint private optimal;

    function initialize(
        uint _baseRatePerYear,
        uint _slopePerYearFirst,
        uint _slopePerYearSecond,
        uint _optimal) external initializer {
        __Ownable_init();

        baseRatePerYear = _baseRatePerYear;
        slopePerYearFirst = _slopePerYearFirst;
        slopePerYearSecond = _slopePerYearSecond;
        optimal = _optimal;
    }

    function utilizationRate(uint cash, uint borrows, uint reserves) public pure returns (uint) {
        if (reserves >= cash.add(borrows)) return 0;
        return borrows.mul(1e18).div(cash.add(borrows).sub(reserves));
    }

    function getBorrowRate(uint cash, uint borrows, uint reserves) public view override returns (uint) {
        uint utilization = utilizationRate(cash, borrows, reserves);
        if (optimal > 0 && utilization < optimal) {
            return baseRatePerYear.add(utilization.mul(slopePerYearFirst).div(optimal)).div(365 days);
        } else {
            uint ratio = utilization.sub(optimal).mul(1e18).div(uint(1e18).sub(optimal));
            return baseRatePerYear.add(slopePerYearFirst).add(ratio.mul(slopePerYearSecond).div(1e18)).div(365 days);
        }
    }

    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactor) public view override returns (uint) {
        uint oneMinusReserveFactor = uint(1e18).sub(reserveFactor);
        uint borrowRate = getBorrowRate(cash, borrows, reserves);
        uint rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);
        return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);
    }
}

File 2 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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;
    }
}

File 3 of 7 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/Initializable.sol";
/**
 * @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.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    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 virtual 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;
}

File 4 of 7 : IRateModel.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;

/*
      ___       ___       ___       ___       ___
     /\  \     /\__\     /\  \     /\  \     /\  \
    /::\  \   /:/ _/_   /::\  \   _\:\  \    \:\  \
    \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\   /::\__\
     \::/  / \:\/:/  / \:\::/  / \::/\/__/  /:/\/__/
     /:/  /   \::/  /   \::/  /   \:\__\    \/__/
     \/__/     \/__/     \/__/     \/__/

*
* MIT License
* ===========
*
* Copyright (c) 2021 QubitFinance
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

interface IRateModel {
    function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint);
    function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactor) external view returns (uint);
}

File 5 of 7 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";

/*
 * @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.
 */
abstract contract ContextUpgradeable is Initializable {
    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;
}

File 6 of 7 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

import "../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract 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 protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already 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) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 7 of 7 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"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":"reserveFactor","type":"uint256"}],"name":"getSupplyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_baseRatePerYear","type":"uint256"},{"internalType":"uint256","name":"_slopePerYearFirst","type":"uint256"},{"internalType":"uint256","name":"_slopePerYearSecond","type":"uint256"},{"internalType":"uint256","name":"_optimal","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"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"}]

608060405234801561001057600080fd5b50610a7c806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063715018a61161005b578063715018a6146101175780638da5cb5b1461011f578063b816881614610143578063f2fde38b146101725761007d565b806315f240531461008257806360a2da44146100bd5780636e71e2d8146100ee575b600080fd5b6100ab6004803603606081101561009857600080fd5b5080359060208101359060400135610198565b60408051918252519081900360200190f35b6100ec600480360360808110156100d357600080fd5b5080359060208101359060408101359060600135610295565b005b6100ab6004803603606081101561010457600080fd5b5080359060208101359060400135610357565b6100ec6103a2565b610127610460565b604080516001600160a01b039092168252519081900360200190f35b6100ab6004803603608081101561015957600080fd5b508035906020810135906040810135906060013561046f565b6100ec6004803603602081101561018857600080fd5b50356001600160a01b03166104d6565b6000806101a6858585610357565b905060006068541180156101bb575060685481105b156101fd576101f56301e133806101e66101ec6068546101e6606654876105eb90919063ffffffff16565b9061064d565b606554906106b4565b91505061028e565b600061024661021f606854670de0b6b3a764000061070e90919063ffffffff16565b6101e6670de0b6b3a76400006102406068548761070e90919063ffffffff16565b906105eb565b90506102896301e133806101e6610274670de0b6b3a76400006101e6606754876105eb90919063ffffffff16565b606654606554610283916106b4565b906106b4565b925050505b9392505050565b600054610100900460ff16806102ae57506102ae61076b565b806102bc575060005460ff16155b6102f75760405162461bcd60e51b815260040180806020018281038252602e8152602001806109f8602e913960400191505060405180910390fd5b600054610100900460ff16158015610322576000805460ff1961ff0019909116610100171660011790555b61032a61077c565b60658590556066849055606783905560688290558015610350576000805461ff00191690555b5050505050565b600061036384846106b4565b82106103715750600061028e565b61039a6103888361038287876106b4565b9061070e565b6101e685670de0b6b3a76400006105eb565b949350505050565b6103aa61082e565b6001600160a01b03166103bb610460565b6001600160a01b031614610416576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b6033546001600160a01b031690565b600080610484670de0b6b3a76400008461070e565b90506000610493878787610198565b905060006104ad670de0b6b3a76400006101e684866105eb565b90506104ca670de0b6b3a76400006101e6836102408c8c8c610357565b98975050505050505050565b6104de61082e565b6001600160a01b03166104ef610460565b6001600160a01b03161461054a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661058f5760405162461bcd60e51b81526004018080602001828103825260268152602001806109d26026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6000826105fa57506000610647565b8282028284828161060757fe5b04146106445760405162461bcd60e51b8152600401808060200182810382526021815260200180610a266021913960400191505060405180910390fd5b90505b92915050565b60008082116106a3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816106ac57fe5b049392505050565b600082820183811015610644576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115610765576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600061077630610832565b15905090565b600054610100900460ff1680610795575061079561076b565b806107a3575060005460ff16155b6107de5760405162461bcd60e51b815260040180806020018281038252602e8152602001806109f8602e913960400191505060405180910390fd5b600054610100900460ff16158015610809576000805460ff1961ff0019909116610100171660011790555b610811610838565b6108196108d8565b801561082b576000805461ff00191690555b50565b3390565b3b151590565b600054610100900460ff1680610851575061085161076b565b8061085f575060005460ff16155b61089a5760405162461bcd60e51b815260040180806020018281038252602e8152602001806109f8602e913960400191505060405180910390fd5b600054610100900460ff16158015610819576000805460ff1961ff001990911661010017166001179055801561082b576000805461ff001916905550565b600054610100900460ff16806108f157506108f161076b565b806108ff575060005460ff16155b61093a5760405162461bcd60e51b815260040180806020018281038252602e8152602001806109f8602e913960400191505060405180910390fd5b600054610100900460ff16158015610965576000805460ff1961ff0019909116610100171660011790555b600061096f61082e565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350801561082b576000805461ff00191690555056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122087a3bd3fd3e99a44c6081ce7512f9e8b1566d19d5f1c3d8b442030fee7f20d3c64736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading