@venusprotocol/isolated-pools 1.0.0-dev.6 → 1.0.0-dev.8

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.
Files changed (219) hide show
  1. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  2. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  3. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
  4. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
  5. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +4 -0
  6. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +63 -0
  7. package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +4 -0
  8. package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.json +56 -0
  9. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +4 -0
  10. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.json +24 -0
  11. package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +4 -0
  12. package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.json +56 -0
  13. package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +4 -0
  14. package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.json +19 -0
  15. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +4 -0
  16. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +80 -0
  17. package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +4 -0
  18. package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.json +24 -0
  19. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +4 -0
  20. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +113 -0
  21. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
  22. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
  23. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +4 -0
  24. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +194 -0
  25. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
  26. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
  27. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +4 -0
  28. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +10 -0
  29. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
  30. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
  31. package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +4 -0
  32. package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +10 -0
  33. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
  34. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
  35. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  36. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  37. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  38. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  39. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
  40. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
  41. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
  42. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
  43. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
  44. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
  45. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +4 -0
  46. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +76 -0
  47. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +4 -0
  48. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +24 -0
  49. package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +4 -0
  50. package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.json +24 -0
  51. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +4 -0
  52. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.json +194 -0
  53. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +4 -0
  54. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.json +86 -0
  55. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +4 -0
  56. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.json +10 -0
  57. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +4 -0
  58. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +10 -0
  59. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +4 -0
  60. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +24 -0
  61. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
  62. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
  63. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +4 -0
  64. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +181 -0
  65. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +4 -0
  66. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +282 -0
  67. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +4 -0
  68. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +40 -0
  69. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +4 -0
  70. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.json +30 -0
  71. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +4 -0
  72. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +43 -0
  73. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +4 -0
  74. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.json +49 -0
  75. package/artifacts/build-info/8c02b3a8e3642dffe55772a8d2bed46f.json +1 -0
  76. package/artifacts/build-info/f19d689bc99e63a20dd2a17a14e2b84a.json +1 -0
  77. package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.dbg.json +4 -0
  78. package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.json +276 -0
  79. package/artifacts/contracts/Comptroller.sol/Comptroller.dbg.json +4 -0
  80. package/artifacts/contracts/Comptroller.sol/Comptroller.json +1667 -0
  81. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +4 -0
  82. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.json +285 -0
  83. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.dbg.json +4 -0
  84. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.json +170 -0
  85. package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.dbg.json +4 -0
  86. package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.json +173 -0
  87. package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.dbg.json +4 -0
  88. package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.json +156 -0
  89. package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.dbg.json +4 -0
  90. package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.json +10 -0
  91. package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.dbg.json +4 -0
  92. package/artifacts/contracts/Factories/JumpRateModelFactory.sol/JumpRateModelFactory.json +50 -0
  93. package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.dbg.json +4 -0
  94. package/artifacts/contracts/Factories/VTokenProxyFactory.sol/VTokenProxyFactory.json +191 -0
  95. package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.dbg.json +4 -0
  96. package/artifacts/contracts/Factories/WhitePaperInterestRateModelFactory.sol/WhitePaperInterestRateModelFactory.json +35 -0
  97. package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.dbg.json +4 -0
  98. package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.json +50 -0
  99. package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.dbg.json +4 -0
  100. package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.json +97 -0
  101. package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.dbg.json +4 -0
  102. package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.json +307 -0
  103. package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.dbg.json +4 -0
  104. package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.json +1087 -0
  105. package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +4 -0
  106. package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.json +59 -0
  107. package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.dbg.json +4 -0
  108. package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.json +923 -0
  109. package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +4 -0
  110. package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.json +176 -0
  111. package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.dbg.json +4 -0
  112. package/artifacts/contracts/Proxy/UpgradeableBeacon.sol/Beacon.json +113 -0
  113. package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.dbg.json +4 -0
  114. package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.json +928 -0
  115. package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +4 -0
  116. package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.json +29 -0
  117. package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.dbg.json +4 -0
  118. package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.json +101 -0
  119. package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +4 -0
  120. package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.json +296 -0
  121. package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.dbg.json +4 -0
  122. package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.json +83 -0
  123. package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.dbg.json +4 -0
  124. package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.json +615 -0
  125. package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.dbg.json +4 -0
  126. package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.json +24 -0
  127. package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.dbg.json +4 -0
  128. package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.json +756 -0
  129. package/artifacts/contracts/VToken.sol/VToken.dbg.json +4 -0
  130. package/artifacts/contracts/VToken.sol/VToken.json +1850 -0
  131. package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.dbg.json +4 -0
  132. package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.json +1398 -0
  133. package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.dbg.json +4 -0
  134. package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.json +219 -0
  135. package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.dbg.json +4 -0
  136. package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.json +192 -0
  137. package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.dbg.json +4 -0
  138. package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.json +1712 -0
  139. package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.dbg.json +4 -0
  140. package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.json +94 -0
  141. package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.dbg.json +4 -0
  142. package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.json +1744 -0
  143. package/artifacts/contracts/test/ERC20.sol/ERC20.dbg.json +4 -0
  144. package/artifacts/contracts/test/ERC20.sol/ERC20.json +194 -0
  145. package/artifacts/contracts/test/ERC20.sol/ERC20Base.dbg.json +4 -0
  146. package/artifacts/contracts/test/ERC20.sol/ERC20Base.json +141 -0
  147. package/artifacts/contracts/test/ERC20.sol/ERC20Harness.dbg.json +4 -0
  148. package/artifacts/contracts/test/ERC20.sol/ERC20Harness.json +351 -0
  149. package/artifacts/contracts/test/ERC20.sol/ERC20NS.dbg.json +4 -0
  150. package/artifacts/contracts/test/ERC20.sol/ERC20NS.json +182 -0
  151. package/artifacts/contracts/test/ERC20.sol/NonStandardToken.dbg.json +4 -0
  152. package/artifacts/contracts/test/ERC20.sol/NonStandardToken.json +247 -0
  153. package/artifacts/contracts/test/ERC20.sol/StandardToken.dbg.json +4 -0
  154. package/artifacts/contracts/test/ERC20.sol/StandardToken.json +259 -0
  155. package/artifacts/contracts/test/EvilToken.sol/EvilToken.dbg.json +4 -0
  156. package/artifacts/contracts/test/EvilToken.sol/EvilToken.json +303 -0
  157. package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.dbg.json +4 -0
  158. package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.json +265 -0
  159. package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.dbg.json +4 -0
  160. package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.json +277 -0
  161. package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.dbg.json +4 -0
  162. package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.json +313 -0
  163. package/artifacts/contracts/test/FeeToken.sol/FeeToken.dbg.json +4 -0
  164. package/artifacts/contracts/test/FeeToken.sol/FeeToken.json +313 -0
  165. package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.dbg.json +4 -0
  166. package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.json +85 -0
  167. package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.dbg.json +4 -0
  168. package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.json +332 -0
  169. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.dbg.json +4 -0
  170. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.json +233 -0
  171. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.dbg.json +4 -0
  172. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.json +187 -0
  173. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.dbg.json +4 -0
  174. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.json +668 -0
  175. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.dbg.json +4 -0
  176. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.json +760 -0
  177. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.dbg.json +4 -0
  178. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.json +962 -0
  179. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.dbg.json +4 -0
  180. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.json +55 -0
  181. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.dbg.json +4 -0
  182. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.json +10 -0
  183. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.dbg.json +4 -0
  184. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.json +982 -0
  185. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.dbg.json +4 -0
  186. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.json +10 -0
  187. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.dbg.json +4 -0
  188. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.json +10 -0
  189. package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.dbg.json +4 -0
  190. package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.json +85 -0
  191. package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.dbg.json +4 -0
  192. package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.json +315 -0
  193. package/artifacts/contracts/test/SafeMath.sol/SafeMath.dbg.json +4 -0
  194. package/artifacts/contracts/test/SafeMath.sol/SafeMath.json +10 -0
  195. package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.dbg.json +4 -0
  196. package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.json +1946 -0
  197. package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.dbg.json +4 -0
  198. package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.json +2306 -0
  199. package/contracts/BaseJumpRateModelV2.sol +4 -3
  200. package/contracts/Comptroller.sol +27 -11
  201. package/contracts/ComptrollerInterface.sol +10 -0
  202. package/contracts/ComptrollerStorage.sol +5 -0
  203. package/contracts/ErrorReporter.sol +5 -0
  204. package/contracts/Lens/PoolLens.sol +13 -0
  205. package/contracts/MaxLoopsLimitHelper.sol +5 -0
  206. package/contracts/Pool/PoolRegistry.sol +19 -1
  207. package/contracts/Pool/PoolRegistryInterface.sol +12 -7
  208. package/contracts/Rewards/RewardsDistributor.sol +15 -0
  209. package/contracts/RiskFund/IProtocolShareReserve.sol +5 -0
  210. package/contracts/RiskFund/IRiskFund.sol +5 -0
  211. package/contracts/RiskFund/ProtocolShareReserve.sol +5 -0
  212. package/contracts/RiskFund/ReserveHelpers.sol +5 -0
  213. package/contracts/RiskFund/RiskFund.sol +3 -0
  214. package/contracts/Shortfall/IShortfall.sol +5 -0
  215. package/contracts/Shortfall/Shortfall.sol +10 -2
  216. package/contracts/VToken.sol +24 -2
  217. package/contracts/VTokenInterfaces.sol +10 -0
  218. package/contracts/WhitePaperInterestRateModel.sol +1 -1
  219. package/package.json +1 -1
