{
  "address": "0xe6FfD92B9F77FBF5BfEc0F3D9c9d027C4CF3bA6e",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "baseRatePerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "multiplierPerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "jumpMultiplierPerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "kink1_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "kink2_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "roof_",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "owner_",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "baseRatePerSecond",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "multiplierPerSecond",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "jumpMultiplierPerSecond",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "kink1",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "kink2",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "roof",
          "type": "uint256"
        }
      ],
      "name": "NewInterestParams",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "baseRatePerSecond",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "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"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "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"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isInterestRateModel",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "jumpMultiplierPerSecond",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "kink1",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "kink2",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "multiplierPerSecond",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "roof",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "secondsPerYear",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "baseRatePerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "multiplierPerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "jumpMultiplierPerYear",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "kink1_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "kink2_",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "roof_",
          "type": "uint256"
        }
      ],
      "name": "updateTripleRateModel",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "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"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "transactionHash": "0xa93d6c404a08fc9615f6a3c31d906a4f4455dfd89b2a4e42c5ece80d4057f8fe",
  "receipt": {
    "to": null,
    "from": "0x5D3e4C0FE11e0aE4c32F0FF74B4544C49538AC61",
    "contractAddress": "0xe6FfD92B9F77FBF5BfEc0F3D9c9d027C4CF3bA6e",
    "transactionIndex": 0,
    "gasUsed": "701977",
    "logsBloom": "0x00000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000800000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000",
    "blockHash": "0x87ed75c82d7a3024c09bd7626e599affb0b09e29170eb2ceef27b1762ef854aa",
    "transactionHash": "0xa93d6c404a08fc9615f6a3c31d906a4f4455dfd89b2a4e42c5ece80d4057f8fe",
    "logs": [
      {
        "transactionIndex": 0,
        "blockNumber": 5446298,
        "transactionHash": "0xa93d6c404a08fc9615f6a3c31d906a4f4455dfd89b2a4e42c5ece80d4057f8fe",
        "address": "0xe6FfD92B9F77FBF5BfEc0F3D9c9d027C4CF3bA6e",
        "topics": [
          "0x4b73aac5f6a6d7f85af810fb244e35fa994ef635f5806dadef27143533fb6436"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d88341bb0000000000000000000000000000000000000000000000000000000ec41a0ddf0000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000c7d713b49da000000000000000000000000000000000000000000000000000014d1120d7b160000",
        "logIndex": 0,
        "blockHash": "0x87ed75c82d7a3024c09bd7626e599affb0b09e29170eb2ceef27b1762ef854aa"
      }
    ],
    "blockNumber": 5446298,
    "cumulativeGasUsed": "701977",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "0",
    "200000000000000000",
    "2000000000000000000",
    "800000000000000000",
    "900000000000000000",
    "1500000000000000000",
    "0x5D3e4C0FE11e0aE4c32F0FF74B4544C49538AC61"
  ],
  "solcInputHash": "14203f8d63760f09a6294504260b2474",
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink1_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink2_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roof_\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseRatePerSecond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"multiplierPerSecond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerSecond\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink1\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kink2\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roof\",\"type\":\"uint256\"}],\"name\":\"NewInterestParams\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"baseRatePerSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"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\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"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\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jumpMultiplierPerSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink1\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"kink2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"multiplierPerSecond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"roof\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"secondsPerYear\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink1_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink2_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"roof_\",\"type\":\"uint256\"}],\"name\":\"updateTripleRateModel\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"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\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"C.R.E.A.M. Finance\",\"methods\":{\"constructor\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerSecond after hitting a specified utilization point\",\"kink1_\":\"The utilization point at which the interest rate is fixed\",\"kink2_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\",\"owner_\":\"The address of the owner, i.e. the Timelock contract (which has the ability to update parameters directly)\",\"roof_\":\"The utilization point at which the borrow rate is fixed\"}},\"getBorrowRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The borrow rate percentage per second as a mantissa (scaled by 1e18)\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserveFactorMantissa\":\"The current reserve factor for the market\",\"reserves\":\"The amount of reserves in the market\"},\"return\":\"The supply rate percentage per second as a mantissa (scaled by 1e18)\"},\"updateTripleRateModel(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by 1e18)\",\"jumpMultiplierPerYear\":\"The multiplierPerSecond after hitting a specified utilization point\",\"kink1_\":\"The utilization point at which the interest rate is fixed\",\"kink2_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by 1e18)\",\"roof_\":\"The utilization point at which the borrow rate is fixed\"}},\"utilizationRate(uint256,uint256,uint256)\":{\"params\":{\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market (currently unused)\"},\"return\":\"The utilization rate as a mantissa between [0, 1e18]\"}},\"title\":\"CREAM's TripleSlopeRateModel Contract\"},\"userdoc\":{\"methods\":{\"constructor\":\"Construct an interest rate model\",\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per second, with the error code expected by the market\"},\"getSupplyRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per second\"},\"updateTripleRateModel(uint256,uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Update the parameters of the interest rate model (only callable by owner, i.e. Timelock)\"},\"utilizationRate(uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\"}}}},\"settings\":{\"compilationTarget\":{\"contracts/TripleSlopeRateModel.sol\":\"TripleSlopeRateModel\"},\"evmVersion\":\"istanbul\",\"libraries\":{\"__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.5.16;\\n\\n/**\\n * @title Compound's InterestRateModel Interface\\n * @author Compound\\n */\\ncontract InterestRateModel {\\n    /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n    bool public constant isInterestRateModel = true;\\n\\n    /**\\n     * @notice Calculates the current borrow interest rate per sec\\n     * @param cash The total amount of cash the market has\\n     * @param borrows The total amount of borrows the market has outstanding\\n     * @param reserves The total amnount of reserves the market has\\n     * @return The borrow rate per sec (as a percentage, and scaled by 1e18)\\n     */\\n    function getBorrowRate(\\n        uint256 cash,\\n        uint256 borrows,\\n        uint256 reserves\\n    ) external view returns (uint256);\\n\\n    /**\\n     * @notice Calculates the current supply interest rate per sec\\n     * @param cash The total amount of cash the market has\\n     * @param borrows The total amount of borrows the market has outstanding\\n     * @param reserves The total amnount of reserves the market has\\n     * @param reserveFactorMantissa The current reserve factor the market has\\n     * @return The supply rate per sec (as a percentage, and scaled by 1e18)\\n     */\\n    function getSupplyRate(\\n        uint256 cash,\\n        uint256 borrows,\\n        uint256 reserves,\\n        uint256 reserveFactorMantissa\\n    ) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7ca611215903c5068643656d02f87c5576f6770ced6dc5b87a49b125d7d007ae\"},\"contracts/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.5.16;\\n\\n// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol\\n// Subject to the MIT license.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\\n * checks.\\n *\\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\\n * in bugs, because programmers usually assume that an overflow raises an\\n * error, which is the standard behavior in high level programming languages.\\n * `SafeMath` restores this intuition by reverting the transaction when an\\n * operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        require(c >= a, \\\"SafeMath: addition overflow\\\");\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     * - Addition cannot overflow.\\n     */\\n    function add(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        uint256 c = a + b;\\n        require(c >= a, errorMessage);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     * - Subtraction cannot underflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return sub(a, b, \\\"SafeMath: subtraction underflow\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     * - Subtraction cannot underflow.\\n     */\\n    function sub(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        require(b <= a, errorMessage);\\n        uint256 c = a - b;\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n        // benefit is lost if 'b' is also tested.\\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n        if (a == 0) {\\n            return 0;\\n        }\\n\\n        uint256 c = a * b;\\n        require(c / a == b, \\\"SafeMath: multiplication overflow\\\");\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n        // benefit is lost if 'b' is also tested.\\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n        if (a == 0) {\\n            return 0;\\n        }\\n\\n        uint256 c = a * b;\\n        require(c / a == b, errorMessage);\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers.\\n     * Reverts on division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return div(a, b, \\\"SafeMath: division by zero\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers.\\n     * Reverts with custom message on division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     * - The divisor cannot be zero.\\n     */\\n    function div(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        // Solidity only automatically asserts when dividing by 0\\n        require(b > 0, errorMessage);\\n        uint256 c = a / b;\\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * Reverts when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return mod(a, b, \\\"SafeMath: modulo by zero\\\");\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * Reverts with custom message when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(\\n        uint256 a,\\n        uint256 b,\\n        string memory errorMessage\\n    ) internal pure returns (uint256) {\\n        require(b != 0, errorMessage);\\n        return a % b;\\n    }\\n}\\n\",\"keccak256\":\"0xa1da05e95da010c1d90b79c5c6ed4caa27c904a66d022ac0bd18371feccae5e1\"},\"contracts/TripleSlopeRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\n\\npragma solidity ^0.5.16;\\n\\nimport \\\"./InterestRateModel.sol\\\";\\nimport \\\"./SafeMath.sol\\\";\\n\\n/**\\n * @title CREAM's TripleSlopeRateModel Contract\\n * @author C.R.E.A.M. Finance\\n */\\ncontract TripleSlopeRateModel is InterestRateModel {\\n    using SafeMath for uint256;\\n\\n    event NewInterestParams(\\n        uint256 baseRatePerSecond,\\n        uint256 multiplierPerSecond,\\n        uint256 jumpMultiplierPerSecond,\\n        uint256 kink1,\\n        uint256 kink2,\\n        uint256 roof\\n    );\\n\\n    /**\\n     * @notice The address of the owner, i.e. the Timelock contract, which can update parameters directly\\n     */\\n    address public owner;\\n\\n    /**\\n     * @notice The approximate number of seconds per year that is assumed by the interest rate model\\n     */\\n    uint256 public constant secondsPerYear = 31536000;\\n\\n    /**\\n     * @notice The minimum roof value used for calculating borrow rate.\\n     */\\n    uint256 internal constant minRoofValue = 1e18;\\n\\n    /**\\n     * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n     */\\n    uint256 public multiplierPerSecond;\\n\\n    /**\\n     * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n     */\\n    uint256 public baseRatePerSecond;\\n\\n    /**\\n     * @notice The multiplierPerSecond after hitting a specified utilization point\\n     */\\n    uint256 public jumpMultiplierPerSecond;\\n\\n    /**\\n     * @notice The utilization point at which the interest rate is fixed\\n     */\\n    uint256 public kink1;\\n\\n    /**\\n     * @notice The utilization point at which the jump multiplier is applied\\n     */\\n    uint256 public kink2;\\n\\n    /**\\n     * @notice The utilization point at which the rate is fixed\\n     */\\n    uint256 public roof;\\n\\n    /**\\n     * @notice Construct an interest rate model\\n     * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n     * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n     * @param jumpMultiplierPerYear The multiplierPerSecond after hitting a specified utilization point\\n     * @param kink1_ The utilization point at which the interest rate is fixed\\n     * @param kink2_ The utilization point at which the jump multiplier is applied\\n     * @param roof_ The utilization point at which the borrow rate is fixed\\n     * @param owner_ The address of the owner, i.e. the Timelock contract (which has the ability to update parameters directly)\\n     */\\n    constructor(\\n        uint256 baseRatePerYear,\\n        uint256 multiplierPerYear,\\n        uint256 jumpMultiplierPerYear,\\n        uint256 kink1_,\\n        uint256 kink2_,\\n        uint256 roof_,\\n        address owner_\\n    ) public {\\n        owner = owner_;\\n\\n        updateTripleRateModelInternal(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink1_, kink2_, roof_);\\n    }\\n\\n    /**\\n     * @notice Update the parameters of the interest rate model (only callable by owner, i.e. Timelock)\\n     * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n     * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n     * @param jumpMultiplierPerYear The multiplierPerSecond after hitting a specified utilization point\\n     * @param kink1_ The utilization point at which the interest rate is fixed\\n     * @param kink2_ The utilization point at which the jump multiplier is applied\\n     * @param roof_ The utilization point at which the borrow rate is fixed\\n     */\\n    function updateTripleRateModel(\\n        uint256 baseRatePerYear,\\n        uint256 multiplierPerYear,\\n        uint256 jumpMultiplierPerYear,\\n        uint256 kink1_,\\n        uint256 kink2_,\\n        uint256 roof_\\n    ) external {\\n        require(msg.sender == owner, \\\"only the owner may call this function.\\\");\\n\\n        updateTripleRateModelInternal(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink1_, kink2_, roof_);\\n    }\\n\\n    /**\\n     * @notice Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`\\n     * @param cash The amount of cash in the market\\n     * @param borrows The amount of borrows in the market\\n     * @param reserves The amount of reserves in the market (currently unused)\\n     * @return The utilization rate as a mantissa between [0, 1e18]\\n     */\\n    function utilizationRate(\\n        uint256 cash,\\n        uint256 borrows,\\n        uint256 reserves\\n    ) public view returns (uint256) {\\n        // Utilization rate is 0 when there are no borrows\\n        if (borrows == 0) {\\n            return 0;\\n        }\\n\\n        uint256 util = borrows.mul(1e18).div(cash.add(borrows).sub(reserves));\\n        // If the utilization is above the roof, cap it.\\n        if (util > roof) {\\n            util = roof;\\n        }\\n        return util;\\n    }\\n\\n    /**\\n     * @notice Calculates the current borrow rate per second, with the error code expected by the market\\n     * @param cash The amount of cash in the market\\n     * @param borrows The amount of borrows in the market\\n     * @param reserves The amount of reserves in the market\\n     * @return The borrow rate percentage per second as a mantissa (scaled by 1e18)\\n     */\\n    function getBorrowRate(\\n        uint256 cash,\\n        uint256 borrows,\\n        uint256 reserves\\n    ) public view returns (uint256) {\\n        uint256 util = utilizationRate(cash, borrows, reserves);\\n\\n        if (util <= kink1) {\\n            return util.mul(multiplierPerSecond).div(1e18).add(baseRatePerSecond);\\n        } else if (util <= kink2) {\\n            return kink1.mul(multiplierPerSecond).div(1e18).add(baseRatePerSecond);\\n        } else {\\n            uint256 normalRate = kink1.mul(multiplierPerSecond).div(1e18).add(baseRatePerSecond);\\n            uint256 excessUtil = util.sub(kink2);\\n            return excessUtil.mul(jumpMultiplierPerSecond).div(1e18).add(normalRate);\\n        }\\n    }\\n\\n    /**\\n     * @notice Calculates the current supply rate per second\\n     * @param cash The amount of cash in the market\\n     * @param borrows The amount of borrows in the market\\n     * @param reserves The amount of reserves in the market\\n     * @param reserveFactorMantissa The current reserve factor for the market\\n     * @return The supply rate percentage per second as a mantissa (scaled by 1e18)\\n     */\\n    function getSupplyRate(\\n        uint256 cash,\\n        uint256 borrows,\\n        uint256 reserves,\\n        uint256 reserveFactorMantissa\\n    ) public view returns (uint256) {\\n        uint256 oneMinusReserveFactor = uint256(1e18).sub(reserveFactorMantissa);\\n        uint256 borrowRate = getBorrowRate(cash, borrows, reserves);\\n        uint256 rateToPool = borrowRate.mul(oneMinusReserveFactor).div(1e18);\\n        return utilizationRate(cash, borrows, reserves).mul(rateToPool).div(1e18);\\n    }\\n\\n    /**\\n     * @notice Internal function to update the parameters of the interest rate model\\n     * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by 1e18)\\n     * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by 1e18)\\n     * @param jumpMultiplierPerYear The multiplierPerSecond after hitting a specified utilization point\\n     * @param kink1_ The utilization point at which the interest rate is fixed\\n     * @param kink2_ The utilization point at which the jump multiplier is applied\\n     * @param roof_ The utilization point at which the borrow rate is fixed\\n     */\\n    function updateTripleRateModelInternal(\\n        uint256 baseRatePerYear,\\n        uint256 multiplierPerYear,\\n        uint256 jumpMultiplierPerYear,\\n        uint256 kink1_,\\n        uint256 kink2_,\\n        uint256 roof_\\n    ) internal {\\n        require(kink1_ <= kink2_, \\\"kink1 must less than or equal to kink2\\\");\\n        require(roof_ >= minRoofValue, \\\"invalid roof value\\\");\\n\\n        baseRatePerSecond = baseRatePerYear.div(secondsPerYear);\\n        multiplierPerSecond = (multiplierPerYear.mul(1e18)).div(secondsPerYear.mul(kink1_));\\n        jumpMultiplierPerSecond = jumpMultiplierPerYear.div(secondsPerYear);\\n        kink1 = kink1_;\\n        kink2 = kink2_;\\n        roof = roof_;\\n\\n        emit NewInterestParams(baseRatePerSecond, multiplierPerSecond, jumpMultiplierPerSecond, kink1, kink2, roof);\\n    }\\n}\\n\",\"keccak256\":\"0x50f22ee19269ec2d22c5065ad4c9d0873a01e79172713add6406c33d84ccabb3\"}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b5060405162000cdc38038062000cdc833981810160405260e08110156200003757600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151600080546001600160a01b0319166001600160a01b03831617905594959394929391929091906200008f8787878787876200009c565b5050505050505062000397565b81831115620000dd5760405162461bcd60e51b815260040180806020018281038252602681526020018062000cb66026913960400191505060405180910390fd5b670de0b6b3a764000081101562000130576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420726f6f662076616c756560701b604482015290519081900360640190fd5b6200014e6301e13380876200023f60201b6200050b1790919060201c565b600255620001a7620001716301e133808562000292602090811b620004a917901c565b62000193670de0b6b3a7640000886200029260201b620004a91790919060201c565b6200023f60201b6200050b1790919060201c565b600155620001c6846301e133806200023f602090811b6200050b17901c565b600381905560048490556005839055600682905560025460015460408051928352602083019190915281810192909252606081018590526080810184905260a0810183905290517f4b73aac5f6a6d7f85af810fb244e35fa994ef635f5806dadef27143533fb64369181900360c00190a1505050505050565b60006200028983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250620002f060201b60201c565b90505b92915050565b600082620002a3575060006200028c565b82820282848281620002b157fe5b0414620002895760405162461bcd60e51b815260040180806020018281038252602181526020018062000c956021913960400191505060405180910390fd5b60008183620003805760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620003445781810151838201526020016200032a565b50505050905090810190601f168015620003725780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200038d57fe5b0495945050505050565b6108ee80620003a76000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636e71e2d81161008c578063b3da1ebb11610066578063b3da1ebb146101a0578063b8168816146101dd578063d34f61141461020c578063d90e026414610214576100cf565b80636e71e2d81461014b57806372cf84a7146101745780638da5cb5b1461017c576100cf565b806315f24053146100d45780632191f92a1461010f578063252e40b11461012b57806346f608ff1461013357806350af8cd61461013b578063573be0fb14610143575b600080fd5b6100fd600480360360608110156100ea57600080fd5b508035906020810135906040013561021c565b60408051918252519081900360200190f35b610117610326565b604080519115158252519081900360200190f35b6100fd61032b565b6100fd610333565b6100fd610339565b6100fd61033f565b6100fd6004803603606081101561016157600080fd5b5080359060208101359060400135610345565b6100fd6103aa565b6101846103b0565b604080516001600160a01b039092168252519081900360200190f35b6101db600480360360c08110156101b657600080fd5b5080359060208101359060408101359060608101359060808101359060a001356103bf565b005b6100fd600480360360808110156101f357600080fd5b508035906020810135906040810135906060013561041e565b6100fd61049d565b6100fd6104a3565b60008061022a858585610345565b9050600454811161027c57610274600254610268670de0b6b3a764000061025c600154866104a990919063ffffffff16565b9063ffffffff61050b16565b9063ffffffff61054d16565b91505061031f565b60055481116102ae57610274600254610268670de0b6b3a764000061025c6001546004546104a990919063ffffffff16565b60006102d9600254610268670de0b6b3a764000061025c6001546004546104a990919063ffffffff16565b905060006102f2600554846105a790919063ffffffff16565b905061031982610268670de0b6b3a764000061025c600354866104a990919063ffffffff16565b93505050505b9392505050565b600181565b6301e1338081565b60015481565b60055481565b60065481565b6000826103545750600061031f565b60006103916103798461036d888863ffffffff61054d16565b9063ffffffff6105a716565b61025c86670de0b6b3a764000063ffffffff6104a916565b90506006548111156103a257506006545b949350505050565b60035481565b6000546001600160a01b031681565b6000546001600160a01b031633146104085760405162461bcd60e51b815260040180806020018281038252602681526020018061086e6026913960400191505060405180910390fd5b6104168686868686866105e9565b505050505050565b600080610439670de0b6b3a76400008463ffffffff6105a716565b9050600061044887878761021c565b90506000610468670de0b6b3a764000061025c848663ffffffff6104a916565b9050610491670de0b6b3a764000061025c836104858c8c8c610345565b9063ffffffff6104a916565b98975050505050505050565b60045481565b60025481565b6000826104b857506000610505565b828202828482816104c557fe5b04146105025760405162461bcd60e51b815260040180806020018281038252602181526020018061084d6021913960400191505060405180910390fd5b90505b92915050565b600061050283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610750565b600082820183811015610502576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061050283836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506107f2565b818311156106285760405162461bcd60e51b81526004018080602001828103825260268152602001806108946026913960400191505060405180910390fd5b670de0b6b3a764000081101561067a576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420726f6f662076616c756560701b604482015290519081900360640190fd5b61068e866301e1338063ffffffff61050b16565b6002556106c06106a86301e133808563ffffffff6104a916565b61025c87670de0b6b3a764000063ffffffff6104a916565b6001556106d7846301e1338063ffffffff61050b16565b600381905560048490556005839055600682905560025460015460408051928352602083019190915281810192909252606081018590526080810184905260a0810183905290517f4b73aac5f6a6d7f85af810fb244e35fa994ef635f5806dadef27143533fb64369181900360c00190a1505050505050565b600081836107dc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107a1578181015183820152602001610789565b50505050905090810190601f1680156107ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816107e857fe5b0495945050505050565b600081848411156108445760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107a1578181015183820152602001610789565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f6e6c7920746865206f776e6572206d61792063616c6c20746869732066756e6374696f6e2e6b696e6b31206d757374206c657373207468616e206f7220657175616c20746f206b696e6b32a265627a7a7231582016e07e1a1051e4f8f17a61e118f7601ecdd21d4f995ad9fd27eae59ea7fab3b464736f6c63430005100032536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776b696e6b31206d757374206c657373207468616e206f7220657175616c20746f206b696e6b32",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80636e71e2d81161008c578063b3da1ebb11610066578063b3da1ebb146101a0578063b8168816146101dd578063d34f61141461020c578063d90e026414610214576100cf565b80636e71e2d81461014b57806372cf84a7146101745780638da5cb5b1461017c576100cf565b806315f24053146100d45780632191f92a1461010f578063252e40b11461012b57806346f608ff1461013357806350af8cd61461013b578063573be0fb14610143575b600080fd5b6100fd600480360360608110156100ea57600080fd5b508035906020810135906040013561021c565b60408051918252519081900360200190f35b610117610326565b604080519115158252519081900360200190f35b6100fd61032b565b6100fd610333565b6100fd610339565b6100fd61033f565b6100fd6004803603606081101561016157600080fd5b5080359060208101359060400135610345565b6100fd6103aa565b6101846103b0565b604080516001600160a01b039092168252519081900360200190f35b6101db600480360360c08110156101b657600080fd5b5080359060208101359060408101359060608101359060808101359060a001356103bf565b005b6100fd600480360360808110156101f357600080fd5b508035906020810135906040810135906060013561041e565b6100fd61049d565b6100fd6104a3565b60008061022a858585610345565b9050600454811161027c57610274600254610268670de0b6b3a764000061025c600154866104a990919063ffffffff16565b9063ffffffff61050b16565b9063ffffffff61054d16565b91505061031f565b60055481116102ae57610274600254610268670de0b6b3a764000061025c6001546004546104a990919063ffffffff16565b60006102d9600254610268670de0b6b3a764000061025c6001546004546104a990919063ffffffff16565b905060006102f2600554846105a790919063ffffffff16565b905061031982610268670de0b6b3a764000061025c600354866104a990919063ffffffff16565b93505050505b9392505050565b600181565b6301e1338081565b60015481565b60055481565b60065481565b6000826103545750600061031f565b60006103916103798461036d888863ffffffff61054d16565b9063ffffffff6105a716565b61025c86670de0b6b3a764000063ffffffff6104a916565b90506006548111156103a257506006545b949350505050565b60035481565b6000546001600160a01b031681565b6000546001600160a01b031633146104085760405162461bcd60e51b815260040180806020018281038252602681526020018061086e6026913960400191505060405180910390fd5b6104168686868686866105e9565b505050505050565b600080610439670de0b6b3a76400008463ffffffff6105a716565b9050600061044887878761021c565b90506000610468670de0b6b3a764000061025c848663ffffffff6104a916565b9050610491670de0b6b3a764000061025c836104858c8c8c610345565b9063ffffffff6104a916565b98975050505050505050565b60045481565b60025481565b6000826104b857506000610505565b828202828482816104c557fe5b04146105025760405162461bcd60e51b815260040180806020018281038252602181526020018061084d6021913960400191505060405180910390fd5b90505b92915050565b600061050283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610750565b600082820183811015610502576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061050283836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506107f2565b818311156106285760405162461bcd60e51b81526004018080602001828103825260268152602001806108946026913960400191505060405180910390fd5b670de0b6b3a764000081101561067a576040805162461bcd60e51b8152602060048201526012602482015271696e76616c696420726f6f662076616c756560701b604482015290519081900360640190fd5b61068e866301e1338063ffffffff61050b16565b6002556106c06106a86301e133808563ffffffff6104a916565b61025c87670de0b6b3a764000063ffffffff6104a916565b6001556106d7846301e1338063ffffffff61050b16565b600381905560048490556005839055600682905560025460015460408051928352602083019190915281810192909252606081018590526080810184905260a0810183905290517f4b73aac5f6a6d7f85af810fb244e35fa994ef635f5806dadef27143533fb64369181900360c00190a1505050505050565b600081836107dc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107a1578181015183820152602001610789565b50505050905090810190601f1680156107ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816107e857fe5b0495945050505050565b600081848411156108445760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156107a1578181015183820152602001610789565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f6e6c7920746865206f776e6572206d61792063616c6c20746869732066756e6374696f6e2e6b696e6b31206d757374206c657373207468616e206f7220657175616c20746f206b696e6b32a265627a7a7231582016e07e1a1051e4f8f17a61e118f7601ecdd21d4f995ad9fd27eae59ea7fab3b464736f6c63430005100032",
  "devdoc": {
    "author": "C.R.E.A.M. Finance",
    "methods": {
      "constructor": {
        "params": {
          "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)",
          "jumpMultiplierPerYear": "The multiplierPerSecond after hitting a specified utilization point",
          "kink1_": "The utilization point at which the interest rate is fixed",
          "kink2_": "The utilization point at which the jump multiplier is applied",
          "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)",
          "owner_": "The address of the owner, i.e. the Timelock contract (which has the ability to update parameters directly)",
          "roof_": "The utilization point at which the borrow rate is fixed"
        }
      },
      "getBorrowRate(uint256,uint256,uint256)": {
        "params": {
          "borrows": "The amount of borrows in the market",
          "cash": "The amount of cash in the market",
          "reserves": "The amount of reserves in the market"
        },
        "return": "The borrow rate percentage per second as a mantissa (scaled by 1e18)"
      },
      "getSupplyRate(uint256,uint256,uint256,uint256)": {
        "params": {
          "borrows": "The amount of borrows in the market",
          "cash": "The amount of cash in the market",
          "reserveFactorMantissa": "The current reserve factor for the market",
          "reserves": "The amount of reserves in the market"
        },
        "return": "The supply rate percentage per second as a mantissa (scaled by 1e18)"
      },
      "updateTripleRateModel(uint256,uint256,uint256,uint256,uint256,uint256)": {
        "params": {
          "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by 1e18)",
          "jumpMultiplierPerYear": "The multiplierPerSecond after hitting a specified utilization point",
          "kink1_": "The utilization point at which the interest rate is fixed",
          "kink2_": "The utilization point at which the jump multiplier is applied",
          "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by 1e18)",
          "roof_": "The utilization point at which the borrow rate is fixed"
        }
      },
      "utilizationRate(uint256,uint256,uint256)": {
        "params": {
          "borrows": "The amount of borrows in the market",
          "cash": "The amount of cash in the market",
          "reserves": "The amount of reserves in the market (currently unused)"
        },
        "return": "The utilization rate as a mantissa between [0, 1e18]"
      }
    },
    "title": "CREAM's TripleSlopeRateModel Contract"
  },
  "userdoc": {
    "methods": {
      "constructor": "Construct an interest rate model",
      "getBorrowRate(uint256,uint256,uint256)": {
        "notice": "Calculates the current borrow rate per second, with the error code expected by the market"
      },
      "getSupplyRate(uint256,uint256,uint256,uint256)": {
        "notice": "Calculates the current supply rate per second"
      },
      "updateTripleRateModel(uint256,uint256,uint256,uint256,uint256,uint256)": {
        "notice": "Update the parameters of the interest rate model (only callable by owner, i.e. Timelock)"
      },
      "utilizationRate(uint256,uint256,uint256)": {
        "notice": "Calculates the utilization rate of the market: `borrows / (cash + borrows - reserves)`"
      }
    }
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 25328,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "owner",
        "offset": 0,
        "slot": "0",
        "type": "t_address"
      },
      {
        "astId": 25336,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "multiplierPerSecond",
        "offset": 0,
        "slot": "1",
        "type": "t_uint256"
      },
      {
        "astId": 25338,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "baseRatePerSecond",
        "offset": 0,
        "slot": "2",
        "type": "t_uint256"
      },
      {
        "astId": 25340,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "jumpMultiplierPerSecond",
        "offset": 0,
        "slot": "3",
        "type": "t_uint256"
      },
      {
        "astId": 25342,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "kink1",
        "offset": 0,
        "slot": "4",
        "type": "t_uint256"
      },
      {
        "astId": 25344,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "kink2",
        "offset": 0,
        "slot": "5",
        "type": "t_uint256"
      },
      {
        "astId": 25346,
        "contract": "contracts/TripleSlopeRateModel.sol:TripleSlopeRateModel",
        "label": "roof",
        "offset": 0,
        "slot": "6",
        "type": "t_uint256"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      }
    }
  }
}