@pendle/core-v2 0.6.9 → 0.7.1-beta

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 (750) hide show
  1. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.dbg.json +4 -0
  2. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.json +714 -0
  3. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +4 -0
  4. package/build/artifacts/contracts/{core/PendleSCYImpl → SuperComposableYield/SCY-implementations}/AaveV3/WadRayMath.sol/WadRayMath.json +3 -3
  5. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +4 -0
  6. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +27 -0
  7. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +4 -0
  8. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json +737 -0
  9. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.dbg.json +4 -0
  10. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol/PendleBtrflyScy.json +635 -0
  11. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.dbg.json +4 -0
  12. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol/PendleERC4626SCY.json +609 -0
  13. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.dbg.json +4 -0
  14. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol/PendleJoeLpSCY.json +653 -0
  15. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +4 -0
  16. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json +622 -0
  17. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.dbg.json +4 -0
  18. package/build/artifacts/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol/PendleYearnVaultSCY.json +622 -0
  19. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBase.sol/SCYBase.dbg.json +4 -0
  20. package/build/artifacts/contracts/SuperComposableYield/{ISuperComposableYield.sol/ISuperComposableYield.json → base-implementations/SCYBase.sol/SCYBase.json} +221 -141
  21. package/build/artifacts/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +4 -0
  22. package/build/artifacts/contracts/SuperComposableYield/{implementations → base-implementations}/SCYBaseWithRewards.sol/SCYBaseWithRewards.json +225 -225
  23. package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.dbg.json +4 -0
  24. package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol/CelerReceiverUpg.json +128 -0
  25. package/build/artifacts/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.dbg.json +4 -0
  26. package/build/artifacts/contracts/{SuperComposableYield/implementations/RewardManager.sol/RewardManager.json → core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol/CelerSenderUpg.json} +34 -38
  27. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +4 -0
  28. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +193 -0
  29. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.dbg.json +4 -0
  30. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol/PendleGaugeControllerMainchainUpg.json +255 -0
  31. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.dbg.json +4 -0
  32. package/build/artifacts/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol/PendleGaugeControllerSidechainUpg.json +318 -0
  33. package/build/artifacts/contracts/core/LiquidityMining/PendleGauge.sol/PendleGauge.dbg.json +4 -0
  34. package/build/artifacts/contracts/{interfaces/IVotingEscrowPendle.sol/IVotingEscrowPendle.json → core/LiquidityMining/PendleGauge.sol/PendleGauge.json} +40 -72
  35. package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +4 -0
  36. package/build/artifacts/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +776 -0
  37. package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +4 -0
  38. package/build/artifacts/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +309 -0
  39. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +4 -0
  40. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +519 -0
  41. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +4 -0
  42. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +353 -0
  43. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +4 -0
  44. package/build/artifacts/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.json +138 -0
  45. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +4 -0
  46. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +898 -0
  47. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +4 -0
  48. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +351 -0
  49. package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.dbg.json +4 -0
  50. package/build/artifacts/contracts/core/PendleERC20.sol/PendleERC20.json +254 -0
  51. package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +4 -0
  52. package/build/artifacts/contracts/core/PendleERC20Permit.sol/PendleERC20Permit.json +329 -0
  53. package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/PendleRouter.sol/PendleRouter.json +2 -20
  55. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +4 -0
  56. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.json +35 -0
  57. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +4 -0
  58. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +378 -0
  59. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +4 -0
  60. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +352 -0
  61. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +4 -0
  62. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +732 -0
  63. package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/actions/ActionCallback.sol/ActionCallback.json +2 -2
  65. package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.dbg.json +1 -1
  66. package/build/artifacts/contracts/core/actions/ActionCore.sol/ActionCore.json +123 -77
  67. package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.dbg.json +1 -1
  68. package/build/artifacts/contracts/core/actions/ActionYT.sol/ActionYT.json +39 -42
  69. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPTBase.sol/ActionSCYAndPTBase.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPTBase.sol/ActionSCYAndPTBase.json +163 -1
  71. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPYBase.sol/ActionSCYAndPYBase.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/actions/base/ActionSCYAndPYBase.sol/ActionSCYAndPYBase.json +0 -13
  73. package/build/artifacts/contracts/core/actions/base/ActionSCYAndYTBase.sol/ActionSCYAndYTBase.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/actions/base/ActionSCYAndYTBase.sol/ActionSCYAndYTBase.json +1 -14
  75. package/build/artifacts/contracts/core/actions/base/CallbackHelper.sol/CallbackHelper.dbg.json +4 -0
  76. package/build/artifacts/contracts/core/actions/base/CallbackHelper.sol/CallbackHelper.json +10 -0
  77. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
  78. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.json +39 -0
  79. package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +1 -1
  80. package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +1 -1
  81. package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
  82. package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.json +13 -0
  83. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +4 -0
  84. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.json +74 -0
  85. package/build/artifacts/contracts/interfaces/ICelerMessageBus.sol/ICelerMessageBus.dbg.json +4 -0
  86. package/build/artifacts/contracts/interfaces/{IVePToken.sol/IVePToken.json → ICelerMessageBus.sol/ICelerMessageBus.json} +21 -11
  87. package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.dbg.json +4 -0
  88. package/build/artifacts/contracts/interfaces/ICelerMessageReceiverApp.sol/ICelerMessageReceiverApp.json +45 -0
  89. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +4 -0
  90. package/build/artifacts/contracts/{core/PendleBaseToken.sol/PendleBaseToken.json → interfaces/IERC4626.sol/IERC4626.json} +53 -68
  91. package/build/artifacts/contracts/interfaces/IJoePair.sol/IJoePair.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/IJoeRouter01.sol/IJoeRouter01.dbg.json +1 -1
  93. package/build/artifacts/contracts/interfaces/IJoeRouter02.sol/IJoeRouter02.dbg.json +4 -0
  94. package/build/artifacts/contracts/interfaces/IJoeRouter02.sol/IJoeRouter02.json +962 -0
  95. package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.dbg.json +1 -1
  96. package/build/artifacts/contracts/interfaces/IPActionCore.sol/IPActionCore.json +122 -58
  97. package/build/artifacts/contracts/interfaces/IPActionYT.sol/IPActionYT.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/IPActionYT.sol/IPActionYT.json +36 -21
  99. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +116 -81
  101. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +4 -0
  102. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.json +135 -0
  103. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +4 -0
  104. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.json +158 -0
  105. package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +4 -0
  107. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.json +35 -0
  108. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +35 -54
  110. package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPMarketAddRemoveCallback.sol/IPMarketAddRemoveCallback.json +2 -2
  112. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.json +37 -0
  114. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.json +13 -0
  118. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.json +61 -5
  121. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +4 -0
  122. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +167 -0
  123. package/build/artifacts/contracts/interfaces/IPVotingEscrow.sol/IPVotingEscrow.dbg.json +1 -1
  124. package/build/artifacts/contracts/interfaces/IPVotingEscrow.sol/IPVotingEscrow.json +70 -89
  125. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  126. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  127. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +156 -106
  128. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +4 -0
  129. package/build/artifacts/contracts/interfaces/{IPBaseToken.sol/IPBaseToken.json → IQiAvax.sol/IQiAvax.json} +106 -15
  130. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  131. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.json +117 -0
  132. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  133. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.json +117 -0
  134. package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +1 -1
  135. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +4 -0
  136. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.json +40 -0
  137. package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +4 -0
  138. package/build/artifacts/contracts/{SuperComposableYield/implementations/SCYBase.sol/SCYBase.json → interfaces/ISuperComposableYield.sol/ISuperComposableYield.json} +183 -181
  139. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  140. package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +1 -1
  141. package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.json +13 -0
  142. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
  143. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.json +13 -0
  144. package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +1 -1
  145. package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.json +13 -0
  146. package/build/artifacts/contracts/libraries/RewardManager.sol/RewardManager.dbg.json +4 -0
  147. package/build/artifacts/contracts/{SuperComposableYield/implementations/IRewardManager.sol/IRewardManager.json → libraries/RewardManager.sol/RewardManager.json} +30 -30
  148. package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +4 -0
  149. package/build/artifacts/contracts/libraries/RewardManagerAbstract.sol/RewardManagerAbstract.json +40 -0
  150. package/build/artifacts/contracts/libraries/SCY/SCYIndex.sol/SCYIndexLib.dbg.json +4 -0
  151. package/build/artifacts/contracts/libraries/{SCYIndex.sol → SCY/SCYIndex.sol}/SCYIndexLib.json +3 -3
  152. package/build/artifacts/contracts/libraries/SCY/SCYUtils.sol/SCYUtils.dbg.json +4 -0
  153. package/build/artifacts/contracts/{SuperComposableYield → libraries/SCY}/SCYUtils.sol/SCYUtils.json +3 -3
  154. package/build/artifacts/contracts/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +4 -0
  155. package/build/artifacts/contracts/libraries/{math/MarketMathAux.sol/MarketMathAux.json → VeBalanceLib.sol/VeBalanceLib.json} +4 -4
  156. package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +4 -0
  157. package/build/artifacts/contracts/libraries/VeHistoryLib.sol/Checkpoints.json +10 -0
  158. package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.dbg.json +4 -0
  159. package/build/artifacts/contracts/libraries/helpers/ArrayLib.sol/ArrayLib.json +10 -0
  160. package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  161. package/build/artifacts/contracts/libraries/helpers/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
  162. package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.dbg.json +4 -0
  163. package/build/artifacts/contracts/libraries/helpers/MiniHelpers.sol/MiniHelpers.json +10 -0
  164. package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.dbg.json +4 -0
  165. package/build/artifacts/contracts/libraries/helpers/SSTORE2Deployer.sol/SSTORE2Deployer.json +10 -0
  166. package/build/artifacts/contracts/libraries/helpers/TokenHelper.sol/TokenHelper.dbg.json +4 -0
  167. package/build/artifacts/contracts/{core/actions/base/ActionType.sol/ActionType.json → libraries/helpers/TokenHelper.sol/TokenHelper.json} +2 -2
  168. package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  169. package/build/artifacts/contracts/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
  170. package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.dbg.json +1 -1
  171. package/build/artifacts/contracts/libraries/math/MarketApproxLib.sol/MarketApproxLib.json +2 -2
  172. package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  173. package/build/artifacts/contracts/libraries/math/MarketMathCore.sol/MarketMathCore.json +2 -2
  174. package/build/artifacts/contracts/libraries/math/Math.sol/Math.dbg.json +1 -1
  175. package/build/artifacts/contracts/libraries/math/Math.sol/Math.json +2 -2
  176. package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.dbg.json +4 -0
  177. package/build/artifacts/contracts/libraries/math/WeekMath.sol/WeekMath.json +10 -0
  178. package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.dbg.json +4 -0
  179. package/build/artifacts/contracts/libraries/solmate/Bytes32AddressLib.sol/Bytes32AddressLib.json +10 -0
  180. package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.dbg.json +4 -0
  181. package/build/artifacts/contracts/libraries/solmate/SSTORE2.sol/SSTORE2.json +10 -0
  182. package/build/artifacts/contracts/libraries/traderjoe/JoeLibrary.sol/JoeLibrary.dbg.json +4 -0
  183. package/build/artifacts/contracts/libraries/{JoeLibrary.sol → traderjoe/JoeLibrary.sol}/JoeLibrary.json +3 -3
  184. package/build/artifacts/contracts/libraries/traderjoe/PendleJoeSwapHelperUpg.sol/PendleJoeSwapHelperUpg.dbg.json +4 -0
  185. package/build/artifacts/contracts/{periphery → libraries/traderjoe}/PendleJoeSwapHelperUpg.sol/PendleJoeSwapHelperUpg.json +1 -14
  186. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +4 -0
  187. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +862 -0
  188. package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.dbg.json +1 -1
  189. package/build/artifacts/contracts/periphery/PendleGovernanceManager.sol/PendleGovernanceManager.json +2 -2
  190. package/build/artifacts/contracts/periphery/PermissionsV2Upg.sol/PermissionsV2Upg.dbg.json +1 -1
  191. package/contracts/SuperComposableYield/SCY-implementations/AaveV3/PendleAaveV3SCY.sol +147 -0
  192. package/contracts/{core/PendleSCYImpl → SuperComposableYield/SCY-implementations}/AaveV3/WadRayMath.sol +1 -1
  193. package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenHelper.sol +74 -0
  194. package/contracts/SuperComposableYield/SCY-implementations/BenQi/PendleQiTokenSCY.sol +187 -0
  195. package/contracts/SuperComposableYield/SCY-implementations/PendleBtrflySCY.sol +123 -0
  196. package/contracts/SuperComposableYield/SCY-implementations/PendleERC4626SCY.sol +99 -0
  197. package/contracts/SuperComposableYield/SCY-implementations/PendleJoeLpSCY.sol +245 -0
  198. package/contracts/SuperComposableYield/SCY-implementations/PendleWstEthSCY.sol +107 -0
  199. package/contracts/SuperComposableYield/SCY-implementations/PendleYearnVaultScy.sol +120 -0
  200. package/contracts/SuperComposableYield/base-implementations/SCYBase.sol +197 -0
  201. package/contracts/SuperComposableYield/base-implementations/SCYBaseWithRewards.sol +131 -0
  202. package/contracts/core/LiquidityMining/CelerAbstracts/CelerReceiverUpg.sol +53 -0
  203. package/contracts/core/LiquidityMining/CelerAbstracts/CelerSenderUpg.sol +59 -0
  204. package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +146 -0
  205. package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerMainchain.sol +33 -0
  206. package/contracts/core/LiquidityMining/GaugeController/PendleGaugeControllerSidechain.sol +26 -0
  207. package/contracts/core/LiquidityMining/PendleGauge.sol +118 -0
  208. package/contracts/core/LiquidityMining/README.md +63 -0
  209. package/contracts/core/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +336 -0
  210. package/contracts/core/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +228 -0
  211. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +245 -0
  212. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +73 -0
  213. package/contracts/core/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +52 -0
  214. package/contracts/core/{PendleMarket.sol → Market/PendleMarket.sol} +135 -100
  215. package/contracts/core/{PendleMarketFactory.sol → Market/PendleMarketFactory.sol} +60 -20
  216. package/contracts/core/PendleERC20.sol +358 -0
  217. package/contracts/core/PendleERC20Permit.sol +84 -0
  218. package/contracts/core/PendleRouter.sol +6 -12
  219. package/contracts/core/YieldContracts/InterestManagerYT.sol +87 -0
  220. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +60 -0
  221. package/contracts/core/{PendleYieldContractFactory.sol → YieldContracts/PendleYieldContractFactory.sol} +43 -23
  222. package/contracts/core/YieldContracts/PendleYieldToken.sol +349 -0
  223. package/contracts/core/actions/ActionCallback.sol +63 -43
  224. package/contracts/core/actions/ActionCore.sol +95 -78
  225. package/contracts/core/actions/ActionYT.sol +35 -86
  226. package/contracts/core/actions/base/ActionSCYAndPTBase.sol +133 -78
  227. package/contracts/core/actions/base/ActionSCYAndPYBase.sol +31 -46
  228. package/contracts/core/actions/base/ActionSCYAndYTBase.sol +127 -45
  229. package/contracts/core/actions/base/CallbackHelper.sol +81 -0
  230. package/contracts/interfaces/IAToken.sol +11 -1
  231. package/contracts/interfaces/IAavePool.sol +1 -1
  232. package/contracts/interfaces/IAaveRewardsController.sol +1 -1
  233. package/contracts/interfaces/IBenQiComptroller.sol +3 -1
  234. package/contracts/interfaces/IBenQiInterestRateModel.sol +16 -0
  235. package/contracts/interfaces/ICelerMessageBus.sol +28 -0
  236. package/contracts/interfaces/ICelerMessageReceiverApp.sol +25 -0
  237. package/contracts/interfaces/IERC4626.sol +39 -0
  238. package/contracts/interfaces/IJoeRouter01.sol +1 -1
  239. package/contracts/interfaces/IJoeRouter02.sol +52 -0
  240. package/contracts/interfaces/IPActionCore.sol +44 -27
  241. package/contracts/interfaces/IPActionYT.sol +12 -9
  242. package/contracts/interfaces/IPAllAction.sol +2 -3
  243. package/contracts/interfaces/IPGaugeController.sol +28 -0
  244. package/contracts/interfaces/IPGaugeControllerMainchain.sol +12 -0
  245. package/contracts/interfaces/IPGovernanceManager.sol +1 -1
  246. package/contracts/interfaces/IPInterestManagerYT.sol +9 -0
  247. package/contracts/interfaces/IPMarket.sol +13 -13
  248. package/contracts/interfaces/IPMarketAddRemoveCallback.sol +3 -3
  249. package/contracts/interfaces/IPMarketFactory.sol +14 -2
  250. package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
  251. package/contracts/interfaces/IPPermissionsV2Upg.sol +1 -1
  252. package/contracts/interfaces/IPPrincipalToken.sol +11 -5
  253. package/contracts/interfaces/IPRouterStatic.sol +1 -1
  254. package/contracts/interfaces/IPVeToken.sol +9 -4
  255. package/contracts/interfaces/IPVotingController.sol +21 -0
  256. package/contracts/interfaces/IPVotingEscrow.sol +14 -22
  257. package/contracts/interfaces/IPYieldContractFactory.sol +1 -1
  258. package/contracts/interfaces/IPYieldToken.sol +28 -18
  259. package/contracts/interfaces/IQiAvax.sol +31 -0
  260. package/contracts/interfaces/IQiErc20.sol +1 -1
  261. package/contracts/interfaces/IQiToken.sol +22 -1
  262. package/contracts/interfaces/IREDACTEDStaking.sol +1 -1
  263. package/contracts/interfaces/IRewardManager.sol +9 -0
  264. package/contracts/interfaces/ISuperComposableYield.sol +182 -0
  265. package/contracts/interfaces/IWETH.sol +1 -1
  266. package/contracts/interfaces/IWXBTRFLY.sol +3 -1
  267. package/contracts/interfaces/IWstETH.sol +3 -1
  268. package/contracts/interfaces/IYearnVault.sol +3 -1
  269. package/contracts/libraries/RewardManager.sol +78 -0
  270. package/contracts/libraries/RewardManagerAbstract.sol +85 -0
  271. package/contracts/libraries/{SCYIndex.sol → SCY/SCYIndex.sol} +8 -8
  272. package/contracts/libraries/SCY/SCYUtils.sol +18 -0
  273. package/contracts/libraries/VeBalanceLib.sol +80 -0
  274. package/contracts/libraries/VeHistoryLib.sol +60 -0
  275. package/contracts/libraries/helpers/ArrayLib.sol +65 -0
  276. package/contracts/libraries/helpers/ExpiryUtilsLib.sol +1 -1
  277. package/contracts/libraries/helpers/MiniHelpers.sol +15 -0
  278. package/contracts/libraries/helpers/SSTORE2Deployer.sol +30 -0
  279. package/contracts/libraries/helpers/TokenHelper.sol +105 -0
  280. package/contracts/libraries/math/LogExpMath.sol +59 -1
  281. package/contracts/libraries/math/MarketApproxLib.sol +167 -164
  282. package/contracts/libraries/math/MarketMathCore.sol +106 -25
  283. package/contracts/libraries/math/Math.sol +28 -21
  284. package/contracts/libraries/math/WeekMath.sol +19 -0
  285. package/contracts/libraries/solmate/Bytes32AddressLib.sol +14 -0
  286. package/contracts/libraries/solmate/SSTORE2.sol +99 -0
  287. package/contracts/libraries/{JoeLibrary.sol → traderjoe/JoeLibrary.sol} +3 -2
  288. package/contracts/{periphery → libraries/traderjoe}/PendleJoeSwapHelperUpg.sol +8 -10
  289. package/contracts/{core → offchain-helpers}/RouterStatic.sol +25 -20
  290. package/contracts/periphery/PendleGovernanceManager.sol +1 -1
  291. package/contracts/periphery/PermissionsV2Upg.sol +7 -1
  292. package/deployments/43113-benqi.json +6 -0
  293. package/deployments/43113-core.json +14 -0
  294. package/deployments/43113-markets/benqi-market.json +7 -0
  295. package/deployments/80001-benqi.json +6 -0
  296. package/deployments/80001-core.json +13 -0
  297. package/deployments/80001-markets/benqi-market.json +7 -0
  298. package/package.json +2 -2
  299. package/typechain-types/ActionCore.ts +169 -96
  300. package/typechain-types/{ActionSCYAndYOBase.ts → ActionSCYAndPTBase.ts} +54 -67
  301. package/typechain-types/ActionSCYAndPYBase.ts +0 -13
  302. package/typechain-types/ActionSCYAndYTBase.ts +8 -21
  303. package/typechain-types/ActionYT.ts +73 -64
  304. package/typechain-types/CelerReceiverUpg.ts +267 -0
  305. package/typechain-types/CelerSenderUpg.ts +216 -0
  306. package/typechain-types/{ERC20Burnable.ts → ERC20Permit.ts} +116 -68
  307. package/typechain-types/IAToken.ts +55 -0
  308. package/typechain-types/IBenQiComptroller.ts +13 -0
  309. package/typechain-types/{InterestRateModel.ts → IBenQiInterestRateModel.ts} +12 -28
  310. package/typechain-types/ICelerMessageBus.ts +134 -0
  311. package/typechain-types/{IMessageReceiverApp.ts → ICelerMessageReceiverApp.ts} +19 -9
  312. package/typechain-types/IERC20Permit.ts +175 -0
  313. package/typechain-types/{ERC20Premined.ts → IERC4626.ts} +103 -113
  314. package/typechain-types/IJoeRouter02.ts +1420 -0
  315. package/typechain-types/IPActionCore.ts +169 -83
  316. package/typechain-types/IPActionYT.ts +65 -43
  317. package/typechain-types/IPAllAction.ts +190 -137
  318. package/typechain-types/IPGaugeController.ts +254 -0
  319. package/typechain-types/IPGaugeControllerMainchain.ts +298 -0
  320. package/typechain-types/{IVePToken.ts → IPInterestManagerYT.ts} +38 -27
  321. package/typechain-types/IPMarket.ts +73 -74
  322. package/typechain-types/IPMarketAddRemoveCallback.ts +10 -10
  323. package/typechain-types/IPMarketFactory.ts +38 -4
  324. package/typechain-types/IPPrincipalToken.ts +13 -0
  325. package/typechain-types/IPVeToken.ts +103 -8
  326. package/typechain-types/IPVotingController.ts +179 -0
  327. package/typechain-types/IPVotingEscrow.ts +100 -180
  328. package/typechain-types/IPYieldToken.ts +227 -264
  329. package/typechain-types/{PendleBaseToken.ts → IQiAvax.ts} +183 -107
  330. package/typechain-types/IQiErc20.ts +171 -0
  331. package/typechain-types/IQiToken.ts +171 -0
  332. package/typechain-types/IRewardManager.ts +16 -86
  333. package/typechain-types/ISuperComposableYield.ts +283 -269
  334. package/typechain-types/IWXBTRFLY.ts +13 -0
  335. package/typechain-types/IWstETH.ts +13 -0
  336. package/typechain-types/IYearnVault.ts +13 -0
  337. package/typechain-types/{PermissionsV2.ts → InterestManagerYT.ts} +30 -14
  338. package/typechain-types/PendleAaveV3SCY.ts +331 -496
  339. package/typechain-types/PendleBtrflyScy.ts +287 -348
  340. package/typechain-types/{IPBaseToken.ts → PendleERC20.ts} +5 -31
  341. package/typechain-types/{ERC20PresetFixedSupply.ts → PendleERC20Permit.ts} +100 -130
  342. package/typechain-types/{LYTBaseWithRewards.ts → PendleERC4626SCY.ts} +311 -316
  343. package/typechain-types/PendleGauge.ts +83 -315
  344. package/typechain-types/PendleGaugeControllerBaseUpg.ts +346 -0
  345. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +410 -0
  346. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +524 -0
  347. package/typechain-types/{PendleYTLYTBenqi.ts → PendleJoeLpSCY.ts} +336 -362
  348. package/typechain-types/PendleJoeSwapHelperUpg.ts +0 -13
  349. package/typechain-types/PendleMarket.ts +229 -154
  350. package/typechain-types/PendleMarketFactory.ts +127 -20
  351. package/typechain-types/PendlePrincipalToken.ts +0 -106
  352. package/typechain-types/{PermlessAbstract.ts → PendleQiTokenHelper.ts} +5 -5
  353. package/typechain-types/{PendleBenQiErc20LYT.ts → PendleQiTokenSCY.ts} +359 -308
  354. package/typechain-types/PendleRouter.ts +0 -19
  355. package/typechain-types/PendleVotingControllerUpg.ts +1145 -0
  356. package/typechain-types/{PendleAaveV3LYT.ts → PendleWstEthSCY.ts} +325 -320
  357. package/typechain-types/{ILiquidYieldTokenWrap.ts → PendleYearnVaultSCY.ts} +314 -290
  358. package/typechain-types/PendleYieldContractFactory.ts +74 -27
  359. package/typechain-types/PendleYieldToken.ts +272 -496
  360. package/typechain-types/RewardManager.ts +44 -82
  361. package/typechain-types/{IGaugeController.ts → RewardManagerAbstract.ts} +41 -32
  362. package/typechain-types/RouterStatic.ts +5 -11
  363. package/typechain-types/SCYBase.ts +276 -335
  364. package/typechain-types/SCYBaseWithRewards.ts +337 -433
  365. package/typechain-types/VotingControllerStorageUpg.ts +467 -0
  366. package/typechain-types/VotingEscrowPendleMainchain.ts +819 -0
  367. package/typechain-types/VotingEscrowPendleSidechain.ts +546 -0
  368. package/typechain-types/VotingEscrowTokenBase.ts +251 -0
  369. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  370. package/typechain-types/factories/ActionCore__factory.ts +122 -80
  371. package/typechain-types/factories/{ActionSCYAndYOBase__factory.ts → ActionSCYAndPTBase__factory.ts} +20 -33
  372. package/typechain-types/factories/ActionSCYAndPYBase__factory.ts +0 -13
  373. package/typechain-types/factories/ActionSCYAndYTBase__factory.ts +1 -14
  374. package/typechain-types/factories/ActionYT__factory.ts +39 -48
  375. package/typechain-types/factories/{CrosschainReceiver__factory.ts → CelerReceiverUpg__factory.ts} +39 -83
  376. package/typechain-types/factories/{CrosschainSender__factory.ts → CelerSenderUpg__factory.ts} +34 -37
  377. package/typechain-types/factories/{PendleBaseToken__factory.ts → ERC20Permit__factory.ts} +72 -52
  378. package/typechain-types/factories/ERC20__factory.ts +1 -1
  379. package/typechain-types/factories/IAToken__factory.ts +39 -0
  380. package/typechain-types/factories/IBenQiComptroller__factory.ts +13 -0
  381. package/typechain-types/factories/{InterestRateModel__factory.ts → IBenQiInterestRateModel__factory.ts} +12 -27
  382. package/typechain-types/factories/{PendleRouterBase__factory.ts → ICelerMessageBus__factory.ts} +29 -29
  383. package/typechain-types/factories/{IMessageReceiverApp__factory.ts → ICelerMessageReceiverApp__factory.ts} +19 -10
  384. package/typechain-types/factories/IERC20Permit__factory.ts +98 -0
  385. package/typechain-types/factories/{ERC20Burnable__factory.ts → IERC4626__factory.ts} +55 -49
  386. package/typechain-types/factories/IJoeRouter02__factory.ts +974 -0
  387. package/typechain-types/factories/IPActionCore__factory.ts +122 -58
  388. package/typechain-types/factories/IPActionYT__factory.ts +36 -21
  389. package/typechain-types/factories/IPAllAction__factory.ts +116 -81
  390. package/typechain-types/factories/IPGaugeControllerMainchain__factory.ts +177 -0
  391. package/typechain-types/factories/{IPGauge__factory.ts → IPGaugeController__factory.ts} +77 -52
  392. package/typechain-types/factories/IPInterestManagerYT__factory.ts +50 -0
  393. package/typechain-types/factories/IPMarketAddRemoveCallback__factory.ts +2 -2
  394. package/typechain-types/factories/IPMarketFactory__factory.ts +37 -0
  395. package/typechain-types/factories/IPMarket__factory.ts +35 -54
  396. package/typechain-types/factories/IPPrincipalToken__factory.ts +13 -0
  397. package/typechain-types/factories/IPVeToken__factory.ts +61 -5
  398. package/typechain-types/factories/IPVotingController__factory.ts +182 -0
  399. package/typechain-types/factories/IPVotingEscrow__factory.ts +68 -87
  400. package/typechain-types/factories/IPYieldToken__factory.ts +156 -106
  401. package/typechain-types/factories/{IPOwnershipToken__factory.ts → IQiAvax__factory.ts} +73 -60
  402. package/typechain-types/factories/IQiErc20__factory.ts +117 -0
  403. package/typechain-types/factories/IQiToken__factory.ts +117 -0
  404. package/typechain-types/factories/IRewardManager__factory.ts +8 -45
  405. package/typechain-types/factories/ISuperComposableYield__factory.ts +201 -138
  406. package/typechain-types/factories/IWXBTRFLY__factory.ts +13 -0
  407. package/typechain-types/factories/IWstETH__factory.ts +13 -0
  408. package/typechain-types/factories/IYearnVault__factory.ts +13 -0
  409. package/typechain-types/factories/InterestManagerYT__factory.ts +50 -0
  410. package/typechain-types/factories/PendleAaveV3SCY__factory.ts +212 -318
  411. package/typechain-types/factories/PendleBtrflyScy__factory.ts +200 -234
  412. package/typechain-types/factories/PendleERC20Permit__factory.ts +405 -0
  413. package/typechain-types/factories/PendleERC20__factory.ts +327 -0
  414. package/typechain-types/factories/PendleERC4626SCY__factory.ts +678 -0
  415. package/typechain-types/factories/{EIP20NonStandardInterface__factory.ts → PendleGaugeControllerBaseUpg__factory.ts} +90 -91
  416. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +334 -0
  417. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +393 -0
  418. package/typechain-types/factories/PendleGauge__factory.ts +32 -268
  419. package/typechain-types/factories/PendleGovernanceManager__factory.ts +1 -1
  420. package/typechain-types/factories/PendleJoeLpSCY__factory.ts +726 -0
  421. package/typechain-types/factories/PendleJoeSwapHelperUpg__factory.ts +0 -13
  422. package/typechain-types/factories/PendleMarketFactory__factory.ts +91 -5
  423. package/typechain-types/factories/PendleMarket__factory.ts +158 -94
  424. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -75
  425. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +99 -0
  426. package/typechain-types/factories/PendleQiTokenSCY__factory.ts +821 -0
  427. package/typechain-types/factories/PendleRouter__factory.ts +1 -23
  428. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +845 -0
  429. package/typechain-types/factories/PendleWstEthSCY__factory.ts +686 -0
  430. package/typechain-types/factories/PendleYearnVaultSCY__factory.ts +691 -0
  431. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +42 -29
  432. package/typechain-types/factories/PendleYieldToken__factory.ts +165 -241
  433. package/typechain-types/factories/{PendleRouterSCYAndForgeBaseUpg__factory.ts → RewardManagerAbstract__factory.ts} +22 -19
  434. package/typechain-types/factories/RewardManager__factory.ts +28 -41
  435. package/typechain-types/factories/RouterStatic__factory.ts +2 -2
  436. package/typechain-types/factories/SCYBaseWithRewards__factory.ts +220 -220
  437. package/typechain-types/factories/SCYBase__factory.ts +195 -176
  438. package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +328 -0
  439. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +588 -0
  440. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +415 -0
  441. package/typechain-types/factories/VotingEscrowTokenBase__factory.ts +157 -0
  442. package/typechain-types/hardhat.d.ts +308 -155
  443. package/typechain-types/index.ts +84 -50
  444. package/build/artifacts/contracts/SuperComposableYield/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +0 -4
  445. package/build/artifacts/contracts/SuperComposableYield/SCYUtils.sol/SCYUtils.dbg.json +0 -4
  446. package/build/artifacts/contracts/SuperComposableYield/implementations/IRewardManager.sol/IRewardManager.dbg.json +0 -4
  447. package/build/artifacts/contracts/SuperComposableYield/implementations/RewardManager.sol/RewardManager.dbg.json +0 -4
  448. package/build/artifacts/contracts/SuperComposableYield/implementations/SCYBase.sol/SCYBase.dbg.json +0 -4
  449. package/build/artifacts/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +0 -4
  450. package/build/artifacts/contracts/core/PendleBaseToken.sol/PendleBaseToken.dbg.json +0 -4
  451. package/build/artifacts/contracts/core/PendleMarket.sol/PendleMarket.dbg.json +0 -4
  452. package/build/artifacts/contracts/core/PendleMarket.sol/PendleMarket.json +0 -842
  453. package/build/artifacts/contracts/core/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +0 -4
  454. package/build/artifacts/contracts/core/PendleMarketFactory.sol/PendleMarketFactory.json +0 -265
  455. package/build/artifacts/contracts/core/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +0 -4
  456. package/build/artifacts/contracts/core/PendlePrincipalToken.sol/PendlePrincipalToken.json +0 -452
  457. package/build/artifacts/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.dbg.json +0 -4
  458. package/build/artifacts/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol/PendleAaveV3SCY.json +0 -783
  459. package/build/artifacts/contracts/core/PendleSCYImpl/AaveV3/WadRayMath.sol/WadRayMath.dbg.json +0 -4
  460. package/build/artifacts/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol/PendleBenQiErc20SCY.dbg.json +0 -4
  461. package/build/artifacts/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol/PendleBenQiErc20SCY.json +0 -766
  462. package/build/artifacts/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol/PendleBtrflyScy.dbg.json +0 -4
  463. package/build/artifacts/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol/PendleBtrflyScy.json +0 -641
  464. package/build/artifacts/contracts/core/PendleSCYImpl/PendleStETHSCY.sol/PendleStEthSCY.dbg.json +0 -4
  465. package/build/artifacts/contracts/core/PendleSCYImpl/PendleStETHSCY.sol/PendleStEthSCY.json +0 -623
  466. package/build/artifacts/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol/PendleYearnVaultScy.dbg.json +0 -4
  467. package/build/artifacts/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol/PendleYearnVaultScy.json +0 -623
  468. package/build/artifacts/contracts/core/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +0 -4
  469. package/build/artifacts/contracts/core/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +0 -339
  470. package/build/artifacts/contracts/core/PendleYieldToken.sol/PendleYieldToken.dbg.json +0 -4
  471. package/build/artifacts/contracts/core/PendleYieldToken.sol/PendleYieldToken.json +0 -808
  472. package/build/artifacts/contracts/core/RouterStatic.sol/RouterStatic.dbg.json +0 -4
  473. package/build/artifacts/contracts/core/RouterStatic.sol/RouterStatic.json +0 -862
  474. package/build/artifacts/contracts/core/actions/ActionRedeem.sol/ActionRedeem.dbg.json +0 -4
  475. package/build/artifacts/contracts/core/actions/ActionRedeem.sol/ActionRedeem.json +0 -55
  476. package/build/artifacts/contracts/core/actions/base/ActionType.sol/ActionType.dbg.json +0 -4
  477. package/build/artifacts/contracts/interfaces/IPActionRedeem.sol/IPActionRedeem.dbg.json +0 -4
  478. package/build/artifacts/contracts/interfaces/IPActionRedeem.sol/IPActionRedeem.json +0 -55
  479. package/build/artifacts/contracts/interfaces/IPBaseToken.sol/IPBaseToken.dbg.json +0 -4
  480. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +0 -4
  481. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.json +0 -113
  482. package/build/artifacts/contracts/interfaces/IPVotingEscrowController.sol/IPVotingEscrowController.dbg.json +0 -4
  483. package/build/artifacts/contracts/interfaces/IPVotingEscrowController.sol/IPVotingEscrowController.json +0 -61
  484. package/build/artifacts/contracts/interfaces/IPendleGauge.sol/IPendleGauge.dbg.json +0 -4
  485. package/build/artifacts/contracts/interfaces/IPendleGauge.sol/IPendleGauge.json +0 -113
  486. package/build/artifacts/contracts/interfaces/IVePToken.sol/IVePToken.dbg.json +0 -4
  487. package/build/artifacts/contracts/interfaces/IVotingEscrowController.sol/VotingEscrowController.dbg.json +0 -4
  488. package/build/artifacts/contracts/interfaces/IVotingEscrowController.sol/VotingEscrowController.json +0 -61
  489. package/build/artifacts/contracts/interfaces/IVotingEscrowPendle.sol/IVotingEscrowPendle.dbg.json +0 -4
  490. package/build/artifacts/contracts/libraries/JoeLibrary.sol/JoeLibrary.dbg.json +0 -4
  491. package/build/artifacts/contracts/libraries/SCYIndex.sol/SCYIndexLib.dbg.json +0 -4
  492. package/build/artifacts/contracts/libraries/math/MarketMathAux.sol/MarketMathAux.dbg.json +0 -4
  493. package/build/artifacts/contracts/periphery/PendleJoeSwapHelperUpg.sol/PendleJoeSwapHelperUpg.dbg.json +0 -4
  494. package/contracts/SuperComposableYield/ISuperComposableYield.sol +0 -80
  495. package/contracts/SuperComposableYield/SCYUtils.sol +0 -14
  496. package/contracts/SuperComposableYield/implementations/IRewardManager.sol +0 -16
  497. package/contracts/SuperComposableYield/implementations/RewardManager.sol +0 -151
  498. package/contracts/SuperComposableYield/implementations/SCYBase.sol +0 -166
  499. package/contracts/SuperComposableYield/implementations/SCYBaseWithRewards.sol +0 -88
  500. package/contracts/core/PendleBaseToken.sol +0 -35
  501. package/contracts/core/PendlePrincipalToken.sol +0 -54
  502. package/contracts/core/PendleSCYImpl/AaveV3/PendleAaveV3SCY.sol +0 -140
  503. package/contracts/core/PendleSCYImpl/PendleBenQiErc20SCY.sol +0 -133
  504. package/contracts/core/PendleSCYImpl/PendleBtrflySCY.sol +0 -120
  505. package/contracts/core/PendleSCYImpl/PendleStETHSCY.sol +0 -107
  506. package/contracts/core/PendleSCYImpl/PendleYearnVaultSCY.sol +0 -109
  507. package/contracts/core/PendleYieldToken.sol +0 -340
  508. package/contracts/core/actions/ActionRedeem.sol +0 -36
  509. package/contracts/core/actions/base/ActionType.sol +0 -11
  510. package/contracts/interfaces/IPActionRedeem.sol +0 -17
  511. package/contracts/interfaces/IPBaseToken.sol +0 -9
  512. package/contracts/interfaces/IPGauge.sol +0 -32
  513. package/contracts/interfaces/IPVotingEscrowController.sol +0 -14
  514. package/contracts/interfaces/IPendleGauge.sol +0 -32
  515. package/contracts/interfaces/IVePToken.sol +0 -14
  516. package/contracts/interfaces/IVotingEscrowController.sol +0 -14
  517. package/contracts/interfaces/IVotingEscrowPendle.sol +0 -32
  518. package/contracts/libraries/math/MarketMathAux.sol +0 -101
  519. package/deployments/kovan.json +0 -31
  520. package/typechain-types/ActionRedeem.ts +0 -125
  521. package/typechain-types/AggregatorV2V3Interface.ts +0 -380
  522. package/typechain-types/BenqiChainlinkOracle.ts +0 -362
  523. package/typechain-types/BoringOwnable.ts +0 -194
  524. package/typechain-types/BoringOwnableData.ts +0 -100
  525. package/typechain-types/BoringOwnableUpg.ts +0 -194
  526. package/typechain-types/BoringOwnableUpgData.ts +0 -100
  527. package/typechain-types/Comptroller.ts +0 -2860
  528. package/typechain-types/ComptrollerErrorReporter.ts +0 -70
  529. package/typechain-types/ComptrollerInterface.ts +0 -881
  530. package/typechain-types/ComptrollerVXStorage.ts +0 -781
  531. package/typechain-types/CrosschainContract.ts +0 -113
  532. package/typechain-types/CrosschainReceiver.ts +0 -347
  533. package/typechain-types/CrosschainSender.ts +0 -210
  534. package/typechain-types/EIP20Interface.ts +0 -337
  535. package/typechain-types/EIP20NonStandardInterface.ts +0 -298
  536. package/typechain-types/ERC20Locker.ts +0 -91
  537. package/typechain-types/EpochController.ts +0 -195
  538. package/typechain-types/FundKeeper.ts +0 -347
  539. package/typechain-types/GaugeTypeControllerAbstract.ts +0 -546
  540. package/typechain-types/GaugeTypeControllerCrosschain.ts +0 -733
  541. package/typechain-types/GaugeTypeControllerMainchain.ts +0 -604
  542. package/typechain-types/ILiquidYieldToken.ts +0 -639
  543. package/typechain-types/IMessageBus.ts +0 -543
  544. package/typechain-types/IPActionRedeem.ts +0 -125
  545. package/typechain-types/IPFlashCallback.ts +0 -115
  546. package/typechain-types/IPGauge.ts +0 -241
  547. package/typechain-types/IPLiquidYieldToken.ts +0 -641
  548. package/typechain-types/IPMarketCallback.ts +0 -107
  549. package/typechain-types/IPOwnershipToken.ts +0 -488
  550. package/typechain-types/IPRouterCore.ts +0 -769
  551. package/typechain-types/IPRouterRedeem.ts +0 -155
  552. package/typechain-types/IPRouterYT.ts +0 -489
  553. package/typechain-types/IPVotingEscrowController.ts +0 -154
  554. package/typechain-types/IPendleGauge.ts +0 -241
  555. package/typechain-types/IPermissionsV2.ts +0 -87
  556. package/typechain-types/IRainbowBridge.ts +0 -91
  557. package/typechain-types/ISCYRewardIndex.ts +0 -695
  558. package/typechain-types/IVEPendleToken.ts +0 -121
  559. package/typechain-types/IVotingEscrowPendle.ts +0 -297
  560. package/typechain-types/IXPendle.ts +0 -114
  561. package/typechain-types/JumpRateModel.ts +0 -347
  562. package/typechain-types/LYTBase.ts +0 -721
  563. package/typechain-types/LYTWrap.ts +0 -872
  564. package/typechain-types/LYTWrapWithRewards.ts +0 -979
  565. package/typechain-types/LiquidityMining.ts +0 -468
  566. package/typechain-types/Maximillion.ts +0 -145
  567. package/typechain-types/Ownable.ts +0 -160
  568. package/typechain-types/PendleBenQiErc20SCY.ts +0 -1050
  569. package/typechain-types/PendleBenqiLiquidYieldToken.ts +0 -1013
  570. package/typechain-types/PendleBtrflyLYT.ts +0 -781
  571. package/typechain-types/PendleJoeSwapHelper.ts +0 -92
  572. package/typechain-types/PendleLYTMockYT.ts +0 -894
  573. package/typechain-types/PendleLiquidYieldToken.ts +0 -814
  574. package/typechain-types/PendleLiquidYieldTokenBase.ts +0 -941
  575. package/typechain-types/PendleOwnershipToken.ts +0 -598
  576. package/typechain-types/PendleRouter01.ts +0 -184
  577. package/typechain-types/PendleRouter02.ts +0 -564
  578. package/typechain-types/PendleRouter03.ts +0 -224
  579. package/typechain-types/PendleRouterBase.ts +0 -126
  580. package/typechain-types/PendleRouterCore.ts +0 -328
  581. package/typechain-types/PendleRouterCoreUpg.ts +0 -798
  582. package/typechain-types/PendleRouterLytAndForge.ts +0 -331
  583. package/typechain-types/PendleRouterMarketBase.ts +0 -82
  584. package/typechain-types/PendleRouterOT.ts +0 -463
  585. package/typechain-types/PendleRouterProxy.ts +0 -335
  586. package/typechain-types/PendleRouterRawTokenOT.ts +0 -865
  587. package/typechain-types/PendleRouterRawTokenYT.ts +0 -520
  588. package/typechain-types/PendleRouterRedeemUpg.ts +0 -125
  589. package/typechain-types/PendleRouterSCYAndForgeBaseUpg.ts +0 -98
  590. package/typechain-types/PendleRouterStaticUpg.ts +0 -399
  591. package/typechain-types/PendleRouterYT.ts +0 -227
  592. package/typechain-types/PendleRouterYTBaseUpg.ts +0 -134
  593. package/typechain-types/PendleRouterYTUpg.ts +0 -537
  594. package/typechain-types/PendleStEthSCY.ts +0 -872
  595. package/typechain-types/PendleYearnVaultLYT.ts +0 -723
  596. package/typechain-types/PendleYearnVaultScy.ts +0 -875
  597. package/typechain-types/PglStakingContract.ts +0 -662
  598. package/typechain-types/PglStakingContractProxy.ts +0 -256
  599. package/typechain-types/PglStakingContractProxyStorage.ts +0 -136
  600. package/typechain-types/PglStakingContractStorage.ts +0 -397
  601. package/typechain-types/PriceOracle.ts +0 -116
  602. package/typechain-types/ProtocolFakeUser.ts +0 -105
  603. package/typechain-types/Qi.ts +0 -760
  604. package/typechain-types/QiAvax.ts +0 -1720
  605. package/typechain-types/QiDelegateInterface.ts +0 -145
  606. package/typechain-types/QiDelegationStorage.ts +0 -82
  607. package/typechain-types/QiDelegatorInterface.ts +0 -149
  608. package/typechain-types/QiErc20.ts +0 -1846
  609. package/typechain-types/QiErc20Delegate.ts +0 -1926
  610. package/typechain-types/QiErc20Delegator.ts +0 -1885
  611. package/typechain-types/QiErc20Interface.ts +0 -382
  612. package/typechain-types/QiErc20Storage.ts +0 -79
  613. package/typechain-types/QiToken.ts +0 -1475
  614. package/typechain-types/QiTokenInterface.ts +0 -1419
  615. package/typechain-types/QiTokenSaleDistributor.ts +0 -771
  616. package/typechain-types/QiTokenSaleDistributorProxy.ts +0 -256
  617. package/typechain-types/QiTokenSaleDistributorProxyStorage.ts +0 -136
  618. package/typechain-types/QiTokenSaleDistributorStorage.ts +0 -401
  619. package/typechain-types/QiTokenStorage.ts +0 -311
  620. package/typechain-types/ReentrancyGuard.ts +0 -52
  621. package/typechain-types/SingleGaugeTypeController.ts +0 -478
  622. package/typechain-types/TokenErrorReporter.ts +0 -70
  623. package/typechain-types/Unitroller.ts +0 -356
  624. package/typechain-types/UnitrollerAdminStorage.ts +0 -143
  625. package/typechain-types/VePendle.ts +0 -1156
  626. package/typechain-types/VePendleCrosschain.ts +0 -969
  627. package/typechain-types/VePendleToken.ts +0 -688
  628. package/typechain-types/VotingController.ts +0 -883
  629. package/typechain-types/VotingEscrowController.ts +0 -154
  630. package/typechain-types/WETH9.ts +0 -414
  631. package/typechain-types/WhitePaperInterestRateModel.ts +0 -304
  632. package/typechain-types/XPendle.ts +0 -618
  633. package/typechain-types/factories/ActionRedeem__factory.ts +0 -105
  634. package/typechain-types/factories/AggregatorV2V3Interface__factory.ts +0 -288
  635. package/typechain-types/factories/BenqiChainlinkOracle__factory.ts +0 -311
  636. package/typechain-types/factories/BoringOwnableData__factory.ts +0 -90
  637. package/typechain-types/factories/BoringOwnableUpgData__factory.ts +0 -94
  638. package/typechain-types/factories/BoringOwnableUpg__factory.ts +0 -139
  639. package/typechain-types/factories/BoringOwnable__factory.ts +0 -149
  640. package/typechain-types/factories/ComptrollerErrorReporter__factory.ts +0 -93
  641. package/typechain-types/factories/ComptrollerInterface__factory.ts +0 -595
  642. package/typechain-types/factories/ComptrollerVXStorage__factory.ts +0 -610
  643. package/typechain-types/factories/Comptroller__factory.ts +0 -2189
  644. package/typechain-types/factories/CrosschainContract__factory.ts +0 -52
  645. package/typechain-types/factories/EIP20Interface__factory.ts +0 -248
  646. package/typechain-types/factories/ERC20Locker__factory.ts +0 -73
  647. package/typechain-types/factories/ERC20Premined__factory.ts +0 -393
  648. package/typechain-types/factories/ERC20PresetFixedSupply__factory.ts +0 -422
  649. package/typechain-types/factories/EpochController__factory.ts +0 -170
  650. package/typechain-types/factories/FundKeeper__factory.ts +0 -212
  651. package/typechain-types/factories/GaugeTypeControllerAbstract__factory.ts +0 -387
  652. package/typechain-types/factories/GaugeTypeControllerCrosschain__factory.ts +0 -522
  653. package/typechain-types/factories/GaugeTypeControllerMainchain__factory.ts +0 -431
  654. package/typechain-types/factories/IGaugeController__factory.ts +0 -45
  655. package/typechain-types/factories/ILiquidYieldTokenWrap__factory.ts +0 -533
  656. package/typechain-types/factories/ILiquidYieldToken__factory.ts +0 -429
  657. package/typechain-types/factories/IMessageBus__factory.ts +0 -396
  658. package/typechain-types/factories/IPActionRedeem__factory.ts +0 -70
  659. package/typechain-types/factories/IPBaseToken__factory.ts +0 -271
  660. package/typechain-types/factories/IPFlashCallback__factory.ts +0 -49
  661. package/typechain-types/factories/IPLiquidYieldToken__factory.ts +0 -433
  662. package/typechain-types/factories/IPMarketCallback__factory.ts +0 -55
  663. package/typechain-types/factories/IPRouterCore__factory.ts +0 -531
  664. package/typechain-types/factories/IPRouterRedeem__factory.ts +0 -72
  665. package/typechain-types/factories/IPRouterYT__factory.ts +0 -305
  666. package/typechain-types/factories/IPVotingEscrowController__factory.ts +0 -80
  667. package/typechain-types/factories/IPendleGauge__factory.ts +0 -125
  668. package/typechain-types/factories/IPermissionsV2__factory.ts +0 -39
  669. package/typechain-types/factories/IRainbowBridge__factory.ts +0 -76
  670. package/typechain-types/factories/ISCYRewardIndex__factory.ts +0 -465
  671. package/typechain-types/factories/IVEPendleToken__factory.ts +0 -71
  672. package/typechain-types/factories/IVePToken__factory.ts +0 -55
  673. package/typechain-types/factories/IVotingEscrowPendle__factory.ts +0 -182
  674. package/typechain-types/factories/IXPendle__factory.ts +0 -61
  675. package/typechain-types/factories/JumpRateModel__factory.ts +0 -334
  676. package/typechain-types/factories/LYTBaseWithRewards__factory.ts +0 -530
  677. package/typechain-types/factories/LYTBase__factory.ts +0 -474
  678. package/typechain-types/factories/LYTWrapWithRewards__factory.ts +0 -643
  679. package/typechain-types/factories/LYTWrap__factory.ts +0 -574
  680. package/typechain-types/factories/LiquidityMining__factory.ts +0 -367
  681. package/typechain-types/factories/Maximillion__factory.ts +0 -125
  682. package/typechain-types/factories/Ownable__factory.ts +0 -75
  683. package/typechain-types/factories/PendleAaveV3LYT__factory.ts +0 -657
  684. package/typechain-types/factories/PendleBenQiErc20LYT__factory.ts +0 -748
  685. package/typechain-types/factories/PendleBenQiErc20SCY__factory.ts +0 -871
  686. package/typechain-types/factories/PendleBenqiLiquidYieldToken__factory.ts +0 -785
  687. package/typechain-types/factories/PendleBtrflyLYT__factory.ts +0 -647
  688. package/typechain-types/factories/PendleJoeSwapHelper__factory.ts +0 -52
  689. package/typechain-types/factories/PendleLYTMockYT__factory.ts +0 -732
  690. package/typechain-types/factories/PendleLiquidYieldTokenBase__factory.ts +0 -603
  691. package/typechain-types/factories/PendleLiquidYieldToken__factory.ts +0 -510
  692. package/typechain-types/factories/PendleOwnershipToken__factory.ts +0 -527
  693. package/typechain-types/factories/PendleRouter01__factory.ts +0 -152
  694. package/typechain-types/factories/PendleRouter02__factory.ts +0 -438
  695. package/typechain-types/factories/PendleRouter03__factory.ts +0 -190
  696. package/typechain-types/factories/PendleRouterCoreUpg__factory.ts +0 -635
  697. package/typechain-types/factories/PendleRouterCore__factory.ts +0 -268
  698. package/typechain-types/factories/PendleRouterLytAndForge__factory.ts +0 -294
  699. package/typechain-types/factories/PendleRouterMarketBase__factory.ts +0 -43
  700. package/typechain-types/factories/PendleRouterOT__factory.ts +0 -372
  701. package/typechain-types/factories/PendleRouterProxy__factory.ts +0 -285
  702. package/typechain-types/factories/PendleRouterRawTokenOT__factory.ts +0 -697
  703. package/typechain-types/factories/PendleRouterRawTokenYT__factory.ts +0 -431
  704. package/typechain-types/factories/PendleRouterRedeemUpg__factory.ts +0 -112
  705. package/typechain-types/factories/PendleRouterStaticUpg__factory.ts +0 -315
  706. package/typechain-types/factories/PendleRouterYTBaseUpg__factory.ts +0 -66
  707. package/typechain-types/factories/PendleRouterYTUpg__factory.ts +0 -422
  708. package/typechain-types/factories/PendleRouterYT__factory.ts +0 -184
  709. package/typechain-types/factories/PendleStEthSCY__factory.ts +0 -716
  710. package/typechain-types/factories/PendleYTLYTBenqi__factory.ts +0 -713
  711. package/typechain-types/factories/PendleYearnVaultLYT__factory.ts +0 -586
  712. package/typechain-types/factories/PendleYearnVaultScy__factory.ts +0 -716
  713. package/typechain-types/factories/PermissionsV2__factory.ts +0 -36
  714. package/typechain-types/factories/PermlessAbstract__factory.ts +0 -30
  715. package/typechain-types/factories/PglStakingContractProxyStorage__factory.ts +0 -130
  716. package/typechain-types/factories/PglStakingContractProxy__factory.ts +0 -187
  717. package/typechain-types/factories/PglStakingContractStorage__factory.ts +0 -309
  718. package/typechain-types/factories/PglStakingContract__factory.ts +0 -446
  719. package/typechain-types/factories/PriceOracle__factory.ts +0 -59
  720. package/typechain-types/factories/ProtocolFakeUser__factory.ts +0 -87
  721. package/typechain-types/factories/QiAvax__factory.ts +0 -1471
  722. package/typechain-types/factories/QiDelegateInterface__factory.ts +0 -65
  723. package/typechain-types/factories/QiDelegationStorage__factory.ts +0 -79
  724. package/typechain-types/factories/QiDelegatorInterface__factory.ts +0 -89
  725. package/typechain-types/factories/QiErc20Delegate__factory.ts +0 -1563
  726. package/typechain-types/factories/QiErc20Delegator__factory.ts +0 -1648
  727. package/typechain-types/factories/QiErc20Interface__factory.ts +0 -239
  728. package/typechain-types/factories/QiErc20Storage__factory.ts +0 -79
  729. package/typechain-types/factories/QiErc20__factory.ts +0 -1515
  730. package/typechain-types/factories/QiTokenInterface__factory.ts +0 -1182
  731. package/typechain-types/factories/QiTokenSaleDistributorProxyStorage__factory.ts +0 -124
  732. package/typechain-types/factories/QiTokenSaleDistributorProxy__factory.ts +0 -171
  733. package/typechain-types/factories/QiTokenSaleDistributorStorage__factory.ts +0 -289
  734. package/typechain-types/factories/QiTokenSaleDistributor__factory.ts +0 -480
  735. package/typechain-types/factories/QiTokenStorage__factory.ts +0 -274
  736. package/typechain-types/factories/QiToken__factory.ts +0 -1219
  737. package/typechain-types/factories/Qi__factory.ts +0 -648
  738. package/typechain-types/factories/ReentrancyGuard__factory.ts +0 -69
  739. package/typechain-types/factories/SingleGaugeTypeController__factory.ts +0 -341
  740. package/typechain-types/factories/TokenErrorReporter__factory.ts +0 -89
  741. package/typechain-types/factories/UnitrollerAdminStorage__factory.ts +0 -128
  742. package/typechain-types/factories/Unitroller__factory.ts +0 -305
  743. package/typechain-types/factories/VePendleCrosschain__factory.ts +0 -727
  744. package/typechain-types/factories/VePendleToken__factory.ts +0 -494
  745. package/typechain-types/factories/VePendle__factory.ts +0 -800
  746. package/typechain-types/factories/VotingController__factory.ts +0 -610
  747. package/typechain-types/factories/VotingEscrowController__factory.ts +0 -80
  748. package/typechain-types/factories/WETH9__factory.ts +0 -342
  749. package/typechain-types/factories/WhitePaperInterestRateModel__factory.ts +0 -281
  750. package/typechain-types/factories/XPendle__factory.ts +0 -473