@@ -8,8 +8,9 @@ import { BLOCKS_PER_YEAR, EXP_SCALE, MANTISSA_ONE } from "./lib/constants.sol";
8
8
 
9
9
  /**
10
10
  * @title Logic for Compound's JumpRateModel Contract V2.
11
- * @author Compound (modified by Dharma Labs, refactored by Arr00)
12
- * @notice Version 2 modifies Version 1 by enabling updateable parameters.
11
+ * @author Compound (modified by Dharma Labs, Arr00 and Venus)
12
+ * @notice An interest rate model with a steep increase after a certain utilization threshold called **kink** is reached.
13
+ * The parameters of this interest rate model can be adjusted by the owner. Version 2 modifies Version 1 by enabling updateable parameters.
13
14
  */
14
15
  abstract contract BaseJumpRateModelV2 is InterestRateModel {
15
16
  /**
@@ -134,7 +135,7 @@ abstract contract BaseJumpRateModelV2 is InterestRateModel {
134
135
  uint256 reserves,
135
136
  uint256 badDebt
136
137
  ) public pure returns (uint256) {
137
- // Utilization rate is 0 when there are no borrows
138
+ // Utilization rate is 0 when there are no borrows and badDebt
138
139
  if ((borrows + badDebt) == 0) {
139
140
  return 0;
140
141
  }
@@ -14,7 +14,27 @@ import { MaxLoopsLimitHelper } from "./MaxLoopsLimitHelper.sol";
14
14
  import { ensureNonzeroAddress } from "./lib/validators.sol";
15
15
 
16
16
  /**
17
- * @title Comptroller Contract
17
+ * @title Comptroller
18
+ * @author Venus
19
+ * @notice The Comptroller is designed to provide checks for all minting, redeeming, transferring, borrowing, lending, repaying, liquidating,
20
+ * and seizing done by the `vToken` contract. Each pool has one `Comptroller` checking these interactions across markets. When a user interacts
21
+ * with a given market by one of these main actions, a call is made to a corresponding hook in the associated `Comptroller`, which either allows
22
+ * or reverts the transaction. These hooks also update supply and borrow rewards as they are called. The comptroller holds the logic for assessing
23
+ * liquidity snapshots of an account via the collateral factor and liquidation threshold. This check determines the collateral needed for a borrow,
24
+ * as well as how much of a borrow may be liquidated. A user may borrow a portion of their collateral with the maximum amount determined by the
25
+ * markets collateral factor. However, if their borrowed amount exceeds an amount calculated using the market’s corresponding liquidation threshold,
26
+ * the borrow is eligible for liquidation.
27
+ *
28
+ * The `Comptroller` also includes two functions `liquidateAccount()` and `healAccount()`, which are meant to handle accounts that do not exceed
29
+ * the `minLiquidatableCollateral` for the `Comptroller`:
30
+ *
31
+ * - `healAccount()`: This function is called to seize all of a given user’s collateral, requiring the `msg.sender` repay a certain percentage
32
+ * of the debt calculated by `collateral/(borrows*liquidationIncentive)`. The function can only be called if the calculated percentage does not exceed
33
+ * 100%, because otherwise no `badDebt` would be created and `liquidateAccount()` should be used instead. The difference in the actual amount of debt
34
+ * and debt paid off is recorded as `badDebt` for each market, which can then be auctioned off for the risk reserves of the associated pool.
35
+ * - `liquidateAccount()`: This function can only be called if the collateral seized will cover all borrows of an account, as well as the liquidation
36
+ * incentive. Otherwise, the pool will incur bad debt, in which case the function `healAccount()` should be used instead. This function skips the logic
37
+ * verifying that the repay amount does not exceed the close factor.
18
38
  */
19
39
  contract Comptroller is
20
40
  Ownable2StepUpgradeable,
@@ -161,10 +181,6 @@ contract Comptroller is
161
181
  function enterMarkets(address[] memory vTokens) external override returns (uint256[] memory) {
162
182
  uint256 len = vTokens.length;
163
183
 
164
- uint256 accountAssetsLen = accountAssets[msg.sender].length;
165
-
166
- _ensureMaxLoops(accountAssetsLen + len);
167
-
168
184
  uint256[] memory results = new uint256[](len);
169
185
  for (uint256 i; i < len; ++i) {
170
186
  VToken vToken = VToken(vTokens[i]);
@@ -337,9 +353,6 @@ contract Comptroller is
337
353
  ) external override {
338
354
  _checkActionPauseState(vToken, Action.BORROW);
339
355
 
340
- //Update the prices of tokens
341
- updatePrices(borrower);
342
-
343
356
  if (!markets[vToken].isListed) {
344
357
  revert MarketNotListed(address(vToken));
345
358
  }
@@ -347,11 +360,14 @@ contract Comptroller is
347
360
  if (!markets[vToken].accountMembership[borrower]) {
348
361
  // only vTokens may call borrowAllowed if borrower not in market
349
362
  _checkSenderIs(vToken);
350
- _ensureMaxLoops(accountAssets[msg.sender].length + 1);
363
+
351
364
  // attempt to add borrower to the market or revert
352
365
  _addToMarket(VToken(msg.sender), borrower);
353
366
  }
354
367
 
368
+ // Update the prices of tokens
369
+ updatePrices(borrower);
370
+
355
371
  if (oracle.getUnderlyingPrice(vToken) == 0) {
356
372
  revert PriceError(address(vToken));
357
373
  }
@@ -445,7 +461,7 @@ contract Comptroller is
445
461
  // Action.SEIZE on it
446
462
  _checkActionPauseState(vTokenBorrowed, Action.LIQUIDATE);
447
463
 
448
- //Update the prices of tokens
464
+ // Update the prices of tokens
449
465
  updatePrices(borrower);
450
466
 
451
467
  if (!markets[vTokenBorrowed].isListed) {
@@ -1313,7 +1329,7 @@ contract Comptroller is
1313
1329
  return;
1314
1330
  }
1315
1331
 
1316
- //Update the prices of tokens
1332
+ // Update the prices of tokens
1317
1333
  updatePrices(redeemer);
1318
1334
 
1319
1335
  /* Otherwise, perform a hypothetical liquidity check to guard against shortfall */
@@ -6,6 +6,11 @@ import { ResilientOracleInterface } from "@venusprotocol/oracle/contracts/interf
6
6
  import { VToken } from "./VToken.sol";
7
7
  import { RewardsDistributor } from "./Rewards/RewardsDistributor.sol";
8
8
 
9
+ /**
10
+ * @title ComptrollerInterface
11
+ * @author Venus
12
+ * @notice Interface implemented by the `Comptroller` contract.
13
+ */
9
14
  interface ComptrollerInterface {
10
15
  /*** Assets You Are In ***/
11
16
 
@@ -70,6 +75,11 @@ interface ComptrollerInterface {
70
75
  function getAllMarkets() external view returns (VToken[] memory);
71
76
  }
72
77
 
78
+ /**
79
+ * @title ComptrollerViewInterface
80
+ * @author Venus
81
+ * @notice Interface implemented by the `Comptroller` contract, including only some util view functions.
82
+ */
73
83
  interface ComptrollerViewInterface {
74
84
  function markets(address) external view returns (bool, uint256);
75
85
 
@@ -6,6 +6,11 @@ import { ResilientOracleInterface } from "@venusprotocol/oracle/contracts/interf
6
6
  import { VToken } from "./VToken.sol";
7
7
  import { RewardsDistributor } from "./Rewards/RewardsDistributor.sol";
8
8
 
9
+ /**
10
+ * @title ComptrollerStorage
11
+ * @author Venus
12
+ * @notice Storage layout for the `Comptroller` contract.
13
+ */
9
14
  contract ComptrollerStorage {
10
15
  struct LiquidationOrder {
11
16
  VToken vTokenCollateral;
@@ -1,6 +1,11 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title TokenErrorReporter
6
+ * @author Venus
7
+ * @notice Errors that can be thrown by the `VToken` contract.
8
+ */
4
9
  contract TokenErrorReporter {
5
10
  uint256 public constant NO_ERROR = 0; // support legacy return codes
6
11
 
@@ -12,6 +12,19 @@ import { PoolRegistryInterface } from "../Pool/PoolRegistryInterface.sol";
12
12
  import { PoolRegistry } from "../Pool/PoolRegistry.sol";
13
13
  import { RewardsDistributor } from "../Rewards/RewardsDistributor.sol";
14
14
 
15
+ /**
16
+ * @title PoolLens
17
+ * @author Venus
18
+ * @notice The `PoolLens` contract is designed to retrieve important information for each registered pool. A list of essential information
19
+ * for all pools within the lending protocol can be acquired through the function `getAllPools()`. Additionally, the following records can be
20
+ * looked up for specific pools and markets:
21
+ - the vToken balance of a given user;
22
+ - the pool data (oracle address, associated vToken, liquidation incentive, etc) of a pool via its associated comptroller address;
23
+ - the vToken address in a pool for a given asset;
24
+ - a list of all pools that support an asset;
25
+ - the underlying asset price of a vToken;
26
+ - the metadata (exchange/borrow/supply rate, total supply, collateral factor, etc) of any vToken.
27
+ */
15
28
  contract PoolLens is ExponentialNoError {
16
29
  /**
17
30
  * @dev Struct for PoolDetails.
@@ -1,6 +1,11 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title MaxLoopsLimitHelper
6
+ * @author Venus
7
+ * @notice Abstract contract used to avoid collection with too many items that would generate gas errors and DoS.
8
+ */
4
9
  abstract contract MaxLoopsLimitHelper {
5
10
  // Limit for the loops to avoid the DOS
6
11
  uint256 public maxLoopsLimit;
@@ -24,7 +24,25 @@ import { ensureNonzeroAddress } from "../lib/validators.sol";
24
24
 
25
25
  /**
26
26
  * @title PoolRegistry
27
- * @notice PoolRegistry is a registry for Venus interest rate pools.
27
+ * @author Venus
28
+ * @notice The Isolated Pools architecture centers around the `PoolRegistry` contract. The `PoolRegistry` maintains a directory of isolated lending
29
+ * pools and can perform actions like creating and registering new pools, adding new markets to existing pools, setting and updating the pool's required
30
+ * metadata, and providing the getter methods to get information on the pools.
31
+ *
32
+ * Isolated lending has three main components: PoolRegistry, pools, and markets. The PoolRegistry is responsible for managing pools.
33
+ * It can create new pools, update pool metadata and manage markets within pools. PoolRegistry contains getter methods to get the details of
34
+ * any existing pool like `getVTokenForAsset` and `getPoolsSupportedByAsset`. It also contains methods for updating pool metadata (`updatePoolMetadata`)
35
+ * and setting pool name (`setPoolName`).
36
+ *
37
+ * The directory of pools is managed through two mappings: `_poolByComptroller` which is a hashmap with the comptroller address as the key and `VenusPool` as
38
+ * the value and `_poolsByID` which is an array of comptroller addresses. Individual pools can be accessed by calling `getPoolByComptroller` with the pool's
39
+ * comptroller address. `_poolsByID` is used to iterate through all of the pools.
40
+ *
41
+ * PoolRegistry also contains a map of asset addresses called `_supportedPools` that maps to an array of assets suppored by each pool. This array of pools by
42
+ * asset is retrieved by calling `getPoolsSupportedByAsset`.
43
+ *
44
+ * PoolRegistry registers new isolated pools in the directory with the `createRegistryPool` method. Isolated pools are composed of independent markets with
45
+ * specific assets and custom risk management configurations according to their markets.
28
46
  */
29
47
  contract PoolRegistry is Ownable2StepUpgradeable, AccessControlledV8, PoolRegistryInterface {
30
48
  using SafeERC20Upgradeable for IERC20Upgradeable;
@@ -1,9 +1,14 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title PoolRegistryInterface
6
+ * @author Venus
7
+ * @notice Interface implemented by `PoolRegistry`.
8
+ */
4
9
  interface PoolRegistryInterface {
5
10
  /**
6
- * @dev Struct for a Venus interest rate pool.
11
+ * @notice Struct for a Venus interest rate pool.
7
12
  */
8
13
  struct VenusPool {
9
14
  string name;
@@ -14,7 +19,7 @@ interface PoolRegistryInterface {
14
19
  }
15
20
 
16
21
  /**
17
- * @dev Struct for a Venus interest rate pool metadata.
22
+ * @notice Struct for a Venus interest rate pool metadata.
18
23
  */
19
24
  struct VenusPoolMetaData {
20
25
  string category;
@@ -22,18 +27,18 @@ interface PoolRegistryInterface {
22
27
  string description;
23
28
  }
24
29
 
25
- /*** get All Pools in PoolRegistry ***/
30
+ /// @notice Get all pools in PoolRegistry
26
31
  function getAllPools() external view returns (VenusPool[] memory);
27
32
 
28
- /*** get a Pool by comptrollerAddress ***/
33
+ /// @notice Get a pool by comptroller address
29
34
  function getPoolByComptroller(address comptroller) external view returns (VenusPool memory);
30
35
 
31
- /*** get VToken in the Pool for an Asset ***/
36
+ /// @notice Get the address of the VToken contract in the Pool where the underlying token is the provided asset
32
37
  function getVTokenForAsset(address comptroller, address asset) external view returns (address);
33
38
 
34
- /*** get Pools supported by Asset ***/
39
+ /// @notice Get the addresss of the Pools supported that include a market for the provided asset
35
40
  function getPoolsSupportedByAsset(address asset) external view returns (address[] memory);
36
41
 
37
- /*** get metadata of a Pool by comptroller ***/
42
+ /// @notice Get the metadata of a Pool by comptroller address
38
43
  function getVenusPoolMetadata(address comptroller) external view returns (VenusPoolMetaData memory);
39
44
  }
@@ -11,6 +11,21 @@ import { VToken } from "../VToken.sol";
11
11
  import { Comptroller } from "../Comptroller.sol";
12
12
  import { MaxLoopsLimitHelper } from "../MaxLoopsLimitHelper.sol";
13
13
 
14
+ /**
15
+ * @title `RewardsDistributor`
16
+ * @author Venus
17
+ * @notice Contract used to configure, track and distribute rewards to users based on their actions (borrows and supplies) in the protocol.
18
+ * Users can receive additional rewards through a `RewardsDistributor`. Each `RewardsDistributor` proxy is initialized with a specific reward
19
+ * token and `Comptroller`, which can then distribute the reward token to users that supply or borrow in the associated pool.
20
+ * Authorized users can set the reward token borrow and supply speeds for each market in the pool. This sets a fixed amount of reward
21
+ * token to be released each block for borrowers and suppliers, which is distributed based on a user’s percentage of the borrows or supplies
22
+ * respectively. The owner can also set up reward distributions to contributor addresses (distinct from suppliers and borrowers) by setting
23
+ * their contributor reward token speed, which similarly allocates a fixed amount of reward token per block.
24
+ *
25
+ * The owner has the ability to transfer any amount of reward tokens held by the contract to any other address. Rewards are not distributed
26
+ * automatically and must be claimed by a user calling `claimRewardToken()`. Users should be aware that it is up to the owner and other centralized
27
+ * entities to ensure that the `RewardsDistributor` holds enough tokens to distribute the accumulated rewards of users and contributors.
28
+ */
14
29
  contract RewardsDistributor is ExponentialNoError, Ownable2StepUpgradeable, AccessControlledV8, MaxLoopsLimitHelper {
15
30
  using SafeERC20Upgradeable for IERC20Upgradeable;
16
31
 
@@ -1,6 +1,11 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title IProtocolShareReserve
6
+ * @author Venus
7
+ * @notice Interface implemented by `ProtocolShareReserve`.
8
+ */
4
9
  interface IProtocolShareReserve {
5
10
  function updateAssetsState(address comptroller, address asset) external;
6
11
  }
@@ -1,6 +1,11 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title IRiskFund
6
+ * @author Venus
7
+ * @notice Interface implemented by `RiskFund`.
8
+ */
4
9
  interface IRiskFund {
5
10
  function swapPoolsAssets(
6
11
  address[] calldata markets,
@@ -11,6 +11,11 @@ import { ReserveHelpers } from "./ReserveHelpers.sol";
11
11
  import { IRiskFund } from "./IRiskFund.sol";
12
12
  import { ensureNonzeroAddress } from "../lib/validators.sol";
13
13
 
14
+ /**
15
+ * @title ProtocolShareReserve
16
+ * @author Venus
17
+ * @notice Contract used to store and distribute the reserves generated in the markets.
18
+ */
14
19
  contract ProtocolShareReserve is Ownable2StepUpgradeable, ExponentialNoError, ReserveHelpers, IProtocolShareReserve {
15
20
  using SafeERC20Upgradeable for IERC20Upgradeable;
16
21
 
@@ -8,6 +8,11 @@ import { ensureNonzeroAddress } from "../lib/validators.sol";
8
8
  import { ComptrollerInterface } from "../ComptrollerInterface.sol";
9
9
  import { PoolRegistryInterface } from "../Pool/PoolRegistryInterface.sol";
10
10
 
11
+ /**
12
+ * @title ReserveHelpers
13
+ * @author Venus
14
+ * @notice Contract with basic features to track/hold different assets for different Comptrollers.
15
+ */
11
16
  contract ReserveHelpers {
12
17
  using SafeERC20Upgradeable for IERC20Upgradeable;
13
18
 
@@ -19,6 +19,9 @@ import { MaxLoopsLimitHelper } from "../MaxLoopsLimitHelper.sol";
19
19
  import { ensureNonzeroAddress } from "../lib/validators.sol";
20
20
 
21
21
  /**
22
+ * @title ReserveHelpers
23
+ * @author Venus
24
+ * @notice Contract with basic features to track/hold different assets for different Comptrollers.
22
25
  * @dev This contract does not support BNB.
23
26
  */
24
27
  contract RiskFund is
@@ -1,6 +1,11 @@
1
1
  // SPDX-License-Identifier: BSD-3-Clause
2
2
  pragma solidity 0.8.13;
3
3
 
4
+ /**
5
+ * @title IShortfall
6
+ * @author Venus
7
+ * @notice Interface implemented by `Shortfall`.
8
+ */
4
9
  interface IShortfall {
5
10
  function convertibleBaseAsset() external returns (address);
6
11
  }
@@ -17,6 +17,16 @@ import { PoolRegistryInterface } from "../Pool/PoolRegistryInterface.sol";
17
17
  import { ensureNonzeroAddress } from "../lib/validators.sol";
18
18
  import { EXP_SCALE } from "../lib/constants.sol";
19
19
 
20
+ /**
21
+ * @title Shortfall
22
+ * @author Venus
23
+ * @notice Shortfall is an auction contract designed to auction off the `convertibleBaseAsset` accumulated in `RiskFund`. The `convertibleBaseAsset`
24
+ * is auctioned in exchange for users paying off the pool's bad debt. An auction can be started by anyone once a pool's bad debt has reached a minimum value.
25
+ * This value is set and can be changed by the authorized accounts. If the pool’s bad debt exceeds the risk fund plus a 10% incentive, then the auction winner
26
+ * is determined by who will pay off the largest percentage of the pool's bad debt. The auction winner then exchanges for the entire risk fund. Otherwise,
27
+ * if the risk fund covers the pool's bad debt plus the 10% incentive, then the auction winner is determined by who will take the smallest percentage of the
28
+ * risk fund in exchange for paying off all the pool's bad debt.
29
+ */
20
30
  contract Shortfall is Ownable2StepUpgradeable, AccessControlledV8, ReentrancyGuardUpgradeable, IShortfall {
21
31
  using SafeERC20Upgradeable for IERC20Upgradeable;
22
32
 
@@ -225,7 +235,6 @@ contract Shortfall is Ownable2StepUpgradeable, AccessControlledV8, ReentrancyGua
225
235
  * @notice Close an auction
226
236
  * @param comptroller Comptroller address of the pool
227
237
  * @custom:event Emits AuctionClosed event on successful close
228
- * @custom:event Errors if auctions are paused
229
238
  */
230
239
  function closeAuction(address comptroller) external nonReentrant {
231
240
  Auction storage auction = auctions[comptroller];
@@ -290,7 +299,6 @@ contract Shortfall is Ownable2StepUpgradeable, AccessControlledV8, ReentrancyGua
290
299
  * @notice Restart an auction
291
300
  * @param comptroller Address of the pool
292
301
  * @custom:event Emits AuctionRestarted event on successful restart
293
- * @custom:event Errors if auctions are paused
294
302
  */
295
303
  function restartAuction(address comptroller) external {
296
304
  Auction storage auction = auctions[comptroller];
@@ -15,8 +15,30 @@ import { IProtocolShareReserve } from "./RiskFund/IProtocolShareReserve.sol";
15
15
  import { ensureNonzeroAddress } from "./lib/validators.sol";
16
16
 
17
17
  /**
18
- * @title Venus VToken Contract
19
- * @author Venus Dev Team
18
+ * @title VToken
19
+ * @author Venus
20
+ * @notice Each asset that is supported by a pool is integrated through an instance of the `VToken` contract. As outlined in the protocol overview,
21
+ * each isolated pool creates its own `vToken` corresponding to an asset. Within a given pool, each included `vToken` is referred to as a market of
22
+ * the pool. The main actions a user regularly interacts with in a market are:
23
+
24
+ - mint/redeem of vTokens;
25
+ - transfer of vTokens;
26
+ - borrow/repay a loan on an underlying asset;
27
+ - liquidate a borrow or liquidate/heal an account.
28
+
29
+ * A user supplies the underlying asset to a pool by minting `vTokens`, where the corresponding `vToken` amount is determined by the `exchangeRate`.
30
+ * The `exchangeRate` will change over time, dependent on a number of factors, some of which accrue interest. Additionally, once users have minted
31
+ * `vToken` in a pool, they can borrow any asset in the isolated pool by using their `vToken` as collateral. In order to borrow an asset or use a `vToken`
32
+ * as collateral, the user must be entered into each corresponding market (else, the `vToken` will not be considered collateral for a borrow). Note that
33
+ * a user may borrow up to a portion of their collateral determined by the market’s collateral factor. However, if their borrowed amount exceeds an amount
34
+ * calculated using the market’s corresponding liquidation threshold, the borrow is eligible for liquidation. When a user repays a borrow, they must also
35
+ * pay off interest accrued on the borrow.
36
+ *
37
+ * The Venus protocol includes unique mechanisms for healing an account and liquidating an account. These actions are performed in the `Comptroller`
38
+ * and consider all borrows and collateral for which a given account is entered within a market. These functions may only be called on an account with a
39
+ * total collateral amount that is no larger than a universal `minLiquidatableCollateral` value, which is used for all markets within a `Comptroller`.
40
+ * Both functions settle all of an account’s borrows, but `healAccount()` may add `badDebt` to a vToken. For more detail, see the description of
41
+ * `healAccount()` and `liquidateAccount()` in the `Comptroller` summary section below.
20
42
  */
21
43
  contract VToken is
22
44
  Ownable2StepUpgradeable,
@@ -7,6 +7,11 @@ import { ResilientOracleInterface } from "@venusprotocol/oracle/contracts/interf
7
7
  import { ComptrollerInterface } from "./ComptrollerInterface.sol";
8
8
  import { InterestRateModel } from "./InterestRateModel.sol";
9
9
 
10
+ /**
11
+ * @title VTokenStorage
12
+ * @author Venus
13
+ * @notice Storage layout used by the `VToken` contract
14
+ */
10
15
  // solhint-disable-next-line max-states-count
11
16
  contract VTokenStorage {
12
17
  /**
@@ -130,6 +135,11 @@ contract VTokenStorage {
130
135
  uint256[50] private __gap;
131
136
  }
132
137
 
138
+ /**
139
+ * @title VTokenInterface
140
+ * @author Venus
141
+ * @notice Interface implemented by the `VToken` contract
142
+ */
133
143
  abstract contract VTokenInterface is VTokenStorage {
134
144
  struct RiskManagementInit {
135
145
  address shortfall;
@@ -90,7 +90,7 @@ contract WhitePaperInterestRateModel is InterestRateModel {
90
90
  uint256 reserves,
91
91
  uint256 badDebt
92
92
  ) public pure returns (uint256) {
93
- // Utilization rate is 0 when there are no borrows
93
+ // Utilization rate is 0 when there are no borrows and badDebt
94
94
  if ((borrows + badDebt) == 0) {
95
95
  return 0;
96
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venusprotocol/isolated-pools",
3
- "version": "1.0.0-dev.6",
3
+ "version": "1.0.0-dev.8",
4
4
  "description": "",
5
5
  "files": [
6
6
  "artifacts",