@pendle/core-v2 3.0.0-beta-10 → 3.0.0-beta-12

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 (937) 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/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  17. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  33. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  35. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  37. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +2 -2
  39. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  42. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  44. package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
  47. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
  49. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
  64. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
  66. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
  68. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
  70. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
  71. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
  72. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
  73. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.json +2 -2
  74. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
  76. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
  78. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
  79. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol/ComposableStablePreviewProxy.dbg.json +1 -1
  81. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol/ComposableStablePreviewV4.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol/ComposableStablePreviewV5.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
  85. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
  86. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
  87. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
  88. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
  89. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
  90. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
  91. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +1 -1
  92. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  93. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  94. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  95. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  96. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
  97. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
  98. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
  99. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
  100. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
  101. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
  102. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
  103. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
  104. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol/PendleChainlinkRelayer.dbg.json +1 -1
  105. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  106. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
  107. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  108. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
  109. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
  110. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
  111. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
  112. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  113. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
  114. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
  115. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
  116. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
  117. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
  118. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
  119. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
  120. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol/HLPPricingHelper.dbg.json +1 -1
  121. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
  122. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
  123. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
  124. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
  125. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
  126. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
  127. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
  128. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
  129. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
  130. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
  131. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
  132. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
  133. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
  134. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
  135. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
  136. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
  137. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  138. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
  139. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
  140. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
  141. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
  142. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
  143. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
  144. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +2 -2
  145. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  146. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  147. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
  148. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
  149. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
  150. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
  151. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
  152. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
  153. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
  154. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
  155. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
  156. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
  157. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  158. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  159. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  160. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  161. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  162. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  163. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  164. package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
  165. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
  166. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
  167. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
  168. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
  169. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
  170. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
  171. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  172. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  173. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  174. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  175. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  176. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  177. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  178. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  179. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -18
  180. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  181. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  182. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  183. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  184. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  185. package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
  186. package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
  187. package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
  188. package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
  189. package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
  190. package/build/artifacts/contracts/interfaces/Balancer/IPComposableStablePreview.sol/IPComposableStablePreview.dbg.json +1 -1
  191. package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
  192. package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
  193. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
  194. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
  195. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
  196. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
  197. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
  198. package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
  199. package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
  200. package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.dbg.json +1 -1
  201. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  202. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  203. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
  204. package/build/artifacts/contracts/interfaces/Flux/IFluxErc20.sol/IFluxErc20.dbg.json +1 -1
  205. package/build/artifacts/contracts/interfaces/Flux/IFluxInterestRateModel.sol/IFluxInterestRateModel.dbg.json +1 -1
  206. package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
  207. package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
  208. package/build/artifacts/contracts/interfaces/HMX/IHLPStaking.sol/IHLPStaking.dbg.json +1 -1
  209. package/build/artifacts/contracts/interfaces/HMX/IHMXCalculator.sol/IHMXCalculator.dbg.json +1 -1
  210. package/build/artifacts/contracts/interfaces/HMX/IHMXCompounder.sol/IHMXCompounder.dbg.json +1 -1
  211. package/build/artifacts/contracts/interfaces/HMX/IHMXStaking.sol/IHMXStaking.dbg.json +1 -1
  212. package/build/artifacts/contracts/interfaces/HMX/IHMXVester.sol/IHMXVester.dbg.json +1 -1
  213. package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
  214. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
  215. package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.dbg.json +1 -1
  216. package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +1 -1
  217. package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
  218. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  219. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  220. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
  221. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +4 -0
  222. package/build/artifacts/contracts/interfaces/{IPLimitRouter.sol/ILimitOrderCallee.json → IPActionCallbackV3.sol/IPActionCallbackV3.json} +19 -28
  223. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  224. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  225. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  226. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  227. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
  228. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.json +18 -42
  229. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  230. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
  231. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
  232. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
  233. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +37 -27
  234. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  235. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  236. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  237. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  238. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  239. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  240. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  241. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +23 -136
  242. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +4 -0
  243. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.json +45 -0
  244. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixinType.dbg.json +1 -1
  245. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  246. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  247. package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +1 -1
  248. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  249. package/build/artifacts/contracts/interfaces/IPPtOracle.sol/IPPtOracle.dbg.json +1 -1
  250. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
  251. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  252. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  253. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  254. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  255. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  256. package/build/artifacts/contracts/interfaces/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
  257. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  258. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  259. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  260. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  261. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  262. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  263. package/build/artifacts/contracts/interfaces/IStargateLP.sol/IStargateLP.dbg.json +1 -1
  264. package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
  265. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  266. package/build/artifacts/contracts/interfaces/Lybra/IEUSD.sol/IEUSD.dbg.json +1 -1
  267. package/build/artifacts/contracts/interfaces/Stader/IStaderStakeManager.sol/IStaderStakeManager.dbg.json +1 -1
  268. package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
  269. package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
  270. package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
  271. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  272. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  273. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  274. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +62 -132
  275. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.dbg.json +1 -1
  276. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.json +255 -130
  277. package/build/artifacts/contracts/limit/helpers/ArgumentsDecoder.sol/ArgumentsDecoder.dbg.json +1 -1
  278. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
  279. package/build/artifacts/contracts/limit/helpers/Permitable.sol/Permitable.dbg.json +1 -1
  280. package/build/artifacts/contracts/limit/helpers/RevertReasonParser.sol/RevertReasonParser.dbg.json +1 -1
  281. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  282. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  283. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  284. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  285. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  286. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  287. package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  288. package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  289. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  290. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  291. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +4 -0
  292. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +10 -0
  293. package/build/artifacts/contracts/offchain-helpers/ChainlinkRelayerGelato.sol/ChainlinkRelayerGelato.dbg.json +1 -1
  294. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  295. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  296. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  297. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +4 -0
  298. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +174 -0
  299. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
  300. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
  301. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  302. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  303. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  304. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
  305. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +2 -2
  306. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
  307. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +84 -0
  308. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  309. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  310. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  311. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  312. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  313. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  314. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  315. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  316. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  317. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  318. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  319. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  320. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  321. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  322. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  323. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  324. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  325. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  326. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
  327. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
  328. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
  329. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
  330. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
  331. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
  332. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
  333. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
  334. package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
  335. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
  336. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
  337. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +4 -0
  338. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +116 -0
  339. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
  340. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +36 -60
  341. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
  342. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
  343. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
  344. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -57
  345. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
  346. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
  347. package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +1 -1
  348. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +1 -1
  349. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +7 -2
  350. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  351. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  352. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  353. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  354. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  355. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  356. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  357. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  358. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
  359. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
  360. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
  361. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
  362. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
  363. package/build/artifacts/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
  364. package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
  365. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +5 -23
  366. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +2 -5
  367. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +6 -20
  368. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +6 -27
  369. package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +1 -2
  370. package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +1 -1
  371. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +16 -17
  372. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -7
  373. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +7 -8
  374. package/contracts/LiquidityMining/PendleMerkleDistributor.sol +2 -11
  375. package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +14 -37
  376. package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol +19 -34
  377. package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +4 -14
  378. package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +4 -16
  379. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +11 -39
  380. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +3 -10
  381. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +1 -1
  382. package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +5 -20
  383. package/contracts/LiquidityMining/libraries/VeHistoryLib.sol +1 -3
  384. package/contracts/core/Market/MarketMathCore.sol +12 -37
  385. package/contracts/core/Market/OracleLib.sol +6 -24
  386. package/contracts/core/Market/PendleExternalRewardDistributor.sol +4 -10
  387. package/contracts/core/Market/PendleGauge.sol +3 -9
  388. package/contracts/core/Market/PendleMarket.sol +14 -39
  389. package/contracts/core/Market/PendleMarketFactory.sol +14 -21
  390. package/contracts/core/Market/v2/PendleGaugeV2.sol +8 -24
  391. package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +7 -27
  392. package/contracts/core/Market/v2/PendleMarketV2.sol +13 -36
  393. package/contracts/core/Market/v3/PendleMarketFactoryV3.sol +137 -0
  394. package/contracts/core/Market/v3/PendleMarketV3.sol +360 -0
  395. package/contracts/core/RewardManager/PendleLinearDistributor.sol +143 -0
  396. package/contracts/core/RewardManager/RewardManager.sol +14 -7
  397. package/contracts/core/RewardManager/RewardManagerAbstract.sol +5 -17
  398. package/contracts/core/StandardizedYield/SYBase.sol +10 -40
  399. package/contracts/core/StandardizedYield/SYBaseUpg.sol +197 -0
  400. package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +9 -41
  401. package/contracts/core/StandardizedYield/SYBaseWithRewardsUpg.sol +88 -0
  402. package/contracts/core/StandardizedYield/SYUtils.sol +1 -4
  403. package/contracts/core/StandardizedYield/StEthHelper.sol +3 -9
  404. package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +94 -0
  405. package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol +19 -0
  406. package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol +126 -0
  407. package/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol +4 -12
  408. package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +5 -19
  409. package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol +4 -14
  410. package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol +4 -14
  411. package/contracts/core/StandardizedYield/implementations/BalancerStable/{PendleAuraWethVethSY.sol → AuraWethVethSYUpg.sol} +13 -20
  412. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol +3 -7
  413. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol +12 -29
  414. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol +12 -29
  415. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol +12 -29
  416. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol +14 -39
  417. package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol +7 -28
  418. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +13 -30
  419. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol +1 -1
  420. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol +50 -153
  421. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol +50 -157
  422. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol +4 -16
  423. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol +6 -25
  424. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol +36 -34
  425. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +4 -13
  426. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +20 -58
  427. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol +28 -79
  428. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol +310 -0
  429. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +1 -3
  430. package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +2 -6
  431. package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol +5 -13
  432. package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol +9 -29
  433. package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +2 -8
  434. package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol +1 -5
  435. package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol +8 -19
  436. package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol +7 -25
  437. package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +8 -27
  438. package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol +2 -2
  439. package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol +4 -9
  440. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +3 -15
  441. package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +5 -23
  442. package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +10 -40
  443. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +2 -8
  444. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +2 -7
  445. package/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol +5 -20
  446. package/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol +6 -4
  447. package/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol +3 -11
  448. package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +3 -9
  449. package/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol +115 -0
  450. package/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol +134 -0
  451. package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +5 -19
  452. package/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol +3 -4
  453. package/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol +18 -25
  454. package/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol +425 -0
  455. package/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol +438 -0
  456. package/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol +155 -0
  457. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/FullMath.sol +123 -0
  458. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiqDeltaMath.sol +17 -0
  459. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiquidityMath.sol +74 -0
  460. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/MathConstants.sol +19 -0
  461. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QtyDeltaMath.sol +103 -0
  462. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QuadMath.sol +31 -0
  463. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/ReinvestmentMath.sol +26 -0
  464. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SafeCast.sol +73 -0
  465. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SwapMath.sol +272 -0
  466. package/contracts/core/StandardizedYield/implementations/Kyber/libraries/TickMath.sol +223 -0
  467. package/contracts/core/StandardizedYield/implementations/MUX/MlpPricingHelper.sol +26 -0
  468. package/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol +195 -0
  469. package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol +12 -41
  470. package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol +1 -1
  471. package/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol +13 -42
  472. package/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol +4 -11
  473. package/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol +4 -16
  474. package/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol +3 -11
  475. package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +3 -11
  476. package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +5 -18
  477. package/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol +3 -7
  478. package/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol +5 -18
  479. package/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol +3 -10
  480. package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +4 -12
  481. package/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol +157 -0
  482. package/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol +4 -12
  483. package/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol +4 -12
  484. package/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol +9 -29
  485. package/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol +3 -10
  486. package/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol +9 -30
  487. package/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol +10 -40
  488. package/contracts/core/YieldContracts/InterestManagerYT.sol +6 -8
  489. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +1 -1
  490. package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +2 -3
  491. package/contracts/core/YieldContracts/PendleYieldToken.sol +17 -44
  492. package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +5 -14
  493. package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +1 -1
  494. package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +2 -3
  495. package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +13 -48
  496. package/contracts/core/erc20/PendleERC20.sol +2 -8
  497. package/contracts/core/erc20/PendleERC20Permit.sol +2 -6
  498. package/contracts/core/erc20/PendleERC20PermitUpg.sol +82 -0
  499. package/contracts/core/erc20/PendleERC20Upg.sol +334 -0
  500. package/contracts/core/libraries/ArrayLib.sol +7 -8
  501. package/contracts/core/libraries/BaseSplitCodeFactory.sol +1 -6
  502. package/contracts/core/libraries/Errors.sol +20 -2
  503. package/contracts/core/libraries/ExpiryUtilsLib.sol +3 -26
  504. package/contracts/core/libraries/StringLib.sol +5 -21
  505. package/contracts/core/libraries/TokenHelper.sol +3 -3
  506. package/contracts/core/libraries/math/LogExpMath.sol +1 -4
  507. package/contracts/core/libraries/math/PMath.sol +13 -15
  508. package/contracts/interfaces/AaveV3/IAaveV3AToken.sol +15 -0
  509. package/contracts/interfaces/AaveV3/IAaveV3Pool.sol +11 -0
  510. package/contracts/interfaces/Balancer/IComposableStable.sol +3 -4
  511. package/contracts/interfaces/Balancer/IERC4626LinearPool.sol +2 -10
  512. package/contracts/interfaces/Balancer/IMetaStablePool.sol +3 -11
  513. package/contracts/interfaces/Balancer/IVault.sol +3 -8
  514. package/contracts/interfaces/BinanceEth/IWBETH.sol +1 -1
  515. package/contracts/interfaces/Camelot/ICamelotNFTFactory.sol +1 -3
  516. package/contracts/interfaces/Camelot/ICamelotNFTHandler.sol +2 -10
  517. package/contracts/interfaces/Camelot/ICamelotNitroPool.sol +0 -1
  518. package/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol +3 -12
  519. package/contracts/interfaces/Camelot/ICamelotPair.sol +5 -25
  520. package/contracts/interfaces/Camelot/ICamelotRouter.sol +1 -5
  521. package/contracts/interfaces/Camelot/IXGrail.sol +3 -11
  522. package/contracts/interfaces/ConvexCurve/IBooster.sol +1 -3
  523. package/contracts/interfaces/Curve/ICrvPool.sol +3 -12
  524. package/contracts/interfaces/Curve/ITriCrvPool.sol +2 -9
  525. package/contracts/interfaces/Flux/IFluxErc20.sol +1 -1
  526. package/contracts/interfaces/Flux/IFluxInterestRateModel.sol +1 -5
  527. package/contracts/interfaces/GMX/IGMXPriceHelper.sol +6 -0
  528. package/contracts/interfaces/GMX/IGMXVault.sol +2 -9
  529. package/contracts/interfaces/GMX/IRewardRouterV2.sol +1 -4
  530. package/contracts/interfaces/HMX/IHLPStaking.sol +1 -1
  531. package/contracts/interfaces/HMX/IHMXCalculator.sol +1 -1
  532. package/contracts/interfaces/HMX/IHMXCompounder.sol +1 -1
  533. package/contracts/interfaces/HMX/IHMXStaking.sol +1 -1
  534. package/contracts/interfaces/HMX/IHMXVester.sol +1 -1
  535. package/contracts/interfaces/IApeStaking.sol +3 -9
  536. package/contracts/interfaces/IBenQiInterestRateModel.sol +1 -5
  537. package/contracts/interfaces/IDiamondCut.sol +1 -5
  538. package/contracts/interfaces/IDiamondLoupe.sol +1 -3
  539. package/contracts/interfaces/ILayerZeroReceiver.sol +1 -6
  540. package/contracts/interfaces/IPActionAddRemoveLiqV3.sol +10 -2
  541. package/contracts/interfaces/IPActionCallbackV3.sol +7 -0
  542. package/contracts/interfaces/IPActionInfoStatic.sol +4 -7
  543. package/contracts/interfaces/IPActionMarketAuxStatic.sol +5 -9
  544. package/contracts/interfaces/IPActionMarketCoreStatic.sol +118 -58
  545. package/contracts/interfaces/IPActionMintRedeemStatic.sol +38 -21
  546. package/contracts/interfaces/IPActionMiscV3.sol +52 -32
  547. package/contracts/interfaces/IPActionStorageStatic.sol +5 -1
  548. package/contracts/interfaces/IPAllActionTypeV3.sol +1 -0
  549. package/contracts/interfaces/IPAllActionV3.sol +2 -2
  550. package/contracts/interfaces/IPBulkSeller.sol +49 -0
  551. package/contracts/interfaces/IPBulkSellerFactory.sol +12 -0
  552. package/contracts/interfaces/IPBulkSellerSYCallback.sol +6 -0
  553. package/contracts/interfaces/IPFeeDistributor.sol +1 -3
  554. package/contracts/interfaces/IPFeeDistributorV2.sol +8 -7
  555. package/contracts/interfaces/IPGaugeController.sol +2 -8
  556. package/contracts/interfaces/IPGaugeControllerMainchain.sol +1 -5
  557. package/contracts/interfaces/IPInterestManagerYT.sol +3 -3
  558. package/contracts/interfaces/IPInterestManagerYTV2.sol +1 -4
  559. package/contracts/interfaces/IPLimitRouter.sol +29 -60
  560. package/contracts/interfaces/IPLinearDistributor.sol +21 -0
  561. package/contracts/interfaces/IPMarket.sol +4 -17
  562. package/contracts/interfaces/IPMarketFactory.sol +2 -13
  563. package/contracts/interfaces/IPMarketFactoryV3.sol +24 -0
  564. package/contracts/interfaces/IPMarketV3.sol +8 -0
  565. package/contracts/interfaces/IPOffchainStorage.sol +11 -0
  566. package/contracts/interfaces/IPPriceFeed.sol +6 -0
  567. package/contracts/interfaces/IPPtOracle.sol +2 -9
  568. package/contracts/interfaces/IPRouterHelper.sol +11 -7
  569. package/contracts/interfaces/IPRouterStatic.sol +1 -3
  570. package/contracts/interfaces/IPVotingController.sol +7 -19
  571. package/contracts/interfaces/IPVotingEscrowMainchain.sol +2 -8
  572. package/contracts/interfaces/IPYieldToken.sol +2 -8
  573. package/contracts/interfaces/IPYieldTokenV2.sol +1 -6
  574. package/contracts/interfaces/IPendlePreviewHelper.sol +2 -8
  575. package/contracts/interfaces/IRewardManager.sol +1 -4
  576. package/contracts/interfaces/IStETH.sol +1 -4
  577. package/contracts/interfaces/IStandardizedYield.sol +9 -16
  578. package/contracts/interfaces/IStargateLP.sol +0 -3
  579. package/contracts/interfaces/IStargateRouter.sol +1 -5
  580. package/contracts/interfaces/Kyber/IKyberElasticFactory.sol +157 -0
  581. package/contracts/interfaces/Kyber/IKyberElasticPool.sol +101 -0
  582. package/contracts/interfaces/Kyber/IKyberElasticRouter.sol +98 -0
  583. package/contracts/interfaces/Kyber/IKyberLiquidityMining.sol +209 -0
  584. package/contracts/interfaces/Kyber/IKyberMathHelper.sol +28 -0
  585. package/contracts/interfaces/Kyber/IKyberPositionManager.sol +179 -0
  586. package/contracts/interfaces/Lybra/IEUSD.sol +1 -1
  587. package/contracts/interfaces/MUX/IMUXRewardRouter.sol +139 -0
  588. package/contracts/interfaces/Silo/ISilo.sol +298 -0
  589. package/contracts/interfaces/Silo/ISiloIncentiveController.sol +16 -0
  590. package/contracts/interfaces/Silo/ISiloLens.sol +6 -0
  591. package/contracts/interfaces/Stader/IStaderStakeManager.sol +2 -2
  592. package/contracts/interfaces/Thena/IThenaFactory.sol +1 -5
  593. package/contracts/interfaces/Thena/IThenaGaugeV2.sol +1 -2
  594. package/contracts/interfaces/Thena/IThenaPair.sol +3 -5
  595. package/contracts/limit/LimitMathCore.sol +75 -148
  596. package/contracts/limit/{PendleOrderMixin.sol → LimitRouterBase.sol} +121 -214
  597. package/contracts/limit/PendleLimitRouter.sol +15 -17
  598. package/contracts/offchain-helpers/AutomateReady.sol +17 -32
  599. package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +6 -3
  600. package/contracts/offchain-helpers/BoringLpSeller.sol +4 -17
  601. package/contracts/offchain-helpers/BoringPtSeller.sol +2 -7
  602. package/contracts/offchain-helpers/Broadcaster.sol +1 -1
  603. package/contracts/offchain-helpers/BytesLib.sol +551 -0
  604. package/contracts/offchain-helpers/EmptyUUPS.sol +0 -1
  605. package/contracts/offchain-helpers/LegacyNFTHelper.sol +4 -23
  606. package/contracts/offchain-helpers/LimitBackendHelper.sol +109 -0
  607. package/contracts/offchain-helpers/MarketExchangeRateLib.sol +2 -13
  608. package/contracts/offchain-helpers/Multicall2.sol +2 -7
  609. package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
  610. package/contracts/offchain-helpers/PendleMulticallV2.sol +12 -13
  611. package/contracts/offchain-helpers/PendleOffchainStorage.sol +59 -0
  612. package/contracts/offchain-helpers/SimulateHelper.sol +40 -0
  613. package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +15 -1
  614. package/contracts/oracles/PendleLpOracleLib.sol +9 -10
  615. package/contracts/oracles/PendlePtOracle.sol +8 -19
  616. package/contracts/oracles/PendlePtOracleLib.sol +8 -13
  617. package/contracts/oracles/samples/PendleLpGlpOracle.sol +6 -10
  618. package/contracts/oracles/samples/PendlePtGlpOracle.sol +6 -10
  619. package/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol +8 -15
  620. package/contracts/router/ActionAddRemoveLiqV3.sol +147 -52
  621. package/contracts/router/{base/ActionBaseCallback.sol → ActionCallbackV3.sol} +64 -9
  622. package/contracts/router/ActionMiscV3.sol +47 -46
  623. package/contracts/router/ActionSwapPTV3.sol +18 -6
  624. package/contracts/router/ActionSwapYTV3.sol +44 -16
  625. package/contracts/router/PendleRouterHelper.sol +72 -40
  626. package/contracts/router/PendleRouterV3.sol +81 -74
  627. package/contracts/router/base/ActionBase.sol +94 -46
  628. package/contracts/router/base/CallbackHelper.sol +18 -20
  629. package/contracts/router/base/MarketApproxLib.sol +36 -32
  630. package/contracts/router/swap-aggregator/PendleSwap.sol +31 -7
  631. package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutorOptimistic.sol +63 -0
  632. package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol +314 -0
  633. package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol +560 -0
  634. package/contracts/router/swap-aggregator/kyberswap/{IMetaAggregationRouterV2.sol → interfaces/IMetaAggregationRouterV2.sol} +11 -6
  635. package/contracts/router/swap-aggregator/kyberswap/{KyberInputScalingHelper.sol → l1-contracts/InputScalingHelper.sol} +70 -19
  636. package/contracts/router/swap-aggregator/kyberswap/{ScalingDataLib.sol → l1-contracts/ScalingDataLib.sol} +111 -53
  637. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/BytesHelper.sol +29 -0
  638. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol +149 -0
  639. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol +118 -0
  640. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol +42 -0
  641. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol +382 -0
  642. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol +61 -0
  643. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol +329 -0
  644. package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol +173 -0
  645. package/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol +4 -10
  646. package/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol +20 -14
  647. package/deployments/1-core.json +5 -2
  648. package/deployments/1-markets/EPENDLE-SEP2024.json +12 -0
  649. package/deployments/1-markets/SFRAX-MARCH2024.json +10 -0
  650. package/deployments/1-markets/SILO-CRVUSD-MARCH2024.json +10 -0
  651. package/deployments/10-core.json +6 -3
  652. package/deployments/42161-core.json +7 -3
  653. package/deployments/42161-markets/AAVE-USDC-JUNE2024.json +11 -0
  654. package/deployments/42161-markets/ARBSILO-USDC-FEB2024.json +10 -0
  655. package/deployments/42161-markets/GM-ARB-USDC-MARCH2024.json +10 -0
  656. package/deployments/42161-markets/KYBER-AXLWSTETH-WSTETH-MARCH2024.json +10 -0
  657. package/deployments/42161-markets/MLP-MARCH2024.json +10 -0
  658. package/deployments/42161-markets/WSTETH-ARBITRUM-MARCH2024.json +11 -0
  659. package/deployments/42161-markets/WSTETHSILO-ETH-MARCH2024.json +11 -0
  660. package/deployments/56-core.json +5 -2
  661. package/deployments/merkle-distribution/2023-10-26.json +7300 -0
  662. package/deployments/merkle-distribution/2023-11-30.json +7730 -0
  663. package/package.json +8 -8
  664. package/typechain-types/AccessControlUpgradeable.ts +369 -0
  665. package/typechain-types/ActionAddRemoveLiq.ts +1239 -0
  666. package/typechain-types/ActionCallbackV3.ts +164 -0
  667. package/typechain-types/ActionMintRedeem.ts +673 -0
  668. package/typechain-types/ActionMisc.ts +155 -0
  669. package/typechain-types/ActionMiscV3.ts +36 -75
  670. package/typechain-types/ActionSwapPT.ts +544 -0
  671. package/typechain-types/ActionSwapYT.ts +730 -0
  672. package/typechain-types/ActionSwapYTV3.ts +0 -44
  673. package/typechain-types/AuraWethVethSYUpg.ts +1612 -0
  674. package/typechain-types/BeaconProxy.ts +97 -0
  675. package/typechain-types/BulkSeller.ts +743 -0
  676. package/typechain-types/BulkSellerFactory.ts +712 -0
  677. package/typechain-types/BulkSellerOffchain.ts +251 -0
  678. package/typechain-types/ContextUpgradeable.ts +68 -0
  679. package/typechain-types/EIP712.ts +135 -0
  680. package/typechain-types/ERC165Upgradeable.ts +113 -0
  681. package/typechain-types/GMTokenPricingHelper.ts +478 -0
  682. package/typechain-types/IAccessControlUpgradeable.ts +305 -0
  683. package/typechain-types/IAggregationExecutorOptimistic.ts +394 -0
  684. package/typechain-types/IERC165Upgradeable.ts +102 -0
  685. package/typechain-types/IERC1967.ts +97 -0
  686. package/typechain-types/IERC5267.ts +135 -0
  687. package/typechain-types/IERC5267Upgradeable.ts +135 -0
  688. package/typechain-types/IExecutorHelperL2.ts +2272 -0
  689. package/typechain-types/IGMXPriceHelper.ts +84 -0
  690. package/typechain-types/IGMXV2DataStore.ts +87 -0
  691. package/typechain-types/IGMXV2Oracle.ts +107 -0
  692. package/typechain-types/IGMXV2Reader.ts +204 -0
  693. package/typechain-types/IKyberElasticFactory.ts +734 -0
  694. package/typechain-types/IKyberElasticPool.ts +514 -0
  695. package/typechain-types/IKyberElasticRouter.ts +315 -0
  696. package/typechain-types/IKyberLiquidityMining.ts +968 -0
  697. package/typechain-types/IKyberMathHelper.ts +231 -0
  698. package/typechain-types/IKyberPositionManager.ts +773 -0
  699. package/typechain-types/IMUXRewardRouter.ts +1599 -0
  700. package/typechain-types/IPActionAddRemoveLiq.ts +1239 -0
  701. package/typechain-types/IPActionCallbackV3.ts +164 -0
  702. package/typechain-types/IPActionMintRedeem.ts +673 -0
  703. package/typechain-types/IPActionMisc.ts +155 -0
  704. package/typechain-types/IPActionMiscV3.ts +36 -75
  705. package/typechain-types/IPActionSwapPT.ts +544 -0
  706. package/typechain-types/IPActionSwapYT.ts +686 -0
  707. package/typechain-types/IPAllAction.ts +2935 -0
  708. package/typechain-types/IPAllActionV3.ts +70 -60
  709. package/typechain-types/IPBulkSeller.ts +391 -0
  710. package/typechain-types/IPBulkSellerCallback.ts +115 -0
  711. package/typechain-types/IPBulkSellerFactory.ts +152 -0
  712. package/typechain-types/IPLimitRouter.ts +39 -72
  713. package/typechain-types/IPLimitRouterCallback.ts +120 -0
  714. package/typechain-types/IPLinearDistributor.ts +199 -0
  715. package/typechain-types/IPMarketFactoryV3.ts +225 -0
  716. package/typechain-types/IPMarketV3.ts +1068 -0
  717. package/typechain-types/IPOffchainStorage.ts +146 -0
  718. package/typechain-types/IPPriceFeed.ts +81 -0
  719. package/typechain-types/ISilo.ts +1093 -0
  720. package/typechain-types/ISiloIncentiveController.ts +129 -0
  721. package/typechain-types/ISiloLens.ts +107 -0
  722. package/typechain-types/KyberMathHelper.ts +604 -0
  723. package/typechain-types/KyberNftManagerBaseUpg.ts +148 -0
  724. package/typechain-types/LimitBackendHelper.ts +287 -0
  725. package/typechain-types/MlpPricingHelper.ts +397 -0
  726. package/typechain-types/PendleAuraBalancerStableLPSYV3Upg.ts +1577 -0
  727. package/typechain-types/PendleERC20PermitUpg.ts +517 -0
  728. package/typechain-types/PendleERC20Upg.ts +348 -0
  729. package/typechain-types/PendleGMV2TokenSY.ts +1434 -0
  730. package/typechain-types/PendleKyberElasticSYUpg.ts +1648 -0
  731. package/typechain-types/PendleLimitRouter.ts +110 -92
  732. package/typechain-types/PendleLinearDistributor.ts +829 -0
  733. package/typechain-types/PendleMarketFactoryV3.ts +719 -0
  734. package/typechain-types/PendleMarketV3.ts +1364 -0
  735. package/typechain-types/PendleMlpSY.ts +1606 -0
  736. package/typechain-types/PendleOffchainStorage.ts +666 -0
  737. package/typechain-types/PendleOrderMixin.ts +292 -92
  738. package/typechain-types/PendleRouter.ts +217 -0
  739. package/typechain-types/PendleRouterHelper2.ts +185 -0
  740. package/typechain-types/PendleSiloWithIncentiveSY.ts +1455 -0
  741. package/typechain-types/PendleSwapBase.ts +126 -0
  742. package/typechain-types/PendleSwapL1.ts +126 -0
  743. package/typechain-types/PendleSwapL2.ts +126 -0
  744. package/typechain-types/ReentrancyGuardUpgradeable.ts +68 -0
  745. package/typechain-types/SYBaseUpg.ts +1270 -0
  746. package/typechain-types/SYBaseWithRewardsUpg.ts +1363 -0
  747. package/typechain-types/ShortStrings.ts +57 -0
  748. package/typechain-types/SimulateHelper.ts +42 -35
  749. package/typechain-types/factories/AccessControlUpgradeable__factory.ts +247 -0
  750. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
  751. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1676 -0
  752. package/typechain-types/factories/ActionBaseCallback__factory.ts +59 -0
  753. package/typechain-types/factories/ActionCallbackV3__factory.ts +169 -0
  754. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  755. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  756. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  757. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  758. package/typechain-types/factories/ActionMintRedeem__factory.ts +806 -0
  759. package/typechain-types/factories/ActionMiscV3__factory.ts +35 -59
  760. package/typechain-types/factories/ActionMisc__factory.ts +129 -0
  761. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  762. package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
  763. package/typechain-types/factories/ActionSwapPT__factory.ts +770 -0
  764. package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -56
  765. package/typechain-types/factories/ActionSwapYT__factory.ts +1041 -0
  766. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  767. package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
  768. package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
  769. package/typechain-types/factories/AuraWethVethSYUpg__factory.ts +1264 -0
  770. package/typechain-types/factories/BeaconProxy__factory.ts +141 -0
  771. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  772. package/typechain-types/factories/BulkSellerFactory__factory.ts +574 -0
  773. package/typechain-types/factories/BulkSellerOffchain__factory.ts +178 -0
  774. package/typechain-types/factories/BulkSeller__factory.ts +692 -0
  775. package/typechain-types/factories/ContextUpgradeable__factory.ts +39 -0
  776. package/typechain-types/factories/EIP712__factory.ts +85 -0
  777. package/typechain-types/factories/ERC165Upgradeable__factory.ts +58 -0
  778. package/typechain-types/factories/Errors__factory.ts +17 -17
  779. package/typechain-types/factories/GMTokenPricingHelper__factory.ts +354 -0
  780. package/typechain-types/factories/IAccessControlUpgradeable__factory.ts +202 -0
  781. package/typechain-types/factories/IAggregationExecutorOptimistic__factory.ts +213 -0
  782. package/typechain-types/factories/IERC165Upgradeable__factory.ts +45 -0
  783. package/typechain-types/factories/IERC1967__factory.ts +68 -0
  784. package/typechain-types/factories/IERC5267Upgradeable__factory.ts +75 -0
  785. package/typechain-types/factories/IERC5267__factory.ts +72 -0
  786. package/typechain-types/factories/IExecutorHelperL2__factory.ts +1862 -0
  787. package/typechain-types/factories/IGMXPriceHelper__factory.ts +45 -0
  788. package/typechain-types/factories/IGMXV2DataStore__factory.ts +45 -0
  789. package/typechain-types/factories/IGMXV2Oracle__factory.ts +47 -0
  790. package/typechain-types/factories/IGMXV2Reader__factory.ts +192 -0
  791. package/typechain-types/factories/IKyberElasticFactory__factory.ts +455 -0
  792. package/typechain-types/factories/IKyberElasticPool__factory.ts +315 -0
  793. package/typechain-types/factories/IKyberElasticRouter__factory.ts +240 -0
  794. package/typechain-types/factories/IKyberLiquidityMining__factory.ts +913 -0
  795. package/typechain-types/factories/IKyberMathHelper__factory.ts +143 -0
  796. package/typechain-types/factories/IKyberPositionManager__factory.ts +633 -0
  797. package/typechain-types/factories/IMUXRewardRouter__factory.ts +885 -0
  798. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +1446 -0
  799. package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
  800. package/typechain-types/factories/IPActionMintRedeem__factory.ts +720 -0
  801. package/typechain-types/factories/IPActionMiscV3__factory.ts +18 -42
  802. package/typechain-types/factories/IPActionMisc__factory.ts +91 -0
  803. package/typechain-types/factories/IPActionSwapPT__factory.ts +544 -0
  804. package/typechain-types/factories/IPActionSwapYT__factory.ts +723 -0
  805. package/typechain-types/factories/IPAllActionV3__factory.ts +37 -27
  806. package/typechain-types/factories/IPAllAction__factory.ts +3515 -0
  807. package/typechain-types/factories/IPBulkSellerCallback__factory.ts +53 -0
  808. package/typechain-types/factories/IPBulkSellerFactory__factory.ts +107 -0
  809. package/typechain-types/factories/IPBulkSeller__factory.ts +333 -0
  810. package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
  811. package/typechain-types/factories/IPLimitRouter__factory.ts +23 -136
  812. package/typechain-types/factories/IPLinearDistributor__factory.ts +150 -0
  813. package/typechain-types/factories/IPMarketFactoryV3__factory.ts +160 -0
  814. package/typechain-types/factories/IPMarketV3__factory.ts +845 -0
  815. package/typechain-types/factories/IPOffchainStorage__factory.ts +82 -0
  816. package/typechain-types/factories/IPPriceFeed__factory.ts +36 -0
  817. package/typechain-types/factories/ISiloIncentiveController__factory.ts +67 -0
  818. package/typechain-types/factories/ISiloLens__factory.ts +47 -0
  819. package/typechain-types/factories/ISilo__factory.ts +846 -0
  820. package/typechain-types/factories/KyberMathHelper__factory.ts +430 -0
  821. package/typechain-types/factories/KyberNftManagerBaseUpg__factory.ts +101 -0
  822. package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
  823. package/typechain-types/factories/MlpPricingHelper__factory.ts +303 -0
  824. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  825. package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
  826. package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
  827. package/typechain-types/factories/PendleAuraBalancerStableLPSYV3Upg__factory.ts +1209 -0
  828. package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
  829. package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
  830. package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
  831. package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
  832. package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
  833. package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
  834. package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
  835. package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
  836. package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
  837. package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +1 -1
  838. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
  839. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
  840. package/typechain-types/factories/PendleERC20PermitUpg__factory.ts +389 -0
  841. package/typechain-types/factories/PendleERC20Upg__factory.ts +261 -0
  842. package/typechain-types/factories/PendleERC4626SY__factory.ts +1 -1
  843. package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
  844. package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
  845. package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
  846. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  847. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  848. package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
  849. package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
  850. package/typechain-types/factories/PendleGMV2TokenSY__factory.ts +1240 -0
  851. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  852. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  853. package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
  854. package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
  855. package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1351 -0
  856. package/typechain-types/factories/PendleLimitRouter__factory.ts +61 -131
  857. package/typechain-types/factories/PendleLinearDistributor__factory.ts +627 -0
  858. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
  859. package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
  860. package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
  861. package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
  862. package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +714 -0
  863. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  864. package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
  865. package/typechain-types/factories/PendleMarketV3__factory.ts +1351 -0
  866. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  867. package/typechain-types/factories/PendleMlpSY__factory.ts +1314 -0
  868. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  869. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  870. package/typechain-types/factories/PendleOffchainStorage__factory.ts +492 -0
  871. package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
  872. package/typechain-types/factories/PendleOrderMixin__factory.ts +254 -129
  873. package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
  874. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  875. package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
  876. package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
  877. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  878. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  879. package/typechain-types/factories/PendleRouterHelper2__factory.ts +206 -0
  880. package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
  881. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  882. package/typechain-types/factories/PendleRouterV3__factory.ts +10 -1
  883. package/typechain-types/factories/PendleRouter__factory.ts +264 -0
  884. package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
  885. package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1266 -0
  886. package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
  887. package/typechain-types/factories/PendleSwapBase__factory.ts +91 -0
  888. package/typechain-types/factories/PendleSwapL1__factory.ts +126 -0
  889. package/typechain-types/factories/PendleSwapL2__factory.ts +126 -0
  890. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  891. package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
  892. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  893. package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
  894. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  895. package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
  896. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  897. package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
  898. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  899. package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
  900. package/typechain-types/factories/ReentrancyGuardUpgradeable__factory.ts +43 -0
  901. package/typechain-types/factories/SAPE__factory.ts +1 -1
  902. package/typechain-types/factories/SYBaseUpg__factory.ts +988 -0
  903. package/typechain-types/factories/SYBaseWithRewardsUpg__factory.ts +1061 -0
  904. package/typechain-types/factories/ShortStrings__factory.ts +77 -0
  905. package/typechain-types/factories/SimulateHelper__factory.ts +71 -18
  906. package/typechain-types/factories/SwETHSY__factory.ts +1 -1
  907. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  908. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  909. package/typechain-types/hardhat.d.ts +763 -16
  910. package/typechain-types/index.ts +160 -6
  911. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/ILimitOrderCallee.dbg.json +0 -4
  912. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.dbg.json +0 -4
  913. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.json +0 -438
  914. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +0 -4
  915. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -82
  916. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.dbg.json +0 -4
  917. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.json +0 -69
  918. package/contracts/limit/helpers/ArgumentsDecoder.sol +0 -47
  919. package/contracts/limit/helpers/Permitable.sol +0 -48
  920. package/contracts/limit/helpers/RevertReasonParser.sol +0 -75
  921. package/contracts/offchain-helpers/ChainlinkRelayerGelato.sol +0 -37
  922. package/contracts/offchain-helpers/PtAndLpToAsset.sol +0 -62
  923. package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +0 -19
  924. package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +0 -112
  925. package/contracts/offchain-helpers/router-static/base/ActionLimitOrdersStatic.sol +0 -145
  926. package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +0 -171
  927. package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +0 -582
  928. package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +0 -116
  929. package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +0 -64
  930. package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +0 -53
  931. package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +0 -18
  932. package/contracts/router/base/SimulateHelper.sol +0 -33
  933. package/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol +0 -231
  934. package/deployments/1-markets/BALANCER-LP-AURA-VETH-WETH-SEP2024.json +0 -8
  935. /package/contracts/router/swap-aggregator/kyberswap/{IAggregationExecutor.sol → interfaces/IAggregationExecutor.sol} +0 -0
  936. /package/deployments/1-markets/{BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json} +0 -0
  937. /package/deployments/1-markets/{BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json} +0 -0
