@venusprotocol/isolated-pools 1.0.0-dev.1 → 1.0.0-dev.11

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 (265) hide show
  1. package/README.md +1 -11
  2. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.dbg.json +4 -0
  3. package/artifacts/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json +215 -0
  4. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.dbg.json +4 -0
  5. package/artifacts/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json +183 -0
  6. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.dbg.json +4 -0
  7. package/artifacts/@openzeppelin/contracts/access/Ownable.sol/Ownable.json +63 -0
  8. package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.dbg.json +4 -0
  9. package/artifacts/@openzeppelin/contracts/interfaces/IERC1967.sol/IERC1967.json +56 -0
  10. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.dbg.json +4 -0
  11. package/artifacts/@openzeppelin/contracts/interfaces/draft-IERC1822.sol/IERC1822Proxiable.json +24 -0
  12. package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.dbg.json +4 -0
  13. package/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol/ERC1967Upgrade.json +56 -0
  14. package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.dbg.json +4 -0
  15. package/artifacts/@openzeppelin/contracts/proxy/Proxy.sol/Proxy.json +19 -0
  16. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.dbg.json +4 -0
  17. package/artifacts/@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol/BeaconProxy.json +80 -0
  18. package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.dbg.json +4 -0
  19. package/artifacts/@openzeppelin/contracts/proxy/beacon/IBeacon.sol/IBeacon.json +24 -0
  20. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.dbg.json +4 -0
  21. package/artifacts/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol/UpgradeableBeacon.json +113 -0
  22. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +4 -0
  23. package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json +297 -0
  24. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +4 -0
  25. package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json +194 -0
  26. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +4 -0
  27. package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json +233 -0
  28. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.dbg.json +4 -0
  29. package/artifacts/@openzeppelin/contracts/utils/Address.sol/Address.json +10 -0
  30. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +4 -0
  31. package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.json +10 -0
  32. package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.dbg.json +4 -0
  33. package/artifacts/@openzeppelin/contracts/utils/StorageSlot.sol/StorageSlot.json +10 -0
  34. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.dbg.json +4 -0
  35. package/artifacts/@openzeppelin/contracts/utils/Strings.sol/Strings.json +10 -0
  36. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.dbg.json +4 -0
  37. package/artifacts/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json +30 -0
  38. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.dbg.json +4 -0
  39. package/artifacts/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json +30 -0
  40. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.dbg.json +4 -0
  41. package/artifacts/@openzeppelin/contracts/utils/math/Math.sol/Math.json +10 -0
  42. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +4 -0
  43. package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.json +10 -0
  44. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.dbg.json +4 -0
  45. package/artifacts/@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol/Ownable2StepUpgradeable.json +115 -0
  46. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +4 -0
  47. package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json +76 -0
  48. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +4 -0
  49. package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json +24 -0
  50. package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.dbg.json +4 -0
  51. package/artifacts/@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol/ReentrancyGuardUpgradeable.json +24 -0
  52. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.dbg.json +4 -0
  53. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol/IERC20Upgradeable.json +194 -0
  54. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.dbg.json +4 -0
  55. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol/IERC20PermitUpgradeable.json +86 -0
  56. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.dbg.json +4 -0
  57. package/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol/SafeERC20Upgradeable.json +10 -0
  58. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +4 -0
  59. package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.json +10 -0
  60. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +4 -0
  61. package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json +24 -0
  62. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.dbg.json +4 -0
  63. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlManager.sol/AccessControlManager.json +369 -0
  64. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.dbg.json +4 -0
  65. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/AccessControlledV8.sol/AccessControlledV8.json +181 -0
  66. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.dbg.json +4 -0
  67. package/artifacts/@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol/IAccessControlManagerV8.json +282 -0
  68. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +4 -0
  69. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.json +40 -0
  70. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +4 -0
  71. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/OracleInterface.json +30 -0
  72. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +4 -0
  73. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.json +43 -0
  74. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +4 -0
  75. package/artifacts/@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol/TwapInterface.json +49 -0
  76. package/artifacts/build-info/5d0b3e7c7d317c28bfc8eca20c31f64e.json +1 -0
  77. package/artifacts/build-info/f19d689bc99e63a20dd2a17a14e2b84a.json +1 -0
  78. package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.dbg.json +4 -0
  79. package/artifacts/contracts/BaseJumpRateModelV2.sol/BaseJumpRateModelV2.json +276 -0
  80. package/artifacts/contracts/Comptroller.sol/Comptroller.dbg.json +4 -0
  81. package/artifacts/contracts/Comptroller.sol/Comptroller.json +1667 -0
  82. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.dbg.json +4 -0
  83. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerInterface.json +285 -0
  84. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.dbg.json +4 -0
  85. package/artifacts/contracts/ComptrollerInterface.sol/ComptrollerViewInterface.json +170 -0
  86. package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.dbg.json +4 -0
  87. package/artifacts/contracts/ComptrollerStorage.sol/ComptrollerStorage.json +173 -0
  88. package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.dbg.json +4 -0
  89. package/artifacts/contracts/ErrorReporter.sol/TokenErrorReporter.json +156 -0
  90. package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.dbg.json +4 -0
  91. package/artifacts/contracts/ExponentialNoError.sol/ExponentialNoError.json +10 -0
  92. package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.dbg.json +4 -0
  93. package/artifacts/contracts/IPancakeswapV2Router.sol/IPancakeswapV2Router.json +50 -0
  94. package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.dbg.json +4 -0
  95. package/artifacts/contracts/InterestRateModel.sol/InterestRateModel.json +97 -0
  96. package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.dbg.json +4 -0
  97. package/artifacts/contracts/JumpRateModelV2.sol/JumpRateModelV2.json +307 -0
  98. package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.dbg.json +4 -0
  99. package/artifacts/contracts/Lens/PoolLens.sol/PoolLens.json +1087 -0
  100. package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.dbg.json +4 -0
  101. package/artifacts/contracts/MaxLoopsLimitHelper.sol/MaxLoopsLimitHelper.json +59 -0
  102. package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.dbg.json +4 -0
  103. package/artifacts/contracts/Pool/PoolRegistry.sol/PoolRegistry.json +689 -0
  104. package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.dbg.json +4 -0
  105. package/artifacts/contracts/Pool/PoolRegistryInterface.sol/PoolRegistryInterface.json +176 -0
  106. package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.dbg.json +4 -0
  107. package/artifacts/contracts/Rewards/RewardsDistributor.sol/RewardsDistributor.json +928 -0
  108. package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.dbg.json +4 -0
  109. package/artifacts/contracts/RiskFund/IProtocolShareReserve.sol/IProtocolShareReserve.json +29 -0
  110. package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.dbg.json +4 -0
  111. package/artifacts/contracts/RiskFund/IRiskFund.sol/IRiskFund.json +101 -0
  112. package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.dbg.json +4 -0
  113. package/artifacts/contracts/RiskFund/ProtocolShareReserve.sol/ProtocolShareReserve.json +296 -0
  114. package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.dbg.json +4 -0
  115. package/artifacts/contracts/RiskFund/ReserveHelpers.sol/ReserveHelpers.json +83 -0
  116. package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.dbg.json +4 -0
  117. package/artifacts/contracts/RiskFund/RiskFund.sol/RiskFund.json +596 -0
  118. package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.dbg.json +4 -0
  119. package/artifacts/contracts/Shortfall/IShortfall.sol/IShortfall.json +24 -0
  120. package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.dbg.json +4 -0
  121. package/artifacts/contracts/Shortfall/Shortfall.sol/Shortfall.json +761 -0
  122. package/artifacts/contracts/VToken.sol/VToken.dbg.json +4 -0
  123. package/artifacts/contracts/VToken.sol/VToken.json +1850 -0
  124. package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.dbg.json +4 -0
  125. package/artifacts/contracts/VTokenInterfaces.sol/VTokenInterface.json +1398 -0
  126. package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.dbg.json +4 -0
  127. package/artifacts/contracts/VTokenInterfaces.sol/VTokenStorage.json +219 -0
  128. package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.dbg.json +4 -0
  129. package/artifacts/contracts/WhitePaperInterestRateModel.sol/WhitePaperInterestRateModel.json +192 -0
  130. package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.dbg.json +4 -0
  131. package/artifacts/contracts/test/ComptrollerHarness.sol/ComptrollerHarness.json +1712 -0
  132. package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.dbg.json +4 -0
  133. package/artifacts/contracts/test/ComptrollerHarness.sol/EchoTypesComptroller.json +94 -0
  134. package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.dbg.json +4 -0
  135. package/artifacts/contracts/test/ComptrollerScenario.sol/ComptrollerScenario.json +1744 -0
  136. package/artifacts/contracts/test/ERC20.sol/ERC20.dbg.json +4 -0
  137. package/artifacts/contracts/test/ERC20.sol/ERC20.json +194 -0
  138. package/artifacts/contracts/test/ERC20.sol/ERC20Base.dbg.json +4 -0
  139. package/artifacts/contracts/test/ERC20.sol/ERC20Base.json +141 -0
  140. package/artifacts/contracts/test/ERC20.sol/ERC20Harness.dbg.json +4 -0
  141. package/artifacts/contracts/test/ERC20.sol/ERC20Harness.json +351 -0
  142. package/artifacts/contracts/test/ERC20.sol/ERC20NS.dbg.json +4 -0
  143. package/artifacts/contracts/test/ERC20.sol/ERC20NS.json +182 -0
  144. package/artifacts/contracts/test/ERC20.sol/NonStandardToken.dbg.json +4 -0
  145. package/artifacts/contracts/test/ERC20.sol/NonStandardToken.json +247 -0
  146. package/artifacts/contracts/test/ERC20.sol/StandardToken.dbg.json +4 -0
  147. package/artifacts/contracts/test/ERC20.sol/StandardToken.json +259 -0
  148. package/artifacts/contracts/test/EvilToken.sol/EvilToken.dbg.json +4 -0
  149. package/artifacts/contracts/test/EvilToken.sol/EvilToken.json +303 -0
  150. package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.dbg.json +4 -0
  151. package/artifacts/contracts/test/FaucetToken.sol/FaucetNonStandardToken.json +265 -0
  152. package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.dbg.json +4 -0
  153. package/artifacts/contracts/test/FaucetToken.sol/FaucetToken.json +277 -0
  154. package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.dbg.json +4 -0
  155. package/artifacts/contracts/test/FaucetToken.sol/FaucetTokenReEntrantHarness.json +313 -0
  156. package/artifacts/contracts/test/FeeToken.sol/FeeToken.dbg.json +4 -0
  157. package/artifacts/contracts/test/FeeToken.sol/FeeToken.json +313 -0
  158. package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.dbg.json +4 -0
  159. package/artifacts/contracts/test/HarnessMaxLoopsLimitHelper.sol/HarnessMaxLoopsLimitHelper.json +85 -0
  160. package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.dbg.json +4 -0
  161. package/artifacts/contracts/test/MockDeflationaryToken.sol/MockDeflatingToken.json +332 -0
  162. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.dbg.json +4 -0
  163. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IERC20.json +233 -0
  164. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.dbg.json +4 -0
  165. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeFactory.json +187 -0
  166. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.dbg.json +4 -0
  167. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakePair.json +668 -0
  168. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.dbg.json +4 -0
  169. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter01.json +760 -0
  170. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.dbg.json +4 -0
  171. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IPancakeRouter02.json +962 -0
  172. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.dbg.json +4 -0
  173. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/IWETH.json +55 -0
  174. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.dbg.json +4 -0
  175. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeLibrary.json +10 -0
  176. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.dbg.json +4 -0
  177. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/PancakeRouter.json +982 -0
  178. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.dbg.json +4 -0
  179. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/SafeMath.json +10 -0
  180. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.dbg.json +4 -0
  181. package/artifacts/contracts/test/Mocks/MockPancakeSwap.sol/TransferHelper.json +10 -0
  182. package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.dbg.json +4 -0
  183. package/artifacts/contracts/test/Mocks/MockPriceOracle.sol/MockPriceOracle.json +85 -0
  184. package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.dbg.json +4 -0
  185. package/artifacts/contracts/test/Mocks/MockToken.sol/MockToken.json +315 -0
  186. package/artifacts/contracts/test/SafeMath.sol/SafeMath.dbg.json +4 -0
  187. package/artifacts/contracts/test/SafeMath.sol/SafeMath.json +10 -0
  188. package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.dbg.json +4 -0
  189. package/artifacts/contracts/test/UpgradedVToken.sol/UpgradedVToken.json +1946 -0
  190. package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.dbg.json +4 -0
  191. package/artifacts/contracts/test/VTokenHarness.sol/VTokenHarness.json +2306 -0
  192. package/contracts/BaseJumpRateModelV2.sol +4 -3
  193. package/contracts/Comptroller.sol +40 -15
  194. package/contracts/ComptrollerInterface.sol +10 -0
  195. package/contracts/ComptrollerStorage.sol +5 -0
  196. package/contracts/ErrorReporter.sol +5 -0
  197. package/contracts/ExponentialNoError.sol +0 -7
  198. package/contracts/Lens/PoolLens.sol +13 -0
  199. package/contracts/MaxLoopsLimitHelper.sol +5 -0
  200. package/contracts/Pool/PoolRegistry.sol +58 -206
  201. package/contracts/Pool/PoolRegistryInterface.sol +12 -7
  202. package/contracts/Rewards/RewardsDistributor.sol +15 -0
  203. package/contracts/RiskFund/IProtocolShareReserve.sol +5 -0
  204. package/contracts/RiskFund/IRiskFund.sol +5 -0
  205. package/contracts/RiskFund/ProtocolShareReserve.sol +5 -0
  206. package/contracts/RiskFund/ReserveHelpers.sol +5 -0
  207. package/contracts/RiskFund/RiskFund.sol +5 -5
  208. package/contracts/Shortfall/IShortfall.sol +5 -0
  209. package/contracts/Shortfall/Shortfall.sol +33 -22
  210. package/contracts/VToken.sol +31 -9
  211. package/contracts/VTokenInterfaces.sol +10 -0
  212. package/contracts/WhitePaperInterestRateModel.sol +1 -1
  213. package/contracts/lib/imports.sol +11 -0
  214. package/contracts/test/MockDeflationaryToken.sol +113 -0
  215. package/dist/deploy/001-deploy-mock-tokens.d.ts +3 -0
  216. package/dist/deploy/001-deploy-mock-tokens.js +23 -0
  217. package/dist/deploy/002-price-oracle.d.ts +2 -0
  218. package/dist/deploy/002-price-oracle.js +9 -0
  219. package/dist/deploy/003-price-oracle-configure-feeds.d.ts +2 -0
  220. package/dist/deploy/003-price-oracle-configure-feeds.js +9 -0
  221. package/{deploy/004-swap-router.ts → dist/deploy/004-swap-router.d.ts} +0 -3
  222. package/dist/deploy/004-swap-router.js +8 -0
  223. package/dist/deploy/005-access-control.d.ts +3 -0
  224. package/dist/deploy/005-access-control.js +16 -0
  225. package/dist/deploy/006-deploy-factories.d.ts +3 -0
  226. package/dist/deploy/006-deploy-factories.js +37 -0
  227. package/dist/deploy/007-access-control-configure.d.ts +3 -0
  228. package/dist/deploy/007-access-control-configure.js +69 -0
  229. package/dist/deploy/008-deploy-pool-lens.d.ts +3 -0
  230. package/dist/deploy/008-deploy-pool-lens.js +15 -0
  231. package/dist/deploy/009-deploy-pools.d.ts +3 -0
  232. package/dist/deploy/009-deploy-pools.js +186 -0
  233. package/dist/deploy/010-rewards.d.ts +3 -0
  234. package/dist/deploy/010-rewards.js +76 -0
  235. package/dist/deploy/011-transfer-pools-ownership.d.ts +3 -0
  236. package/dist/deploy/011-transfer-pools-ownership.js +75 -0
  237. package/dist/deploy/012-riskfund-protocolshare.d.ts +3 -0
  238. package/dist/deploy/012-riskfund-protocolshare.js +139 -0
  239. package/dist/deploy/013-transfer-funds-ownership.d.ts +3 -0
  240. package/dist/deploy/013-transfer-funds-ownership.js +46 -0
  241. package/dist/hardhat.config.d.ts +14 -0
  242. package/dist/hardhat.config.js +237 -0
  243. package/dist/helpers/deploymentConfig.d.ts +59 -0
  244. package/dist/helpers/deploymentConfig.js +836 -0
  245. package/dist/helpers/utils.d.ts +3 -0
  246. package/dist/helpers/utils.js +28 -0
  247. package/package.json +3 -11
  248. package/contracts/Factories/JumpRateModelFactory.sol +0 -26
  249. package/contracts/Factories/VTokenProxyFactory.sol +0 -53
  250. package/contracts/Factories/WhitePaperInterestRateModelFactory.sol +0 -12
  251. package/contracts/Proxy/UpgradeableBeacon.sol +0 -10
  252. package/deploy/001-deploy-mock-tokens.ts +0 -29
  253. package/deploy/002-price-oracle.ts +0 -7
  254. package/deploy/003-price-oracle-configure-feeds.ts +0 -7
  255. package/deploy/005-access-control.ts +0 -20
  256. package/deploy/006-deploy-factories.ts +0 -82
  257. package/deploy/007-access-control-configure.ts +0 -142
  258. package/deploy/008-deploy-pool-lens.ts +0 -19
  259. package/deploy/009-deploy-pools.ts +0 -171
  260. package/deploy/010-rewards.ts +0 -84
  261. package/deploy/011-transfer-pools-ownership.ts +0 -93
  262. package/deploy/012-riskfund-protocolshare.ts +0 -140
  263. package/deploy/013-transfer-funds-ownership.ts +0 -63
  264. package/helpers/deploymentConfig.ts +0 -897
  265. package/helpers/utils.ts +0 -24
