@pendle/core-v2 3.0.0-beta-2 → 3.0.0-beta-3

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 (334) 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/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
  10. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  14. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
  16. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  18. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  24. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  26. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  30. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  31. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  32. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  33. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  34. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +2 -2
  36. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  38. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  40. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
  42. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
  44. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
  48. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
  50. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
  52. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
  54. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.json +2 -2
  64. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
  66. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
  68. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  71. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  73. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
  75. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
  76. package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
  77. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  78. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
  79. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
  81. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
  84. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
  85. package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
  86. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
  87. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
  88. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
  89. package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
  90. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
  91. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
  92. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
  93. package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
  94. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
  95. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
  96. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
  97. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
  98. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
  99. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
  100. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
  101. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
  102. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
  103. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
  104. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  105. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
  106. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
  107. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
  108. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
  109. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
  110. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
  111. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +2 -2
  112. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  113. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  114. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
  115. package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
  116. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
  117. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
  118. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
  119. package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
  120. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  121. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
  122. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  123. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
  124. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  125. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  126. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
  127. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
  128. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
  129. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
  130. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
  131. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
  132. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  133. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +2 -50
  134. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  135. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +61 -1
  136. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  137. package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +1 -1
  138. package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.json +94 -20
  139. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  140. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  141. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +40 -0
  142. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  143. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +40 -0
  144. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  145. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +235 -21
  146. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/ILimitOrderCallee.dbg.json +1 -1
  147. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
  148. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +43 -139
  149. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.dbg.json +1 -1
  150. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixin.json +33 -139
  151. package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPOrderMixinType.dbg.json +1 -1
  152. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  153. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
  154. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  155. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  156. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  157. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
  158. package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
  159. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
  160. package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
  161. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.dbg.json +1 -1
  162. package/build/artifacts/contracts/limit/PendleOrderMixin.sol/PendleOrderMixin.json +47 -153
  163. package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  164. package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  165. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  166. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
  167. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
  168. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
  169. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
  170. package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +2 -2
  171. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  172. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
  173. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  174. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
  175. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  176. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
  177. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  178. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
  179. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  180. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
  181. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  182. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
  183. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  184. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
  185. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  186. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  187. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
  188. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
  189. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
  190. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
  191. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
  192. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
  193. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
  194. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
  195. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
  196. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  197. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +63 -3
  198. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  199. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +18 -22
  200. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  201. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
  202. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  203. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
  204. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  205. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
  206. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
  207. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
  208. package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +1 -1
  209. package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
  210. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
  211. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  212. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  213. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  214. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  215. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
  216. package/build/artifacts/contracts/router/base/SimulateHelper.sol/SimulateHelper.json +69 -0
  217. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  218. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
  219. package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
  220. package/contracts/core/libraries/Errors.sol +0 -3
  221. package/contracts/interfaces/IPActionAddRemoveLiq.sol +1 -1
  222. package/contracts/interfaces/IPActionMisc.sol +9 -2
  223. package/contracts/interfaces/IPLimitRouter.sol +15 -30
  224. package/contracts/limit/LimitMathCore.sol +54 -31
  225. package/contracts/limit/PendleLimitRouter.sol +3 -3
  226. package/contracts/limit/PendleOrderMixin.sol +172 -182
  227. package/contracts/router/ActionAddRemoveLiq.sol +3 -3
  228. package/contracts/router/ActionMisc.sol +16 -22
  229. package/contracts/router/PendleRouter.sol +84 -74
  230. package/contracts/router/base/MarketApproxLib.sol +1 -1
  231. package/contracts/router/base/SimulateHelper.sol +33 -0
  232. package/package.json +1 -1
  233. package/typechain-types/ActionAddRemoveLiq.ts +13 -10
  234. package/typechain-types/ActionMisc.ts +40 -14
  235. package/typechain-types/ActionSwapPT.ts +7 -4
  236. package/typechain-types/ActionSwapYT.ts +7 -4
  237. package/typechain-types/IPActionAddRemoveLiq.ts +13 -10
  238. package/typechain-types/IPActionMisc.ts +84 -14
  239. package/typechain-types/IPActionSwapPT.ts +7 -4
  240. package/typechain-types/IPActionSwapYT.ts +7 -4
  241. package/typechain-types/IPAllAction.ts +105 -32
  242. package/typechain-types/IPLimitRouter.ts +46 -176
  243. package/typechain-types/IPOrderMixin.ts +44 -174
  244. package/typechain-types/PendleLimitRouter.ts +47 -177
  245. package/typechain-types/PendleOrderMixin.ts +45 -175
  246. package/typechain-types/SimulateHelper.ts +146 -0
  247. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +62 -2
  248. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  249. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  250. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  251. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  252. package/typechain-types/factories/ActionMisc__factory.ts +17 -21
  253. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  254. package/typechain-types/factories/ActionSwapPT__factory.ts +41 -1
  255. package/typechain-types/factories/ActionSwapYT__factory.ts +41 -1
  256. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  257. package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
  258. package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
  259. package/typechain-types/factories/Broadcaster__factory.ts +1 -1
  260. package/typechain-types/factories/Errors__factory.ts +1 -49
  261. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +61 -1
  262. package/typechain-types/factories/IPActionMisc__factory.ts +94 -20
  263. package/typechain-types/factories/IPActionSwapPT__factory.ts +40 -0
  264. package/typechain-types/factories/IPActionSwapYT__factory.ts +40 -0
  265. package/typechain-types/factories/IPAllAction__factory.ts +235 -21
  266. package/typechain-types/factories/IPLimitRouter__factory.ts +43 -139
  267. package/typechain-types/factories/IPOrderMixin__factory.ts +33 -139
  268. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  269. package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
  270. package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
  271. package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
  272. package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
  273. package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
  274. package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
  275. package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
  276. package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
  277. package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
  278. package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
  279. package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
  280. package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +1 -1
  281. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
  282. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
  283. package/typechain-types/factories/PendleERC4626SY__factory.ts +1 -1
  284. package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
  285. package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
  286. package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
  287. package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
  288. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  289. package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
  290. package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
  291. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
  292. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
  293. package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
  294. package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
  295. package/typechain-types/factories/PendleLimitRouter__factory.ts +58 -154
  296. package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
  297. package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
  298. package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
  299. package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
  300. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  301. package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
  302. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  303. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  304. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  305. package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
  306. package/typechain-types/factories/PendleOrderMixin__factory.ts +47 -153
  307. package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
  308. package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
  309. package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
  310. package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
  311. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  312. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  313. package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
  314. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  315. package/typechain-types/factories/PendleRouter__factory.ts +1 -1
  316. package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
  317. package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
  318. package/typechain-types/factories/PendleSwap__factory.ts +1 -1
  319. package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
  320. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  321. package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
  322. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  323. package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
  324. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
  325. package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
  326. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  327. package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
  328. package/typechain-types/factories/SAPE__factory.ts +1 -1
  329. package/typechain-types/factories/SimulateHelper__factory.ts +84 -0
  330. package/typechain-types/factories/SwETHSY__factory.ts +1 -1
  331. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  332. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  333. package/typechain-types/hardhat.d.ts +9 -9
  334. package/typechain-types/index.ts +2 -2