@@ -0,0 +1,272 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity >=0.8.0;
3
+
4
+ import {MathConstants as C} from "./MathConstants.sol";
5
+ import {FullMath} from "./FullMath.sol";
6
+ import {QuadMath} from "./QuadMath.sol";
7
+ import {SafeCast} from "./SafeCast.sol";
8
+
9
+ /**
10
+ * --------- [DIRECT COPIED FROM KYBERSWAP] ---------
11
+ */
12
+
13
+ /// @title Contains helper functions for swaps
14
+ library SwapMath {
15
+ using SafeCast for uint256;
16
+ using SafeCast for int256;
17
+
18
+ /// @dev Computes the actual swap input / output amounts to be deducted or added,
19
+ /// the swap fee to be collected and the resulting sqrtP.
20
+ /// @notice nextSqrtP should not exceed targetSqrtP.
21
+ /// @param liquidity active base liquidity + reinvest liquidity
22
+ /// @param currentSqrtP current sqrt price
23
+ /// @param targetSqrtP sqrt price limit the new sqrt price can take
24
+ /// @param feeInFeeUnits swap fee in basis points
25
+ /// @param specifiedAmount the amount remaining to be used for the swap
26
+ /// @param isExactInput true if specifiedAmount refers to input amount, false if specifiedAmount refers to output amount
27
+ /// @param isToken0 true if specifiedAmount is in token0, false if specifiedAmount is in token1
28
+ /// @return usedAmount actual amount to be used for the swap
29
+ /// @return returnedAmount output qty to be accumulated if isExactInput = true, input qty if isExactInput = false
30
+ /// @return deltaL collected swap fee, to be incremented to reinvest liquidity
31
+ /// @return nextSqrtP the new sqrt price after the computed swap step
32
+ function computeSwapStep(
33
+ uint256 liquidity,
34
+ uint160 currentSqrtP,
35
+ uint160 targetSqrtP,
36
+ uint256 feeInFeeUnits,
37
+ int256 specifiedAmount,
38
+ bool isExactInput,
39
+ bool isToken0
40
+ ) internal pure returns (int256 usedAmount, int256 returnedAmount, uint256 deltaL, uint160 nextSqrtP) {
41
+ // in the event currentSqrtP == targetSqrtP because of tick movements, return
42
+ // eg. swapped up tick where specified price limit is on an initialised tick
43
+ // then swapping down tick will cause next tick to be the same as the current tick
44
+ if (currentSqrtP == targetSqrtP) return (0, 0, 0, currentSqrtP);
45
+ usedAmount = calcReachAmount(liquidity, currentSqrtP, targetSqrtP, feeInFeeUnits, isExactInput, isToken0);
46
+
47
+ if ((isExactInput && usedAmount > specifiedAmount) || (!isExactInput && usedAmount <= specifiedAmount)) {
48
+ usedAmount = specifiedAmount;
49
+ } else {
50
+ nextSqrtP = targetSqrtP;
51
+ }
52
+
53
+ uint256 absDelta = usedAmount >= 0 ? uint256(usedAmount) : usedAmount.revToUint256();
54
+ if (nextSqrtP == 0) {
55
+ deltaL = estimateIncrementalLiquidity(
56
+ absDelta,
57
+ liquidity,
58
+ currentSqrtP,
59
+ feeInFeeUnits,
60
+ isExactInput,
61
+ isToken0
62
+ );
63
+ nextSqrtP = calcFinalPrice(absDelta, liquidity, deltaL, currentSqrtP, isExactInput, isToken0).toUint160();
64
+ } else {
65
+ deltaL = calcIncrementalLiquidity(absDelta, liquidity, currentSqrtP, nextSqrtP, isExactInput, isToken0);
66
+ }
67
+ returnedAmount = calcReturnedAmount(liquidity, currentSqrtP, nextSqrtP, deltaL, isExactInput, isToken0);
68
+ }
69
+
70
+ /// @dev calculates the amount needed to reach targetSqrtP from currentSqrtP
71
+ /// @dev we cast currentSqrtP and targetSqrtP to uint256 as they are multiplied by TWO_FEE_UNITS or feeInFeeUnits
72
+ function calcReachAmount(
73
+ uint256 liquidity,
74
+ uint256 currentSqrtP,
75
+ uint256 targetSqrtP,
76
+ uint256 feeInFeeUnits,
77
+ bool isExactInput,
78
+ bool isToken0
79
+ ) internal pure returns (int256 reachAmount) {
80
+ uint256 absPriceDiff;
81
+ unchecked {
82
+ absPriceDiff = (currentSqrtP >= targetSqrtP) ? (currentSqrtP - targetSqrtP) : (targetSqrtP - currentSqrtP);
83
+ }
84
+ if (isExactInput) {
85
+ // we round down so that we avoid taking giving away too much for the specified input
86
+ // ie. require less input qty to move ticks
87
+ if (isToken0) {
88
+ // numerator = 2 * liquidity * absPriceDiff
89
+ // denominator = currentSqrtP * (2 * targetSqrtP - currentSqrtP * feeInFeeUnits / FEE_UNITS)
90
+ // overflow should not happen because the absPriceDiff is capped to ~5%
91
+ uint256 denominator = C.TWO_FEE_UNITS * targetSqrtP - feeInFeeUnits * currentSqrtP;
92
+ uint256 numerator = FullMath.mulDivFloor(liquidity, C.TWO_FEE_UNITS * absPriceDiff, denominator);
93
+ reachAmount = FullMath.mulDivFloor(numerator, C.TWO_POW_96, currentSqrtP).toInt256();
94
+ } else {
95
+ // numerator = 2 * liquidity * absPriceDiff * currentSqrtP
96
+ // denominator = 2 * currentSqrtP - targetSqrtP * feeInFeeUnits / FEE_UNITS
97
+ // overflow should not happen because the absPriceDiff is capped to ~5%
98
+ uint256 denominator = C.TWO_FEE_UNITS * currentSqrtP - feeInFeeUnits * targetSqrtP;
99
+ uint256 numerator = FullMath.mulDivFloor(liquidity, C.TWO_FEE_UNITS * absPriceDiff, denominator);
100
+ reachAmount = FullMath.mulDivFloor(numerator, currentSqrtP, C.TWO_POW_96).toInt256();
101
+ }
102
+ } else {
103
+ // we will perform negation as the last step
104
+ // we round down so that we require less output qty to move ticks
105
+ if (isToken0) {
106
+ // numerator: (liquidity)(absPriceDiff)(2 * currentSqrtP - deltaL * (currentSqrtP + targetSqrtP))
107
+ // denominator: (currentSqrtP * targetSqrtP) * (2 * currentSqrtP - deltaL * targetSqrtP)
108
+ // overflow should not happen because the absPriceDiff is capped to ~5%
109
+ uint256 denominator = C.TWO_FEE_UNITS * currentSqrtP - feeInFeeUnits * targetSqrtP;
110
+ uint256 numerator = denominator - feeInFeeUnits * currentSqrtP;
111
+ numerator = FullMath.mulDivFloor(liquidity << C.RES_96, numerator, denominator);
112
+ reachAmount = (FullMath.mulDivFloor(numerator, absPriceDiff, currentSqrtP) / targetSqrtP).revToInt256();
113
+ } else {
114
+ // numerator: liquidity * absPriceDiff * (TWO_FEE_UNITS * targetSqrtP - feeInFeeUnits * (targetSqrtP + currentSqrtP))
115
+ // denominator: (TWO_FEE_UNITS * targetSqrtP - feeInFeeUnits * currentSqrtP)
116
+ // overflow should not happen because the absPriceDiff is capped to ~5%
117
+ uint256 denominator = C.TWO_FEE_UNITS * targetSqrtP - feeInFeeUnits * currentSqrtP;
118
+ uint256 numerator = denominator - feeInFeeUnits * targetSqrtP;
119
+ numerator = FullMath.mulDivFloor(liquidity, numerator, denominator);
120
+ reachAmount = FullMath.mulDivFloor(numerator, absPriceDiff, C.TWO_POW_96).revToInt256();
121
+ }
122
+ }
123
+ }
124
+
125
+ /// @dev estimates deltaL, the swap fee to be collected based on amount specified
126
+ /// for the final swap step to be performed,
127
+ /// where the next (temporary) tick will not be crossed
128
+ function estimateIncrementalLiquidity(
129
+ uint256 absDelta,
130
+ uint256 liquidity,
131
+ uint160 currentSqrtP,
132
+ uint256 feeInFeeUnits,
133
+ bool isExactInput,
134
+ bool isToken0
135
+ ) internal pure returns (uint256 deltaL) {
136
+ if (isExactInput) {
137
+ if (isToken0) {
138
+ // deltaL = feeInFeeUnits * absDelta * currentSqrtP / 2
139
+ deltaL = FullMath.mulDivFloor(currentSqrtP, absDelta * feeInFeeUnits, C.TWO_FEE_UNITS << C.RES_96);
140
+ } else {
141
+ // deltaL = feeInFeeUnits * absDelta * / (currentSqrtP * 2)
142
+ // Because nextSqrtP = (liquidity + absDelta / currentSqrtP) * currentSqrtP / (liquidity + deltaL)
143
+ // so we round up deltaL, to round down nextSqrtP
144
+ deltaL = FullMath.mulDivFloor(C.TWO_POW_96, absDelta * feeInFeeUnits, C.TWO_FEE_UNITS * currentSqrtP);
145
+ }
146
+ } else {
147
+ // obtain the smaller root of the quadratic equation
148
+ // ax^2 - 2bx + c = 0 such that b > 0, and x denotes deltaL
149
+ uint256 a = feeInFeeUnits;
150
+ uint256 b = (C.FEE_UNITS - feeInFeeUnits) * liquidity;
151
+ uint256 c = feeInFeeUnits * liquidity * absDelta;
152
+ if (isToken0) {
153
+ // a = feeInFeeUnits
154
+ // b = (FEE_UNITS - feeInFeeUnits) * liquidity - FEE_UNITS * absDelta * currentSqrtP
155
+ // c = feeInFeeUnits * liquidity * absDelta * currentSqrtP
156
+ b -= FullMath.mulDivFloor(C.FEE_UNITS * absDelta, currentSqrtP, C.TWO_POW_96);
157
+ c = FullMath.mulDivFloor(c, currentSqrtP, C.TWO_POW_96);
158
+ } else {
159
+ // a = feeInFeeUnits
160
+ // b = (FEE_UNITS - feeInFeeUnits) * liquidity - FEE_UNITS * absDelta / currentSqrtP
161
+ // c = liquidity * feeInFeeUnits * absDelta / currentSqrtP
162
+ b -= FullMath.mulDivFloor(C.FEE_UNITS * absDelta, C.TWO_POW_96, currentSqrtP);
163
+ c = FullMath.mulDivFloor(c, C.TWO_POW_96, currentSqrtP);
164
+ }
165
+ deltaL = QuadMath.getSmallerRootOfQuadEqn(a, b, c);
166
+ }
167
+ }
168
+
169
+ /// @dev calculates deltaL, the swap fee to be collected for an intermediate swap step,
170
+ /// where the next (temporary) tick will be crossed
171
+ function calcIncrementalLiquidity(
172
+ uint256 absDelta,
173
+ uint256 liquidity,
174
+ uint160 currentSqrtP,
175
+ uint160 nextSqrtP,
176
+ bool isExactInput,
177
+ bool isToken0
178
+ ) internal pure returns (uint256 deltaL) {
179
+ if (isToken0) {
180
+ // deltaL = nextSqrtP * (liquidity / currentSqrtP +/- absDelta)) - liquidity
181
+ // needs to be minimum
182
+ uint256 tmp1 = FullMath.mulDivFloor(liquidity, C.TWO_POW_96, currentSqrtP);
183
+ uint256 tmp2 = isExactInput ? tmp1 + absDelta : tmp1 - absDelta;
184
+ uint256 tmp3 = FullMath.mulDivFloor(nextSqrtP, tmp2, C.TWO_POW_96);
185
+ // in edge cases where liquidity or absDelta is small
186
+ // liquidity might be greater than nextSqrtP * ((liquidity / currentSqrtP) +/- absDelta))
187
+ // due to rounding
188
+ deltaL = (tmp3 > liquidity) ? tmp3 - liquidity : 0;
189
+ } else {
190
+ // deltaL = (liquidity * currentSqrtP +/- absDelta) / nextSqrtP - liquidity
191
+ // needs to be minimum
192
+ uint256 tmp1 = FullMath.mulDivFloor(liquidity, currentSqrtP, C.TWO_POW_96);
193
+ uint256 tmp2 = isExactInput ? tmp1 + absDelta : tmp1 - absDelta;
194
+ uint256 tmp3 = FullMath.mulDivFloor(tmp2, C.TWO_POW_96, nextSqrtP);
195
+ // in edge cases where liquidity or absDelta is small
196
+ // liquidity might be greater than nextSqrtP * ((liquidity / currentSqrtP) +/- absDelta))
197
+ // due to rounding
198
+ deltaL = (tmp3 > liquidity) ? tmp3 - liquidity : 0;
199
+ }
200
+ }
201
+
202
+ /// @dev calculates the sqrt price of the final swap step
203
+ /// where the next (temporary) tick will not be crossed
204
+ function calcFinalPrice(
205
+ uint256 absDelta,
206
+ uint256 liquidity,
207
+ uint256 deltaL,
208
+ uint160 currentSqrtP,
209
+ bool isExactInput,
210
+ bool isToken0
211
+ ) internal pure returns (uint256) {
212
+ if (isToken0) {
213
+ // if isExactInput: swap 0 -> 1, sqrtP decreases, we round up
214
+ // else swap: 1 -> 0, sqrtP increases, we round down
215
+ uint256 tmp = FullMath.mulDivFloor(absDelta, currentSqrtP, C.TWO_POW_96);
216
+ if (isExactInput) {
217
+ return FullMath.mulDivCeiling(liquidity + deltaL, currentSqrtP, liquidity + tmp);
218
+ } else {
219
+ return FullMath.mulDivFloor(liquidity + deltaL, currentSqrtP, liquidity - tmp);
220
+ }
221
+ } else {
222
+ // if isExactInput: swap 1 -> 0, sqrtP increases, we round down
223
+ // else swap: 0 -> 1, sqrtP decreases, we round up
224
+ uint256 tmp = FullMath.mulDivFloor(absDelta, C.TWO_POW_96, currentSqrtP);
225
+ if (isExactInput) {
226
+ return FullMath.mulDivFloor(liquidity + tmp, currentSqrtP, liquidity + deltaL);
227
+ } else {
228
+ return FullMath.mulDivCeiling(liquidity - tmp, currentSqrtP, liquidity + deltaL);
229
+ }
230
+ }
231
+ }
232
+
233
+ /// @dev calculates returned output | input tokens in exchange for specified amount
234
+ /// @dev round down when calculating returned output (isExactInput) so we avoid sending too much
235
+ /// @dev round up when calculating returned input (!isExactInput) so we get desired output amount
236
+ function calcReturnedAmount(
237
+ uint256 liquidity,
238
+ uint160 currentSqrtP,
239
+ uint160 nextSqrtP,
240
+ uint256 deltaL,
241
+ bool isExactInput,
242
+ bool isToken0
243
+ ) internal pure returns (int256 returnedAmount) {
244
+ if (isToken0) {
245
+ if (isExactInput) {
246
+ // minimise actual output (<0, make less negative) so we avoid sending too much
247
+ // returnedAmount = deltaL * nextSqrtP - liquidity * (currentSqrtP - nextSqrtP)
248
+ returnedAmount =
249
+ FullMath.mulDivCeiling(deltaL, nextSqrtP, C.TWO_POW_96).toInt256() +
250
+ FullMath.mulDivFloor(liquidity, currentSqrtP - nextSqrtP, C.TWO_POW_96).revToInt256();
251
+ } else {
252
+ // maximise actual input (>0) so we get desired output amount
253
+ // returnedAmount = deltaL * nextSqrtP + liquidity * (nextSqrtP - currentSqrtP)
254
+ returnedAmount =
255
+ FullMath.mulDivCeiling(deltaL, nextSqrtP, C.TWO_POW_96).toInt256() +
256
+ FullMath.mulDivCeiling(liquidity, nextSqrtP - currentSqrtP, C.TWO_POW_96).toInt256();
257
+ }
258
+ } else {
259
+ // returnedAmount = (liquidity + deltaL)/nextSqrtP - (liquidity)/currentSqrtP
260
+ // if exactInput, minimise actual output (<0, make less negative) so we avoid sending too much
261
+ // if exactOutput, maximise actual input (>0) so we get desired output amount
262
+ returnedAmount =
263
+ FullMath.mulDivCeiling(liquidity + deltaL, C.TWO_POW_96, nextSqrtP).toInt256() +
264
+ FullMath.mulDivFloor(liquidity, C.TWO_POW_96, currentSqrtP).revToInt256();
265
+ }
266
+
267
+ if (isExactInput && returnedAmount == 1) {
268
+ // rounding make returnedAmount == 1
269
+ returnedAmount = 0;
270
+ }
271
+ }
272
+ }
@@ -0,0 +1,223 @@
1
+ // SPDX-License-Identifier: GPL-2.0-or-later
2
+ pragma solidity >=0.8.0;
3
+
4
+ /**
5
+ * --------- [DIRECT COPIED FROM KYBERSWAP] ---------
6
+ */
7
+
8
+ /// @title Math library for computing sqrt prices from ticks and vice versa
9
+ /// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
10
+ /// prices between 2**-128 and 2**128
11
+ library TickMath {
12
+ /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
13
+ int24 internal constant MIN_TICK = -887272;
14
+ /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
15
+ int24 internal constant MAX_TICK = -MIN_TICK;
16
+
17
+ /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
18
+ uint160 internal constant MIN_SQRT_RATIO = 4295128739;
19
+ /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
20
+ uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
21
+
22
+ /// @notice Calculates sqrt(1.0001^tick) * 2^96
23
+ /// @dev Throws if |tick| > max tick
24
+ /// @param tick The input tick for the above formula
25
+ /// @return sqrtP A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
26
+ /// at the given tick
27
+ function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtP) {
28
+ unchecked {
29
+ uint256 absTick = uint256(tick < 0 ? -int256(tick) : int256(tick));
30
+ require(absTick <= uint256(int256(MAX_TICK)), "T");
31
+
32
+ // do bitwise comparison, if i-th bit is turned on,
33
+ // multiply ratio by hardcoded values of sqrt(1.0001^-(2^i)) * 2^128
34
+ // where 0 <= i <= 19
35
+ uint256 ratio = (absTick & 0x1 != 0)
36
+ ? 0xfffcb933bd6fad37aa2d162d1a594001
37
+ : 0x100000000000000000000000000000000;
38
+ if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
39
+ if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
40
+ if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
41
+ if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
42
+ if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
43
+ if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
44
+ if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
45
+ if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
46
+ if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
47
+ if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
48
+ if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
49
+ if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
50
+ if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
51
+ if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
52
+ if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
53
+ if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
54
+ if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
55
+ if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
56
+ if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;
57
+
58
+ // take reciprocal for positive tick values
59
+ if (tick > 0) ratio = type(uint256).max / ratio;
60
+
61
+ // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
62
+ // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
63
+ // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
64
+ sqrtP = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
65
+ }
66
+ }
67
+
68
+ /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
69
+ /// @dev Throws in case sqrtP < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
70
+ /// ever return.
71
+ /// @param sqrtP The sqrt ratio for which to compute the tick as a Q64.96
72
+ /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
73
+ function getTickAtSqrtRatio(uint160 sqrtP) internal pure returns (int24 tick) {
74
+ // second inequality must be < because the price can never reach the price at the max tick
75
+ require(sqrtP >= MIN_SQRT_RATIO && sqrtP < MAX_SQRT_RATIO, "R");
76
+ uint256 ratio = uint256(sqrtP) << 32;
77
+
78
+ uint256 r = ratio;
79
+ uint256 msb = 0;
80
+
81
+ unchecked {
82
+ assembly {
83
+ let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
84
+ msb := or(msb, f)
85
+ r := shr(f, r)
86
+ }
87
+ assembly {
88
+ let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
89
+ msb := or(msb, f)
90
+ r := shr(f, r)
91
+ }
92
+ assembly {
93
+ let f := shl(5, gt(r, 0xFFFFFFFF))
94
+ msb := or(msb, f)
95
+ r := shr(f, r)
96
+ }
97
+ assembly {
98
+ let f := shl(4, gt(r, 0xFFFF))
99
+ msb := or(msb, f)
100
+ r := shr(f, r)
101
+ }
102
+ assembly {
103
+ let f := shl(3, gt(r, 0xFF))
104
+ msb := or(msb, f)
105
+ r := shr(f, r)
106
+ }
107
+ assembly {
108
+ let f := shl(2, gt(r, 0xF))
109
+ msb := or(msb, f)
110
+ r := shr(f, r)
111
+ }
112
+ assembly {
113
+ let f := shl(1, gt(r, 0x3))
114
+ msb := or(msb, f)
115
+ r := shr(f, r)
116
+ }
117
+ assembly {
118
+ let f := gt(r, 0x1)
119
+ msb := or(msb, f)
120
+ }
121
+
122
+ if (msb >= 128) r = ratio >> (msb - 127);
123
+ else r = ratio << (127 - msb);
124
+
125
+ int256 log_2 = (int256(msb) - 128) << 64;
126
+
127
+ assembly {
128
+ r := shr(127, mul(r, r))
129
+ let f := shr(128, r)
130
+ log_2 := or(log_2, shl(63, f))
131
+ r := shr(f, r)
132
+ }
133
+ assembly {
134
+ r := shr(127, mul(r, r))
135
+ let f := shr(128, r)
136
+ log_2 := or(log_2, shl(62, f))
137
+ r := shr(f, r)
138
+ }
139
+ assembly {
140
+ r := shr(127, mul(r, r))
141
+ let f := shr(128, r)
142
+ log_2 := or(log_2, shl(61, f))
143
+ r := shr(f, r)
144
+ }
145
+ assembly {
146
+ r := shr(127, mul(r, r))
147
+ let f := shr(128, r)
148
+ log_2 := or(log_2, shl(60, f))
149
+ r := shr(f, r)
150
+ }
151
+ assembly {
152
+ r := shr(127, mul(r, r))
153
+ let f := shr(128, r)
154
+ log_2 := or(log_2, shl(59, f))
155
+ r := shr(f, r)
156
+ }
157
+ assembly {
158
+ r := shr(127, mul(r, r))
159
+ let f := shr(128, r)
160
+ log_2 := or(log_2, shl(58, f))
161
+ r := shr(f, r)
162
+ }
163
+ assembly {
164
+ r := shr(127, mul(r, r))
165
+ let f := shr(128, r)
166
+ log_2 := or(log_2, shl(57, f))
167
+ r := shr(f, r)
168
+ }
169
+ assembly {
170
+ r := shr(127, mul(r, r))
171
+ let f := shr(128, r)
172
+ log_2 := or(log_2, shl(56, f))
173
+ r := shr(f, r)
174
+ }
175
+ assembly {
176
+ r := shr(127, mul(r, r))
177
+ let f := shr(128, r)
178
+ log_2 := or(log_2, shl(55, f))
179
+ r := shr(f, r)
180
+ }
181
+ assembly {
182
+ r := shr(127, mul(r, r))
183
+ let f := shr(128, r)
184
+ log_2 := or(log_2, shl(54, f))
185
+ r := shr(f, r)
186
+ }
187
+ assembly {
188
+ r := shr(127, mul(r, r))
189
+ let f := shr(128, r)
190
+ log_2 := or(log_2, shl(53, f))
191
+ r := shr(f, r)
192
+ }
193
+ assembly {
194
+ r := shr(127, mul(r, r))
195
+ let f := shr(128, r)
196
+ log_2 := or(log_2, shl(52, f))
197
+ r := shr(f, r)
198
+ }
199
+ assembly {
200
+ r := shr(127, mul(r, r))
201
+ let f := shr(128, r)
202
+ log_2 := or(log_2, shl(51, f))
203
+ r := shr(f, r)
204
+ }
205
+ assembly {
206
+ r := shr(127, mul(r, r))
207
+ let f := shr(128, r)
208
+ log_2 := or(log_2, shl(50, f))
209
+ }
210
+
211
+ int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number
212
+
213
+ int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
214
+ int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);
215
+
216
+ tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtP ? tickHi : tickLow;
217
+ }
218
+ }
219
+
220
+ function getMaxNumberTicks(int24 _tickDistance) internal pure returns (uint24 numTicks) {
221
+ return uint24(TickMath.MAX_TICK / _tickDistance) * 2;
222
+ }
223
+ }
@@ -0,0 +1,26 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
5
+ import "../../../libraries/BoringOwnableUpgradeable.sol";
6
+ import "../../../../interfaces/IPPriceFeed.sol";
7
+ import "../../../../interfaces/IPOffchainStorage.sol";
8
+
9
+ contract MlpPricingHelper is BoringOwnableUpgradeable, UUPSUpgradeable, IPPriceFeed {
10
+ address public immutable pendleStorage;
11
+ bytes32 public constant KEY = keccak256("MLP.price");
12
+
13
+ constructor(address _pendleStorage) initializer {
14
+ pendleStorage = _pendleStorage;
15
+ }
16
+
17
+ function initialize() external initializer {
18
+ __BoringOwnable_init();
19
+ }
20
+
21
+ function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
22
+
23
+ function getPrice() external view returns (uint256) {
24
+ return IPOffchainStorage(pendleStorage).getUint256(KEY);
25
+ }
26
+ }