@pendle/core-v2 6.0.0 → 6.1.0

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 (513) hide show
  1. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
  3. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
  5. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
  9. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  12. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  16. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
  18. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +127 -2
  22. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +83 -0
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  28. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  33. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  34. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  35. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
  36. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.json +2 -2
  37. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  39. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  41. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.json +2 -2
  44. package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.json +9 -9
  46. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
  50. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.json +2 -2
  52. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  55. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  57. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  59. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  60. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
  61. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  62. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
  63. package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  66. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
  67. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  68. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
  69. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
  71. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
  73. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +13 -2
  76. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
  78. package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
  79. package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.json +2 -2
  80. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  81. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
  82. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
  85. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  86. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.json +2 -2
  87. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +4 -0
  88. package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +599 -0
  89. package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +4 -0
  90. package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +280 -0
  91. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +4 -0
  92. package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.json +1265 -0
  93. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +4 -0
  94. package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +1573 -0
  95. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  96. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  97. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  98. package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  99. package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +4 -0
  101. package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.json +99 -0
  102. package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
  103. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  104. package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
  107. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
  112. package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
  123. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
  124. package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
  125. package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +4 -0
  126. package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.json +928 -0
  127. package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
  128. package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +4 -0
  129. package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.json +57 -0
  130. package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
  131. package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
  132. package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
  133. package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
  134. package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
  135. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  136. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  137. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +4 -0
  138. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.json +346 -0
  139. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +4 -0
  140. package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.json +34 -0
  141. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
  142. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  143. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  144. package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
  145. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  146. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  147. package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
  148. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
  149. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  150. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +13 -0
  151. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
  152. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  153. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  154. package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +1 -1
  155. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  156. package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
  157. package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
  158. package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
  159. package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
  160. package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
  161. package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
  162. package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
  163. package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
  164. package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +4 -0
  165. package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.json +81 -0
  166. package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
  167. package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
  168. package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
  169. package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
  170. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  171. package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
  172. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  173. package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
  174. package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
  175. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  176. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +32 -0
  177. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  178. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  179. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  180. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  181. package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
  182. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  183. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  184. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  185. package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
  186. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  187. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  188. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
  189. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.json +18 -0
  190. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  191. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +33 -2
  192. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
  193. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.json +2 -2
  194. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  195. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
  196. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  197. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  198. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  199. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  200. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
  201. package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
  202. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  203. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
  204. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  205. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  206. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
  207. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
  208. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  209. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
  210. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
  211. package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
  212. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  213. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.json +2 -2
  214. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  215. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +1 -1
  216. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +2 -2
  217. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  218. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
  219. package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
  220. package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
  221. package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
  222. package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
  223. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
  224. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
  225. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
  226. package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
  227. package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
  228. package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
  229. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  230. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
  231. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  232. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
  233. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
  234. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
  235. package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
  236. package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
  237. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
  238. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
  239. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
  240. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
  241. package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.json +2 -2
  242. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
  243. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
  244. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
  245. package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
  246. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
  247. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
  248. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
  249. package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
  250. package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
  251. package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +2 -2
  252. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  253. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -2
  254. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  255. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  256. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  257. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  258. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  259. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  260. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  261. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  262. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  263. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  264. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  265. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  266. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  267. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  268. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
  269. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
  270. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
  271. package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
  272. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  273. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  274. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  275. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
  276. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
  277. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
  278. package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
  279. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
  280. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +2 -2
  281. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
  282. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +2 -2
  283. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
  284. package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +2 -2
  285. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  286. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
  287. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
  288. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
  289. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
  290. package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  291. package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
  292. package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.json +2 -2
  293. package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
  294. package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.json +2 -2
  295. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +4 -0
  296. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.json +24 -0
  297. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +4 -0
  298. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.json +168 -0
  299. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +4 -0
  300. package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.json +71 -0
  301. package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
  302. package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
  303. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
  304. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
  305. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.json +2 -2
  306. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
  307. package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
  308. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  309. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +13 -2
  310. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
  311. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
  312. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  313. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +13 -2
  314. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
  315. package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +13 -2
  316. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
  317. package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
  318. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  319. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +13 -2
  320. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  321. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +13 -2
  322. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
  323. package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
  324. package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
  325. package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
  326. package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
  327. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  328. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
  329. package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +15 -3
  330. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  331. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
  332. package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
  333. package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
  334. package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
  335. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
  336. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
  337. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
  338. package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
  339. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
  340. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
  341. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
  342. package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
  343. package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
  344. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
  345. package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
  346. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
  347. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
  348. package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
  349. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
  350. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
  351. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  352. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  353. package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +26 -4
  354. package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +32 -1
  355. package/contracts/core/libraries/Errors.sol +1 -0
  356. package/contracts/cross-chain/FixedPricePTAMM.sol +159 -0
  357. package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +38 -0
  358. package/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol +12 -0
  359. package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +41 -0
  360. package/contracts/interfaces/ILPWrapper.sol +16 -0
  361. package/contracts/interfaces/IPBridgedPrincipalToken.sol +11 -0
  362. package/contracts/interfaces/IPChainlinkOracleEssential.sol +11 -0
  363. package/contracts/interfaces/IPFixedPricePTAMM.sol +67 -0
  364. package/contracts/interfaces/IPLimitRouter.sol +2 -0
  365. package/contracts/interfaces/IPPTOFTAdapterFactory.sol +12 -0
  366. package/contracts/interfaces/IPVotingController.sol +4 -0
  367. package/contracts/limit/LimitRouterBase.sol +7 -2
  368. package/contracts/limit/PendleLimitRouter.sol +10 -0
  369. package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +1 -1
  370. package/contracts/offchain-helpers/PendleLPWrapper.sol +2 -1
  371. package/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol +65 -0
  372. package/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol +20 -0
  373. package/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol +3 -1
  374. package/contracts/router/ActionAddRemoveLiqV3.sol +2 -0
  375. package/contracts/router/ActionMiscV3.sol +2 -0
  376. package/contracts/router/ActionSimple.sol +2 -0
  377. package/contracts/router/ActionSwapPTV3.sol +2 -0
  378. package/contracts/router/ActionSwapYTV3.sol +2 -0
  379. package/contracts/router/base/ActionBase.sol +16 -8
  380. package/contracts/router/base/ActionDelegateBase.sol +2 -0
  381. package/deployments/1-core.json +6 -1
  382. package/deployments/10-core.json +11 -3
  383. package/deployments/146-core.json +4 -2
  384. package/deployments/42161-core.json +4 -1
  385. package/deployments/43114-core.json +5 -0
  386. package/deployments/5000-core.json +3 -1
  387. package/deployments/56-core.json +3 -1
  388. package/deployments/80094-core.json +3 -1
  389. package/deployments/8453-core.json +3 -1
  390. package/deployments/999-core.json +4 -1
  391. package/package.json +4 -1
  392. package/typechain-types/ActionDelegateBase.ts +57 -0
  393. package/typechain-types/ERC1967UpgradeUpgradeable.ts +106 -0
  394. package/typechain-types/FixedPricePTAMM.ts +230 -52
  395. package/typechain-types/IBeaconUpgradeable.ts +87 -0
  396. package/typechain-types/IERC1822ProxiableUpgradeable.ts +87 -0
  397. package/typechain-types/IERC1967Upgradeable.ts +97 -0
  398. package/typechain-types/ILPWrapper.ts +224 -0
  399. package/typechain-types/IPFixedPricePTAMM.ts +77 -23
  400. package/typechain-types/IPLimitRouter.ts +17 -0
  401. package/typechain-types/IPVotingController.ts +24 -0
  402. package/typechain-types/LPExpiry.ts +81 -0
  403. package/typechain-types/LimitRouterBase.ts +24 -2
  404. package/typechain-types/PendleBridgedPrincipalToken.ts +1688 -0
  405. package/typechain-types/PendleLimitRouter.ts +58 -2
  406. package/typechain-types/PendleLpLinearDiscountOracle.ts +262 -0
  407. package/typechain-types/PendleLpLinearDiscountOracleFactory.ts +142 -0
  408. package/typechain-types/PendlePTOFTAdapterFactory.ts +125 -0
  409. package/typechain-types/PendleVotingControllerUpg.ts +139 -0
  410. package/typechain-types/UUPSUpgradeable.ts +9 -0
  411. package/typechain-types/VotingControllerStorageUpg.ts +69 -0
  412. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +19 -3
  413. package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
  414. package/typechain-types/factories/ActionDelegateBase__factory.ts +80 -0
  415. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  416. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  417. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  418. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  419. package/typechain-types/factories/ActionMiscV3__factory.ts +19 -3
  420. package/typechain-types/factories/ActionSimple__factory.ts +19 -3
  421. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  422. package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
  423. package/typechain-types/factories/ActionSwapPTV3__factory.ts +19 -3
  424. package/typechain-types/factories/ActionSwapYTV3__factory.ts +19 -3
  425. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  426. package/typechain-types/factories/AddressCast__factory.ts +1 -1
  427. package/typechain-types/factories/AddressProvider__factory.ts +1 -1
  428. package/typechain-types/factories/BalanceReader__factory.ts +1 -1
  429. package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
  430. package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
  431. package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
  432. package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
  433. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  434. package/typechain-types/factories/ERC1967Proxy__factory.ts +1 -1
  435. package/typechain-types/factories/ERC1967UpgradeUpgradeable__factory.ts +88 -0
  436. package/typechain-types/factories/ERC20__factory.ts +1 -1
  437. package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
  438. package/typechain-types/factories/Errors__factory.ts +12 -1
  439. package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
  440. package/typechain-types/factories/FixedPricePTAMM__factory.ts +158 -25
  441. package/typechain-types/factories/IBeaconUpgradeable__factory.ts +39 -0
  442. package/typechain-types/factories/IERC1822ProxiableUpgradeable__factory.ts +43 -0
  443. package/typechain-types/factories/IERC1967Upgradeable__factory.ts +71 -0
  444. package/typechain-types/factories/ILPWrapper__factory.ts +111 -0
  445. package/typechain-types/factories/IPFixedPricePTAMM__factory.ts +48 -4
  446. package/typechain-types/factories/IPLimitRouter__factory.ts +13 -0
  447. package/typechain-types/factories/IPVotingController__factory.ts +32 -0
  448. package/typechain-types/factories/LPExpiry__factory.ts +36 -0
  449. package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
  450. package/typechain-types/factories/LimitBackendHelper__factory.ts +1 -1
  451. package/typechain-types/factories/LimitRouterBase__factory.ts +18 -0
  452. package/typechain-types/factories/Multicall2__factory.ts +1 -1
  453. package/typechain-types/factories/NonceManager__factory.ts +1 -1
  454. package/typechain-types/factories/OFTAdapterImpl__factory.ts +1 -1
  455. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  456. package/typechain-types/factories/PendleBoringOneracle__factory.ts +1 -1
  457. package/typechain-types/factories/PendleBoringSolvBTCOneracle__factory.ts +1 -1
  458. package/typechain-types/factories/PendleBridgedPrincipalToken__factory.ts +1673 -0
  459. package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
  460. package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
  461. package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
  462. package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
  463. package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
  464. package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
  465. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  466. package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +1 -1
  467. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  468. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  469. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  470. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  471. package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
  472. package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
  473. package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
  474. package/typechain-types/factories/PendleLimitRouter__factory.ts +32 -1
  475. package/typechain-types/factories/PendleLpLinearDiscountOracleFactory__factory.ts +134 -0
  476. package/typechain-types/factories/PendleLpLinearDiscountOracle__factory.ts +248 -0
  477. package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +1 -1
  478. package/typechain-types/factories/PendleMarketV3__factory.ts +1 -1
  479. package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
  480. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  481. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  482. package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
  483. package/typechain-types/factories/PendleMulticallOwnerV1__factory.ts +1 -1
  484. package/typechain-types/factories/PendleMulticallV1__factory.ts +1 -1
  485. package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
  486. package/typechain-types/factories/PendleOffchainStorage__factory.ts +1 -1
  487. package/typechain-types/factories/PendlePTOFTAdapterFactory__factory.ts +90 -1
  488. package/typechain-types/factories/PendlePYLpOracle__factory.ts +1 -1
  489. package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
  490. package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
  491. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  492. package/typechain-types/factories/PendleRedStoneRateOracleAdapter__factory.ts +1 -1
  493. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  494. package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
  495. package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
  496. package/typechain-types/factories/PendleSparkLinearDiscountOracle__factory.ts +1 -1
  497. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  498. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +126 -1
  499. package/typechain-types/factories/PendleWstETHPriceFeed__factory.ts +1 -1
  500. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  501. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  502. package/typechain-types/factories/Reflector__factory.ts +1 -1
  503. package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -1
  504. package/typechain-types/factories/ShortStrings__factory.ts +1 -1
  505. package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
  506. package/typechain-types/factories/SupplyCapReader__factory.ts +1 -1
  507. package/typechain-types/factories/TransparentUpgradeableProxy__factory.ts +1 -1
  508. package/typechain-types/factories/UUPSUpgradeable__factory.ts +13 -0
  509. package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +83 -0
  510. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  511. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  512. package/typechain-types/hardhat.d.ts +171 -0
  513. package/typechain-types/index.ts +38 -2
