@pendle/core-v2 3.0.0 → 4.0.1

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 (695) 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/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
  16. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  18. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  22. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  27. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  33. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  34. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  36. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  38. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +2 -2
  40. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  43. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  44. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  45. package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
  48. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
  50. package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.json +2 -2
  52. package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.json +2 -2
  54. package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.json +2 -2
  56. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  60. package/build/artifacts/contracts/core/StandardizedYield/SYBaseUpg.sol/SYBaseUpg.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  62. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewardsUpg.sol/SYBaseWithRewardsUpg.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.dbg.json +4 -0
  66. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.json +1057 -0
  67. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol/AaveAdapterLib.dbg.json +4 -0
  68. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol/AaveAdapterLib.json +10 -0
  69. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol/WadRayMath.dbg.json +4 -0
  70. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol/WadRayMath.json +10 -0
  71. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
  73. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
  75. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
  76. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
  77. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
  78. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
  79. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.json +2 -2
  81. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
  83. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
  85. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
  86. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
  87. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
  88. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
  89. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
  90. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
  91. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
  92. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
  93. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
  94. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
  95. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol/ComposableStablePreviewProxy.dbg.json +1 -1
  96. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol/ComposableStablePreviewV4.dbg.json +1 -1
  97. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol/ComposableStablePreviewV5.dbg.json +1 -1
  98. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
  99. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
  100. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
  101. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
  102. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
  103. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
  104. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
  105. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol/PendleAuraBalancerStableLPSYV3Upg.dbg.json +1 -1
  106. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
  107. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +1 -1
  108. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  109. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  110. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  111. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  112. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
  113. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.json +2 -2
  114. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
  115. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.json +2 -2
  116. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
  117. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
  118. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.json +2 -2
  119. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
  120. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
  121. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
  122. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
  123. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol/PendleChainlinkRelayer.dbg.json +1 -1
  124. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  125. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
  126. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  127. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
  128. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
  129. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
  130. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
  131. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  132. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
  133. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
  134. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
  135. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
  136. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
  137. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/GMTokenPricingHelper.dbg.json +1 -1
  138. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2DataStore.dbg.json +1 -1
  139. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2Oracle.dbg.json +1 -1
  140. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2Reader.dbg.json +1 -1
  141. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.dbg.json +1 -1
  142. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.json +2 -2
  143. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
  144. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
  145. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol/HLPPricingHelper.dbg.json +1 -1
  146. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
  147. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
  148. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol/KyberMathHelper.dbg.json +1 -1
  149. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol/KyberNftManagerBaseUpg.dbg.json +1 -1
  150. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.dbg.json +1 -1
  151. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.json +2 -2
  152. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/FullMath.sol/FullMath.dbg.json +1 -1
  153. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiqDeltaMath.sol/LiqDeltaMath.dbg.json +1 -1
  154. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiquidityMath.sol/LiquidityMath.dbg.json +1 -1
  155. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/MathConstants.sol/MathConstants.dbg.json +1 -1
  156. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/QtyDeltaMath.sol/QtyDeltaMath.dbg.json +1 -1
  157. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/QuadMath.sol/QuadMath.dbg.json +1 -1
  158. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/ReinvestmentMath.sol/ReinvestmentMath.dbg.json +1 -1
  159. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/SafeCast.sol/SafeCast.dbg.json +1 -1
  160. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/SwapMath.sol/SwapMath.dbg.json +1 -1
  161. package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/TickMath.sol/TickMath.dbg.json +1 -1
  162. package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/MlpPricingHelper.sol/MlpPricingHelper.dbg.json +1 -1
  163. package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.dbg.json +1 -1
  164. package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.json +2 -2
  165. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
  166. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
  167. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
  168. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
  169. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
  170. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
  171. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
  172. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
  173. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
  174. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
  175. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
  176. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
  177. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
  178. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
  179. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  180. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
  181. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
  182. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
  183. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
  184. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
  185. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
  186. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +2 -2
  187. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  188. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  189. package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.dbg.json +1 -1
  190. package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.json +2 -2
  191. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
  192. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
  193. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
  194. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
  195. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
  196. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
  197. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
  198. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
  199. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
  200. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
  201. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  202. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  203. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  204. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  205. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  206. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  207. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  208. package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
  209. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
  210. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
  211. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
  212. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
  213. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
  214. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
  215. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  216. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  217. package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +1 -1
  218. package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.dbg.json +1 -1
  219. package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
  220. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  221. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  222. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  223. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  224. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  225. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -50
  226. package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
  227. package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
  228. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  229. package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
  230. package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
  231. package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3AToken.sol/IAaveV3AToken.dbg.json +4 -0
  232. package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3AToken.sol/IAaveV3AToken.json +99 -0
  233. package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3Pool.sol/IAaveV3Pool.dbg.json +4 -0
  234. package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3Pool.sol/IAaveV3Pool.json +87 -0
  235. package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
  236. package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
  237. package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
  238. package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
  239. package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
  240. package/build/artifacts/contracts/interfaces/Balancer/IPComposableStablePreview.sol/IPComposableStablePreview.dbg.json +1 -1
  241. package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
  242. package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
  243. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
  244. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
  245. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
  246. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
  247. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
  248. package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
  249. package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
  250. package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.dbg.json +1 -1
  251. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  252. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  253. package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
  254. package/build/artifacts/contracts/interfaces/Flux/IFluxErc20.sol/IFluxErc20.dbg.json +1 -1
  255. package/build/artifacts/contracts/interfaces/Flux/IFluxInterestRateModel.sol/IFluxInterestRateModel.dbg.json +1 -1
  256. package/build/artifacts/contracts/interfaces/GMX/IGMXPriceHelper.sol/IGMXPriceHelper.dbg.json +1 -1
  257. package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
  258. package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
  259. package/build/artifacts/contracts/interfaces/HMX/IHLPStaking.sol/IHLPStaking.dbg.json +1 -1
  260. package/build/artifacts/contracts/interfaces/HMX/IHMXCalculator.sol/IHMXCalculator.dbg.json +1 -1
  261. package/build/artifacts/contracts/interfaces/HMX/IHMXCompounder.sol/IHMXCompounder.dbg.json +1 -1
  262. package/build/artifacts/contracts/interfaces/HMX/IHMXStaking.sol/IHMXStaking.dbg.json +1 -1
  263. package/build/artifacts/contracts/interfaces/HMX/IHMXVester.sol/IHMXVester.dbg.json +1 -1
  264. package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
  265. package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
  266. package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.dbg.json +4 -0
  267. package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.json +59 -0
  268. package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +1 -1
  269. package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
  270. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  271. package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
  272. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +4 -0
  273. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.json +2614 -0
  274. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +4 -0
  275. package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.json +68 -0
  276. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  277. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  278. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  279. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  280. package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +4 -0
  281. package/build/artifacts/contracts/interfaces/{IPActionMintRedeem.sol/IPActionMintRedeem.json → IPActionMiscV3.sol/IPActionMiscV3.json} +269 -22
  282. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  283. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +4 -0
  284. package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.json +1185 -0
  285. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +4 -0
  286. package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.json +1364 -0
  287. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +4 -0
  288. package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +6215 -0
  289. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
  290. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +1 -1
  291. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +1 -1
  292. package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
  293. package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
  294. package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
  295. package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
  296. package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
  297. package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
  298. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +4 -0
  299. package/build/artifacts/contracts/{router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json → interfaces/IPLimitRouter.sol/IPLimitOrderType.json} +2 -2
  300. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +4 -0
  301. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +553 -0
  302. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +4 -0
  303. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.json +45 -0
  304. package/build/artifacts/contracts/interfaces/IPLinearDistributor.sol/IPLinearDistributor.dbg.json +1 -1
  305. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  306. package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
  307. package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +1 -1
  308. package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +1 -1
  309. package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
  310. package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
  311. package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
  312. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  313. package/build/artifacts/contracts/interfaces/IPPtOracle.sol/IPPtOracle.dbg.json +1 -1
  314. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
  315. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.json +0 -25
  316. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  317. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  318. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  319. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  320. package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
  321. package/build/artifacts/contracts/interfaces/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
  322. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  323. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  324. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  325. package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
  326. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  327. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  328. package/build/artifacts/contracts/interfaces/IStargateLP.sol/IStargateLP.dbg.json +1 -1
  329. package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
  330. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  331. package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticFactory.sol/IKyberElasticFactory.dbg.json +1 -1
  332. package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticPool.sol/IKyberElasticPool.dbg.json +1 -1
  333. package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticRouter.sol/IKyberElasticRouter.dbg.json +1 -1
  334. package/build/artifacts/contracts/interfaces/Kyber/IKyberLiquidityMining.sol/IKyberLiquidityMining.dbg.json +1 -1
  335. package/build/artifacts/contracts/interfaces/Kyber/IKyberMathHelper.sol/IKyberMathHelper.dbg.json +1 -1
  336. package/build/artifacts/contracts/interfaces/Kyber/IKyberPositionManager.sol/IKyberPositionManager.dbg.json +1 -1
  337. package/build/artifacts/contracts/interfaces/Lybra/IEUSD.sol/IEUSD.dbg.json +1 -1
  338. package/build/artifacts/contracts/interfaces/MUX/IMUXRewardRouter.sol/IMUXRewardRouter.dbg.json +1 -1
  339. package/build/artifacts/contracts/interfaces/Silo/ISilo.sol/ISilo.dbg.json +1 -1
  340. package/build/artifacts/contracts/interfaces/Silo/ISiloIncentiveController.sol/ISiloIncentiveController.dbg.json +1 -1
  341. package/build/artifacts/contracts/interfaces/Silo/ISiloLens.sol/ISiloLens.dbg.json +1 -1
  342. package/build/artifacts/contracts/interfaces/Stader/IStaderStakeManager.sol/IStaderStakeManager.dbg.json +1 -1
  343. package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
  344. package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
  345. package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
  346. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +4 -0
  347. package/build/artifacts/contracts/{core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json → limit/LimitMathCore.sol/LimitMathCore.json} +4 -4
  348. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +4 -0
  349. package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.json +845 -0
  350. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +4 -0
  351. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +872 -0
  352. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +4 -0
  353. package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.json +99 -0
  354. package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
  355. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
  356. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
  357. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
  358. package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
  359. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  360. package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  361. package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  362. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  363. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  364. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +4 -0
  365. package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +10 -0
  366. package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
  367. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
  368. package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
  369. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +4 -0
  370. package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +174 -0
  371. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
  372. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
  373. package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
  374. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
  375. package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
  376. package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
  377. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
  378. package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +84 -0
  379. package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
  380. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  381. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  382. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
  383. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
  384. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
  385. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
  386. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
  387. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
  388. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
  389. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
  390. package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
  391. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +4 -0
  392. package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2810 -0
  393. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +4 -0
  394. package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +116 -0
  395. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +4 -0
  396. package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +1016 -0
  397. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +4 -0
  398. package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +1323 -0
  399. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +4 -0
  400. package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +1518 -0
  401. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
  402. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +3 -33
  403. package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +4 -0
  404. package/build/artifacts/contracts/{interfaces/IPActionSwapPT.sol/IPActionSwapPT.json → router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.json} +163 -226
  405. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +4 -0
  406. package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +179 -0
  407. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +4 -0
  408. package/build/artifacts/contracts/{offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.json → router/base/ActionBase.sol/ActionBase.json} +2 -2
  409. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  410. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  411. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  412. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  413. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  414. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapBase.dbg.json +1 -1
  415. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.dbg.json +1 -1
  416. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.json +2 -2
  417. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.dbg.json +1 -1
  418. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.json +2 -2
  419. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
  420. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutorOptimistic.sol/IAggregationExecutorOptimistic.dbg.json +1 -1
  421. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
  422. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol/IExecutorHelperL2.dbg.json +1 -1
  423. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
  424. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol/InputScalingHelper.dbg.json +1 -1
  425. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
  426. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/BytesHelper.sol/BytesHelper.dbg.json +1 -1
  427. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol/CalldataReader.dbg.json +1 -1
  428. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol/CalldataWriter.dbg.json +1 -1
  429. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol/Common.dbg.json +1 -1
  430. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol/DexScaler.dbg.json +1 -1
  431. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol/ExecutorReader.dbg.json +1 -1
  432. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol/InputScalingHelperL2.dbg.json +1 -1
  433. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol/ScalingDataL2Lib.dbg.json +1 -1
  434. package/build/artifacts/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
  435. package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
  436. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +11 -7
  437. package/contracts/core/StandardizedYield/SYBase.sol +1 -0
  438. package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +94 -0
  439. package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol +19 -0
  440. package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol +126 -0
  441. package/contracts/core/libraries/Errors.sol +2 -3
  442. package/contracts/core/libraries/TokenHelper.sol +2 -0
  443. package/contracts/interfaces/AaveV3/IAaveV3AToken.sol +15 -0
  444. package/contracts/interfaces/AaveV3/IAaveV3Pool.sol +11 -0
  445. package/contracts/interfaces/IDailLikePermit.sol +17 -0
  446. package/contracts/interfaces/{IPActionAddRemoveLiq.sol → IPActionAddRemoveLiqV3.sol} +52 -40
  447. package/contracts/interfaces/IPActionCallbackV3.sol +7 -0
  448. package/contracts/interfaces/{IPActionMintRedeem.sol → IPActionMiscV3.sol} +38 -6
  449. package/contracts/interfaces/IPActionStorageStatic.sol +1 -1
  450. package/contracts/interfaces/{IPActionSwapPT.sol → IPActionSwapPTV3.sol} +21 -31
  451. package/contracts/interfaces/{IPActionSwapYT.sol → IPActionSwapYTV3.sol} +25 -35
  452. package/contracts/interfaces/IPAllActionTypeV3.sol +34 -0
  453. package/contracts/interfaces/IPAllActionV3.sol +19 -0
  454. package/contracts/interfaces/IPBulkSeller.sol +7 -1
  455. package/contracts/interfaces/IPLimitRouter.sol +120 -0
  456. package/contracts/interfaces/IPRouterHelper.sol +6 -8
  457. package/contracts/limit/LimitMathCore.sol +158 -0
  458. package/contracts/limit/LimitRouterBase.sol +442 -0
  459. package/contracts/limit/PendleLimitRouter.sol +65 -0
  460. package/contracts/limit/helpers/NonceManager.sol +30 -0
  461. package/contracts/offchain-helpers/BytesLib.sol +551 -0
  462. package/contracts/offchain-helpers/LimitBackendHelper.sol +109 -0
  463. package/contracts/offchain-helpers/SimulateHelper.sol +40 -0
  464. package/contracts/oracles/PendlePtOracle.sol +3 -2
  465. package/contracts/router/ActionAddRemoveLiqV3.sol +504 -0
  466. package/contracts/router/ActionCallbackV3.sol +141 -0
  467. package/contracts/router/ActionMiscV3.sol +164 -0
  468. package/contracts/router/ActionSwapPTV3.sol +87 -0
  469. package/contracts/router/ActionSwapYTV3.sol +240 -0
  470. package/contracts/router/PendleRouterHelper.sol +56 -14
  471. package/contracts/router/PendleRouterV3.sol +235 -0
  472. package/contracts/router/base/ActionBase.sol +289 -0
  473. package/contracts/router/base/CallbackHelper.sol +20 -81
  474. package/contracts/router/base/MarketApproxLib.sol +124 -99
  475. package/deployments/1-core.json +5 -3
  476. package/deployments/10-core.json +5 -3
  477. package/deployments/42161-core.json +6 -3
  478. package/deployments/42161-markets/AAVE-USDC-JUNE2024.json +11 -0
  479. package/deployments/42161-markets/WSTETH-ARBITRUM-MARCH2024.json +11 -0
  480. package/deployments/42161-markets/WSTETHSILO-ETH-MARCH2024.json +11 -0
  481. package/deployments/56-core.json +5 -3
  482. package/deployments/merkle-distribution/2023-11-30.json +7730 -0
  483. package/deployments/merkle-distribution/2023-12-28.json +8225 -0
  484. package/package.json +5 -5
  485. package/typechain-types/ActionAddRemoveLiqV3.ts +10 -7
  486. package/typechain-types/ActionCallbackV3.ts +164 -0
  487. package/typechain-types/ActionMarketCoreStatic.ts +18 -63
  488. package/typechain-types/ActionMintRedeemStatic.ts +10 -102
  489. package/typechain-types/ActionMiscV3.ts +36 -75
  490. package/typechain-types/ActionStorageStatic.ts +0 -55
  491. package/typechain-types/ActionSwapPTV3.ts +8 -5
  492. package/typechain-types/ActionSwapYTV3.ts +8 -49
  493. package/typechain-types/IAaveV3AToken.ts +204 -0
  494. package/typechain-types/IAaveV3Pool.ts +192 -0
  495. package/typechain-types/IPActionAddRemoveLiqV3.ts +10 -7
  496. package/typechain-types/IPActionCallbackV3.ts +164 -0
  497. package/typechain-types/IPActionMiscV3.ts +36 -75
  498. package/typechain-types/IPActionSwapPTV3.ts +8 -5
  499. package/typechain-types/IPActionSwapYTV3.ts +8 -5
  500. package/typechain-types/IPAllActionV3.ts +103 -90
  501. package/typechain-types/IPLimitRouter.ts +93 -98
  502. package/typechain-types/IPLimitRouterCallback.ts +120 -0
  503. package/typechain-types/IPRouterHelper.ts +6 -19
  504. package/typechain-types/LimitBackendHelper.ts +287 -0
  505. package/typechain-types/LimitRouterBase.ts +981 -0
  506. package/typechain-types/PendleAaveV3SY.ts +1310 -0
  507. package/typechain-types/PendleLimitRouter.ts +238 -127
  508. package/typechain-types/PendleOrderMixin.ts +292 -92
  509. package/typechain-types/PendleRouterHelper.ts +7 -23
  510. package/typechain-types/SimulateHelper.ts +42 -35
  511. package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +43 -13
  512. package/typechain-types/factories/ActionCallbackV3__factory.ts +169 -0
  513. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  514. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  515. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -46
  516. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -102
  517. package/typechain-types/factories/ActionMiscV3__factory.ts +35 -59
  518. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -27
  519. package/typechain-types/factories/ActionSwapPTV3__factory.ts +29 -9
  520. package/typechain-types/factories/ActionSwapYTV3__factory.ts +29 -64
  521. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  522. package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
  523. package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
  524. package/typechain-types/factories/AuraWethVethSYUpg__factory.ts +1 -1
  525. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  526. package/typechain-types/factories/CamelotRewardHelper__factory.ts +1 -1
  527. package/typechain-types/factories/CamelotV1VolatilePreview__factory.ts +1 -1
  528. package/typechain-types/factories/Errors__factory.ts +17 -49
  529. package/typechain-types/factories/IAaveV3AToken__factory.ts +111 -0
  530. package/typechain-types/factories/IAaveV3Pool__factory.ts +99 -0
  531. package/typechain-types/factories/IPActionAddRemoveLiqV3__factory.ts +42 -12
  532. package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
  533. package/typechain-types/factories/IPActionMiscV3__factory.ts +18 -42
  534. package/typechain-types/factories/IPActionSwapPTV3__factory.ts +28 -8
  535. package/typechain-types/factories/IPActionSwapYTV3__factory.ts +28 -8
  536. package/typechain-types/factories/IPAllActionV3__factory.ts +150 -70
  537. package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
  538. package/typechain-types/factories/IPLimitRouter__factory.ts +50 -146
  539. package/typechain-types/factories/IPRouterHelper__factory.ts +0 -25
  540. package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
  541. package/typechain-types/factories/LimitRouterBase__factory.ts +860 -0
  542. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  543. package/typechain-types/factories/PendleAaveV3SY__factory.ts +1130 -0
  544. package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
  545. package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
  546. package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
  547. package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
  548. package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
  549. package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
  550. package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
  551. package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
  552. package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
  553. package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
  554. package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
  555. package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +1 -1
  556. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
  557. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
  558. package/typechain-types/factories/PendleERC4626SY__factory.ts +1 -1
  559. package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
  560. package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
  561. package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
  562. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  563. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  564. package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
  565. package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
  566. package/typechain-types/factories/PendleGMV2TokenSY__factory.ts +1 -1
  567. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  568. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  569. package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
  570. package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
  571. package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1 -1
  572. package/typechain-types/factories/PendleLimitRouter__factory.ts +152 -156
  573. package/typechain-types/factories/PendleLinearDistributor__factory.ts +1 -1
  574. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
  575. package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
  576. package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
  577. package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
  578. package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +1 -1
  579. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  580. package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
  581. package/typechain-types/factories/PendleMarketV3__factory.ts +1 -1
  582. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  583. package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
  584. package/typechain-types/factories/PendleMlpSY__factory.ts +1 -1
  585. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  586. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  587. package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
  588. package/typechain-types/factories/PendleOrderMixin__factory.ts +254 -129
  589. package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
  590. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  591. package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
  592. package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
  593. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  594. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  595. package/typechain-types/factories/PendleRouterHelper__factory.ts +2 -32
  596. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  597. package/typechain-types/factories/PendleRouterV3__factory.ts +10 -1
  598. package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
  599. package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1 -1
  600. package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
  601. package/typechain-types/factories/PendleSwapL1__factory.ts +1 -1
  602. package/typechain-types/factories/PendleSwapL2__factory.ts +1 -1
  603. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  604. package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
  605. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  606. package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
  607. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  608. package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
  609. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  610. package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
  611. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  612. package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
  613. package/typechain-types/factories/SAPE__factory.ts +1 -1
  614. package/typechain-types/factories/SimulateHelper__factory.ts +71 -18
  615. package/typechain-types/factories/SwETHSY__factory.ts +1 -1
  616. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  617. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  618. package/typechain-types/hardhat.d.ts +64 -316
  619. package/typechain-types/index.ts +24 -70
  620. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +0 -4
  621. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +0 -642
  622. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +0 -4
  623. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +0 -521
  624. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +0 -4
  625. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +0 -4
  626. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +0 -1427
  627. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +0 -4
  628. package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +0 -4
  629. package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.json +0 -79
  630. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +0 -4
  631. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +0 -4
  632. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +0 -708
  633. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +0 -4
  634. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +0 -3503
  635. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +0 -4
  636. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +0 -125
  637. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +0 -4
  638. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +0 -30
  639. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +0 -4
  640. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +0 -307
  641. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +0 -4
  642. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +0 -409
  643. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +0 -4
  644. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +0 -1397
  645. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +0 -4
  646. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +0 -348
  647. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +0 -4
  648. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +0 -228
  649. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +0 -4
  650. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +0 -93
  651. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +0 -4
  652. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +0 -4
  653. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +0 -1623
  654. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +0 -4
  655. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +0 -753
  656. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +0 -4
  657. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +0 -79
  658. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +0 -4
  659. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +0 -720
  660. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +0 -4
  661. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +0 -976
  662. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +0 -4
  663. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +0 -190
  664. package/build/artifacts/contracts/router/PendleRouterHelper2.sol/PendleRouterHelper2.dbg.json +0 -4
  665. package/build/artifacts/contracts/router/PendleRouterHelper2.sol/PendleRouterHelper2.json +0 -145
  666. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +0 -4
  667. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -141
  668. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +0 -4
  669. package/contracts/core/BulkSeller/BulkSeller.sol +0 -215
  670. package/contracts/core/BulkSeller/BulkSellerFactory.sol +0 -71
  671. package/contracts/core/BulkSeller/BulkSellerMathCore.sol +0 -126
  672. package/contracts/interfaces/IPActionMisc.sol +0 -23
  673. package/contracts/interfaces/IPAllAction.sol +0 -21
  674. package/contracts/limit/Mock.sol +0 -429
  675. package/contracts/offchain-helpers/BulkSellerOffchain.sol +0 -57
  676. package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +0 -19
  677. package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +0 -111
  678. package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +0 -182
  679. package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +0 -682
  680. package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +0 -171
  681. package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +0 -72
  682. package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +0 -55
  683. package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +0 -21
  684. package/contracts/router/ActionAddRemoveLiq.sol +0 -525
  685. package/contracts/router/ActionMintRedeem.sol +0 -134
  686. package/contracts/router/ActionMisc.sol +0 -51
  687. package/contracts/router/ActionSwapPT.sol +0 -197
  688. package/contracts/router/ActionSwapYT.sol +0 -323
  689. package/contracts/router/PendleRouter.sol +0 -242
  690. package/contracts/router/PendleRouterHelper2.sol +0 -41
  691. package/contracts/router/base/ActionBaseCallback.sol +0 -152
  692. package/contracts/router/base/ActionBaseMintRedeem.sol +0 -182
  693. package/deployments/5000-core.json +0 -31
  694. package/deployments/5000-markets/WSTETH-MANTLE-MARCH2024.json +0 -10
  695. package/deployments/5000-offchain-helper.json +0 -4