@@ -1,897 +0,0 @@
1
- import { ethers } from "hardhat";
2
- import { DeploymentsExtension } from "hardhat-deploy/types";
3
-
4
- import { convertToUnit } from "./utils";
5
-
6
- export type NetworkConfig = {
7
- hardhat: DeploymentConfig;
8
- bsctestnet: DeploymentConfig;
9
- bscmainnet: DeploymentConfig;
10
- };
11
-
12
- export type DeploymentConfig = {
13
- tokensConfig: TokenConfig[];
14
- poolConfig: PoolConfig[];
15
- };
16
-
17
- export type TokenConfig = {
18
- isMock: boolean;
19
- name?: string;
20
- symbol: string;
21
- decimals?: number;
22
- tokenAddress: string;
23
- };
24
-
25
- export type PoolConfig = {
26
- name: string;
27
- closeFactor: string;
28
- liquidationIncentive: string;
29
- minLiquidatableCollateral: string;
30
- vtokens: VTokenConfig[];
31
- rewards?: RewardConfig[];
32
- };
33
-
34
- // NOTE: markets, supplySpeeds, borrowSpeeds array sizes should match
35
- export type RewardConfig = {
36
- asset: string;
37
- markets: string[]; // underlying asset symbol of a the e.g ["BNX","CAKE"]
38
- supplySpeeds: string[];
39
- borrowSpeeds: string[];
40
- };
41
-
42
- export type SpeedConfig = {
43
- borrowSpeed: string;
44
- supplySpeed: string;
45
- };
46
-
47
- export type VTokenConfig = {
48
- name: string;
49
- symbol: string;
50
- asset: string; // This should match a name property from a TokenCofig
51
- rateModel: string;
52
- baseRatePerYear: string;
53
- multiplierPerYear: string;
54
- jumpMultiplierPerYear: string;
55
- kink_: string;
56
- collateralFactor: string;
57
- liquidationThreshold: string;
58
- reserveFactor: string;
59
- initialSupply: string;
60
- supplyCap: string;
61
- borrowCap: string;
62
- };
63
-
64
- export enum InterestRateModels {
65
- WhitePaper,
66
- JumpRate,
67
- }
68
-
69
- const stableTokenTemplate = {
70
- rateModel: InterestRateModels.JumpRate.toString(),
71
- baseRatePerYear: "0",
72
- multiplierPerYear: convertToUnit(0.15, 18),
73
- jumpMultiplierPerYear: convertToUnit(3, 18),
74
- kink_: convertToUnit(0.6, 18),
75
- collateralFactor: convertToUnit(0.7, 18),
76
- liquidationThreshold: convertToUnit(0.8, 18),
77
- reserveFactor: convertToUnit(0.1, 18), // 10%
78
- initialSupply: convertToUnit(100_000, 18),
79
- supplyCap: convertToUnit(10_000_000, 18),
80
- borrowCap: convertToUnit(10_000_000, 18),
81
- };
82
-
83
- const volatileTokenTemplate = {
84
- rateModel: InterestRateModels.JumpRate.toString(),
85
- baseRatePerYear: convertToUnit(1, 16), // 1%
86
- multiplierPerYear: convertToUnit(0.25, 18),
87
- jumpMultiplierPerYear: convertToUnit(4, 18),
88
- kink_: convertToUnit(0.5, 18),
89
- collateralFactor: convertToUnit(0.6, 18),
90
- liquidationThreshold: convertToUnit(0.7, 18),
91
- reserveFactor: convertToUnit(0.25, 18), // 25%
92
- initialSupply: convertToUnit(100_000, 18),
93
- supplyCap: convertToUnit(10_000_000, 18),
94
- borrowCap: convertToUnit(10_000_000, 18),
95
- };
96
-
97
- export const globalConfig: NetworkConfig = {
98
- hardhat: {
99
- tokensConfig: [
100
- {
101
- isMock: true,
102
- name: "Venus",
103
- symbol: "XVS",
104
- decimals: 18,
105
- tokenAddress: ethers.constants.AddressZero,
106
- },
107
- {
108
- isMock: true,
109
- name: "Binance USD",
110
- symbol: "BUSD",
111
- decimals: 18,
112
- tokenAddress: ethers.constants.AddressZero,
113
- },
114
- {
115
- isMock: true,
116
- name: "Bitcoin BEP2",
117
- symbol: "BTCB",
118
- decimals: 18,
119
- tokenAddress: ethers.constants.AddressZero,
120
- },
121
- {
122
- isMock: true,
123
- name: "BinaryX",
124
- symbol: "BNX",
125
- decimals: 18,
126
- tokenAddress: ethers.constants.AddressZero,
127
- },
128
- {
129
- isMock: true,
130
- name: "Ankr",
131
- symbol: "ANKR",
132
- decimals: 18,
133
- tokenAddress: ethers.constants.AddressZero,
134
- },
135
- {
136
- isMock: true,
137
- name: "Ankr Staked BNB",
138
- symbol: "ankrBNB",
139
- decimals: 18,
140
- tokenAddress: ethers.constants.AddressZero,
141
- },
142
- {
143
- isMock: true,
144
- name: "MOBOX",
145
- symbol: "MBOX",
146
- decimals: 18,
147
- tokenAddress: ethers.constants.AddressZero,
148
- },
149
- {
150
- isMock: true,
151
- name: "NFT",
152
- symbol: "NFT",
153
- decimals: 18,
154
- tokenAddress: ethers.constants.AddressZero,
155
- },
156
- {
157
- isMock: true,
158
- name: "RACA",
159
- symbol: "RACA",
160
- decimals: 18,
161
- tokenAddress: ethers.constants.AddressZero,
162
- },
163
- {
164
- isMock: true,
165
- name: "pSTAKE Staked BNB",
166
- symbol: "stkBNB",
167
- decimals: 18,
168
- tokenAddress: ethers.constants.AddressZero,
169
- },
170
- {
171
- isMock: true,
172
- name: "USDD",
173
- symbol: "USDD",
174
- decimals: 18,
175
- tokenAddress: ethers.constants.AddressZero,
176
- },
177
- {
178
- isMock: true,
179
- name: "AUTO",
180
- symbol: "AUTO",
181
- decimals: 18,
182
- tokenAddress: ethers.constants.AddressZero,
183
- },
184
- ],
185
- poolConfig: [
186
- {
187
- name: "Pool 1",
188
- closeFactor: convertToUnit(0.05, 18),
189
- liquidationIncentive: convertToUnit(1, 18),
190
- minLiquidatableCollateral: convertToUnit(100, 18),
191
- vtokens: [
192
- {
193
- name: "Venus BNX",
194
- asset: "BNX",
195
- symbol: "vBNX",
196
- rateModel: InterestRateModels.JumpRate.toString(),
197
- baseRatePerYear: convertToUnit(1, 16), // 1%
198
- multiplierPerYear: convertToUnit(0.25, 18),
199
- jumpMultiplierPerYear: convertToUnit(4, 18),
200
- kink_: convertToUnit(0.5, 18),
201
- collateralFactor: convertToUnit(0.6, 18),
202
- liquidationThreshold: convertToUnit(0.7, 18),
203
- reserveFactor: convertToUnit(0.25, 18),
204
- initialSupply: convertToUnit(10, 18),
205
- supplyCap: convertToUnit(932019, 18),
206
- borrowCap: convertToUnit(478980, 18),
207
- },
208
- {
209
- name: "Venus BTCB",
210
- asset: "BTCB",
211
- symbol: "vBTCB",
212
- rateModel: InterestRateModels.JumpRate.toString(),
213
- baseRatePerYear: "0",
214
- multiplierPerYear: convertToUnit(0.15, 18),
215
- jumpMultiplierPerYear: convertToUnit(3, 18),
216
- kink_: convertToUnit(0.6, 18),
217
- collateralFactor: convertToUnit(0.7, 18),
218
- liquidationThreshold: convertToUnit(0.8, 18),
219
- reserveFactor: convertToUnit(0.25, 18),
220
- initialSupply: convertToUnit(10, 18),
221
- supplyCap: convertToUnit(1000, 18),
222
- borrowCap: convertToUnit(1000, 18),
223
- },
224
- ],
225
- rewards: [
226
- {
227
- asset: "XVS",
228
- markets: ["BNX", "BTCB"],
229
- supplySpeeds: [convertToUnit(23, 8), convertToUnit(23, 8)],
230
- borrowSpeeds: [convertToUnit(23, 8), convertToUnit(23, 8)],
231
- },
232
- {
233
- asset: "BNX",
234
- markets: ["BNX"],
235
- supplySpeeds: [convertToUnit(33, 8)],
236
- borrowSpeeds: [convertToUnit(33, 8)],
237
- },
238
- ],
239
- },
240
- {
241
- name: "Pool 2",
242
- closeFactor: convertToUnit(0.05, 18),
243
- liquidationIncentive: convertToUnit(1, 18),
244
- minLiquidatableCollateral: convertToUnit(100, 18),
245
- vtokens: [
246
- {
247
- name: "Venus ANKR",
248
- asset: "ANKR",
249
- symbol: "vANKR",
250
- rateModel: InterestRateModels.JumpRate.toString(),
251
- baseRatePerYear: "0",
252
- multiplierPerYear: convertToUnit(0.15, 18),
253
- jumpMultiplierPerYear: convertToUnit(3, 18),
254
- kink_: convertToUnit(0.6, 18),
255
- collateralFactor: convertToUnit(0.7, 18),
256
- liquidationThreshold: convertToUnit(0.8, 18),
257
- reserveFactor: convertToUnit(0.25, 18),
258
- initialSupply: convertToUnit(10, 18),
259
- supplyCap: convertToUnit(3000000, 18),
260
- borrowCap: convertToUnit(3000000, 18),
261
- },
262
- {
263
- name: "Venus ankrBNB",
264
- asset: "ankrBNB",
265
- symbol: "vankrBNB",
266
- rateModel: InterestRateModels.JumpRate.toString(),
267
- baseRatePerYear: convertToUnit(1, 16),
268
- multiplierPerYear: convertToUnit(0.25, 18),
269
- jumpMultiplierPerYear: convertToUnit(4, 18),
270
- kink_: convertToUnit(0.5, 18),
271
- collateralFactor: convertToUnit(0.6, 18),
272
- liquidationThreshold: convertToUnit(0.7, 18),
273
- reserveFactor: convertToUnit(0.25, 18),
274
- initialSupply: convertToUnit(10, 18),
275
- supplyCap: convertToUnit(100, 18),
276
- borrowCap: convertToUnit(100, 18),
277
- },
278
- {
279
- name: "Venus MBOX",
280
- asset: "MBOX",
281
- symbol: "vMBOX",
282
- rateModel: InterestRateModels.JumpRate.toString(),
283
- baseRatePerYear: "0",
284
- multiplierPerYear: convertToUnit(0.15, 18),
285
- jumpMultiplierPerYear: convertToUnit(3, 18),
286
- kink_: convertToUnit(0.6, 18),
287
- collateralFactor: convertToUnit(0.7, 18),
288
- liquidationThreshold: convertToUnit(0.8, 18),
289
- reserveFactor: convertToUnit(0.25, 18),
290
- initialSupply: convertToUnit(10, 18),
291
- supplyCap: convertToUnit(7000000, 18),
292
- borrowCap: convertToUnit(3184294, 18),
293
- },
294
- {
295
- name: "Venus NFT",
296
- asset: "NFT",
297
- symbol: "vNFT",
298
- rateModel: InterestRateModels.JumpRate.toString(),
299
- baseRatePerYear: convertToUnit(1, 16),
300
- multiplierPerYear: convertToUnit(0.25, 18),
301
- jumpMultiplierPerYear: convertToUnit(4, 18),
302
- kink_: convertToUnit(0.5, 18),
303
- collateralFactor: convertToUnit(0.6, 18),
304
- liquidationThreshold: convertToUnit(0.7, 18),
305
- reserveFactor: convertToUnit(0.25, 18),
306
- initialSupply: convertToUnit(10, 18),
307
- supplyCap: convertToUnit(84985800573, 18),
308
- borrowCap: convertToUnit(24654278679, 18),
309
- },
310
- {
311
- name: "Venus RACA",
312
- asset: "RACA",
313
- symbol: "vRACA",
314
- rateModel: InterestRateModels.JumpRate.toString(),
315
- baseRatePerYear: convertToUnit(1, 16),
316
- multiplierPerYear: convertToUnit(0.25, 18),
317
- jumpMultiplierPerYear: convertToUnit(4, 18),
318
- kink_: convertToUnit(0.5, 18),
319
- collateralFactor: convertToUnit(0.6, 18),
320
- liquidationThreshold: convertToUnit(0.7, 18),
321
- reserveFactor: convertToUnit(0.25, 18),
322
- initialSupply: convertToUnit(10, 18),
323
- supplyCap: convertToUnit(23758811062, 18),
324
- borrowCap: convertToUnit(3805812642, 18),
325
- },
326
- {
327
- name: "Venus stkBNB",
328
- asset: "stkBNB",
329
- symbol: "vstkBNB",
330
- rateModel: InterestRateModels.JumpRate.toString(),
331
- baseRatePerYear: convertToUnit(1, 16),
332
- multiplierPerYear: convertToUnit(0.25, 18),
333
- jumpMultiplierPerYear: convertToUnit(4, 18),
334
- kink_: convertToUnit(0.5, 18),
335
- collateralFactor: convertToUnit(0.6, 18),
336
- liquidationThreshold: convertToUnit(0.7, 18),
337
- reserveFactor: convertToUnit(0.25, 18),
338
- initialSupply: convertToUnit(10, 18),
339
- supplyCap: convertToUnit(1963, 18),
340
- borrowCap: convertToUnit(324, 18),
341
- },
342
- {
343
- name: "Venus USDD",
344
- asset: "USDD",
345
- symbol: "vUSDD",
346
- rateModel: InterestRateModels.JumpRate.toString(),
347
- baseRatePerYear: "0",
348
- multiplierPerYear: convertToUnit(0.15, 18),
349
- jumpMultiplierPerYear: convertToUnit(3, 18),
350
- kink_: convertToUnit(0.6, 18),
351
- collateralFactor: convertToUnit(0.7, 18),
352
- liquidationThreshold: convertToUnit(0.8, 18),
353
- reserveFactor: convertToUnit(0.1, 18),
354
- initialSupply: convertToUnit(10, 18),
355
- supplyCap: convertToUnit(10601805, 18),
356
- borrowCap: convertToUnit(1698253, 18),
357
- },
358
- ],
359
- rewards: [
360
- {
361
- asset: "XVS",
362
- markets: ["ANKR", "ankrBNB", "MBOX", "NFT", "RACA", "stkBNB", "USDD"],
363
- supplySpeeds: [
364
- convertToUnit(23, 8),
365
- convertToUnit(23, 8),
366
- convertToUnit(23, 8),
367
- convertToUnit(23, 8),
368
- convertToUnit(23, 8),
369
- convertToUnit(23, 8),
370
- convertToUnit(23, 8),
371
- ],
372
- borrowSpeeds: [
373
- convertToUnit(23, 8),
374
- convertToUnit(23, 8),
375
- convertToUnit(23, 8),
376
- convertToUnit(23, 8),
377
- convertToUnit(23, 8),
378
- convertToUnit(23, 8),
379
- convertToUnit(23, 8),
380
- ],
381
- },
382
- {
383
- asset: "ANKR",
384
- markets: ["ANKR", "ankrBNB"],
385
- supplySpeeds: [convertToUnit(20, 8), convertToUnit(20, 8)],
386
- borrowSpeeds: [convertToUnit(20, 8), convertToUnit(20, 8)],
387
- },
388
- {
389
- asset: "MBOX",
390
- markets: ["MBOX"],
391
- supplySpeeds: [convertToUnit(25, 8)],
392
- borrowSpeeds: [convertToUnit(25, 8)],
393
- },
394
- {
395
- asset: "NFT",
396
- markets: ["NFT"],
397
- supplySpeeds: [convertToUnit(22, 8)],
398
- borrowSpeeds: [convertToUnit(22, 8)],
399
- },
400
- {
401
- asset: "RACA",
402
- markets: ["RACA"],
403
- supplySpeeds: [convertToUnit(27, 8)],
404
- borrowSpeeds: [convertToUnit(27, 8)],
405
- },
406
- ],
407
- },
408
- ],
409
- },
410
- bsctestnet: {
411
- tokensConfig: [
412
- {
413
- isMock: false,
414
- name: "Venus",
415
- symbol: "XVS",
416
- decimals: 18,
417
- tokenAddress: "0xB9e0E753630434d7863528cc73CB7AC638a7c8ff",
418
- },
419
- {
420
- isMock: false,
421
- name: "Binance USD",
422
- symbol: "BUSD",
423
- decimals: 18,
424
- tokenAddress: "0x8301F2213c0eeD49a7E28Ae4c3e91722919B8B47",
425
- },
426
- {
427
- isMock: false,
428
- name: "Bitcoin BEP2",
429
- symbol: "BTCB",
430
- decimals: 18,
431
- tokenAddress: "0xA808e341e8e723DC6BA0Bb5204Bafc2330d7B8e4",
432
- },
433
- {
434
- isMock: false,
435
- name: "Wrapped BNB",
436
- symbol: "WBNB",
437
- decimals: 18,
438
- tokenAddress: "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",
439
- },
440
- {
441
- isMock: false,
442
- name: "TRON",
443
- symbol: "TRX",
444
- decimals: 18,
445
- tokenAddress: "0x19E7215abF8B2716EE807c9f4b83Af0e7f92653F",
446
- },
447
- {
448
- isMock: false,
449
- name: "USDT",
450
- symbol: "USDT",
451
- decimals: 6,
452
- tokenAddress: "0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c",
453
- },
454
- {
455
- isMock: true,
456
- name: "Ankr",
457
- symbol: "ANKR",
458
- decimals: 18,
459
- tokenAddress: ethers.constants.AddressZero,
460
- },
461
- {
462
- isMock: true,
463
- name: "Ankr Staked BNB",
464
- symbol: "ankrBNB",
465
- decimals: 18,
466
- tokenAddress: ethers.constants.AddressZero,
467
- },
468
- {
469
- isMock: true,
470
- name: "NFT",
471
- symbol: "NFT",
472
- decimals: 18,
473
- tokenAddress: ethers.constants.AddressZero,
474
- },
475
- {
476
- isMock: true,
477
- name: "RACA",
478
- symbol: "RACA",
479
- decimals: 18,
480
- tokenAddress: ethers.constants.AddressZero,
481
- },
482
- {
483
- isMock: true,
484
- name: "pSTAKE Staked BNB",
485
- symbol: "stkBNB",
486
- decimals: 18,
487
- tokenAddress: ethers.constants.AddressZero,
488
- },
489
- {
490
- isMock: true,
491
- name: "BIFI",
492
- symbol: "BIFI",
493
- decimals: 18,
494
- tokenAddress: ethers.constants.AddressZero,
495
- },
496
- {
497
- isMock: true,
498
- name: "Biswap",
499
- symbol: "BSW",
500
- decimals: 18,
501
- tokenAddress: ethers.constants.AddressZero,
502
- },
503
- {
504
- isMock: true,
505
- name: "WOO",
506
- symbol: "WOO",
507
- decimals: 18,
508
- tokenAddress: ethers.constants.AddressZero,
509
- },
510
- {
511
- isMock: true,
512
- name: "FLOKI",
513
- symbol: "FLOKI",
514
- decimals: 18,
515
- tokenAddress: ethers.constants.AddressZero,
516
- },
517
- {
518
- isMock: true,
519
- name: "BNBx",
520
- symbol: "BNBx",
521
- decimals: 18,
522
- tokenAddress: ethers.constants.AddressZero,
523
- },
524
- {
525
- isMock: true,
526
- name: "HAY",
527
- symbol: "HAY",
528
- decimals: 18,
529
- tokenAddress: ethers.constants.AddressZero,
530
- },
531
- {
532
- isMock: true,
533
- name: "BTT",
534
- symbol: "BTT",
535
- decimals: 18,
536
- tokenAddress: ethers.constants.AddressZero,
537
- },
538
- {
539
- isMock: true,
540
- name: "WIN",
541
- symbol: "WIN",
542
- decimals: 18,
543
- tokenAddress: ethers.constants.AddressZero,
544
- },
545
- {
546
- isMock: true,
547
- name: "USDD",
548
- symbol: "USDD",
549
- decimals: 18,
550
- tokenAddress: ethers.constants.AddressZero,
551
- },
552
- {
553
- isMock: true,
554
- name: "ALPACA",
555
- symbol: "ALPACA",
556
- decimals: 18,
557
- tokenAddress: ethers.constants.AddressZero,
558
- },
559
- ],
560
- poolConfig: [
561
- {
562
- name: "DEFI",
563
- closeFactor: convertToUnit(0.05, 18),
564
- liquidationIncentive: convertToUnit(1, 18),
565
- minLiquidatableCollateral: convertToUnit(100, 18),
566
- vtokens: [
567
- {
568
- name: "Venus BIFI",
569
- asset: "BIFI",
570
- symbol: "vBIFI",
571
- ...volatileTokenTemplate,
572
- },
573
- {
574
- name: "Venus BSW",
575
- asset: "BSW",
576
- symbol: "vBSW",
577
- ...volatileTokenTemplate,
578
- },
579
- {
580
- name: "Venus ALPACA",
581
- asset: "ALPACA",
582
- symbol: "vALPACA",
583
- ...volatileTokenTemplate,
584
- },
585
- {
586
- name: "Venus WOO",
587
- asset: "WOO",
588
- symbol: "vWOO",
589
- ...volatileTokenTemplate,
590
- },
591
- {
592
- name: "Venus USDT",
593
- asset: "USDT",
594
- symbol: "vUSDT",
595
- ...stableTokenTemplate,
596
- initialSupply: convertToUnit(100_000, 6),
597
- supplyCap: convertToUnit(10_000_000, 6),
598
- borrowCap: convertToUnit(10_000_000, 6),
599
- },
600
- {
601
- name: "Venus USDD",
602
- asset: "USDD",
603
- symbol: "vUSDD",
604
- ...stableTokenTemplate,
605
- },
606
- ],
607
- rewards: [
608
- {
609
- asset: "XVS",
610
- markets: ["BIFI", "BSW", "ALPACA", "WOO"],
611
- supplySpeeds: [convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8)],
612
- borrowSpeeds: [convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8)],
613
- },
614
- {
615
- asset: "BIFI",
616
- markets: ["BSW"],
617
- supplySpeeds: [convertToUnit(33, 8)],
618
- borrowSpeeds: [convertToUnit(33, 8)],
619
- },
620
- ],
621
- },
622
- {
623
- name: "GAMEFI",
624
- closeFactor: convertToUnit(0.05, 18),
625
- liquidationIncentive: convertToUnit(1, 18),
626
- minLiquidatableCollateral: convertToUnit(100, 18),
627
- vtokens: [
628
- {
629
- name: "Venus RACA",
630
- asset: "RACA",
631
- symbol: "vRACA",
632
- ...volatileTokenTemplate,
633
- },
634
- {
635
- name: "Venus FLOKI",
636
- asset: "FLOKI",
637
- symbol: "vFLOKI",
638
- ...volatileTokenTemplate,
639
- },
640
- {
641
- name: "Venus USDT",
642
- asset: "USDT",
643
- symbol: "vUSDT",
644
- ...stableTokenTemplate,
645
- initialSupply: convertToUnit(100_000, 6),
646
- supplyCap: convertToUnit(10_000_000, 6),
647
- borrowCap: convertToUnit(10_000_000, 6),
648
- },
649
- {
650
- name: "Venus USDD",
651
- asset: "USDD",
652
- symbol: "vUSDD",
653
- ...stableTokenTemplate,
654
- },
655
- ],
656
- rewards: [
657
- {
658
- asset: "XVS",
659
- markets: ["RACA", "FLOKI"],
660
- supplySpeeds: [convertToUnit(23, 8), convertToUnit(23, 8)],
661
- borrowSpeeds: [convertToUnit(23, 8), convertToUnit(23, 8)],
662
- },
663
- {
664
- asset: "RACA",
665
- markets: ["FLOKI"],
666
- supplySpeeds: [convertToUnit(33, 8)],
667
- borrowSpeeds: [convertToUnit(33, 8)],
668
- },
669
- ],
670
- },
671
- {
672
- name: "LIQUID STAKED BNB",
673
- closeFactor: convertToUnit(0.05, 18),
674
- liquidationIncentive: convertToUnit(1, 18),
675
- minLiquidatableCollateral: convertToUnit(100, 18),
676
- vtokens: [
677
- {
678
- name: "Venus ankrBNB",
679
- asset: "ankrBNB",
680
- symbol: "vankrBNB",
681
- ...volatileTokenTemplate,
682
- },
683
- {
684
- name: "Venus BNBx",
685
- asset: "BNBx",
686
- symbol: "vBNBx",
687
- ...volatileTokenTemplate,
688
- },
689
- {
690
- name: "Venus stkBNB",
691
- asset: "stkBNB",
692
- symbol: "vstkBNB",
693
- ...volatileTokenTemplate,
694
- },
695
- {
696
- name: "Venus WBNB",
697
- asset: "WBNB",
698
- symbol: "vWBNB",
699
- ...volatileTokenTemplate,
700
- initialSupply: convertToUnit("0.5", 18),
701
- },
702
- {
703
- name: "Venus ANKR",
704
- asset: "ANKR",
705
- symbol: "vANKR",
706
- ...volatileTokenTemplate,
707
- },
708
- {
709
- name: "Venus USDT",
710
- asset: "USDT",
711
- symbol: "vUSDT",
712
- ...stableTokenTemplate,
713
- initialSupply: convertToUnit(100_000, 6),
714
- supplyCap: convertToUnit(10_000_000, 6),
715
- borrowCap: convertToUnit(10_000_000, 6),
716
- },
717
- {
718
- name: "Venus USDD",
719
- asset: "USDD",
720
- symbol: "vUSDD",
721
- ...stableTokenTemplate,
722
- },
723
- ],
724
- rewards: [
725
- {
726
- asset: "XVS",
727
- markets: ["ankrBNB", "BNBx", "stkBNB"],
728
- supplySpeeds: [convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8)],
729
- borrowSpeeds: [convertToUnit(23, 8), convertToUnit(23, 8), convertToUnit(23, 8)],
730
- },
731
- {
732
- asset: "ankrBNB",
733
- markets: ["BNBx"],
734
- supplySpeeds: [convertToUnit(33, 8)],
735
- borrowSpeeds: [convertToUnit(33, 8)],
736
- },
737
- ],
738
- },
739
- {
740
- name: "STABLE COINS",
741
- closeFactor: convertToUnit(0.05, 18),
742
- liquidationIncentive: convertToUnit(1, 18),
743
- minLiquidatableCollateral: convertToUnit(100, 18),
744
- vtokens: [
745
- {
746
- name: "Venus HAY",
747
- asset: "HAY",
748
- symbol: "vHAY",
749
- ...stableTokenTemplate,
750
- },
751
- {
752
- name: "Venus USDT",
753
- asset: "USDT",
754
- symbol: "vUSDT",
755
- ...stableTokenTemplate,
756
- initialSupply: convertToUnit(100_000, 6),
757
- supplyCap: convertToUnit(10_000_000, 6),
758
- borrowCap: convertToUnit(10_000_000, 6),
759
- },
760
- {
761
- name: "Venus USDD",
762
- asset: "USDD",
763
- symbol: "vUSDD",
764
- ...stableTokenTemplate,
765
- },
766
- ],
767
- rewards: [
768
- {
769
- asset: "XVS",
770
- markets: ["HAY"],
771
- supplySpeeds: [convertToUnit(23, 8)],
772
- borrowSpeeds: [convertToUnit(23, 8)],
773
- },
774
- {
775
- asset: "HAY",
776
- markets: ["USDT"],
777
- supplySpeeds: [convertToUnit(33, 8)],
778
- borrowSpeeds: [convertToUnit(33, 8)],
779
- },
780
- ],
781
- },
782
- {
783
- name: "TRON FAMILY",
784
- closeFactor: convertToUnit(0.05, 18),
785
- liquidationIncentive: convertToUnit(1, 18),
786
- minLiquidatableCollateral: convertToUnit(100, 18),
787
- vtokens: [
788
- {
789
- name: "Venus BTT",
790
- asset: "BTT",
791
- symbol: "vBTT",
792
- ...volatileTokenTemplate,
793
- },
794
- {
795
- name: "Venus NFT",
796
- asset: "NFT",
797
- symbol: "vNFT",
798
- ...volatileTokenTemplate,
799
- },
800
- {
801
- name: "Venus WIN",
802
- asset: "WIN",
803
- symbol: "vWIN",
804
- ...volatileTokenTemplate,
805
- },
806
- {
807
- name: "Venus TRX",
808
- asset: "TRX",
809
- symbol: "vTRX",
810
- ...volatileTokenTemplate,
811
- },
812
- {
813
- name: "Venus USDT",
814
- asset: "USDT",
815
- symbol: "vUSDT",
816
- ...stableTokenTemplate,
817
- initialSupply: convertToUnit(100_000, 6),
818
- supplyCap: convertToUnit(10_000_000, 6),
819
- borrowCap: convertToUnit(10_000_000, 6),
820
- },
821
- {
822
- name: "Venus USDD",
823
- asset: "USDD",
824
- symbol: "vUSDD",
825
- ...stableTokenTemplate,
826
- },
827
- ],
828
- rewards: [
829
- {
830
- asset: "XVS",
831
- markets: ["TRX", "BTT", "NFT", "USDD", "WIN"],
832
- supplySpeeds: [
833
- convertToUnit(23, 8),
834
- convertToUnit(23, 8),
835
- convertToUnit(23, 8),
836
- convertToUnit(23, 8),
837
- convertToUnit(23, 8),
838
- ],
839
- borrowSpeeds: [
840
- convertToUnit(23, 8),
841
- convertToUnit(23, 8),
842
- convertToUnit(23, 8),
843
- convertToUnit(23, 8),
844
- convertToUnit(23, 8),
845
- ],
846
- },
847
- {
848
- asset: "TRX",
849
- markets: ["BTT"],
850
- supplySpeeds: [convertToUnit(33, 8)],
851
- borrowSpeeds: [convertToUnit(33, 8)],
852
- },
853
- ],
854
- },
855
- ],
856
- },
857
- bscmainnet: {
858
- tokensConfig: [],
859
- poolConfig: [],
860
- },
861
- };
862
-
863
- export async function getConfig(networkName: string): Promise<DeploymentConfig> {
864
- switch (networkName) {
865
- case "hardhat":
866
- return globalConfig.hardhat;
867
- case "bsctestnet":
868
- return globalConfig.bsctestnet;
869
- case "bscmainnet":
870
- return globalConfig.bscmainnet;
871
- case "development":
872
- return globalConfig.bsctestnet;
873
- default:
874
- throw new Error(`config for network ${networkName} is not available.`);
875
- }
876
- }
877
-
878
- export function getTokenConfig(tokenSymbol: string, tokens: TokenConfig[]): TokenConfig {
879
- const tokenCofig = tokens.find(
880
- ({ symbol }) => symbol.toLocaleLowerCase().trim() === tokenSymbol.toLocaleLowerCase().trim(),
881
- );
882
-
883
- if (tokenCofig) {
884
- return tokenCofig;
885
- } else {
886
- throw Error(`Token ${tokenSymbol} is not found in the config`);
887
- }
888
- }
889
-
890
- export async function getTokenAddress(tokenConfig: TokenConfig, deployments: DeploymentsExtension) {
891
- if (tokenConfig.isMock) {
892
- const token = await deployments.get(`Mock${tokenConfig.symbol}`);
893
- return token.address;
894
- } else {
895
- return tokenConfig.tokenAddress;
896
- }
897
- }