@venusprotocol/isolated-pools 3.0.0-dev.2 → 3.1.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,519 @@
1
+ {
2
+ "address": "0x5E0dB1e8a6D6181aa39B3317179CDF91FBa4Ac51",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "uint256",
8
+ "name": "blocksPerYear_",
9
+ "type": "uint256"
10
+ },
11
+ {
12
+ "internalType": "uint256",
13
+ "name": "baseRatePerYear",
14
+ "type": "uint256"
15
+ },
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "multiplierPerYear",
19
+ "type": "uint256"
20
+ },
21
+ {
22
+ "internalType": "uint256",
23
+ "name": "jumpMultiplierPerYear",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "internalType": "uint256",
28
+ "name": "kink_",
29
+ "type": "uint256"
30
+ },
31
+ {
32
+ "internalType": "contract IAccessControlManagerV8",
33
+ "name": "accessControlManager_",
34
+ "type": "address"
35
+ }
36
+ ],
37
+ "stateMutability": "nonpayable",
38
+ "type": "constructor"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "address",
44
+ "name": "sender",
45
+ "type": "address"
46
+ },
47
+ {
48
+ "internalType": "address",
49
+ "name": "calledContract",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "internalType": "string",
54
+ "name": "methodSignature",
55
+ "type": "string"
56
+ }
57
+ ],
58
+ "name": "Unauthorized",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "anonymous": false,
63
+ "inputs": [
64
+ {
65
+ "indexed": false,
66
+ "internalType": "uint256",
67
+ "name": "baseRatePerBlock",
68
+ "type": "uint256"
69
+ },
70
+ {
71
+ "indexed": false,
72
+ "internalType": "uint256",
73
+ "name": "multiplierPerBlock",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "indexed": false,
78
+ "internalType": "uint256",
79
+ "name": "jumpMultiplierPerBlock",
80
+ "type": "uint256"
81
+ },
82
+ {
83
+ "indexed": false,
84
+ "internalType": "uint256",
85
+ "name": "kink",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "name": "NewInterestParams",
90
+ "type": "event"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "accessControlManager",
95
+ "outputs": [
96
+ {
97
+ "internalType": "contract IAccessControlManagerV8",
98
+ "name": "",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "stateMutability": "view",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [],
107
+ "name": "baseRatePerBlock",
108
+ "outputs": [
109
+ {
110
+ "internalType": "uint256",
111
+ "name": "",
112
+ "type": "uint256"
113
+ }
114
+ ],
115
+ "stateMutability": "view",
116
+ "type": "function"
117
+ },
118
+ {
119
+ "inputs": [],
120
+ "name": "blocksPerYear",
121
+ "outputs": [
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [
133
+ {
134
+ "internalType": "uint256",
135
+ "name": "cash",
136
+ "type": "uint256"
137
+ },
138
+ {
139
+ "internalType": "uint256",
140
+ "name": "borrows",
141
+ "type": "uint256"
142
+ },
143
+ {
144
+ "internalType": "uint256",
145
+ "name": "reserves",
146
+ "type": "uint256"
147
+ },
148
+ {
149
+ "internalType": "uint256",
150
+ "name": "badDebt",
151
+ "type": "uint256"
152
+ }
153
+ ],
154
+ "name": "getBorrowRate",
155
+ "outputs": [
156
+ {
157
+ "internalType": "uint256",
158
+ "name": "",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "stateMutability": "view",
163
+ "type": "function"
164
+ },
165
+ {
166
+ "inputs": [
167
+ {
168
+ "internalType": "uint256",
169
+ "name": "cash",
170
+ "type": "uint256"
171
+ },
172
+ {
173
+ "internalType": "uint256",
174
+ "name": "borrows",
175
+ "type": "uint256"
176
+ },
177
+ {
178
+ "internalType": "uint256",
179
+ "name": "reserves",
180
+ "type": "uint256"
181
+ },
182
+ {
183
+ "internalType": "uint256",
184
+ "name": "reserveFactorMantissa",
185
+ "type": "uint256"
186
+ },
187
+ {
188
+ "internalType": "uint256",
189
+ "name": "badDebt",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "name": "getSupplyRate",
194
+ "outputs": [
195
+ {
196
+ "internalType": "uint256",
197
+ "name": "",
198
+ "type": "uint256"
199
+ }
200
+ ],
201
+ "stateMutability": "view",
202
+ "type": "function"
203
+ },
204
+ {
205
+ "inputs": [],
206
+ "name": "isInterestRateModel",
207
+ "outputs": [
208
+ {
209
+ "internalType": "bool",
210
+ "name": "",
211
+ "type": "bool"
212
+ }
213
+ ],
214
+ "stateMutability": "pure",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [],
219
+ "name": "jumpMultiplierPerBlock",
220
+ "outputs": [
221
+ {
222
+ "internalType": "uint256",
223
+ "name": "",
224
+ "type": "uint256"
225
+ }
226
+ ],
227
+ "stateMutability": "view",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [],
232
+ "name": "kink",
233
+ "outputs": [
234
+ {
235
+ "internalType": "uint256",
236
+ "name": "",
237
+ "type": "uint256"
238
+ }
239
+ ],
240
+ "stateMutability": "view",
241
+ "type": "function"
242
+ },
243
+ {
244
+ "inputs": [],
245
+ "name": "multiplierPerBlock",
246
+ "outputs": [
247
+ {
248
+ "internalType": "uint256",
249
+ "name": "",
250
+ "type": "uint256"
251
+ }
252
+ ],
253
+ "stateMutability": "view",
254
+ "type": "function"
255
+ },
256
+ {
257
+ "inputs": [
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "baseRatePerYear",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "internalType": "uint256",
265
+ "name": "multiplierPerYear",
266
+ "type": "uint256"
267
+ },
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "jumpMultiplierPerYear",
271
+ "type": "uint256"
272
+ },
273
+ {
274
+ "internalType": "uint256",
275
+ "name": "kink_",
276
+ "type": "uint256"
277
+ }
278
+ ],
279
+ "name": "updateJumpRateModel",
280
+ "outputs": [],
281
+ "stateMutability": "nonpayable",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [
286
+ {
287
+ "internalType": "uint256",
288
+ "name": "cash",
289
+ "type": "uint256"
290
+ },
291
+ {
292
+ "internalType": "uint256",
293
+ "name": "borrows",
294
+ "type": "uint256"
295
+ },
296
+ {
297
+ "internalType": "uint256",
298
+ "name": "reserves",
299
+ "type": "uint256"
300
+ },
301
+ {
302
+ "internalType": "uint256",
303
+ "name": "badDebt",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "name": "utilizationRate",
308
+ "outputs": [
309
+ {
310
+ "internalType": "uint256",
311
+ "name": "",
312
+ "type": "uint256"
313
+ }
314
+ ],
315
+ "stateMutability": "pure",
316
+ "type": "function"
317
+ }
318
+ ],
319
+ "transactionHash": "0x21c951cd7ef70b7c7a7c641884ae2bc948990e165a78d90cc3732fdfdb5e51c2",
320
+ "receipt": {
321
+ "to": null,
322
+ "from": "0x986991992FFf9234635C51d1dFAF9e471314c703",
323
+ "contractAddress": "0x5E0dB1e8a6D6181aa39B3317179CDF91FBa4Ac51",
324
+ "transactionIndex": 7,
325
+ "gasUsed": "565152",
326
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000004000008000000000000000000080000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
327
+ "blockHash": "0x888991d27b47eb0603987d397394e3ecaa390f03cbef1f3ad59f85cc641b7714",
328
+ "transactionHash": "0x21c951cd7ef70b7c7a7c641884ae2bc948990e165a78d90cc3732fdfdb5e51c2",
329
+ "logs": [
330
+ {
331
+ "transactionIndex": 7,
332
+ "blockNumber": 37765115,
333
+ "transactionHash": "0x21c951cd7ef70b7c7a7c641884ae2bc948990e165a78d90cc3732fdfdb5e51c2",
334
+ "address": "0x5E0dB1e8a6D6181aa39B3317179CDF91FBa4Ac51",
335
+ "topics": ["0x6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d"],
336
+ "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c4c4e299000000000000000000000000000000000000000000000000000000375f61b4060000000000000000000000000000000000000000000000000b1a2bc2ec500000",
337
+ "logIndex": 18,
338
+ "blockHash": "0x888991d27b47eb0603987d397394e3ecaa390f03cbef1f3ad59f85cc641b7714"
339
+ }
340
+ ],
341
+ "blockNumber": 37765115,
342
+ "cumulativeGasUsed": "1231182",
343
+ "status": 1,
344
+ "byzantium": true
345
+ },
346
+ "args": [
347
+ 10512000,
348
+ "0",
349
+ "125000000000000000",
350
+ "2500000000000000000",
351
+ "800000000000000000",
352
+ "0x4788629abc6cfca10f9f969efdeaa1cf70c23555"
353
+ ],
354
+ "numDeployments": 1,
355
+ "solcInputHash": "cc4a40f102671d2570e0434d3962d0c4",
356
+ "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blocksPerYear_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseRatePerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"multiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jumpMultiplierPerYear\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"kink_\",\"type\":\"uint256\"},{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"accessControlManager_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"calledContract\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"methodSignature\",\"type\":\"string\"}],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"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\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"contract IAccessControlManagerV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\"},{\"internalType\":\"uint256\",\"name\":\"badDebt\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"badDebt\",\"type\":\"uint256\"}],\"name\":\"getSupplyRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"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\":[{\"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\"},{\"internalType\":\"uint256\",\"name\":\"badDebt\",\"type\":\"uint256\"}],\"name\":\"utilizationRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Arr00\",\"kind\":\"dev\",\"methods\":{\"getBorrowRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"badDebt\":\"The amount of badDebt in the market\",\"borrows\":\"The amount of borrows in the market\",\"cash\":\"The amount of cash in the market\",\"reserves\":\"The amount of reserves in the market\"},\"returns\":{\"_0\":\"The borrow rate percentage per block as a mantissa (scaled by 1e18)\"}},\"getSupplyRate(uint256,uint256,uint256,uint256,uint256)\":{\"params\":{\"badDebt\":\"The amount of badDebt in the market\",\"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\"},\"returns\":{\"_0\":\"The supply rate percentage per block as a mantissa (scaled by EXP_SCALE)\"}},\"isInterestRateModel()\":{\"returns\":{\"_0\":\"Always true\"}},\"updateJumpRateModel(uint256,uint256,uint256,uint256)\":{\"custom:access\":\"Controlled by AccessControlManager\",\"custom:error\":\"Unauthorized if the sender is not allowed to call this function\",\"params\":{\"baseRatePerYear\":\"The approximate target base APR, as a mantissa (scaled by EXP_SCALE)\",\"jumpMultiplierPerYear\":\"The multiplierPerBlock after hitting a specified utilization point\",\"kink_\":\"The utilization point at which the jump multiplier is applied\",\"multiplierPerYear\":\"The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE)\"}},\"utilizationRate(uint256,uint256,uint256,uint256)\":{\"params\":{\"badDebt\":\"The amount of badDebt in the market\",\"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)\"},\"returns\":{\"_0\":\"The utilization rate as a mantissa between [0, MANTISSA_ONE]\"}}},\"title\":\"Compound's JumpRateModel Contract V2 for V2 vTokens\",\"version\":1},\"userdoc\":{\"errors\":{\"Unauthorized(address,address,string)\":[{\"notice\":\"Thrown when the action is prohibited by AccessControlManager\"}]},\"kind\":\"user\",\"methods\":{\"accessControlManager()\":{\"notice\":\"The address of the AccessControlManager contract\"},\"baseRatePerBlock()\":{\"notice\":\"The base interest rate which is the y-intercept when utilization rate is 0\"},\"blocksPerYear()\":{\"notice\":\"The approximate number of blocks per year that is assumed by the interest rate model\"},\"getBorrowRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current borrow rate per block\"},\"getSupplyRate(uint256,uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the current supply rate per block\"},\"isInterestRateModel()\":{\"notice\":\"Indicator that this is an InterestRateModel contract (for inspection)\"},\"jumpMultiplierPerBlock()\":{\"notice\":\"The multiplier per block after hitting a specified utilization point\"},\"kink()\":{\"notice\":\"The utilization point at which the jump multiplier is applied\"},\"multiplierPerBlock()\":{\"notice\":\"The multiplier of utilization rate that gives the slope of the interest rate\"},\"updateJumpRateModel(uint256,uint256,uint256,uint256)\":{\"notice\":\"Update the parameters of the interest rate model\"},\"utilizationRate(uint256,uint256,uint256,uint256)\":{\"notice\":\"Calculates the utilization rate of the market: `(borrows + badDebt) / (cash + borrows + badDebt - reserves)`\"}},\"notice\":\"Supports only for V2 vTokens\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/JumpRateModelV2.sol\":\"JumpRateModelV2\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x8adbe291d659987faf4de606736227ad9d8e1a0e284a33a6ca12b30ab2a504b2\",\"license\":\"BSD-3-Clause\"},\"contracts/BaseJumpRateModelV2.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\n\\nimport { InterestRateModel } from \\\"./InterestRateModel.sol\\\";\\nimport { EXP_SCALE, MANTISSA_ONE } from \\\"./lib/constants.sol\\\";\\n\\n/**\\n * @title Logic for Compound's JumpRateModel Contract V2.\\n * @author Compound (modified by Dharma Labs, Arr00 and Venus)\\n * @notice An interest rate model with a steep increase after a certain utilization threshold called **kink** is reached.\\n * The parameters of this interest rate model can be adjusted by the owner. Version 2 modifies Version 1 by enabling updateable parameters.\\n */\\nabstract contract BaseJumpRateModelV2 is InterestRateModel {\\n /**\\n * @notice The approximate number of blocks per year that is assumed by the interest rate model\\n */\\n uint256 public immutable blocksPerYear;\\n /**\\n * @notice The address of the AccessControlManager contract\\n */\\n IAccessControlManagerV8 public accessControlManager;\\n\\n /**\\n * @notice The multiplier of utilization rate that gives the slope of the interest rate\\n */\\n uint256 public multiplierPerBlock;\\n\\n /**\\n * @notice The base interest rate which is the y-intercept when utilization rate is 0\\n */\\n uint256 public baseRatePerBlock;\\n\\n /**\\n * @notice The multiplier per block after hitting a specified utilization point\\n */\\n uint256 public jumpMultiplierPerBlock;\\n\\n /**\\n * @notice The utilization point at which the jump multiplier is applied\\n */\\n uint256 public kink;\\n\\n event NewInterestParams(\\n uint256 baseRatePerBlock,\\n uint256 multiplierPerBlock,\\n uint256 jumpMultiplierPerBlock,\\n uint256 kink\\n );\\n\\n /**\\n * @notice Thrown when the action is prohibited by AccessControlManager\\n */\\n error Unauthorized(address sender, address calledContract, string methodSignature);\\n\\n /**\\n * @notice Construct an interest rate model\\n * @param blocksPerYear_ The approximate number of blocks per year that is assumed by the interest rate model.\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by EXP_SCALE)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n * @param accessControlManager_ The address of the AccessControlManager contract\\n */\\n constructor(\\n uint256 blocksPerYear_,\\n uint256 baseRatePerYear,\\n uint256 multiplierPerYear,\\n uint256 jumpMultiplierPerYear,\\n uint256 kink_,\\n IAccessControlManagerV8 accessControlManager_\\n ) {\\n require(address(accessControlManager_) != address(0), \\\"invalid ACM address\\\");\\n require(blocksPerYear_ != 0, \\\"Invalid blocks per year\\\");\\n accessControlManager = accessControlManager_;\\n blocksPerYear = blocksPerYear_;\\n\\n _updateJumpRateModel(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_);\\n }\\n\\n /**\\n * @notice Update the parameters of the interest rate model\\n * @param baseRatePerYear The approximate target base APR, as a mantissa (scaled by EXP_SCALE)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n * @custom:error Unauthorized if the sender is not allowed to call this function\\n * @custom:access Controlled by AccessControlManager\\n */\\n function updateJumpRateModel(\\n uint256 baseRatePerYear,\\n uint256 multiplierPerYear,\\n uint256 jumpMultiplierPerYear,\\n uint256 kink_\\n ) external virtual {\\n string memory signature = \\\"updateJumpRateModel(uint256,uint256,uint256,uint256)\\\";\\n bool isAllowedToCall = accessControlManager.isAllowedToCall(msg.sender, signature);\\n\\n if (!isAllowedToCall) {\\n revert Unauthorized(msg.sender, address(this), signature);\\n }\\n\\n _updateJumpRateModel(baseRatePerYear, multiplierPerYear, jumpMultiplierPerYear, kink_);\\n }\\n\\n /**\\n * @notice Calculates the current supply rate per block\\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 * @param badDebt The amount of badDebt in the market\\n * @return The supply rate percentage per block as a mantissa (scaled by EXP_SCALE)\\n */\\n function getSupplyRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 reserveFactorMantissa,\\n uint256 badDebt\\n ) public view virtual override returns (uint256) {\\n uint256 oneMinusReserveFactor = MANTISSA_ONE - reserveFactorMantissa;\\n uint256 borrowRate = _getBorrowRate(cash, borrows, reserves, badDebt);\\n uint256 rateToPool = (borrowRate * oneMinusReserveFactor) / EXP_SCALE;\\n uint256 incomeToDistribute = borrows * rateToPool;\\n uint256 supply = cash + borrows + badDebt - reserves;\\n return incomeToDistribute / supply;\\n }\\n\\n /**\\n * @notice Calculates the utilization rate of the market: `(borrows + badDebt) / (cash + borrows + badDebt - 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 * @param badDebt The amount of badDebt in the market\\n * @return The utilization rate as a mantissa between [0, MANTISSA_ONE]\\n */\\n function utilizationRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 badDebt\\n ) public pure returns (uint256) {\\n // Utilization rate is 0 when there are no borrows and badDebt\\n if ((borrows + badDebt) == 0) {\\n return 0;\\n }\\n\\n uint256 rate = ((borrows + badDebt) * EXP_SCALE) / (cash + borrows + badDebt - reserves);\\n\\n if (rate > EXP_SCALE) {\\n rate = EXP_SCALE;\\n }\\n\\n return rate;\\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 EXP_SCALE)\\n * @param multiplierPerYear The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE)\\n * @param jumpMultiplierPerYear The multiplierPerBlock after hitting a specified utilization point\\n * @param kink_ The utilization point at which the jump multiplier is applied\\n */\\n function _updateJumpRateModel(\\n uint256 baseRatePerYear,\\n uint256 multiplierPerYear,\\n uint256 jumpMultiplierPerYear,\\n uint256 kink_\\n ) internal {\\n baseRatePerBlock = baseRatePerYear / blocksPerYear;\\n multiplierPerBlock = multiplierPerYear / blocksPerYear;\\n jumpMultiplierPerBlock = jumpMultiplierPerYear / blocksPerYear;\\n kink = kink_;\\n\\n emit NewInterestParams(baseRatePerBlock, multiplierPerBlock, jumpMultiplierPerBlock, kink);\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block, 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 * @param badDebt The amount of badDebt in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by EXP_SCALE)\\n */\\n function _getBorrowRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 badDebt\\n ) internal view returns (uint256) {\\n uint256 util = utilizationRate(cash, borrows, reserves, badDebt);\\n uint256 kink_ = kink;\\n\\n if (util <= kink_) {\\n return ((util * multiplierPerBlock) / EXP_SCALE) + baseRatePerBlock;\\n }\\n uint256 normalRate = ((kink_ * multiplierPerBlock) / EXP_SCALE) + baseRatePerBlock;\\n uint256 excessUtil;\\n unchecked {\\n excessUtil = util - kink_;\\n }\\n return ((excessUtil * jumpMultiplierPerBlock) / EXP_SCALE) + normalRate;\\n }\\n}\\n\",\"keccak256\":\"0xa2fa0aae39306f3c8ddf1c3b2fefffa15ce68406315cd95ebe2c2ac4263e7f16\",\"license\":\"BSD-3-Clause\"},\"contracts/InterestRateModel.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/**\\n * @title Compound's InterestRateModel Interface\\n * @author Compound\\n */\\nabstract contract InterestRateModel {\\n /**\\n * @notice Calculates the current borrow interest rate per block\\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 amount of reserves the market has\\n * @param badDebt The amount of badDebt in the market\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 badDebt\\n ) external view virtual returns (uint256);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\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 amount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @param badDebt The amount of badDebt in the market\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 reserveFactorMantissa,\\n uint256 badDebt\\n ) external view virtual returns (uint256);\\n\\n /**\\n * @notice Indicator that this is an InterestRateModel contract (for inspection)\\n * @return Always true\\n */\\n function isInterestRateModel() external pure virtual returns (bool) {\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x60ea8b0b70165acc3cf0f1e92f8dcea93ef5ddc2b8b99172799594aeec7c22b5\",\"license\":\"BSD-3-Clause\"},\"contracts/JumpRateModelV2.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\n\\nimport { BaseJumpRateModelV2 } from \\\"./BaseJumpRateModelV2.sol\\\";\\n\\n/**\\n * @title Compound's JumpRateModel Contract V2 for V2 vTokens\\n * @author Arr00\\n * @notice Supports only for V2 vTokens\\n */\\ncontract JumpRateModelV2 is BaseJumpRateModelV2 {\\n constructor(\\n uint256 blocksPerYear_,\\n uint256 baseRatePerYear,\\n uint256 multiplierPerYear,\\n uint256 jumpMultiplierPerYear,\\n uint256 kink_,\\n IAccessControlManagerV8 accessControlManager_\\n )\\n BaseJumpRateModelV2(\\n blocksPerYear_,\\n baseRatePerYear,\\n multiplierPerYear,\\n jumpMultiplierPerYear,\\n kink_,\\n accessControlManager_\\n )\\n /* solhint-disable-next-line no-empty-blocks */\\n {\\n\\n }\\n\\n /**\\n * @notice Calculates the current borrow rate per block\\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 badDebt The amount of badDebt in the market\\n * @return The borrow rate percentage per block as a mantissa (scaled by 1e18)\\n */\\n function getBorrowRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 badDebt\\n ) external view override returns (uint256) {\\n return _getBorrowRate(cash, borrows, reserves, badDebt);\\n }\\n}\\n\",\"keccak256\":\"0x4bac8ea1ed2dad59939317cc9e1a76fd55de6a745df29802f52cd97cf1c5a1ac\",\"license\":\"BSD-3-Clause\"},\"contracts/lib/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.13;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\",\"keccak256\":\"0x44de02d7837ee1d4dcf6e9f5e783e9d9e0bec0154f23f5661fb54810cff9f892\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
357
+ "bytecode": "0x60a060405234801561001057600080fd5b506040516109ca3803806109ca83398101604081905261002f916101a9565b8585858585856001600160a01b0381166100905760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642041434d20616464726573730000000000000000000000000060448201526064015b60405180910390fd5b856000036100e05760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420626c6f636b732070657220796561720000000000000000006044820152606401610087565b600080546001600160a01b0319166001600160a01b038316179055608086905261010c8585858561011d565b50505050505050505050505061022f565b60805161012a908561020d565b60025560805161013a908461020d565b60015560805161014a908361020d565b60038190556004829055600254600154604080519283526020830191909152810191909152606081018290527f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9060800160405180910390a150505050565b60008060008060008060c087890312156101c257600080fd5b86516020880151604089015160608a015160808b015160a08c0151949a50929850909650945092506001600160a01b03811681146101ff57600080fd5b809150509295509295509295565b60008261022a57634e487b7160e01b600052601260045260246000fd5b500490565b60805161076b61025f6000396000818161012c0152818161046a0152818161049701526104c4015261076b6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638726bb89116100715780638726bb891461011e578063a385fb9614610127578063b4a0bdf31461014e578063b9f9850a14610179578063f14039de14610182578063fd2da3391461018b57600080fd5b8063073b8a74146100ae5780630cde8d1c146100d45780632037f3e7146100e75780632191f92a146100fc57806370d3c43f1461010b575b600080fd5b6100c16100bc366004610548565b610194565b6040519081526020015b60405180910390f35b6100c16100e236600461057a565b6101ad565b6100fa6100f5366004610548565b610240565b005b604051600181526020016100cb565b6100c1610119366004610548565b610317565b6100c160015481565b6100c17f000000000000000000000000000000000000000000000000000000000000000081565b600054610161906001600160a01b031681565b6040516001600160a01b0390911681526020016100cb565b6100c160035481565b6100c160025481565b6100c160045481565b60006101a2858585856103a0565b90505b949350505050565b6000806101c284670de0b6b3a76400006105cb565b905060006101d2888888876103a0565b90506000670de0b6b3a76400006101e984846105e2565b6101f39190610601565b90506000610201828a6105e2565b9050600088876102118c8e610623565b61021b9190610623565b61022591906105cb565b90506102318183610601565b9b9a5050505050505050505050565b600060405180606001604052806034815260200161070260349139600080546040516318c5e8ab60e01b815292935090916001600160a01b03909116906318c5e8ab906102939033908690600401610688565b602060405180830381865afa1580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d491906106ac565b90508061030357333083604051634a3fa29360e01b81526004016102fa939291906106d5565b60405180910390fd5b61030f86868686610465565b505050505050565b60006103238285610623565b600003610332575060006101a5565b600083836103408789610623565b61034a9190610623565b61035491906105cb565b670de0b6b3a76400006103678588610623565b61037191906105e2565b61037b9190610601565b9050670de0b6b3a76400008111156101a25750670de0b6b3a764000095945050505050565b6000806103af86868686610317565b6004549091508082116103f357600254670de0b6b3a7640000600154846103d691906105e2565b6103e09190610601565b6103ea9190610623565b925050506101a5565b6000600254670de0b6b3a76400006001548461040f91906105e2565b6104199190610601565b6104239190610623565b90506000828403905081670de0b6b3a76400006003548361044491906105e2565b61044e9190610601565b6104589190610623565b9998505050505050505050565b61048f7f000000000000000000000000000000000000000000000000000000000000000085610601565b6002556104bc7f000000000000000000000000000000000000000000000000000000000000000084610601565b6001556104e97f000000000000000000000000000000000000000000000000000000000000000083610601565b60038190556004829055600254600154604080519283526020830191909152810191909152606081018290527f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9060800160405180910390a150505050565b6000806000806080858703121561055e57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600080600060a0868803121561059257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b634e487b7160e01b600052601160045260246000fd5b6000828210156105dd576105dd6105b5565b500390565b60008160001904831182151516156105fc576105fc6105b5565b500290565b60008261061e57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115610636576106366105b5565b500190565b6000815180845260005b8181101561066157602081850181015186830182015201610645565b81811115610673576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190526000906101a59083018461063b565b6000602082840312156106be57600080fd5b815180151581146106ce57600080fd5b9392505050565b6001600160a01b038481168252831660208201526060604082018190526000906101a29083018461063b56fe7570646174654a756d70526174654d6f64656c2875696e743235362c75696e743235362c75696e743235362c75696e7432353629a2646970667358221220b75bf1d0074ed366d2d57edf624e0b49ebdf2d5a91d67cfcef99da40658b1d9864736f6c634300080d0033",
358
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80638726bb89116100715780638726bb891461011e578063a385fb9614610127578063b4a0bdf31461014e578063b9f9850a14610179578063f14039de14610182578063fd2da3391461018b57600080fd5b8063073b8a74146100ae5780630cde8d1c146100d45780632037f3e7146100e75780632191f92a146100fc57806370d3c43f1461010b575b600080fd5b6100c16100bc366004610548565b610194565b6040519081526020015b60405180910390f35b6100c16100e236600461057a565b6101ad565b6100fa6100f5366004610548565b610240565b005b604051600181526020016100cb565b6100c1610119366004610548565b610317565b6100c160015481565b6100c17f000000000000000000000000000000000000000000000000000000000000000081565b600054610161906001600160a01b031681565b6040516001600160a01b0390911681526020016100cb565b6100c160035481565b6100c160025481565b6100c160045481565b60006101a2858585856103a0565b90505b949350505050565b6000806101c284670de0b6b3a76400006105cb565b905060006101d2888888876103a0565b90506000670de0b6b3a76400006101e984846105e2565b6101f39190610601565b90506000610201828a6105e2565b9050600088876102118c8e610623565b61021b9190610623565b61022591906105cb565b90506102318183610601565b9b9a5050505050505050505050565b600060405180606001604052806034815260200161070260349139600080546040516318c5e8ab60e01b815292935090916001600160a01b03909116906318c5e8ab906102939033908690600401610688565b602060405180830381865afa1580156102b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d491906106ac565b90508061030357333083604051634a3fa29360e01b81526004016102fa939291906106d5565b60405180910390fd5b61030f86868686610465565b505050505050565b60006103238285610623565b600003610332575060006101a5565b600083836103408789610623565b61034a9190610623565b61035491906105cb565b670de0b6b3a76400006103678588610623565b61037191906105e2565b61037b9190610601565b9050670de0b6b3a76400008111156101a25750670de0b6b3a764000095945050505050565b6000806103af86868686610317565b6004549091508082116103f357600254670de0b6b3a7640000600154846103d691906105e2565b6103e09190610601565b6103ea9190610623565b925050506101a5565b6000600254670de0b6b3a76400006001548461040f91906105e2565b6104199190610601565b6104239190610623565b90506000828403905081670de0b6b3a76400006003548361044491906105e2565b61044e9190610601565b6104589190610623565b9998505050505050505050565b61048f7f000000000000000000000000000000000000000000000000000000000000000085610601565b6002556104bc7f000000000000000000000000000000000000000000000000000000000000000084610601565b6001556104e97f000000000000000000000000000000000000000000000000000000000000000083610601565b60038190556004829055600254600154604080519283526020830191909152810191909152606081018290527f6960ab234c7ef4b0c9197100f5393cfcde7c453ac910a27bd2000aa1dd4c068d9060800160405180910390a150505050565b6000806000806080858703121561055e57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600080600060a0868803121561059257600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b634e487b7160e01b600052601160045260246000fd5b6000828210156105dd576105dd6105b5565b500390565b60008160001904831182151516156105fc576105fc6105b5565b500290565b60008261061e57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115610636576106366105b5565b500190565b6000815180845260005b8181101561066157602081850181015186830182015201610645565b81811115610673576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b03831681526040602082018190526000906101a59083018461063b565b6000602082840312156106be57600080fd5b815180151581146106ce57600080fd5b9392505050565b6001600160a01b038481168252831660208201526060604082018190526000906101a29083018461063b56fe7570646174654a756d70526174654d6f64656c2875696e743235362c75696e743235362c75696e743235362c75696e7432353629a2646970667358221220b75bf1d0074ed366d2d57edf624e0b49ebdf2d5a91d67cfcef99da40658b1d9864736f6c634300080d0033",
359
+ "devdoc": {
360
+ "author": "Arr00",
361
+ "kind": "dev",
362
+ "methods": {
363
+ "getBorrowRate(uint256,uint256,uint256,uint256)": {
364
+ "params": {
365
+ "badDebt": "The amount of badDebt in the market",
366
+ "borrows": "The amount of borrows in the market",
367
+ "cash": "The amount of cash in the market",
368
+ "reserves": "The amount of reserves in the market"
369
+ },
370
+ "returns": {
371
+ "_0": "The borrow rate percentage per block as a mantissa (scaled by 1e18)"
372
+ }
373
+ },
374
+ "getSupplyRate(uint256,uint256,uint256,uint256,uint256)": {
375
+ "params": {
376
+ "badDebt": "The amount of badDebt in the market",
377
+ "borrows": "The amount of borrows in the market",
378
+ "cash": "The amount of cash in the market",
379
+ "reserveFactorMantissa": "The current reserve factor for the market",
380
+ "reserves": "The amount of reserves in the market"
381
+ },
382
+ "returns": {
383
+ "_0": "The supply rate percentage per block as a mantissa (scaled by EXP_SCALE)"
384
+ }
385
+ },
386
+ "isInterestRateModel()": {
387
+ "returns": {
388
+ "_0": "Always true"
389
+ }
390
+ },
391
+ "updateJumpRateModel(uint256,uint256,uint256,uint256)": {
392
+ "custom:access": "Controlled by AccessControlManager",
393
+ "custom:error": "Unauthorized if the sender is not allowed to call this function",
394
+ "params": {
395
+ "baseRatePerYear": "The approximate target base APR, as a mantissa (scaled by EXP_SCALE)",
396
+ "jumpMultiplierPerYear": "The multiplierPerBlock after hitting a specified utilization point",
397
+ "kink_": "The utilization point at which the jump multiplier is applied",
398
+ "multiplierPerYear": "The rate of increase in interest rate wrt utilization (scaled by EXP_SCALE)"
399
+ }
400
+ },
401
+ "utilizationRate(uint256,uint256,uint256,uint256)": {
402
+ "params": {
403
+ "badDebt": "The amount of badDebt in the market",
404
+ "borrows": "The amount of borrows in the market",
405
+ "cash": "The amount of cash in the market",
406
+ "reserves": "The amount of reserves in the market (currently unused)"
407
+ },
408
+ "returns": {
409
+ "_0": "The utilization rate as a mantissa between [0, MANTISSA_ONE]"
410
+ }
411
+ }
412
+ },
413
+ "title": "Compound's JumpRateModel Contract V2 for V2 vTokens",
414
+ "version": 1
415
+ },
416
+ "userdoc": {
417
+ "errors": {
418
+ "Unauthorized(address,address,string)": [
419
+ {
420
+ "notice": "Thrown when the action is prohibited by AccessControlManager"
421
+ }
422
+ ]
423
+ },
424
+ "kind": "user",
425
+ "methods": {
426
+ "accessControlManager()": {
427
+ "notice": "The address of the AccessControlManager contract"
428
+ },
429
+ "baseRatePerBlock()": {
430
+ "notice": "The base interest rate which is the y-intercept when utilization rate is 0"
431
+ },
432
+ "blocksPerYear()": {
433
+ "notice": "The approximate number of blocks per year that is assumed by the interest rate model"
434
+ },
435
+ "getBorrowRate(uint256,uint256,uint256,uint256)": {
436
+ "notice": "Calculates the current borrow rate per block"
437
+ },
438
+ "getSupplyRate(uint256,uint256,uint256,uint256,uint256)": {
439
+ "notice": "Calculates the current supply rate per block"
440
+ },
441
+ "isInterestRateModel()": {
442
+ "notice": "Indicator that this is an InterestRateModel contract (for inspection)"
443
+ },
444
+ "jumpMultiplierPerBlock()": {
445
+ "notice": "The multiplier per block after hitting a specified utilization point"
446
+ },
447
+ "kink()": {
448
+ "notice": "The utilization point at which the jump multiplier is applied"
449
+ },
450
+ "multiplierPerBlock()": {
451
+ "notice": "The multiplier of utilization rate that gives the slope of the interest rate"
452
+ },
453
+ "updateJumpRateModel(uint256,uint256,uint256,uint256)": {
454
+ "notice": "Update the parameters of the interest rate model"
455
+ },
456
+ "utilizationRate(uint256,uint256,uint256,uint256)": {
457
+ "notice": "Calculates the utilization rate of the market: `(borrows + badDebt) / (cash + borrows + badDebt - reserves)`"
458
+ }
459
+ },
460
+ "notice": "Supports only for V2 vTokens",
461
+ "version": 1
462
+ },
463
+ "storageLayout": {
464
+ "storage": [
465
+ {
466
+ "astId": 15223,
467
+ "contract": "contracts/JumpRateModelV2.sol:JumpRateModelV2",
468
+ "label": "accessControlManager",
469
+ "offset": 0,
470
+ "slot": "0",
471
+ "type": "t_contract(IAccessControlManagerV8)6918"
472
+ },
473
+ {
474
+ "astId": 15226,
475
+ "contract": "contracts/JumpRateModelV2.sol:JumpRateModelV2",
476
+ "label": "multiplierPerBlock",
477
+ "offset": 0,
478
+ "slot": "1",
479
+ "type": "t_uint256"
480
+ },
481
+ {
482
+ "astId": 15229,
483
+ "contract": "contracts/JumpRateModelV2.sol:JumpRateModelV2",
484
+ "label": "baseRatePerBlock",
485
+ "offset": 0,
486
+ "slot": "2",
487
+ "type": "t_uint256"
488
+ },
489
+ {
490
+ "astId": 15232,
491
+ "contract": "contracts/JumpRateModelV2.sol:JumpRateModelV2",
492
+ "label": "jumpMultiplierPerBlock",
493
+ "offset": 0,
494
+ "slot": "3",
495
+ "type": "t_uint256"
496
+ },
497
+ {
498
+ "astId": 15235,
499
+ "contract": "contracts/JumpRateModelV2.sol:JumpRateModelV2",
500
+ "label": "kink",
501
+ "offset": 0,
502
+ "slot": "4",
503
+ "type": "t_uint256"
504
+ }
505
+ ],
506
+ "types": {
507
+ "t_contract(IAccessControlManagerV8)6918": {
508
+ "encoding": "inplace",
509
+ "label": "contract IAccessControlManagerV8",
510
+ "numberOfBytes": "20"
511
+ },
512
+ "t_uint256": {
513
+ "encoding": "inplace",
514
+ "label": "uint256",
515
+ "numberOfBytes": "32"
516
+ }
517
+ }
518
+ }
519
+ }