@@ -33,7 +33,7 @@ abstract contract PendleOrderMixin is
33
33
  using Address for address payable;
34
34
 
35
35
  bytes32 internal constant LIMIT_ORDER_TYPEHASH = keccak256(
36
- "Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,bytes permit)"
36
+ "Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,uint256 failSafeRate,bytes permit)"
37
37
  );
38
38
 
39
39
  uint256 internal constant _ORDER_DOES_NOT_EXIST = 0;
@@ -50,6 +50,7 @@ abstract contract PendleOrderMixin is
50
50
  WNATIVE = _WNATIVE;
51
51
  }
52
52
 
53
+ // solhint-disable-next-line no-empty-blocks
53
54
  receive() external payable {}
54
55
 
55
56
  function initialize(address _feeRecipient, uint96 _lnFeeRateRoot) external initializer {
@@ -62,12 +63,12 @@ abstract contract PendleOrderMixin is
62
63
  external
63
64
  returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
64
65
  {
65
- OrderType orderType = params[0].order.orderType;
66
66
  _validateOrdersSkipSig(params);
67
+ OrderType orderType = params[0].order.orderType;
67
68
  if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
68
- return normalFillTokenForPY(params, receiver, maxTaking, callback);
69
+ return normalFillTokenForPY(Args(orderType, params, receiver, maxTaking, callback));
69
70
  } else {
70
- return normalFillPYForToken(params, receiver, maxTaking, callback);
71
+ return normalFillPYForToken(Args(orderType, params, receiver, maxTaking, callback));
71
72
  }
72
73
  }
73
74
 
@@ -75,38 +76,37 @@ abstract contract PendleOrderMixin is
75
76
  external
76
77
  returns (uint256 netOutputToTaker, uint256 netInputFromTaker, uint256 totalFee)
77
78
  {
78
- OrderType orderType = params[0].order.orderType;
79
79
  _validateOrdersSkipSig(params);
80
+ OrderType orderType = params[0].order.orderType;
80
81
  if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
81
- return flashFillTokenForPY(params, receiver, maxInput, callback);
82
+ return flashFillTokenForPY(Args(orderType, params, receiver, maxInput, callback));
82
83
  } else {
83
- return flashFillPYForToken(params, receiver, maxInput, callback);
84
+ return flashFillPYForToken(Args(orderType, params, receiver, maxInput, callback));
84
85
  }