@@ -1,525 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity ^0.8.17;
3
-
4
- import "./base/ActionBaseMintRedeem.sol";
5
- import "../interfaces/IPActionAddRemoveLiq.sol";
6
- import "../interfaces/IPMarket.sol";
7
- import "../core/libraries/Errors.sol";
8
-
9
- /**
10
- * @dev If market is expired, all actions will revert, except for the following:
11
- * - removeLiquidityDualSyAndPt()
12
- * - removeLiquidityDualTokenAndPt()
13
- * - removeLiquiditySingleSy()
14
- * - removeLiquiditySingleToken()
15
- * This is because swapping and adding liquidity are not allowed on an expired market.
16
- */
17
- contract ActionAddRemoveLiq is IPActionAddRemoveLiq, ActionBaseMintRedeem {
18
- using PMath for uint256;
19
- using PMath for int256;
20
- using MarketMathCore for MarketState;
21
- using MarketApproxPtInLib for MarketState;
22
- using MarketApproxPtOutLib for MarketState;
23
- using PYIndexLib for IPYieldToken;
24
- using PYIndexLib for PYIndex;
25
-
26
- /**
27
- * @notice Adds liquidity to the SY/PT market, granting LP tokens in return
28
- * @dev Will mint as much LP as possible given no more than `netSyDesired` and `netPtDesired`,
29
- * while not changing the market's price
30
- * @dev Only the necessary SY/PT amount will be transferred
31
- * @dev Reverts if market is expired
32
- */
33
- function addLiquidityDualSyAndPt(
34
- address receiver,
35
- address market,
36
- uint256 netSyDesired,
37
- uint256 netPtDesired,
38
- uint256 minLpOut
39
- ) external returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
40
- (IStandardizedYield SY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
41
-
42
- // calculate the amount of SY and PT to be used
43
- MarketState memory state = IPMarket(market).readState(address(this));
44
- (, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(netSyDesired, netPtDesired, block.timestamp);
45
-
46
- // early-check
47
- if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
48
-
49
- // execute the addLiquidity
50
- _transferFrom(IERC20(SY), msg.sender, market, netSyUsed);
51
- _transferFrom(IERC20(PT), msg.sender, market, netPtUsed);
52
-
53
- (netLpOut, , ) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
54
-
55
- // fail-safe
56
- if (netLpOut < minLpOut) assert(false);
57
-
58
- emit AddLiquidityDualSyAndPt(msg.sender, market, receiver, netSyUsed, netPtUsed, netLpOut);
59
- }
60
-
61
- /**
62
- * @notice Adds liquidity to SY/PT market using PT + any token.
63
- * @dev Input token is first swapped to SY-mintable token using Kyber, then SY is minted from
64
- * such. Finally the SY/PT pair is added to the market
65
- * @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
66
- * @param netPtDesired maximum PT to be used
67
- * @dev Only the necessary PT amount will be transferred
68
- * @dev All SY minted must be used, otherwise the call will revert. Therefore it is recommended
69
- * that `netPtDesired` is slightly higher than actual expected.
70
- * @dev Reverts if market is expired
71
- */
72
- function addLiquidityDualTokenAndPt(
73
- address receiver,
74
- address market,
75
- TokenInput calldata input,
76
- uint256 netPtDesired,
77
- uint256 minLpOut
78
- ) external payable returns (uint256 netLpOut, uint256 netTokenUsed, uint256 netPtUsed) {
79
- (IStandardizedYield SY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
80
-
81
- uint256 netSyDesired = _mintSyFromToken(market, address(SY), 1, input);
82
- uint256 netSyUsed;
83
-
84
- {
85
- // calc the amount of SY and PT to be used
86
- MarketState memory state = IPMarket(market).readState(address(this));
87
- (, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(netSyDesired, netPtDesired, block.timestamp);
88
-
89
- if (netSyDesired != netSyUsed) revert Errors.RouterNotAllSyUsed(netSyDesired, netSyUsed);
90
- if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
91
-
92
- netTokenUsed = input.netTokenIn;
93
- }
94
-
95
- // SY has been minted and transferred to the market
96
- _transferFrom(IERC20(PT), msg.sender, market, netPtUsed);
97
- (netLpOut, , ) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
98
-
99
- // fail-safe
100
- if (netLpOut < minLpOut) assert(false);
101
-
102
- emit AddLiquidityDualTokenAndPt(msg.sender, market, input.tokenIn, receiver, netTokenUsed, netPtUsed, netLpOut);
103
- }
104
-
105
- /**
106
- * @notice Swaps partial PT to SY, then use them to add liquidity to SY/PT pair
107
- * @param netPtIn amount of PT to be transferred in from caller
108
- * @param guessPtSwapToSy approximate info for the swap
109
- * @return netLpOut actual LP output, will not be lower than `minLpOut`
110
- * @return netSyFee amount of SY fee incurred from the swap
111
- * @dev Reverts if market is expired
112
- */
113
- function addLiquiditySinglePt(
114
- address receiver,
115
- address market,
116
- uint256 netPtIn,
117
- uint256 minLpOut,
118
- ApproxParams calldata guessPtSwapToSy
119
- ) external returns (uint256 netLpOut, uint256 netSyFee) {
120
- (, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market).readTokens();
121
-
122
- // calculate the amount of PT to swap
123
- MarketState memory state = IPMarket(market).readState(address(this));
124
-
125
- (uint256 netPtSwap, , ) = state.approxSwapPtToAddLiquidity(
126
- YT.newIndex(),
127
- netPtIn,
128
- block.timestamp,
129
- guessPtSwapToSy
130
- );
131
-
132
- // execute the swap
133
- _transferFrom(IERC20(PT), msg.sender, market, netPtIn);
134
-
135
- uint256 netSyReceived;
136
- (netSyReceived, netSyFee) = IPMarket(market).swapExactPtForSy(market, netPtSwap, EMPTY_BYTES);
137
-
138
- // execute the addLiquidity
139
- (netLpOut, , ) = IPMarket(market).mint(receiver, netSyReceived, netPtIn - netPtSwap);
140
-
141
- if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
142
-
143
- emit AddLiquiditySinglePt(msg.sender, market, receiver, netPtIn, netLpOut);
144
- }
145
-
146
- /**
147
- * @notice Swaps partial SY to PT, then use them to add liquidity to SY/PT pair
148
- * @param netSyIn amount of SY to be transferred in from caller
149
- * @param guessPtReceivedFromSy approx. output PT from the swap
150
- * @return netLpOut actual LP output, will not be lower than `minLpOut`
151
- * @return netSyFee amount of SY fee incurred from the swap
152
- * @dev Reverts if market is expired
153
- */
154
- function addLiquiditySingleSy(
155
- address receiver,
156
- address market,
157
- uint256 netSyIn,
158
- uint256 minLpOut,
159
- ApproxParams calldata guessPtReceivedFromSy
160
- ) external returns (uint256 netLpOut, uint256 netSyFee) {
161
- (IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
162
-
163
- // transfer SY to market
164
- _transferFrom(IERC20(SY), msg.sender, market, netSyIn);
165
-
166
- // mint LP
167
- (netLpOut, netSyFee) = _addLiquiditySingleSy(receiver, market, YT, netSyIn, minLpOut, guessPtReceivedFromSy);
168
-
169
- emit AddLiquiditySingleSy(msg.sender, market, receiver, netSyIn, netLpOut);
170
- }
171
-
172
- /**
173
- * @notice Adds liquidity using a single token input. The input token is first swapped through
174
- * Kyberswap to a SY-mintable token, the rest is the same as `addLiquiditySingleSy()`
175
- * @param guessPtReceivedFromSy approximate PT output for the SY-to-PT swap
176
- * @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
177
- * @return netLpOut actual LP output, will not be lower than `minLpOut`
178
- * @return netSyFee amount of SY fee incurred from the swap
179
- * @dev Reverts if market is expired
180
- */
181
- function addLiquiditySingleToken(
182
- address receiver,
183
- address market,
184
- uint256 minLpOut,
185
- ApproxParams calldata guessPtReceivedFromSy,
186
- TokenInput calldata input
187
- ) external payable returns (uint256 netLpOut, uint256 netSyFee) {
188
- (IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
189
-
190
- // mint SY directly to the market
191
- uint256 netSyUsed = _mintSyFromToken(market, address(SY), 1, input);
192
-
193
- // mint LP
194
- (netLpOut, netSyFee) = _addLiquiditySingleSy(receiver, market, YT, netSyUsed, minLpOut, guessPtReceivedFromSy);
195
-
196
- emit AddLiquiditySingleToken(msg.sender, market, input.tokenIn, receiver, input.netTokenIn, netLpOut);
197
- }
198
-
199
- /**
200
- * @notice Mints partial SY to PT+YT, returns YT to user, then uses PT+SY to add liquidity
201
- * @param netSyIn amount of SY to be transferred in from caller
202
- * @return netLpOut actual LP output, will not be lower than `minLpOut`
203
- * @return netYtOut actual YT output, will not be lower than `minYtOut`
204
- * @dev Reverts if market is expired
205
- */
206
- function addLiquiditySingleSyKeepYt(
207
- address receiver,
208
- address market,
209
- uint256 netSyIn,
210
- uint256 minLpOut,
211
- uint256 minYtOut
212
- ) external returns (uint256 netLpOut, uint256 netYtOut) {
213
- (IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
214
-
215
- _transferIn(address(SY), msg.sender, netSyIn);
216
-
217
- (netLpOut, netYtOut) = _addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyIn, minLpOut, minYtOut);
218
-
219
- emit AddLiquiditySingleSyKeepYt(msg.sender, market, receiver, netSyIn, netLpOut, netYtOut);
220
- }
221
-
222
- /**
223
- * @notice Adds liquidity and returns leftover YT using a single token input. The input token
224
- * is first swapped through Kyberswap to a SY-mintable token, the rest is the same as
225
- * `addLiquiditySingleSyKeepYt()`
226
- * @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
227
- * @return netLpOut actual LP output, will not be lower than `minLpOut`
228
- * @return netYtOut actual YT output, will not be lower than `minYtOut`
229
- * @dev Reverts if market is expired
230
- */
231
- function addLiquiditySingleTokenKeepYt(
232
- address receiver,
233
- address market,
234
- uint256 minLpOut,
235
- uint256 minYtOut,
236
- TokenInput calldata input
237
- ) external returns (uint256 netLpOut, uint256 netYtOut) {
238
- (IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
239
-
240
- uint256 netSyUsed = _mintSyFromToken(address(this), address(SY), 1, input);
241
-
242
- (netLpOut, netYtOut) = _addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyUsed, minLpOut, minYtOut);
243
-
244
- emit AddLiquiditySingleTokenKeepYt(
245
- msg.sender,
246
- market,
247
- input.tokenIn,
248
- receiver,
249
- input.netTokenIn,
250
- netLpOut,
251
- netYtOut
252
- );
253
- }
254
-
255
- /**
256
- * @notice Burns LP token to remove SY/PT liquidity
257
- * @param netLpToRemove amount of LP to be burned from caller
258
- * @dev Will work even if market is expired
259
- */
260
- function removeLiquidityDualSyAndPt(
261
- address receiver,
262
- address market,
263
- uint256 netLpToRemove,
264
- uint256 minSyOut,
265
- uint256 minPtOut
266
- ) external returns (uint256 netSyOut, uint256 netPtOut) {
267
- _transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
268
-
269
- (netSyOut, netPtOut) = IPMarket(market).burn(receiver, receiver, netLpToRemove);
270
-
271
- if (netSyOut < minSyOut) revert Errors.RouterInsufficientSyOut(netSyOut, minSyOut);
272
- if (netPtOut < minPtOut) revert Errors.RouterInsufficientPtOut(netPtOut, minPtOut);
273
-
274
- emit RemoveLiquidityDualSyAndPt(msg.sender, market, receiver, netLpToRemove, netPtOut, netSyOut);
275
- }
276
-
277
- /**
278
- * @notice Burns LP token to remove SY/PT liquidity, then redeems SY, finally (if needed)
279
- * swaps SY redeemings through Kyberswap to desired output token.
280
- * @param netLpToRemove amount of LP to be burned from caller
281
- * @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
282
- * @dev Will work even if market is expired
283
- */
284
- function removeLiquidityDualTokenAndPt(
285
- address receiver,
286
- address market,
287
- uint256 netLpToRemove,
288
- TokenOutput calldata output,
289
- uint256 minPtOut
290
- ) external returns (uint256 netTokenOut, uint256 netPtOut) {
291
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
292
-
293
- // burn LP, SY sent to either SY or bulk, PT sent to receiver
294
- _transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
295
-
296
- uint256 netSyOut;
297
- (netSyOut, netPtOut) = IPMarket(market).burn(_syOrBulk(address(SY), output), receiver, netLpToRemove);
298
-
299
- if (netPtOut < minPtOut) revert Errors.RouterInsufficientPtOut(netPtOut, minPtOut);
300
-
301
- // redeem SY to token
302
- netTokenOut = _redeemSyToToken(receiver, address(SY), netSyOut, output, false);
303
-
304
- emit RemoveLiquidityDualTokenAndPt(
305
- msg.sender,
306
- market,
307
- output.tokenOut,
308
- receiver,
309
- netLpToRemove,
310
- netPtOut,
311
- netTokenOut
312
- );
313
- }
314
-
315
- /**
316
- * @notice Removes SY/PT liquidity, then swaps all resulting SY to return only PT
317
- * @param netLpToRemove amount of LP to be burned from caller
318
- * @param guessPtReceivedFromSy approximate info for the swap
319
- * @return netPtOut total PT output, will not be lower than `minPtOut`
320
- * @return netSyFee amount of SY fee incurred from the swap
321
- * @dev Reverts if market is expired
322
- */
323
- function removeLiquiditySinglePt(
324
- address receiver,
325
- address market,
326
- uint256 netLpToRemove,
327
- uint256 minPtOut,
328
- ApproxParams calldata guessPtReceivedFromSy
329
- ) external returns (uint256 netPtOut, uint256 netSyFee) {
330
- (, , IPYieldToken YT) = IPMarket(market).readTokens();
331
-
332
- // calculate the total amount of PT received from burning & selling SY
333
- MarketState memory state = IPMarket(market).readState(address(this));
334
- (uint256 syFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
335
- (uint256 ptFromSwap, ) = state.approxSwapExactSyForPt(
336
- YT.newIndex(),
337
- syFromBurn,
338
- block.timestamp,
339
- guessPtReceivedFromSy
340
- );
341
-
342
- if (ptFromBurn + ptFromSwap < minPtOut)
343
- revert Errors.RouterInsufficientPtOut(ptFromBurn + ptFromSwap, minPtOut);
344
-
345
- // execute the burn & the swap
346
- _transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
347
-
348
- (, ptFromBurn) = IPMarket(market).burn(market, receiver, netLpToRemove);
349
- (, netSyFee) = IPMarket(market).swapSyForExactPt(receiver, ptFromSwap, EMPTY_BYTES);
350
-
351
- netPtOut = ptFromBurn + ptFromSwap;
352
-
353
- // fail-safe
354
- if (netPtOut < minPtOut) assert(false);
355
-
356
- emit RemoveLiquiditySinglePt(msg.sender, market, receiver, netLpToRemove, netPtOut);
357
- }
358
-
359
- /**
360
- * @notice Removes SY/PT liquidity, then converts all resulting PT to return only SY
361
- * @dev Conversion is done with market swap if not expired, or with PT redeeming if expired
362
- * @param netLpToRemove amount of LP to be burned from caller
363
- * @return netSyOut total SY output, will not be lower than `minSyOut`
364
- * @return netSyFee amount of SY fee incurred from the swap
365
- * @dev Will work even if market is expired
366
- */
367
- function removeLiquiditySingleSy(
368
- address receiver,
369
- address market,
370
- uint256 netLpToRemove,
371
- uint256 minSyOut
372
- ) external returns (uint256 netSyOut, uint256 netSyFee) {
373
- // transfer LP to market
374
- _transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
375
-
376
- // burn LP, SY sent to receiver
377
- (netSyOut, netSyFee) = _removeLiquiditySingleSy(receiver, market, netLpToRemove, minSyOut);
378
-
379
- emit RemoveLiquiditySingleSy(msg.sender, market, receiver, netLpToRemove, netSyOut);
380
- }
381
-
382
- /**
383
- * @notice Removes SY/PT liquidity, then converts all to desired output token.
384
- * @dev inner workings of this function:
385
- - Removes SY/PT liquidity to only SY (see `removeLiquiditySingleSy()`)
386
- - Burns SY to redeem SY-mintable tokens
387
- - (If needed) swaps resulting tokens to desired output token using Kyberswap
388
- * @param netLpToRemove amount of LP to be burned from caller
389
- * @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
390
- * @return netTokenOut total token output, will not be lower than `output.minTokenOut`
391
- * @return netSyFee amount of SY fee incurred from the swap
392
- * @dev Will work even if market is expired
393
- */
394
- function removeLiquiditySingleToken(
395
- address receiver,
396
- address market,
397
- uint256 netLpToRemove,
398
- TokenOutput calldata output
399
- ) external returns (uint256 netTokenOut, uint256 netSyFee) {
400
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
401
-
402
- // transfer LP to market, burn LP, SY sent to either SY or bulk
403
- _transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
404
-
405
- uint256 netSyReceived;
406
-
407
- (netSyReceived, netSyFee) = _removeLiquiditySingleSy(_syOrBulk(address(SY), output), market, netLpToRemove, 1);
408
-
409
- // redeem SY to token
410
- netTokenOut = _redeemSyToToken(receiver, address(SY), netSyReceived, output, false);
411
-
412
- emit RemoveLiquiditySingleToken(msg.sender, market, output.tokenOut, receiver, netLpToRemove, netTokenOut);
413
- }
414
-
415
- /// @dev swaps SY to PT, then adds liquidity
416
- function _addLiquiditySingleSy(
417
- address receiver,
418
- address market,
419
- IPYieldToken YT,
420
- uint256 netSyIn,
421
- uint256 minLpOut,
422
- ApproxParams calldata guessPtReceivedFromSy
423
- ) internal returns (uint256 netLpOut, uint256 netSyFee) {
424
- MarketState memory state = IPMarket(market).readState(address(this));
425
-
426
- // calculate the PT amount needed to add liquidity
427
- (uint256 netPtFromSwap, , ) = state.approxSwapSyToAddLiquidity(
428
- YT.newIndex(),
429
- netSyIn,
430
- block.timestamp,
431
- guessPtReceivedFromSy
432
- );
433
-
434
- // execute the swap & the addLiquidity
435
- uint256 netSySwapped;
436
- (netSySwapped, netSyFee) = IPMarket(market).swapSyForExactPt(market, netPtFromSwap, EMPTY_BYTES);
437
-
438
- (netLpOut, , ) = IPMarket(market).mint(receiver, netSyIn - netSySwapped, netPtFromSwap);
439
-
440
- if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
441
- }
442
-
443
- /**
444
- * @dev algorithm:
445
- - Split SY into a SY and b SY (with a + b = netSyIn)
446
- - Mint PY with a SY ---> gives (a * pyIndex / ONE) PT + YT
447
- - Mint LP with (a * pyIndex / ONE) PT and b SY
448
-
449
- -> We want (a * pyIndex / ONE) / totalPt = b / totalSy
450
- -> a * (1 + pyIndex * totalSy / ONE / totalPt) = netSyIn
451
- -> a = (netSyIn * totalPt) / (totalPt + (pyIndex * totalSy / ONE))
452
- -> a = (netSyIn * totalPt) / (totalPt + totalAsset)
453
- */
454
- function _addLiquiditySingleSyKeepYt(
455
- address receiver,
456
- address market,
457
- IStandardizedYield SY,
458
- IPYieldToken YT,
459
- uint256 netSyIn,
460
- uint256 minLpOut,
461
- uint256 minYtOut
462
- ) internal returns (uint256 netLpOut, uint256 netYtOut) {
463
- MarketState memory state = IPMarket(market).readState(address(this));
464
-
465
- PYIndex pyIndex = YT.newIndex();
466
-
467
- uint256 netSyToPt = (netSyIn * state.totalPt.Uint()) /
468
- (state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
469
-
470
- // transfer SY to mint PY
471
- _transferOut(address(SY), address(YT), netSyToPt);
472
-
473
- // the rest of SY goes to market
474
- _transferOut(address(SY), market, netSyIn - netSyToPt);
475
-
476
- // PT goes to market, YT goes to receiver
477
- netYtOut = YT.mintPY(market, receiver);
478
-
479
- (netLpOut, , ) = IPMarket(market).mint(receiver, netSyIn - netSyToPt, netYtOut);
480
-
481
- if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
482
- if (netYtOut < minYtOut) revert Errors.RouterInsufficientYtOut(netYtOut, minYtOut);
483
- }
484
-
485
- /// @dev removes SY/PT liquidity, then converts PT to SY
486
- function _removeLiquiditySingleSy(
487
- address receiver,
488
- address market,
489
- uint256 netLpToRemove,
490
- uint256 minSyOut
491
- ) internal returns (uint256 netSyOut, uint256 netSyFee) {
492
- if (IPMarket(market).isExpired()) {
493
- netSyOut = __removeLpToSyAfterExpiry(receiver, market, netLpToRemove);
494
- } else {
495
- (netSyOut, netSyFee) = __removeLpToSyBeforeExpiry(receiver, market, netLpToRemove);
496
- }
497
-
498
- if (netSyOut < minSyOut) revert Errors.RouterInsufficientSyOut(netSyOut, minSyOut);
499
- }
500
-
501
- /// @dev converts PT to SY post-expiry
502
- function __removeLpToSyAfterExpiry(
503
- address receiver,
504
- address market,
505
- uint256 netLpToRemove
506
- ) internal returns (uint256 netSyOut) {
507
- (, , IPYieldToken YT) = IPMarket(market).readTokens();
508
- (uint256 syFromBurn, ) = IPMarket(market).burn(receiver, address(YT), netLpToRemove);
509
- netSyOut = syFromBurn + YT.redeemPY(receiver);
510
- }
511
-
512
- /// @dev swaps PT to SY pre-expiry
513
- function __removeLpToSyBeforeExpiry(
514
- address receiver,
515
- address market,
516
- uint256 netLpToRemove
517
- ) internal returns (uint256 netSyOut, uint256 netSyFee) {
518
- (uint256 syFromBurn, uint256 ptFromBurn) = IPMarket(market).burn(receiver, market, netLpToRemove);
519
-
520
- uint256 syFromSwap;
521
- (syFromSwap, netSyFee) = IPMarket(market).swapExactPtForSy(receiver, ptFromBurn, EMPTY_BYTES);
522
-
523
- netSyOut = syFromBurn + syFromSwap;
524
- }
525
- }
@@ -1,134 +0,0 @@
1
- // SPDX-License-Identifier: GPL-3.0-or-later
2
- pragma solidity ^0.8.17;
3
-
4
- import "./base/ActionBaseMintRedeem.sol";
5
- import "../interfaces/IPMarket.sol";
6
- import "../interfaces/IPActionMintRedeem.sol";
7
- import "../core/libraries/Errors.sol";
8
-
9
- contract ActionMintRedeem is IPActionMintRedeem, ActionBaseMintRedeem {
10
- using MarketMathCore for MarketState;
11
- using PMath for uint256;
12
- using PMath for int256;
13
-
14
- /**
15
- * @notice swaps input token for SY-mintable tokens (if needed), then mints SY from such
16
- * @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
17
- */
18
- function mintSyFromToken(
19
- address receiver,
20
- address SY,
21
- uint256 minSyOut,
22
- TokenInput calldata input
23
- ) external payable returns (uint256 netSyOut) {
24
- netSyOut = _mintSyFromToken(receiver, SY, minSyOut, input);
25
- emit MintSyFromToken(msg.sender, input.tokenIn, SY, receiver, input.netTokenIn, netSyOut);
26
- }
27
-
28
- /**
29
- * @notice redeems SY for SY-mintable tokens, then (if needed) swaps resulting tokens for
30
- * desired output token through Kyberswap
31
- * @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
32
- */
33
- function redeemSyToToken(
34
- address receiver,
35
- address SY,
36
- uint256 netSyIn,
37
- TokenOutput calldata output
38
- ) external returns (uint256 netTokenOut) {
39
- netTokenOut = _redeemSyToToken(receiver, SY, netSyIn, output, true);
40
- emit RedeemSyToToken(msg.sender, output.tokenOut, SY, receiver, netSyIn, netTokenOut);
41
- }
42
-
43
- /**
44
- * @notice mints PY from any input token
45
- * @dev swaps input token through Kyberswap to SY-mintable tokens first, then mints SY, finally
46
- * mints PY from SY
47
- * @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
48
- * @dev reverts if PY is expired
49
- */
50
- function mintPyFromToken(
51
- address receiver,
52
- address YT,
53
- uint256 minPyOut,
54
- TokenInput calldata input
55
- ) external payable returns (uint256 netPyOut) {
56
- address SY = IPYieldToken(YT).SY();
57
-
58
- uint256 netSyToMint = _mintSyFromToken(YT, SY, 0, input);
59
- netPyOut = _mintPyFromSy(receiver, SY, YT, netSyToMint, minPyOut, false);
60
-
61
- emit MintPyFromToken(msg.sender, input.tokenIn, YT, receiver, input.netTokenIn, netPyOut);
62
- }
63
-
64
- /**
65
- * @notice redeems PY for token
66
- * @dev redeems PT(+YT) for SY first, then redeems SY, finally swaps resulting tokens to output
67
- * token through Kyberswap (if needed)
68
- * @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
69
- */
70
- function redeemPyToToken(
71
- address receiver,
72
- address YT,
73
- uint256 netPyIn,
74
- TokenOutput calldata output
75
- ) external returns (uint256 netTokenOut) {
76
- address SY = IPYieldToken(YT).SY();
77
-
78
- uint256 netSyToRedeem = _redeemPyToSy(_syOrBulk(SY, output), YT, netPyIn, 1);
79
- netTokenOut = _redeemSyToToken(receiver, SY, netSyToRedeem, output, false);
80
-
81
- emit RedeemPyToToken(msg.sender, output.tokenOut, YT, receiver, netPyIn, netTokenOut);
82
- }
83
-
84
- /**
85
- * @notice mints PT+YT from input SY
86
- * @dev reverts if the PY pair is expired
87
- */
88
- function mintPyFromSy(
89
- address receiver,
90
- address YT,
91
- uint256 netSyIn,
92
- uint256 minPyOut
93
- ) external returns (uint256 netPyOut) {
94
- netPyOut = _mintPyFromSy(receiver, IPYieldToken(YT).SY(), YT, netSyIn, minPyOut, true);
95
- emit MintPyFromSy(msg.sender, receiver, YT, netSyIn, netPyOut);
96
- }
97
-
98
- /// @notice redeems PT(+YT) for its corresponding SY
99
- function redeemPyToSy(
100
- address receiver,
101
- address YT,
102
- uint256 netPyIn,
103
- uint256 minSyOut
104
- ) external returns (uint256 netSyOut) {
105
- netSyOut = _redeemPyToSy(receiver, YT, netPyIn, minSyOut);
106
- emit RedeemPyToSy(msg.sender, receiver, YT, netPyIn, netSyOut);
107
- }
108
-
109
- /**
110
- * @notice A unified interface for redeeming rewards and interests for any SYs,
111
- * YTs, and markets alike for `user`.
112
- * @dev returns arrays of amounts claimed for each asset.
113
- */
114
- function redeemDueInterestAndRewards(
115
- address user,
116
- address[] calldata sys,
117
- address[] calldata yts,
118
- address[] calldata markets
119
- ) external {
120
- unchecked {
121
- for (uint256 i = 0; i < sys.length; ++i) {
122
- IStandardizedYield(sys[i]).claimRewards(user);
123
- }
124
-
125
- for (uint256 i = 0; i < yts.length; ++i) {
126
- IPYieldToken(yts[i]).redeemDueInterestAndRewards(user, true, true);
127
- }
128
-
129
- for (uint256 i = 0; i < markets.length; ++i) {
130
- IPMarket(markets[i]).redeemRewards(user);
131
- }
132
- }
133
- }
134
- }