@@ -0,0 +1,118 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.15;
3
+
4
+ import "../../interfaces/IPGaugeController.sol";
5
+ import "../../interfaces/IPVeToken.sol";
6
+ import "../../interfaces/ISuperComposableYield.sol";
7
+ import "../../libraries/RewardManager.sol";
8
+ import "../../libraries/math/Math.sol";
9
+ import "../../libraries/helpers/ArrayLib.sol";
10
+ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
11
+
12
+ abstract contract PendleGauge is RewardManager {
13
+ using Math for uint256;
14
+ using SafeERC20 for IERC20;
15
+ using ArrayLib for address[];
16
+
17
+ address private immutable SCY;
18
+
19
+ uint256 internal constant TOKENLESS_PRODUCTION = 40;
20
+ address internal immutable PENDLE;
21
+
22
+ IPVeToken public immutable vePENDLE;
23
+ address public immutable gaugeController;
24
+
25
+ uint256 public totalActiveSupply;
26
+ mapping(address => uint256) public activeBalance;
27
+
28
+ constructor(
29
+ address _SCY,
30
+ address _vePendle,
31
+ address _gaugeController
32
+ ) {
33
+ SCY = _SCY;
34
+ vePENDLE = IPVeToken(_vePendle);
35
+ gaugeController = _gaugeController;
36
+ PENDLE = IPGaugeController(gaugeController).pendle();
37
+ }
38
+
39
+ /**
40
+ * @dev It is intended to have user's active balance updated when they try to redeem
41
+ */
42
+ function _redeemRewards(address user) internal virtual returns (uint256[] memory) {
43
+ _updateAndDistributeRewards(user);
44
+ _updateUserActiveBalance(user);
45
+ return _doTransferOutRewards(user, user);
46
+ }
47
+
48
+ /**
49
+ * @dev since rewardShares will be modified after this function, it should update user reward beforehand
50
+ */
51
+ function _updateUserActiveBalance(address user) internal virtual {
52
+ uint256 lpBalance = _stakedBalance(user);
53
+ uint256 veBoostedLpBalance = _calcVeBoostedLpBalance(user, lpBalance);
54
+
55
+ uint256 newActiveBalance = Math.min(veBoostedLpBalance, lpBalance);
56
+
57
+ totalActiveSupply = totalActiveSupply - activeBalance[user] + newActiveBalance;
58
+ activeBalance[user] = newActiveBalance;
59
+ }
60
+
61
+ function _calcVeBoostedLpBalance(address user, uint256 lpBalance)
62
+ internal
63
+ virtual
64
+ returns (uint256)
65
+ {
66
+ uint256 vePendleBalance = vePENDLE.balanceOf(user);
67
+ uint256 vePendleSupply = vePENDLE.totalSupplyCurrent();
68
+ // Inspired by Curve's Gauge
69
+ uint256 veBoostedLpBalance = (lpBalance * TOKENLESS_PRODUCTION) / 100;
70
+ if (vePendleSupply > 0) {
71
+ veBoostedLpBalance +=
72
+ (((_totalStaked() * vePendleBalance) / vePendleSupply) *
73
+ (100 - TOKENLESS_PRODUCTION)) /
74
+ 100;
75
+ }
76
+ return veBoostedLpBalance;
77
+ }
78
+
79
+ function _redeemExternalReward() internal virtual override {
80
+ ISuperComposableYield(SCY).claimRewards(address(this));
81
+ IPGaugeController(gaugeController).claimMarketReward();
82
+ }
83
+
84
+ function _stakedBalance(address user) internal view virtual returns (uint256);
85
+
86
+ function _totalStaked() internal view virtual returns (uint256);
87
+
88
+ function _rewardSharesTotal() internal view virtual override returns (uint256) {
89
+ return totalActiveSupply;
90
+ }
91
+
92
+ function _rewardSharesUser(address user) internal view virtual override returns (uint256) {
93
+ return activeBalance[user];
94
+ }
95
+
96
+ function _getRewardTokens() internal view virtual override returns (address[] memory) {
97
+ address[] memory SCYRewards = ISuperComposableYield(SCY).getRewardTokens();
98
+ if (SCYRewards.contains(PENDLE)) return SCYRewards;
99
+ return SCYRewards.append(PENDLE);
100
+ }
101
+
102
+ function _beforeTokenTransfer(
103
+ address from,
104
+ address to,
105
+ uint256
106
+ ) internal virtual {
107
+ _updateAndDistributeRewardsForTwo(from, to);
108
+ }
109
+
110
+ function _afterTokenTransfer(
111
+ address from,
112
+ address to,
113
+ uint256
114
+ ) internal virtual {
115
+ if (from != address(0) && from != address(this)) _updateUserActiveBalance(from);
116
+ if (to != address(0) && to != address(this)) _updateUserActiveBalance(to);
117
+ }
118
+ }
@@ -0,0 +1,63 @@
1
+ # vePendle For Launch
2
+
3
+ ### Locking PENDLE for vePendle (on ETH)
4
+ * Each user can only lock for a maximum of $MAXLOCKTIME$ = 2 years
5
+ * vePendle balance for users is represented by:
6
+ $balance_u(t) = bias_u - slope_u * t$
7
+
8
+ * As such, we just need to store $bias_u$ and $slope_u$ for each user. (Considerations: store $bias_u$ and $t_{expiry}$ for the user instead, because $t_{expiry}$ is always an exact number)
9
+ * The amount of PENDLE locked by user $u$ is $locked_u$
10
+ * For total supply, it's simply $totalBalance = totalBias - totalSlope * t$
11
+ * Possible actions by an user:
12
+ * User $u$ create a new lock by locking $d_{PENDLE}$ of PENDLE tokens, expiring at $t_{expiry}$
13
+ $slope_u = d_{PENDLE} / MAXLOCKTIME$
14
+ $bias_u = slope_u \cdot t_{expiry}$
15
+ * User $u$ locks an additional of $d_{PENDLE}$ PENDLE tokens, into his existing lock expiring at $t_{expiry}$
16
+ $slope_{u_{new}} = slope_u + d_{PENDLE} / MAXLOCKTIME$
17
+ $bias_{u_{new}} = slope_{u_{new}} \cdot t_{expiry}$
18
+ * User $u$ extends his expiry from $t_{expiry}$ to $t_{expiry_{new}}$
19
+ $bias_{u_{new}} = slope_{u} \cdot t_{expiry_{new}}$
20
+
21
+ * Similar to Curve:
22
+ * We store the checkpoints for when a user's $slope$ or $bias$ changes
23
+ * We restrict the possible expiries to exact weeks from UNIX timestamp 0
24
+ * We store the global bias and slope changes due to expiry of user's vote-locks per week, and process it when the week comes
25
+
26
+ ### Cross-chain messaging module
27
+ * There are contracts inheritting `CelerSender` on governance chain - Ethereum, with a function `sendMessage(chain Y, sender, message)` to send messages to other chains.
28
+ * On each non-governance chain, we have contracts inheritting `CelerReceiver`. Each has a function `afterReceivingMessage(sender, message)` to receive the message from governance.
29
+ * When `sendMessage(chain Y, sender, message)` is called on governance chain, `afterReceivingMessage(sender, message)` will be called on chain Y, thanks to the cross-chain messaging module
30
+ * The current mechanics for the module is using Celer
31
+ * The cross-chain messaging module can be plugged in/plugged out by the governance address (which will initially be controlled by a team multisig)
32
+
33
+ ### Voting for incentives on market and chains
34
+ * On Ethereum, there is a `VotingController` contract to control the voting on incentives for the different markets on the different chains.
35
+ * Adding a new chain:
36
+ * Only the governance address will be able to add markets and a new chains' GaugeController.
37
+ * There is a list of `(market)` that are elligible for the voting, added by governance
38
+ * markets that are expired will be removed by governance
39
+ * vePendle holders can allocate their vePendle to multiple markets on multiple chains
40
+ * Similar to Curve, we store the bias and slope of the total vePendle voted for every market
41
+ * Similary, we adjust the slope/bias changes due to expired vePendle at the weekly mark
42
+ * There is a global PENDLE per second rate for all the incentives across all the chains. This is set by governance.
43
+ * The `VotingController` does not hold any fund. The incentivizing PENDLE is transferred directly to GaugeController by governacne.
44
+ * GaugeControllers: admin can withdraw PENDLE from it
45
+ * In each chain, there is a `GaugeController` contract that is responsible for keeping PENDLE incentives and distributing PENDLE to incentivise different markets.
46
+ * At the finalization of each week (starting of new week), anyone can call a function `finalizeVotingResults` and then `broadcastVotes()` in `VotingController` to broadcast to any chain:
47
+ 1. The PENDLE allocation of each market for the next week
48
+ 2. The timestamp to mark which week is the incentivization coming from
49
+ When this happens, the `GaugeController` in each chain will update the PENDLE per second among the different markets
50
+ * At any time, the governacne has the voting power equivalent to locking X PENDLE in 2 years
51
+
52
+ ### GaugeController
53
+
54
+ Gauge controller will receive the voting results from VotingController and incentivize the amount of PENDLE from `block.timestamp` to `block.timestamp + 1 WEEK`.
55
+
56
+ If there is still leftover reward in each pool, the gauge controller will remove and take the leftover to top up the incentivize for the current week.
57
+
58
+ ### Gauge & Market
59
+ * The Gauge/Market will receive rewardTokens from SCY as well as claiming the PENDLE token from gauge controller. All of the reward tokens (including PENDLE) will be distributed with boosting mechanism
60
+
61
+ ### Broadcasting vePendle balance & different address for boosting rewards for each chain
62
+ * At anytime, an address A could send a cross message to update the vePendle balance on a specific chain
63
+ * The governance reserves the right to set the vePENDLE delegator for some address (for other protocols to build on top).
@@ -0,0 +1,336 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.15;
3
+
4
+ import "./VotingControllerStorageUpg.sol";
5
+ import "../CelerAbstracts/CelerSenderUpg.sol";
6
+ import "../../../libraries/VeBalanceLib.sol";
7
+ import "../../../libraries/math/Math.sol";
8
+ import "../../../interfaces/IPGaugeControllerMainchain.sol";
9
+ import "../../../interfaces/IPVotingController.sol";
10
+ import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
11
+ import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
12
+
13
+ /*
14
+ Voting accounting:
15
+ - For gauge controller, it will consider each message from voting controller
16
+ as a pack of money to incentivize it during the very next WEEK (block.timestamp -> block.timestamp + WEEK)
17
+ - If the reward duration for the last pack of money has not ended, it will combine
18
+ the leftover reward with the current reward to distribute.
19
+
20
+ - In the very extreme case where no one broadcast the result of week x, and at week x+1,
21
+ the results for both are now broadcasted, then the WEEK of (block.timestamp -> WEEK)
22
+ will receive both of the reward pack
23
+ - Each pack of money will has it own id as timestamp, a gauge controller does not
24
+ receive a pack of money with the same id twice, this allow governance to rebroadcast
25
+ in case the last message was corrupted by Celer
26
+
27
+ Pros:
28
+ - If governance does not forget broadcasting the reward on the early of the week,
29
+ the mechanism works just the same as the epoch-based one
30
+ - If governance forget to broadcast the reward, the whole system still works normally,
31
+ the reward is still incentivized, but only approximately fair
32
+ Cons:
33
+ - Does not guarantee the reward will be distributed on epoch start and end
34
+ */
35
+
36
+ /// This contract is upgradable because
37
+ /// - its constructor only sets immutable variables
38
+ /// - it has storage gaps for safe addition of future variables
39
+ /// - it inherits only upgradable contract
40
+ contract PendleVotingControllerUpg is
41
+ CelerSenderUpg,
42
+ VotingControllerStorageUpg,
43
+ UUPSUpgradeable,
44
+ IPVotingController
45
+ {
46
+ using VeBalanceLib for VeBalance;
47
+ using Math for uint256;
48
+ using Math for int256;
49
+ using EnumerableMap for EnumerableMap.UintToAddressMap;
50
+ using EnumerableSet for EnumerableSet.AddressSet;
51
+
52
+ constructor(address _vePendle, address _governanceManager)
53
+ VotingControllerStorageUpg(_vePendle) // constructor only set immutable variables
54
+ CelerSenderUpg(_governanceManager) // constructor only set immutable variables
55
+ {}
56
+
57
+ /*///////////////////////////////////////////////////////////////
58
+ FUNCTIONS CAN BE CALLED BY ANYONE
59
+ //////////////////////////////////////////////////////////////*/
60
+
61
+ /**
62
+ * @notice set a new voting weight for the target pool
63
+ * @dev pre-condition:
64
+ - pool must have been added before
65
+ - the vePENDLE position must still be active
66
+ * @dev state changes expected:
67
+ - update weekData (if any)
68
+ - update poolInfo, userData to reflect the new vote
69
+ - add 1 check point for both the unvote & new vote
70
+ * @dev vePENDLE position not expired is a must, else bias - t*slope < 0 & it will be
71
+ negative weight
72
+ */
73
+ function vote(address pool, uint64 weight) external {
74
+ address user = msg.sender;
75
+
76
+ require(weight != 0, "zero weight");
77
+ require(_isPoolVotable(pool), "invalid pool");
78
+ require(!vePendle.isPositionExpired(user), "user position expired");
79
+
80
+ updatePoolVotes(pool);
81
+ _unvote(user, pool, false);
82
+ _vote(user, pool, weight);
83
+ }
84
+
85
+ /**
86
+ * @notice remove the vote from the current pool
87
+ * @dev no pre-condition as opposed to vote since this function is to clear the vote
88
+ * @dev allow removing vote from a non-votable pool BY not requiring pool to be votable
89
+ * @dev state changes expected:
90
+ - update weekData (if any)
91
+ - update poolInfo, userData to reflect the new vote
92
+ - add 1 check point for the unvote
93
+ */
94
+ function unvote(address pool) external {
95
+ if (_isPoolVotable(pool)) {
96
+ updatePoolVotes(pool);
97
+ }
98
+ _unvote(msg.sender, pool, true);
99
+ }
100
+
101
+ /**
102
+ * @notice Process all the slopeChanges that haven't been processed & update these data into
103
+ poolInfo
104
+ * @dev pre-condition: the pool must be votable
105
+ * @dev state changes expected:
106
+ - update weekData
107
+ - update poolInfo
108
+ */
109
+ function updatePoolVotes(address pool) public {
110
+ require(_isPoolVotable(pool), "invalid pool");
111
+
112
+ uint128 wTime = poolInfo[pool].lastUpdated;
113
+ uint128 currentWeekStart = WeekMath.getCurrentWeekStart();
114
+
115
+ // no state changes are expected
116
+ if (wTime >= currentWeekStart) return;
117
+
118
+ VeBalance memory currentVote = poolInfo[pool].vote;
119
+ while (wTime < currentWeekStart) {
120
+ wTime += WEEK;
121
+ currentVote = currentVote.sub(poolInfo[pool].slopeChanges[wTime], wTime);
122
+ _setFinalPoolVoteForWeek(pool, wTime, currentVote.getValueAt(wTime));
123
+ }
124
+
125
+ _setNewVotePoolInfo(pool, currentVote, wTime);
126
+ }
127
+
128
+ /**
129
+ * @notice finalize the voting results of all pools, up to the current epoch
130
+ * @dev state changes expected:
131
+ - weekData, poolInfo is updated for all pools in allPools
132
+ - isEpochFinalized is set to true for all epochs since the last time until now
133
+ * @dev this function might take a lot of gas, but can be mitigated by calling updatePoolVotes
134
+ separately, hence reduce the number of states to be updated
135
+ */
136
+ function finalizeEpoch() public {
137
+ uint256 length = allPools.length();
138
+ for (uint256 i = 0; i < length; ++i) {
139
+ updatePoolVotes(allPools.at(i));
140
+ }
141
+ _setAllPastEpochsAsFinalized();
142
+ }
143
+
144
+ /**
145
+ * @notice broadcast the voting results of the current week to the chain with chainId. Can be
146
+ called by anyone
147
+ * @dev pre-condition: the epoch must have already been finalized by finalizeEpoch
148
+ * @dev state changes expected:
149
+ - the gaugeController receives the new pendle allocation
150
+ */
151
+ function broadcastResults(uint64 chainId) external payable {
152
+ uint128 wTime = WeekMath.getCurrentWeekStart();
153
+ require(isEpochFinalized[wTime], "epoch not finalized");
154
+ _broadcastResults(chainId, wTime, pendlePerSec);
155
+ }
156
+
157
+ /*///////////////////////////////////////////////////////////////
158
+ GOVERNANCE-ONLY FUNCTIONS
159
+ //////////////////////////////////////////////////////////////*/
160
+
161
+ /**
162
+ * @notice add a pool to allow users to vote. Can only be done by governance
163
+ * @dev pre-condition: pool must not have been added before
164
+ * @dev assumption: chainId is valid, pool does exist on the chain (guaranteed by gov)
165
+ * @dev state changes expected:
166
+ - add to allPools & chainPools
167
+ - set params in poolInfo
168
+ */
169
+ function addPool(uint64 chainId, address pool) external onlyGovernance {
170
+ require(!_isPoolVotable(pool), "pool already added");
171
+ _addPool(chainId, pool);
172
+ emit AddPool(chainId, pool);
173
+ }
174
+
175
+ /**
176
+ * @notice remove a pool from voting. Can only be done by governance
177
+ * @dev pre-condition: pool must have been added before
178
+ * @dev state changes expected:
179
+ - update weekData (if any)
180
+ - remove from allPools & chainPools
181
+ - clear info in poolInfo
182
+ */
183
+ function removePool(address pool) external onlyGovernance {
184
+ require(_isPoolVotable(pool), "invalid pool");
185
+ uint64 chainId = poolInfo[pool].chainId;
186
+
187
+ updatePoolVotes(pool);
188
+ _removePool(pool);
189
+
190
+ emit RemovePool(chainId, pool);
191
+ }
192
+
193
+ /**
194
+ * @notice use the gov-privilege to force broadcast a message in case there are issues with Celer
195
+ * @dev it's intentional for this function to have minimal checks since we assume gov has done the
196
+ due dilligence
197
+ * @dev gov should always call finalizeEpoch beforehand
198
+ * @dev state changes expected:
199
+ - the gaugeController receives the new pendle allocation
200
+ */
201
+ function forceBroadcastResults(
202
+ uint64 chainId,
203
+ uint128 wTime,
204
+ uint128 forcedPendlePerSec
205
+ ) external payable onlyGovernance {
206
+ _broadcastResults(chainId, wTime, forcedPendlePerSec);
207
+ }
208
+
209
+ /**
210
+ * @notice set new pendlePerSec
211
+ * @dev no zero checks because gov may want to stop liquidity mining
212
+ * @dev state changes expected: pendlePerSec is updated
213
+ */
214
+ function setPendlePerSec(uint128 newPendlePerSec) external onlyGovernance {
215
+ pendlePerSec = newPendlePerSec;
216
+ emit SetPendlePerSec(newPendlePerSec);
217
+ }
218
+
219
+ /*///////////////////////////////////////////////////////////////
220
+ INTERNAL FUNCTIONS
221
+ //////////////////////////////////////////////////////////////*/
222
+
223
+ /**
224
+ * @notice broadcast voting results of the timestamp to chainId
225
+ * @dev assumption: the epoch is already finalized, lastUpdated of all pools >= currentWeekTimestamp
226
+ * @dev state changes expected:
227
+ - the gaugeController receives the new pendle allocation
228
+ */
229
+ function _broadcastResults(
230
+ uint64 chainId,
231
+ uint128 wTime,
232
+ uint128 totalPendlePerSec
233
+ ) internal {
234
+ uint256 totalVotes = weekData[wTime].totalVotes;
235
+ if (totalVotes == 0) return;
236
+
237
+ uint256 length = chainPools[chainId].length();
238
+ if (length == 0) return;
239
+
240
+ address[] memory pools = chainPools[chainId].values();
241
+ uint256[] memory totalPendleAmounts = new uint256[](length);
242
+
243
+ for (uint256 i = 0; i < length; ++i) {
244
+ uint256 poolVotes = weekData[wTime].poolVotes[pools[i]];
245
+ uint256 pendlePerSec = (uint256(totalPendlePerSec) * poolVotes) / totalVotes;
246
+ totalPendleAmounts[i] = pendlePerSec * WEEK;
247
+ }
248
+
249
+ if (chainId == block.chainid) {
250
+ address gaugeController = sidechainContracts.get(uint256(chainId));
251
+ IPGaugeControllerMainchain(gaugeController).updateVotingResults(
252
+ wTime,
253
+ pools,
254
+ totalPendleAmounts
255
+ );
256
+ } else {
257
+ _sendMessage(chainId, abi.encode(wTime, pools, totalPendleAmounts));
258
+ }
259
+
260
+ emit BroadcastResults(chainId, wTime, totalPendlePerSec);
261
+ }
262
+
263
+ /**
264
+ * @notice remove the vote from the current pool
265
+ * @dev state changes expected:
266
+ - vote in poolInfo is cleared if the vote is still valid
267
+ - update UserData to remove the vote weight
268
+ - add a check-point if required
269
+ */
270
+ function _unvote(
271
+ address user,
272
+ address pool,
273
+ bool doCreateCheckpoint
274
+ ) internal {
275
+ VeBalance memory oldUVote = userData[user].voteForPools[pool].vote;
276
+ if (_isPoolVotable(pool) && _isVoteActive(oldUVote)) {
277
+ _subtractVotePoolInfo(pool, oldUVote);
278
+ }
279
+ _unsetVoteUserData(user, pool);
280
+
281
+ if (doCreateCheckpoint) {
282
+ _addUserPoolCheckpoint(user, pool, VeBalance(0, 0));
283
+ }
284
+ emit Unvote(user, pool, oldUVote);
285
+ }
286
+
287
+ /**
288
+ * @notice remove the vote from the current pool
289
+ * @dev there must not be any current vote on this pool by the user
290
+ * @dev state changes expected:
291
+ - vote in poolInfo is added
292
+ - update UserData to set the new vote weight
293
+ - add a check-point
294
+ */
295
+ function _vote(
296
+ address user,
297
+ address pool,
298
+ uint64 weight
299
+ ) internal {
300
+ VeBalance memory votingPower = _getVotingPowerByWeight(user, weight);
301
+ _addVotePoolInfo(pool, votingPower);
302
+ _setVoteUserData(user, pool, weight, votingPower);
303
+ _addUserPoolCheckpoint(user, pool, votingPower);
304
+
305
+ emit Vote(user, pool, weight, votingPower);
306
+ }
307
+
308
+ /**
309
+ * @notice return the corresponding voting power of an user given the weight. Basically his voting power
310
+ will be vePendle * weight / USER_VOTE_MAX_WEIGHT
311
+ * @notice governance will always has the vePendle equivalent to 1M PENDLE locked for MAX_LOCK_TIME
312
+ */
313
+ function _getVotingPowerByWeight(address user, uint64 weight)
314
+ internal
315
+ view
316
+ virtual
317
+ returns (VeBalance memory res)
318
+ {
319
+ uint128 amount;
320
+ uint128 expiry;
321
+
322
+ if (user == _governance()) {
323
+ amount = GOVERNANCE_PENDLE_VOTE;
324
+ expiry = WeekMath.getWeekStartTimestamp(uint128(block.timestamp) + MAX_LOCK_TIME);
325
+ } else {
326
+ (amount, expiry) = vePendle.positionData(user);
327
+ }
328
+
329
+ (res.bias, res.slope) = VeBalanceLib.convertToVeBalance(
330
+ uint128((uint256(amount) * weight) / USER_VOTE_MAX_WEIGHT),
331
+ expiry
332
+ );
333
+ }
334
+
335
+ function _authorizeUpgrade(address newImplementation) internal override onlyGovernance {}
336
+ }