85
86
  }
86
87
 
87
88
  // ----------------- Core logic -----------------
88
89
 
90
+ // solhint-disable-next-line
89
91
  struct Args {
92
+ OrderType orderType;
90
93
  FillOrderParams[] params;
91
94
  address receiver;
92
95
  uint256 maxTaking; // or maxInput
93
96
  bytes callback;
94
97
  }
95
98
 
96
- function normalFillTokenForPY(
97
- FillOrderParams[] memory _params,
98
- address _receiver,
99
- uint256 _maxTaking,
100
- bytes memory _callback
101
- ) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee) {
102
- Args memory a = Args(_params, _receiver, _maxTaking, _callback);
103
-
104
- OrderType orderType = a.params[0].order.orderType;
99
+ function normalFillTokenForPY(Args memory a)
100
+ internal
101
+ returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
102
+ {
103
+ (address SY, address PT, address YT, bytes32[] memory orderHashes) =
104
+ _checkSig_doPermit_updMakingAndRemaining(a.params);
105
105
 
106
106
  // Token => This
107
- (address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, true);
107
+ uint256[] memory fromMakers = _transferFromMakers_mintSy_updMakings(SY, a.params);
108
108
 
109
- NormalResults memory out = LimitMath.calcNormalBatch(a.params, onchain);
109
+ NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT, lnFeeRateRoot);
110
110
  (actualMaking, actualTaking, totalFee) = (out.totalMaking - out.totalFee, out.totalTaking, out.totalFee);
111
111
 
112
112
  require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
@@ -116,85 +116,75 @@ abstract contract PendleOrderMixin is
116
116
 
117
117
  // callback to Taker
118
118
  if (a.callback.length > 0) {
119
- ILimitOrderCallee(msg.sender).normalFillCall(orderType, actualMaking, actualTaking, totalFee, a.callback);
119
+ ILimitOrderCallee(msg.sender).normalFillCall(a.orderType, actualMaking, actualTaking, totalFee, a.callback);
120
120
  }
121
121
 
122
122
  // Taker => Makers
123
- address pyToMaker = (orderType == OrderType.SY_FOR_PT) ? PT : YT;
124
- _transferFromMulti(IERC20(pyToMaker), msg.sender, a.params, out.netTakings);
123
+ address pyToMaker = (a.orderType == OrderType.SY_FOR_PT) ? PT : YT;
124
+ _transferToMakers(IERC20(pyToMaker), msg.sender, a.params, out.netTakings);
125
125
 
126
126
  // This => Fee
127
- _transferOut(SY, onchain.feeRecipient, totalFee);
127
+ _transferOut(SY, feeRecipient, totalFee);
128
128
 
129
- emit NormalFill(
130
- orderType, YT, msg.sender, actualMaking, actualTaking, totalFee, out.totalMaking, out.totalTaking
131
- );
129
+ // toMakers == netTakings
130
+ _checkSafety_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
132
131
  }
133
132
 