@@ -0,0 +1,159 @@
1
+ // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
5
+ import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
6
+
7
+ import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
8
+
9
+ import {PMath} from "../core/libraries/math/PMath.sol";
10
+ import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
11
+ import {TokenHelper} from "../core/libraries/TokenHelper.sol";
12
+ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
13
+
14
+ contract FixedPricePTAMM is
15
+ IPFixedPricePTAMM,
16
+ BoringOwnableUpgradeableV2,
17
+ ReentrancyGuardUpgradeable,
18
+ TokenHelper,
19
+ UUPSUpgradeable
20
+ {
21
+ // cast index-erc7201 "pendle.FixedPricePTAMM.storage"
22
+ uint256 internal constant STORAGE_SLOT = 0xbbf04d9aae855c6bd76c8f4ba7a918994ad0d002f537323e58c83cbfe5249000;
23
+
24
+ error OracleNotSet(address PT, address token);
25
+ error InsufficientTokenForTrade(address token, uint256 actualAmount, uint256 requiredAmount);
26
+ error InsufficientPtReceived(address PT, uint256 actualAmount, uint256 requiredAmount);
27
+
28
+ using PMath for uint256;
29
+ using PMath for int256;
30
+
31
+ constructor() {
32
+ _disableInitializers();
33
+ }
34
+
35
+ function initialize(address _owner) external initializer {
36
+ __BoringOwnableV2_init(_owner);
37
+ __UUPSUpgradeable_init();
38
+ }
39
+
40
+ struct OracleData {
41
+ address oracle;
42
+ // @notice This can be seen as the price at maturity.
43
+ // @notice This can help with decimals conversion.
44
+ uint256 multiplier;
45
+ }
46
+
47
+ struct Storage {
48
+ mapping(address PT => mapping(address token => OracleData)) priceOracle;
49
+ mapping(address token => uint256) totalToken;
50
+ }
51
+
52
+ function $() internal pure returns (Storage storage res) {
53
+ assembly ("memory-safe") {
54
+ res.slot := STORAGE_SLOT
55
+ }
56
+ }
57
+
58
+ function priceOracle(
59
+ address PT,
60
+ address token
61
+ ) public view returns (IPChainlinkOracleEssential oracle, uint256 multiplier) {
62
+ oracle = IPChainlinkOracleEssential($().priceOracle[PT][token].oracle);
63
+ multiplier = $().priceOracle[PT][token].multiplier;
64
+
65
+ if (address(oracle) == address(0)) revert OracleNotSet(PT, token);
66
+ }
67
+
68
+ function previewSwapPtForExactToken(
69
+ address PT,
70
+ address token,
71
+ uint256 exactTokenOut
72
+ ) public view returns (uint256 amountPtIn) {
73
+ (IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
74
+ (, int256 rawPrice, , , ) = oracle.latestRoundData();
75
+
76
+ // ceil(exactTokenOut / (rawPrice * multiplier))
77
+ return (exactTokenOut * PMath.ONE * PMath.ONE).rawDivUp(rawPrice.Uint() * multiplier);
78
+ }
79
+
80
+ function previewSwapExactPtForToken(
81
+ address PT,
82
+ uint256 exactPtIn,
83
+ address token
84
+ ) public view returns (uint256 amountTokenOut) {
85
+ (IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
86
+ (, int256 rawPrice, , , ) = oracle.latestRoundData();
87
+
88
+ // exactPtIn * rawPrice * multiplier
89
+ return (exactPtIn * rawPrice.Uint() * multiplier) / (PMath.ONE * PMath.ONE);
90
+ }
91
+
92
+ function swapPtForExactToken(
93
+ address receiver,
94
+ address PT,
95
+ address token,
96
+ uint256 exactTokenOut,
97
+ bytes calldata data
98
+ ) external nonReentrant returns (uint256 netPtIn) {
99
+ netPtIn = previewSwapPtForExactToken(PT, token, exactTokenOut);
100
+ _swap(receiver, PT, netPtIn, token, exactTokenOut, data);
101
+ }
102
+
103
+ function swapExactPtForToken(
104
+ address receiver,
105
+ address PT,
106
+ uint256 exactPtIn,
107
+ address token,
108
+ bytes calldata data
109
+ ) external nonReentrant returns (uint256 netTokenOut) {
110
+ netTokenOut = previewSwapExactPtForToken(PT, exactPtIn, token);
111
+ _swap(receiver, PT, exactPtIn, token, netTokenOut, data);
112
+ }
113
+
114
+ function _swap(
115
+ address receiver,
116
+ address PT,
117
+ uint256 exactPtIn,
118
+ address token,
119
+ uint256 exactTokenOut,
120
+ bytes calldata data
121
+ ) internal {
122
+ if ($().totalToken[token] < exactTokenOut)
123
+ revert InsufficientTokenForTrade(token, $().totalToken[token], exactTokenOut);
124
+
125
+ _transferOut(token, receiver, exactTokenOut);
126
+ $().totalToken[token] -= exactTokenOut;
127
+
128
+ if (data.length > 0) {
129
+ IPFixedPricePTAMMSwapCallback(msg.sender).swapCallback(exactTokenOut, exactPtIn, data);
130
+ }
131
+
132
+ $().totalToken[PT] += exactPtIn;
133
+ if (_selfBalance(PT) < $().totalToken[PT])
134
+ revert InsufficientPtReceived(PT, _selfBalance(PT), $().totalToken[PT]);
135
+
136
+ emit Swap(msg.sender, receiver, PT, exactPtIn, token, exactTokenOut);
137
+ }
138
+
139
+ // Admin functions
140
+
141
+ function setPriceOracle(address PT, address token, address _priceOracle, uint256 _multiplier) external onlyOwner {
142
+ $().priceOracle[PT][token] = OracleData(_priceOracle, _multiplier);
143
+ emit PriceOracleUpdated(PT, token, _priceOracle);
144
+ }
145
+
146
+ function addFund(address token, uint256 amount) external payable onlyOwner {
147
+ _transferIn(token, owner, amount);
148
+ $().totalToken[token] += amount;
149
+ emit Seeded(token, amount);
150
+ }
151
+
152
+ function removeFund(address token, uint256 amount) external onlyOwner {
153
+ _transferOut(token, owner, amount);
154
+ $().totalToken[token] -= amount;
155
+ emit Unseeded(token, amount);
156
+ }
157
+
158
+ function _authorizeUpgrade(address) internal override onlyOwner {}
159
+ }
@@ -0,0 +1,38 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.0;
3
+
4
+ import {IPPTOFTAdapterFactory} from "../../../interfaces/IPPTOFTAdapterFactory.sol";
5
+ import {BoringOwnableUpgradeableV2} from "../../../core/libraries/BoringOwnableUpgradeableV2.sol";
6
+ import {OFTAdapterImpl} from "../../oftImpl/hub/OFTAdapterImpl.sol";
7
+
8
+ import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
9
+
10
+ contract PendlePTOFTAdapterFactory is IPPTOFTAdapterFactory, BoringOwnableUpgradeableV2, UUPSUpgradeable {
11
+ error PTOFTAdapterExisted(address pt);
12
+
13
+ address internal immutable _lzEndpoint;
14
+
15
+ constructor(address lzEndpoint) {
16
+ _disableInitializers();
17
+ _lzEndpoint = lzEndpoint;
18
+ }
19
+
20
+ function initialize(address _owner) external initializer {
21
+ __BoringOwnableV2_init(_owner);
22
+ __UUPSUpgradeable_init();
23
+ }
24
+
25
+ mapping(address pt => address) public ptAdapter;
26
+
27
+ function createPtAdapter(address pt) external override onlyOwner returns (address) {
28
+ if (ptAdapter[pt] != address(0)) revert PTOFTAdapterExisted(pt);
29
+
30
+ OFTAdapterImpl adapter = new OFTAdapterImpl(pt, _lzEndpoint, owner);
31
+ adapter.transferOwnership(owner);
32
+ emit PtAdapterCreated(pt, address(adapter));
33
+
34
+ return ptAdapter[pt] = address(adapter);
35
+ }
36
+
37
+ function _authorizeUpgrade(address) internal override onlyOwner {}
38
+ }
@@ -0,0 +1,12 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+
3
+ pragma solidity ^0.8.0;
4
+
5
+ import {OFTAdapter} from "@layerzerolabs/oft-evm/contracts/OFTAdapter.sol";
6
+
7
+ // @notice Base OFT contract, without any additional functionality (like RateLimiter).
8
+ // @dev This contract inherits Ownable from OpenZeppelin v4.
9
+ // @dev Sender is set as the contract owner at deployment.
10
+ contract OFTAdapterImpl is OFTAdapter {
11
+ constructor(address _token, address _endpoint, address _delegate) OFTAdapter(_token, _endpoint, _delegate) {}
12
+ }
@@ -0,0 +1,41 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IPBridgedPrincipalToken} from "../../../interfaces/IPBridgedPrincipalToken.sol";
5
+ import {OFT, OFTCore, IOFT} from "@layerzerolabs/oft-evm/contracts/OFT.sol";
6
+ import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
7
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
8
+
9
+ contract PendleBridgedPrincipalToken is IPBridgedPrincipalToken, OFT {
10
+ uint256 public immutable expiry;
11
+ uint8 internal immutable LOCAL_DECIMALS;
12
+ uint8 internal immutable SHARED_DECIMALS;
13
+
14
+ constructor(
15
+ string memory _name,
16
+ string memory _symbol,
17
+ address _lzEndpoint,
18
+ address _delegate,
19
+ uint256 _expiry,
20
+ uint8 _localDecimals,
21
+ uint8 _sharedDecimals,
22
+ address initialOwner
23
+ ) OFT(_name, _symbol, _lzEndpoint, _delegate) {
24
+ expiry = _expiry;
25
+ _transferOwnership(initialOwner);
26
+
27
+ LOCAL_DECIMALS = _localDecimals;
28
+ SHARED_DECIMALS = _sharedDecimals;
29
+
30
+ // override decimalConversionRate set in OFTCore constructor
31
+ decimalConversionRate = 10 ** (LOCAL_DECIMALS - SHARED_DECIMALS);
32
+ }
33
+
34
+ function decimals() public view override(ERC20, IERC20Metadata) returns (uint8) {
35
+ return LOCAL_DECIMALS;
36
+ }
37
+
38
+ function sharedDecimals() public view override(OFTCore, IOFT) returns (uint8) {
39
+ return SHARED_DECIMALS;
40
+ }
41
+ }
@@ -0,0 +1,16 @@
1
+ // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
+ pragma solidity ^0.8.0;
3
+
4
+ interface ILPWrapper {
5
+ function LP() external view returns (address);
6
+
7
+ function factory() external view returns (address);
8
+
9
+ function isRewardRedemptionDisabled() external view returns (bool);
10
+
11
+ function setRewardRedemptionDisabled(bool _isRewardRedemptionDisabled) external;
12
+
13
+ function wrap(address receiver, uint256 netLpIn) external;
14
+
15
+ function unwrap(address receiver, uint256 netWrapIn) external;
16
+ }
@@ -0,0 +1,11 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.0;
3
+
4
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
+ import {IOFT} from "@layerzerolabs/oft-evm/contracts/interfaces/IOFT.sol";
6
+ import {IOAppCore} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppCore.sol";
7
+ import {IOAppOptionsType3} from "@layerzerolabs/oapp-evm/contracts/oapp/interfaces/IOAppOptionsType3.sol";
8
+
9
+ interface IPBridgedPrincipalToken is IOFT, IOAppCore, IOAppOptionsType3, IERC20Metadata {
10
+ function expiry() external view returns (uint256);
11
+ }
@@ -0,0 +1,11 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.0;
3
+
4
+ interface IPChainlinkOracleEssential {
5
+ function decimals() external view returns (uint8);
6
+
7
+ function latestRoundData()
8
+ external
9
+ view
10
+ returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
11
+ }
@@ -0,0 +1,67 @@
1
+ // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IPBridgedPrincipalToken} from "./IPBridgedPrincipalToken.sol";
5
+ import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
6
+ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
7
+
8
+ interface IPFixedPricePTAMM {
9
+ event Swap(
10
+ address indexed caller,
11
+ address indexed receiver,
12
+ address PT,
13
+ uint256 netPtIn,
14
+ address token,
15
+ uint256 netTokenOut
16
+ );
17
+
18
+ event PriceOracleUpdated(address indexed PT, address indexed token, address indexed priceOracle);
19
+
20
+ event Seeded(address indexed token, uint256 amount);
21
+ event Unseeded(address indexed token, uint256 amount);
22
+
23
+ function priceOracle(
24
+ address PT,
25
+ address token
26
+ ) external view returns (IPChainlinkOracleEssential, uint256 multiplier);
27
+
28
+ function previewSwapPtForExactToken(
29
+ address PT,
30
+ address token,
31
+ uint256 exactTokenOut
32
+ ) external view returns (uint256 amountPtIn);
33
+
34
+ function previewSwapExactPtForToken(
35
+ address PT,
36
+ uint256 exactPtIn,
37
+ address token
38
+ ) external view returns (uint256 amountTokenOut);
39
+
40
+ function swapPtForExactToken(
41
+ address receiver,
42
+ address PT,
43
+ address token,
44
+ uint256 exactTokenOut,
45
+ bytes calldata data
46
+ ) external returns (uint256 netPtIn);
47
+
48
+ function swapExactPtForToken(
49
+ address receiver,
50
+ address PT,
51
+ uint256 exactPtIn,
52
+ address token,
53
+ bytes calldata data
54
+ ) external returns (uint256 netTokenOut);
55
+
56
+ // Admin functions
57
+
58
+ function setPriceOracle(address PT, address token, address priceOracle, uint256 multiplier) external;
59
+
60
+ function addFund(address token, uint256 amount) external payable;
61
+
62
+ function removeFund(address token, uint256 amount) external;
63
+ }
64
+
65
+ interface IPFixedPricePTAMMSwapCallback {
66
+ function swapCallback(uint256 exactTokenOut, uint256 netPtIn, bytes calldata data) external;
67
+ }
@@ -76,6 +76,8 @@ interface IPLimitRouter is IPLimitOrderType {
76
76
 
77
77
  event OrderCanceled(address indexed maker, bytes32 indexed orderHash);
78
78
 
79
+ event OrderForceCanceled(bytes32 indexed orderHash);
80
+
79
81
  event OrderFilledV2(
80
82
  bytes32 indexed orderHash,
81
83
  OrderType indexed orderType,
@@ -0,0 +1,12 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.0;
3
+
4
+ interface IPPTOFTAdapterFactory {
5
+ event PtAdapterCreated(address indexed pt, address indexed adapter);
6
+
7
+ function initialize(address _owner) external;
8
+
9
+ function createPtAdapter(address pt) external returns (address);
10
+
11
+ function ptAdapter(address pt) external view returns (address);
12
+ }
@@ -16,6 +16,10 @@ interface IPVotingController {
16
16
 
17
17
  event BroadcastResults(uint64 indexed chainId, uint128 indexed wTime, uint128 totalPendlePerSec);
18
18
 
19
+ event SetPoolCaps(address[] pools, uint256[] caps);
20
+
21
+ event SetGlobalCap(uint256 cap);
22
+
19
23
  function applyPoolSlopeChanges(address pool) external;
20
24
 
21
25
  /// @notice deprecated, only kept for compatibility reasons
@@ -485,12 +485,17 @@ abstract contract LimitRouterBase is
485
485
  ownerHelper = _helper;
486
486
  }
487
487
 
488
- function setLnFeeRateRoots(address[] memory YTs, uint256[] memory lnFeeRateRoots) public onlyHelperAndOwner {
488
+ /// @dev if zero fees are intended, it must be explicitly allowed again
489
+ function setLnFeeRateRoots(
490
+ address[] memory YTs,
491
+ uint256[] memory lnFeeRateRoots,
492
+ bool allowZeroFees
493
+ ) public onlyHelperAndOwner {
489
494
  uint256 len = YTs.length;
490
495
  require(len == lnFeeRateRoots.length, "LOP: length mismatch");
491
496
 
492
497
  for (uint256 i = 0; i < len; i++) {
493
- require(lnFeeRateRoots[i] > 0, "LOP: zero fee not allowed");
498
+ require(lnFeeRateRoots[i] > 0 || allowZeroFees, "LOP: zero fee must be allowed explicitly");
494
499
  require(lnFeeRateRoots[i] <= MAX_LN_FEE_RATE_ROOT, "LOP: fee too high");
495
500
 
496
501
  __lnFeeRateRoot[YTs[i]] = lnFeeRateRoots[i];
@@ -29,6 +29,16 @@ contract PendleLimitRouter is LimitRouterBase {
29
29
  emit OrderCanceled(msg.sender, orderHash);
30
30
  }
31
31
 
32
+ /// @dev auto skip cancelled orders to avoid race conditions
33
+ function forceCancel(bytes32[] calldata orderHashes) public onlyHelperAndOwner {
34
+ for (uint256 i = 0; i < orderHashes.length; ++i) {
35
+ if (_status[orderHashes[i]].remaining == _ORDER_FILLED) continue;
36
+
37
+ _status[orderHashes[i]].remaining = _ORDER_FILLED;
38
+ emit OrderForceCanceled(orderHashes[i]);
39
+ }
40
+ }
41
+
32
42
  function orderStatusesRaw(
33
43
  bytes32[] memory orderHashes
34
44
  ) public view returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts) {
@@ -40,7 +40,7 @@ contract ExpiredLpPtRedeemer is TokenHelper, ReentrancyGuardUpgradeable, BoringO
40
40
  uint256 totalPtRedeem = 0;
41
41
 
42
42
  if (netPtIn > 0) {
43
- _transferFrom(PT, msg.sender, address(this), netLpIn);
43
+ _transferFrom(PT, msg.sender, address(this), netPtIn);
44
44
  totalPtRedeem += netPtIn;
45
45
  }
46
46
 
@@ -5,8 +5,9 @@ import "../core/erc20/PendleERC20.sol";
5
5
  import "../core/libraries/TokenHelper.sol";
6
6
  import "../interfaces/IPMarket.sol";
7
7
  import "../interfaces/IPLPWrapperFactory.sol";
8
+ import "../interfaces/ILPWrapper.sol";
8
9
 
9
- contract PendleLPWrapper is PendleERC20, TokenHelper {
10
+ contract PendleLPWrapper is PendleERC20, TokenHelper, ILPWrapper {
10
11
  address public immutable LP;
11
12
  address public immutable factory;
12
13
  bool public isRewardRedemptionDisabled;
@@ -0,0 +1,65 @@
1
+ // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
+ pragma solidity ^0.8.19;
3
+
4
+ /**
5
+ * @title PendleLpLinearDiscountOracle
6
+ * @notice Oracle for pricing Pendle LP tokens using a linear discount model based on time to maturity
7
+ * @dev Implements Chainlink-compatible price feed interface for LP tokens
8
+ * The oracle calculates LP price by applying a time-based linear discount to the PT component
9
+ */
10
+ contract PendleLpLinearDiscountOracle {
11
+ uint256 private constant SECONDS_PER_YEAR = 365 days;
12
+ uint256 private constant ONE = 1e18;
13
+
14
+ /// @notice The LP token address (Pendle Market)
15
+ address public immutable LP;
16
+
17
+ /// @notice The maturity timestamp of the LP token
18
+ uint256 public immutable maturity;
19
+
20
+ /// @notice Annual discount rate for LP tokens (1e18 = 100%)
21
+ uint256 public immutable baseLpDiscountPerYear;
22
+
23
+ /// @notice Base price multiplier for LP tokens (1e18 = 1x)
24
+ uint256 public immutable lpMaturedPrice;
25
+
26
+ constructor(address _lp, uint256 _baseLpDiscountPerYear, uint256 _lpMaturedPrice) {
27
+ require(_lpMaturedPrice >= 1e18, "invalid price");
28
+
29
+ LP = _lp;
30
+ maturity = LPExpiry(LP).expiry();
31
+ baseLpDiscountPerYear = _baseLpDiscountPerYear;
32
+ lpMaturedPrice = _lpMaturedPrice;
33
+ }
34
+
35
+ function latestRoundData()
36
+ external
37
+ view
38
+ returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
39
+ {
40
+ uint256 timeLeft = (maturity > block.timestamp) ? maturity - block.timestamp : 0;
41
+ uint256 lpPrice = getLpPrice(timeLeft);
42
+ return (0, int256(lpPrice), 0, 0, 0);
43
+ }
44
+
45
+ function getLpPrice(uint256 timeLeft) public view returns (uint256) {
46
+ uint256 lpDiscount = getLpDiscount(timeLeft);
47
+ require(lpDiscount <= ONE, "discount overflow");
48
+
49
+ uint256 lpPrice = ((ONE - lpDiscount) * lpMaturedPrice) / ONE;
50
+
51
+ return lpPrice;
52
+ }
53
+
54
+ function getLpDiscount(uint256 timeLeft) public view returns (uint256) {
55
+ return (timeLeft * baseLpDiscountPerYear) / SECONDS_PER_YEAR;
56
+ }
57
+
58
+ function decimals() external pure returns (uint8) {
59
+ return 18;
60
+ }
61
+ }
62
+
63
+ interface LPExpiry {
64
+ function expiry() external view returns (uint256);
65
+ }
@@ -0,0 +1,20 @@
1
+ // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {PendleLpLinearDiscountOracle} from "./PendleLpLinearDiscountOracle.sol";
5
+
6
+ contract PendleLpLinearDiscountOracleFactory {
7
+ event OracleCreated(address indexed market, uint256 basePtDiscountPerYear, uint256 lpBasePrice, address oracle);
8
+
9
+ /**
10
+ * @notice Creates a new LP linear discount oracle
11
+ * @param market The Pendle Market address (LP token)
12
+ * @param basePtDiscountPerYear Annual discount rate for PT (max: 1e18 = 100%)
13
+ * @param lpBasePrice Base price multiplier for LP (min: 1e18 = 1x)
14
+ * @return res The address of the deployed oracle contract
15
+ */
16
+ function create(address market, uint256 basePtDiscountPerYear, uint256 lpBasePrice) external returns (address res) {
17
+ res = address(new PendleLpLinearDiscountOracle(market, basePtDiscountPerYear, lpBasePrice));
18
+ emit OracleCreated(market, basePtDiscountPerYear, lpBasePrice, res);
19
+ }
20
+ }
@@ -1,7 +1,9 @@
1
1
  // SPDX-License-Identifier: SEE LICENSE IN LICENSE
2
2
  pragma solidity ^0.8.19;
3
3
 
4
- contract PendleSparkLinearDiscountOracle {
4
+ import {IPChainlinkOracleEssential} from "../../interfaces/IPChainlinkOracleEssential.sol";
5
+
6
+ contract PendleSparkLinearDiscountOracle is IPChainlinkOracleEssential {
5
7
  uint256 private constant SECONDS_PER_YEAR = 365 days;
6
8
  uint256 private constant ONE = 1e18;
7
9
 
@@ -15,6 +15,8 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
15
15
  using PYIndexLib for IPYieldToken;
16
16
  using PYIndexLib for PYIndex;
17
17
 
18
+ constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
19
+
18
20
  // ------------------ ADD LIQUIDITY DUAL ------------------
19
21
 
20
22
  /// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
@@ -8,6 +8,8 @@ import "../interfaces/IPReflector.sol";
8
8
  contract ActionMiscV3 is IPActionMiscV3, ActionBase {
9
9
  uint256 private constant NOT_FOUND = type(uint256).max;
10
10
 
11
+ constructor(address _dustReceiver) ActionBase(_dustReceiver) {}
12
+
11
13
  function mintSyFromToken(
12
14
  address receiver,
13
15
  address SY,
@@ -24,6 +24,8 @@ contract ActionSimple is ActionBase, IPActionSimple {
24
24
  using PYIndexLib for PYIndex;
25
25
  using PMath for uint256;
26
26
 
27
+ constructor(address _dustReceiver) ActionBase(_dustReceiver) {}
28
+
27
29
  // ------------------ SWAP TOKEN FOR PT ------------------
28
30
  /// @notice This function is for internal router use only and should not be called directly.
29
31
  /// @dev Use swapExactTokenForPt from the main router instead.
@@ -8,6 +8,8 @@ import {ActionDelegateBase} from "./base/ActionDelegateBase.sol";
8
8
  contract ActionSwapPTV3 is IPActionSwapPTV3, ActionBase, ActionDelegateBase {
9
9
  using PMath for uint256;
10
10
 
11
+ constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
12
+
11
13
  // ------------------ SWAP TOKEN FOR PT ------------------
12
14
  /// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
13
15
  function swapExactTokenForPt(
@@ -12,6 +12,8 @@ contract ActionSwapYTV3 is CallbackHelper, IPActionSwapYTV3, ActionBase, ActionD
12
12
  using MarketApproxPtOutLibV2 for MarketState;
13
13
  using PYIndexLib for IPYieldToken;
14
14
 
15
+ constructor(address _dustReceiver) ActionDelegateBase(_dustReceiver) {}
16
+
15
17
  // ------------------ SWAP TOKEN FOR YT ------------------
16
18
 
17
19
  /// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.