134
- function normalFillPYForToken(
135
- FillOrderParams[] memory _params,
136
- address _receiver,
137
- uint256 _maxTaking,
138
- bytes memory _callback
139
- ) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee) {
140
- Args memory a = Args(_params, _receiver, _maxTaking, _callback);
141
-
142
- OrderType orderType = a.params[0].order.orderType;
143
-
144
- (address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, false);
133
+ function normalFillPYForToken(Args memory a)
134
+ internal
135
+ returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
136
+ {
137
+ (address SY, address PT, address YT, bytes32[] memory orderHashes) =
138
+ _checkSig_doPermit_updMakingAndRemaining(a.params);
145
139
 
146
- NormalResults memory out = LimitMath.calcNormalBatch(a.params, onchain);
140
+ NormalResults memory out = LimitMath.calcNormalBatch(a.params, YT, lnFeeRateRoot);
147
141
  (actualMaking, actualTaking, totalFee) = (out.totalMaking, out.totalTaking + out.totalFee, out.totalFee);
148
142
 
149
143
  require(actualTaking <= a.maxTaking, "LOP: maxTaking exceeded");
150
144
 
151
145
  // Makers => Taker
152
- address pyFromMaker = (orderType == OrderType.PT_FOR_SY) ? PT : YT;
153
- _transferFromMulti(IERC20(pyFromMaker), a.params, a.receiver, out.netMakings);
146
+ address pyFromMaker = (a.orderType == OrderType.PT_FOR_SY) ? PT : YT;
147
+ _transferFromMakers(IERC20(pyFromMaker), a.params, a.receiver, out.netMakings);
154
148
 
155
149
  // callback to Taker
156
150
  if (a.callback.length > 0) {
157
- ILimitOrderCallee(msg.sender).normalFillCall(orderType, actualMaking, actualTaking, totalFee, a.callback);
151
+ ILimitOrderCallee(msg.sender).normalFillCall(a.orderType, actualMaking, actualTaking, totalFee, a.callback);
158
152
  }
159
153
 
160
154
  // Taker => This
161
155
  _transferFrom(IERC20(SY), msg.sender, address(this), actualTaking);
162
156
 
163
157
  // This => Makers
164
- _redeemSy_transferOut(SY, a.params, out.totalTaking, out.netTakings);
158
+ uint256[] memory toMakers = _redeemSy_transferToMakers(SY, a.params, out.netTakings);
165
159
 
166
160
  // This => Fee
167
- _transferOut(SY, onchain.feeRecipient, totalFee);
161
+ _transferOut(SY, feeRecipient, totalFee);
168
162
 
169
- emit NormalFill(
170
- orderType, YT, msg.sender, actualMaking, actualTaking, totalFee, out.totalMaking, out.totalTaking
171
- );
163
+ // fromMakers == netMakings
164
+ _checkSafety_emitEvents(a.params, orderHashes, out.netMakings, toMakers, out.netFees, out.notionalVolumes);
172
165
  }
173
166
 
174
167
  // ----------------- Flash functions -----------------
175
168
 
176
- function flashFillTokenForPY(
177
- FillOrderParams[] memory _params,
178
- address _receiver,
179
- uint256 _maxInput,
180
- bytes memory _callback
181
- ) internal returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee) {
182
- Args memory a = Args(_params, _receiver, _maxInput, _callback);
183
-
184
- OrderType orderType = a.params[0].order.orderType;
169
+ function flashFillTokenForPY(Args memory a)
170
+ internal
171
+ returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee)
172
+ {
173
+ (address SY, address PT, address YT, bytes32[] memory orderHashes) =
174
+ _checkSig_doPermit_updMakingAndRemaining(a.params);
185
175
 
186
176
  // Token => This
187
- (address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, true);
177
+ uint256[] memory fromMakers = _transferFromMakers_mintSy_updMakings(SY, a.params);
188
178
 
189
179
  NormalResults memory out;
190
- (totalSyFromTaker, totalPYToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, onchain);
180
+ (totalSyFromTaker, totalPYToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, YT, lnFeeRateRoot);
191
181
 
192
182
  require(totalSyFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
193
183
 
194
184
  // callback to Taker
195
185
  if (a.callback.length > 0) {
196
186
  ILimitOrderCallee(msg.sender).flashFillCall(
197
- orderType, totalPYToTaker, totalSyFromTaker, totalFee, a.callback
187
+ a.orderType, totalPYToTaker, totalSyFromTaker, totalFee, a.callback
198
188
  );
199
189
  }
200
190
 
@@ -204,7 +194,7 @@ abstract contract PendleOrderMixin is
204
194
  // This => YT
205
195
  _transferOut(SY, YT, totalSyFromTaker + out.totalMaking - out.totalFee);
206
196
 
207
- bool isPtToMaker = (orderType == OrderType.SY_FOR_PT);
197
+ bool isPtToMaker = (a.orderType == OrderType.SY_FOR_PT);
208
198
  address pyToMaker = isPtToMaker ? PT : YT;
209
199
  {
210
200
  address receiverPt = isPtToMaker ? address(this) : a.receiver;
@@ -215,48 +205,42 @@ abstract contract PendleOrderMixin is
215
205
  }
216
206
 
217
207
  // This => Makers
218
- _transferFromMulti(IERC20(pyToMaker), address(this), a.params, out.netTakings);
208
+ _transferToMakers(IERC20(pyToMaker), address(this), a.params, out.netTakings);
219
209
 
220
210
  // This => Fee
221
- _transferOut(SY, onchain.feeRecipient, out.totalFee);
211
+ _transferOut(SY, feeRecipient, totalFee);
222
212
 
223
- emit FlashFill(
224
- orderType, YT, msg.sender, totalPYToTaker, totalSyFromTaker, totalFee, out.totalMaking, out.totalTaking
225
- );
213
+ // toMakers == netTakings
214
+ _checkSafety_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
226
215
  }
227
216
 
228
- function flashFillPYForToken(
229
- FillOrderParams[] memory _params,
230
- address _receiver,
231
- uint256 _maxInput,
232
- bytes memory _callback
233
- ) internal returns (uint256 totalSyToTaker, uint256 totalPYFromTaker, uint256 totalFee) {
234
- Args memory a = Args(_params, _receiver, _maxInput, _callback);
235
-
236
- OrderType orderType = a.params[0].order.orderType;
237
-
238
- (address SY, address PT, address YT, OnchainParams memory onchain) = _prep(a.params, false);
217
+ function flashFillPYForToken(Args memory a)
218
+ internal
219
+ returns (uint256 totalSyToTaker, uint256 totalPYFromTaker, uint256 totalFee)
220
+ {
221
+ (address SY, address PT, address YT, bytes32[] memory orderHashes) =
222
+ _checkSig_doPermit_updMakingAndRemaining(a.params);
239
223
 
240
224
  NormalResults memory out;
241
- (totalPYFromTaker, totalSyToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, onchain);
225
+ (totalPYFromTaker, totalSyToTaker, totalFee, out) = LimitMath.calcFlashBatch(a.params, YT, lnFeeRateRoot);
242
226
 
243
227
  require(totalPYFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
244
228
 
245
229
  // callback to Taker
246
230
  if (a.callback.length > 0) {
247
231
  ILimitOrderCallee(msg.sender).flashFillCall(
248
- orderType, totalSyToTaker, totalPYFromTaker, totalFee, a.callback
232
+ a.orderType, totalSyToTaker, totalPYFromTaker, totalFee, a.callback
249
233
  );
250
234
  }
251
235
 
252
- bool ptFromTaker = (orderType == OrderType.YT_FOR_SY);
236
+ bool ptFromTaker = (a.orderType == OrderType.YT_FOR_SY);
253
237
  address pyFromTaker = ptFromTaker ? PT : YT;
254
238
  address pyFromMaker = ptFromTaker ? YT : PT;
255
239
 
256
240
  // Taker => YT
257
241
  _transferFrom(IERC20(pyFromTaker), msg.sender, YT, totalPYFromTaker);
258
242
  // Maker => YT
259
- _transferFromMulti(IERC20(pyFromMaker), a.params, YT, out.netMakings);
243
+ _transferFromMakers(IERC20(pyFromMaker), a.params, YT, out.netMakings);
260
244
 
261
245
  // YT => This
262
246
  IPYieldToken(YT).redeemPY(address(this));
@@ -265,24 +249,21 @@ abstract contract PendleOrderMixin is
265
249
  _transferOut(SY, a.receiver, totalSyToTaker);
266
250
 
267
251
  // This => Makers
268
- _redeemSy_transferOut(SY, a.params, out.totalTaking, out.netTakings);
252
+ uint256[] memory toMakers = _redeemSy_transferToMakers(SY, a.params, out.netTakings);
269
253
 
270
254
  // This => Fee
271
- _transferOut(SY, onchain.feeRecipient, out.totalFee);
255
+ _transferOut(SY, feeRecipient, totalFee);
272
256
 
273
- emit FlashFill(
274
- orderType, YT, msg.sender, totalSyToTaker, totalPYFromTaker, totalFee, out.totalMaking, out.totalTaking
275
- );
257
+ // fromMakers == netMakings
258
+ _checkSafety_emitEvents(a.params, orderHashes, out.netMakings, toMakers, out.netFees, out.notionalVolumes);
276
259
  }
277
260
 
278
261
  // ----------------- verify & convert functions -----------------
279
-
280
262
  function _validateOrdersSkipSig(FillOrderParams[] memory params) internal view {
281
263
  uint256 len = params.length;
282
264
  require(len != 0, "LOP: empty batch");
283
265
 
284
266
  (address YT, OrderType orderType) = (params[0].order.YT, params[0].order.orderType);
285
- bool isTokenOut = (orderType == OrderType.PT_FOR_SY || orderType == OrderType.YT_FOR_SY);
286
267
 
287
268
  uint256 expiry = IPYieldToken(YT).expiry();
288
269
  require(block.timestamp < expiry, "LOP: PY expired");
@@ -294,31 +275,16 @@ abstract contract PendleOrderMixin is
294
275
  require(order.YT == YT, "LOP: not same YT");
295
276
  require(block.timestamp < order.expiry, "LOP: order expired");
296
277
  require(order.nonce >= nonce[order.maker], "LOP: order invalidated");
297
-
298
- if (isTokenOut) require(order.token != WNATIVE, "LOP: invalid tokenOut");
299
- // else assert(order.token!=NATIVE) // always true
300
278
  }
301
279
  }
302
280
 
303
- function _prep(FillOrderParams[] memory params, bool tokenToSy)
281
+ function _checkSig_doPermit_updMakingAndRemaining(FillOrderParams[] memory params)
304
282
  internal
305
- returns (address SY, address PT, address YT, OnchainParams memory onchain)
283
+ returns (address SY, address PT, address YT, bytes32[] memory orderHashes)
306
284
  {
307
- _checkSig_doPermit_updMakingAndRemaining(params); // state changes to avoid reentrancy
308
-
309
- YT = params[0].order.YT;
310
- SY = IPYieldToken(YT).SY();
311
- PT = IPYieldToken(YT).PT();
312
-
313
- if (tokenToSy) {
314
- _transferIn_mintSy(SY, params);
315
- }
316
-
317
- onchain = getOnchainParams(YT);
318
- }
319
-
320
- function _checkSig_doPermit_updMakingAndRemaining(FillOrderParams[] memory params) internal {
321
285
  uint256 len = params.length;
286
+ orderHashes = new bytes32[](len);
287
+
322
288
  for (uint256 i = 0; i < len; i = _inc1(i)) {
323
289
  FillOrderParams memory param = params[i];
324
290
 
@@ -328,11 +294,44 @@ abstract contract PendleOrderMixin is
328
294
  unchecked {
329
295
  remainingMakerAmount = remainingMakerAmount - netMaking;
330
296
  _remaining[orderHash] = remainingMakerAmount + 1;
331
-
332
- emit OrderRemainingUpdated(orderHash, remainingMakerAmount);
333
297
  }
334
298
 
335
299
  param.makingAmount = netMaking;
300
+
301
+ orderHashes[i] = orderHash;
302
+ }
303
+
304
+ YT = params[0].order.YT;
305
+ SY = IPYieldToken(YT).SY();
306
+ PT = IPYieldToken(YT).PT();
307
+ }
308
+
309
+ function _checkSafety_emitEvents(
310
+ FillOrderParams[] memory params,
311
+ bytes32[] memory hashes,
312
+ uint256[] memory fromMakers,
313
+ uint256[] memory toMakers,
314
+ uint256[] memory netFees,
315
+ uint256[] memory notionalVolumes
316
+ ) internal {
317
+ uint256 len = hashes.length;
318
+
319
+ for (uint256 i = 0; i < len; i = _inc1(i)) {
320
+ require(fromMakers[i].mulDown(params[i].order.failSafeRate) <= toMakers[i], "LOP: fail safe");
321
+ }
322
+
323
+ for (uint256 i = 0; i < len; i = _inc1(i)) {
324
+ Order memory order = params[i].order;
325
+ emit OrderFilled(
326
+ hashes[i],
327
+ order.orderType,
328
+ order.YT,
329
+ order.token,
330
+ fromMakers[i],
331
+ toMakers[i],
332
+ netFees[i],
333
+ notionalVolumes[i]
334
+ );
336
335
  }
337
336
  }
338
337
 
@@ -368,30 +367,27 @@ abstract contract PendleOrderMixin is
368
367
 
369
368
  // ----------------- simple helper functions functions -----------------
370
369
 
371
- function _transferIn_mintSy(address SY, FillOrderParams[] memory params) internal {
370
+ function _transferFromMakers_mintSy_updMakings(address SY, FillOrderParams[] memory params)
371
+ internal
372
+ returns (uint256[] memory fromMakers)
373
+ {
372
374
  uint256 len = params.length;
373
- (bool isSame, address commonToken) = _isSameTokens(params);
374
- uint256 totalMakingCommon = 0;
375
-
376
- for (uint256 i = 0; i < len; i = _inc1(i)) {
377
- FillOrderParams memory param = params[i];
378
- if (param.makingAmount == 0) continue;
375
+ fromMakers = new uint256[](len);
376
+
377
+ for ((uint256 l, uint256 r) = (0, 0); l < len; l = r) {
378
+ address sharedToken = params[l].order.token;
379
+ uint256 totalMaking = 0;
380
+ for (; r < len && params[r].order.token == sharedToken; r = _inc1(r)) {
381
+ _transferIn(sharedToken, params[r].order.maker, params[r].makingAmount);
382
+ totalMaking += params[r].makingAmount;
383
+ fromMakers[r] = params[r].makingAmount;
384
+ }
379
385
 
380
- _transferIn(param.order.token, param.order.maker, param.makingAmount);
381
- if (isSame) totalMakingCommon += param.makingAmount;
382
- }
386
+ if (sharedToken == SY || totalMaking == 0) continue;
383
387
 
384
- if (isSame) {
385
- if (commonToken == SY || totalMakingCommon == 0) return;
386
- uint256 totalSy = __mintSy_Single(SY, commonToken, totalMakingCommon);
387
- for (uint256 i = 0; i < len; i = _inc1(i)) {
388
- params[i].makingAmount = params[i].makingAmount * totalSy / totalMakingCommon;
389
- }
390
- } else {
391
- for (uint256 i = 0; i < len; i = _inc1(i)) {
392
- FillOrderParams memory param = params[i];
393
- if (param.makingAmount == 0 || param.order.token == SY) continue;
394
- param.makingAmount = __mintSy_Single(SY, param.order.token, param.makingAmount);
388
+ uint256 totalSy = __mintSy_Single(SY, sharedToken, totalMaking);
389
+ for (uint256 i = l; i < r; i = _inc1(i)) {
390
+ params[i].makingAmount = params[i].makingAmount * totalSy / totalMaking;
395
391
  }
396
392
  }
397
393
  }
@@ -405,77 +401,82 @@ abstract contract PendleOrderMixin is
405
401
  IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(address(this), token, netTokenIn, 0);
406
402
  }
407
403
 
408
- function _redeemSy_transferOut(
409
- address SY,
410
- FillOrderParams[] memory params,
411
- uint256 totalSyOut,
412
- uint256[] memory netSyOuts
413
- ) internal {
404
+ function _redeemSy_transferToMakers(address SY, FillOrderParams[] memory params, uint256[] memory netSyOuts)
405
+ internal
406
+ returns (uint256[] memory toMakers)
407
+ {
408
+ // netSyOuts all > 0, guarantee in LimitMath
409
+
414
410
  uint256 len = params.length;
415
- (bool isSame, address commonToken) = _isSameTokens(params);
411
+ toMakers = new uint256[](len);
412
+
413
+ for ((uint256 l, uint256 r) = (0, 0); l < len; l = r) {
414
+ address sharedToken = params[l].order.token;
415
+ uint256 totalSy = 0;
416
416
 
417
- if (isSame) {
418
- if (commonToken == SY) {
419
- _transferFromMulti(IERC20(SY), address(this), params, netSyOuts);
420
- return;
417
+ for (; r < len && __stillShared(sharedToken, params[r].order.token); r = _inc1(r)) {
418
+ totalSy += netSyOuts[r];
421
419
  }
422
420
 
423
- uint256 totalTokenOut = __redeemSy_Single(address(this), SY, commonToken, totalSyOut);
424
- for (uint256 i = 0; i < len; i = _inc1(i)) {
425
- Order memory order = params[i].order;
426
- uint256 netOut = netSyOuts[i] * totalTokenOut / totalSyOut;
427
- if (order.token == NATIVE) payable(order.receiver).sendValue(netOut);
428
- else IERC20(order.token).safeTransfer(order.receiver, netOut);
421
+ if (sharedToken == SY) {
422
+ for (uint256 i = l; i < r; i = _inc1(i)) {
423
+ _transferOut(SY, params[i].order.receiver, netSyOuts[i]);
424
+ toMakers[i] = netSyOuts[i];
425
+ }
426
+ continue;
429
427
  }
430
- } else {
431
- for (uint256 i = 0; i < len; i = _inc1(i)) {
432
- Order memory order = params[i].order;
433
- if (order.token == SY) {
434
- _transferOut(SY, order.receiver, netSyOuts[i]);
435
- } else {
436
- __redeemSy_Single(order.receiver, SY, order.token, netSyOuts[i]);
428
+
429
+ if (r - l == 1) {
430
+ toMakers[l] = __redeemSy_Single(params[l].order.receiver, SY, sharedToken, netSyOuts[l]);
431
+ } else {
432
+ uint256 totalToken = __redeemSy_Single(address(this), SY, sharedToken, totalSy);
433
+ for (uint256 i = l; i < r; i = _inc1(i)) {
434
+ address token = params[i].order.token;
435
+ toMakers[i] = netSyOuts[i] * totalToken / totalSy;
436
+ if (sharedToken != token) {
437
+ // WNATIVE case
438
+ _wrap_unwrap_ETH(sharedToken, token, toMakers[i]);
439
+ }
440
+ _transferOut(token, params[i].order.receiver, toMakers[i]);
437
441
  }
438
442
  }
439
443
  }
440
444
  }
441
445
 
446
+ function __stillShared(address currentShared, address nextToken) private view returns (bool) {
447
+ return (currentShared == nextToken) || (currentShared == NATIVE && nextToken == WNATIVE)
448
+ || (currentShared == WNATIVE && nextToken == NATIVE);
449
+ }
450
+
442
451
  function __redeemSy_Single(address receiver, address SY, address tokenOut, uint256 netSyIn)
443
452
  private
444
453
  returns (uint256 netTokenOut)
445
454
  {
446
- if (tokenOut == NATIVE) {
447
- address tokenRedeemSy = IStandardizedYield(SY).isValidTokenOut(tokenOut) ? tokenOut : WNATIVE;
455
+ if (tokenOut == NATIVE || tokenOut == WNATIVE) {
456
+ address otherToken = tokenOut == NATIVE ? WNATIVE : NATIVE;
457
+ address tokenRedeemSy = IStandardizedYield(SY).isValidTokenOut(tokenOut) ? tokenOut : otherToken;
458
+
448
459
  netTokenOut = IStandardizedYield(SY).redeem(address(this), netSyIn, tokenRedeemSy, 0, false);
449
460
 
450
- if (tokenRedeemSy == WNATIVE) {
451
- _wrap_unwrap_ETH(WNATIVE, NATIVE, netTokenOut);
461
+ if (tokenOut != tokenRedeemSy) {
462
+ _wrap_unwrap_ETH(tokenRedeemSy, tokenOut, netTokenOut);
463
+ }
464
+
465
+ if (receiver != address(this)) {
466
+ _transferOut(tokenOut, receiver, netTokenOut);
452
467
  }
453
- payable(receiver).sendValue(netTokenOut);
454
468
  } else {
455
469
  return IStandardizedYield(SY).redeem(receiver, netSyIn, tokenOut, 0, false);
456
470
  }
457
471
  }
458
472
 
459
- function _isSameTokens(FillOrderParams[] memory params)
460
- internal
461
- pure
462
- returns (bool, /*isSame*/ address /*commonToken*/ )
463
- {
464
- uint256 len = params.length;
465
- address commonToken = params[0].order.token;
466
- for (uint256 i = 1; i < len; i = _inc1(i)) {
467
- if (params[i].order.token != commonToken) return (false, address(0));
468
- }
469
- return (true, commonToken);
470
- }
471
-
472
473
  function _inc1(uint256 i) internal pure returns (uint256) {
473
474
  unchecked {
474
475
  return i + 1;
475
476
  }
476
477
  }
477
478
 
478
- function _transferFromMulti(IERC20 token, FillOrderParams[] memory params, address to, uint256[] memory netIn)
479
+ function _transferFromMakers(IERC20 token, FillOrderParams[] memory params, address to, uint256[] memory netIn)
479
480
  internal
480
481
  {
481
482
  uint256 len = params.length;
@@ -484,7 +485,7 @@ abstract contract PendleOrderMixin is
484
485
  }
485
486
  }
486
487
 
487
- function _transferFromMulti(IERC20 token, address payer, FillOrderParams[] memory params, uint256[] memory netOut)
488
+ function _transferToMakers(IERC20 token, address payer, FillOrderParams[] memory params, uint256[] memory netOut)
488
489
  internal
489
490
  {
490
491
  uint256 len = params.length;
@@ -499,17 +500,6 @@ abstract contract PendleOrderMixin is
499
500
  }
500
501
  }
501
502
 
502
- // ----------------- Getters -----------------
503
- function getOnchainParams(address YT) public returns (OnchainParams memory) {
504
- uint256 timeToExpiry = IPYieldToken(YT).expiry() - block.timestamp;
505
- return OnchainParams({
506
- timeToExpiry: timeToExpiry,
507
- pyIndex: IPYieldToken(YT).pyIndexCurrent(),
508
- feeRecipient: feeRecipient,
509
- lnFeeRateRoot: lnFeeRateRoot
510
- });
511
- }
512
-
513
503
  function hashOrder(Order memory order) public view returns (bytes32) {
514
504
  StaticOrder memory staticOrder;
515
505
  assembly {
@@ -82,7 +82,7 @@ contract ActionAddRemoveLiq is IPActionAddRemoveLiq, ActionBase {
82
82
  uint256 netSyReceived;
83
83
 
84
84
  if (!_isEmptyLimit(limit)) {
85
- (netPtLeft, netSyReceived, netSyFee,) = _fillLimit(receiver, netPtLeft, limit);
85
+ (netPtLeft, netSyReceived, netSyFee,) = _fillLimit(market, netPtLeft, limit);
86
86
  _transferOut(address(PT), market, netPtLeft);
87
87
  }
88
88
 
@@ -166,7 +166,7 @@ contract ActionAddRemoveLiq is IPActionAddRemoveLiq, ActionBase {
166
166
  uint256 netPtReceived;
167
167
 
168
168
  if (!_isEmptyLimit(limit)) {
169
- (netSyLeft, netPtReceived, netSyFee,) = _fillLimit(receiver, netSyLeft, limit);
169
+ (netSyLeft, netPtReceived, netSyFee,) = _fillLimit(market, netSyLeft, limit);
170
170
  _transferOut(address(SY), market, netSyLeft);
171
171
  }
172
172
 
@@ -194,7 +194,7 @@ contract ActionAddRemoveLiq is IPActionAddRemoveLiq, ActionBase {
194
194
  uint256 minLpOut,
195
195
  uint256 minYtOut,
196
196
  TokenInput calldata input
197
- ) external returns (uint256 netLpOut, uint256 netYtOut) {
197
+ ) external payable returns (uint256 netLpOut, uint256 netYtOut) {
198
198
  (IStandardizedYield SY,, IPYieldToken YT) = IPMarket(market).readTokens();
199
199
 
200
200
  uint256 netSyUsed = _mintSyFromToken(address(this), address(SY), 1, input);