@pendle/core-v2 0.13.1-testnet → 0.14.0-testnet

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 (299) 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/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
  10. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +2 -2
  12. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +89 -0
  14. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +91 -2
  16. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +91 -2
  18. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  21. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  26. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  32. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  33. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  34. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  36. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +26 -26
  39. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
  41. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +4 -0
  43. package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol/PYIndexLib.json +3 -3
  44. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +4 -0
  45. package/build/artifacts/contracts/core/{SuperComposableYield/SCYBase.sol/SCYBase.json → StandardizedYield/SYBase.sol/SYBase.json} +11 -11
  46. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +4 -0
  47. package/build/artifacts/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.json → StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json} +11 -11
  48. package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +4 -0
  49. package/build/artifacts/contracts/core/{SuperComposableYield/SCYUtils.sol/SCYUtils.json → StandardizedYield/SYUtils.sol/SYUtils.json} +4 -4
  50. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +4 -0
  51. package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +3 -3
  52. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +4 -0
  53. package/build/artifacts/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json} +17 -17
  54. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +4 -0
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +1028 -0
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +4 -0
  57. package/build/artifacts/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.json → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.json} +47 -47
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +4 -0
  59. package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +5 -5
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +4 -0
  61. package/build/artifacts/contracts/core/{SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json → StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json} +13 -13
  62. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +4 -4
  65. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  66. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +4 -4
  67. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  68. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +24 -24
  69. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +28 -28
  71. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  72. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +30 -30
  73. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  74. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +34 -34
  75. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  76. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +20 -20
  77. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
  78. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.json +2 -2
  79. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  80. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +20 -20
  81. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  82. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +106 -106
  83. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  84. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +18 -18
  85. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
  86. package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.json +1 -1
  87. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  88. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.json +1 -1
  89. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  91. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +3 -3
  93. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  94. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +6 -6
  95. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +4 -0
  96. package/build/artifacts/contracts/interfaces/{ISuperComposableYield.sol/ISuperComposableYield.json → IStandardizedYield.sol/IStandardizedYield.json} +5 -5
  97. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
  98. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +7 -7
  99. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  100. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +116 -116
  101. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  102. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +35 -35
  103. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  104. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +12 -12
  105. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  106. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +41 -41
  107. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  108. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
  109. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  110. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +28 -28
  111. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
  112. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +4 -4
  113. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  114. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +22 -22
  115. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  116. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
  117. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  118. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  119. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  120. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  121. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  122. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  123. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
  124. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +96 -27
  125. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +40 -12
  126. package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +24 -5
  127. package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +133 -0
  128. package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +33 -0
  129. package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -1
  130. package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +3 -3
  131. package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +2 -7
  132. package/contracts/core/Market/MarketMathCore.sol +50 -53
  133. package/contracts/core/Market/PendleGauge.sol +8 -8
  134. package/contracts/core/Market/PendleMarket.sol +49 -49
  135. package/contracts/core/Market/PendleMarketFactory.sol +1 -1
  136. package/contracts/core/RewardManager/RewardManager.sol +1 -1
  137. package/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol +16 -16
  138. package/contracts/core/{SuperComposableYield/SCYBase.sol → StandardizedYield/SYBase.sol} +17 -17
  139. package/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol → StandardizedYield/SYBaseWithRewards.sol} +9 -9
  140. package/contracts/core/StandardizedYield/SYUtils.sol +26 -0
  141. package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol +1 -1
  142. package/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol} +10 -10
  143. package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +167 -0
  144. package/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol} +51 -70
  145. package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol +7 -7
  146. package/contracts/core/{SuperComposableYield/implementations/PendleWstEthSCY.sol → StandardizedYield/implementations/PendleWstEthSY.sol} +5 -5
  147. package/contracts/core/YieldContracts/InterestManagerYT.sol +7 -7
  148. package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
  149. package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +15 -15
  150. package/contracts/core/YieldContracts/PendleYieldToken.sol +71 -71
  151. package/contracts/core/libraries/Errors.sol +23 -21
  152. package/contracts/core/libraries/TokenHelper.sol +0 -33
  153. package/contracts/interfaces/Curve/ICrvPool.sol +2 -0
  154. package/contracts/interfaces/ILayerZeroEndpoint.sol +39 -0
  155. package/contracts/interfaces/ILayerZeroReceiver.sol +12 -0
  156. package/contracts/interfaces/IPActionAddRemoveLiq.sol +27 -27
  157. package/contracts/interfaces/IPActionMintRedeem.sol +30 -30
  158. package/contracts/interfaces/IPActionSwapPT.sol +16 -16
  159. package/contracts/interfaces/IPActionSwapPTYT.sol +2 -2
  160. package/contracts/interfaces/IPActionSwapYT.sol +16 -16
  161. package/contracts/interfaces/IPMarket.sol +14 -19
  162. package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
  163. package/contracts/interfaces/IPMsgSendEndpoint.sol +4 -2
  164. package/contracts/interfaces/IPPrincipalToken.sol +1 -1
  165. package/contracts/interfaces/IPYieldContractFactory.sol +3 -3
  166. package/contracts/interfaces/IPYieldToken.sol +7 -9
  167. package/contracts/interfaces/{ISuperComposableYield.sol → IStandardizedYield.sol} +6 -6
  168. package/contracts/offchain-helpers/MarketMathStatic.sol +116 -131
  169. package/contracts/offchain-helpers/RouterStatic.sol +80 -93
  170. package/contracts/router/ActionAddRemoveLiq.sol +99 -111
  171. package/contracts/router/ActionCallback.sol +46 -46
  172. package/contracts/router/ActionMintRedeem.sol +58 -58
  173. package/contracts/router/ActionSwapPT.sol +61 -69
  174. package/contracts/router/ActionSwapPTYT.sol +7 -7
  175. package/contracts/router/ActionSwapYT.sol +72 -79
  176. package/contracts/router/PendleRouter.sol +16 -16
  177. package/contracts/router/base/ActionBaseMintRedeem.sol +43 -43
  178. package/contracts/router/base/CallbackHelper.sol +20 -20
  179. package/contracts/router/base/MarketApproxLib.sol +166 -143
  180. package/contracts/router/kyberswap/KyberSwapHelper.sol +2 -2
  181. package/deployments/43113-core.json +16 -0
  182. package/{contracts/deployments → deployments}/43113-helper.json +0 -0
  183. package/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +8 -0
  184. package/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +8 -0
  185. package/{contracts/deployments → deployments}/43113-testenv.json +0 -0
  186. package/deployments/80001-core.json +15 -0
  187. package/{contracts/deployments → deployments}/80001-testenv.json +0 -0
  188. package/package.json +2 -2
  189. package/typechain-types/ActionAddRemoveLiq.ts +127 -129
  190. package/typechain-types/ActionCallback.ts +5 -5
  191. package/typechain-types/ActionMintRedeem.ts +139 -141
  192. package/typechain-types/ActionSwapPT.ts +73 -73
  193. package/typechain-types/ActionSwapPTYT.ts +2 -2
  194. package/typechain-types/ActionSwapYT.ts +73 -73
  195. package/typechain-types/IPActionAddRemoveLiq.ts +127 -129
  196. package/typechain-types/IPActionMintRedeem.ts +139 -141
  197. package/typechain-types/IPActionSwapPT.ts +73 -73
  198. package/typechain-types/IPActionSwapPTYT.ts +2 -2
  199. package/typechain-types/IPActionSwapYT.ts +73 -73
  200. package/typechain-types/IPAllAction.ts +402 -406
  201. package/typechain-types/IPMarket.ts +51 -54
  202. package/typechain-types/IPMarketSwapCallback.ts +5 -5
  203. package/typechain-types/IPPrincipalToken.ts +8 -8
  204. package/typechain-types/IPYieldContractFactory.ts +13 -13
  205. package/typechain-types/IPYieldToken.ts +17 -17
  206. package/typechain-types/IStandardizedYield.ts +895 -0
  207. package/typechain-types/MarketMathStatic.ts +27 -27
  208. package/typechain-types/Pendle3CrvAndTokenSY.ts +1243 -0
  209. package/typechain-types/Pendle3CrvHelper.ts +13 -13
  210. package/typechain-types/PendleConvexLPSY.ts +1189 -0
  211. package/typechain-types/PendleGaugeControllerBaseUpg.ts +125 -0
  212. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +125 -0
  213. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +124 -0
  214. package/typechain-types/PendleMarket.ts +54 -57
  215. package/typechain-types/PendlePrincipalToken.ts +8 -8
  216. package/typechain-types/PendleQiTokenSY.ts +1166 -0
  217. package/typechain-types/PendleWstEthSY.ts +1040 -0
  218. package/typechain-types/PendleYieldContractFactory.ts +8 -8
  219. package/typechain-types/PendleYieldToken.ts +41 -44
  220. package/typechain-types/RouterStatic.ts +196 -196
  221. package/typechain-types/SYBase.ts +1001 -0
  222. package/typechain-types/SYBaseWithRewards.ts +1094 -0
  223. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +34 -34
  224. package/typechain-types/factories/ActionCallback__factory.ts +11 -11
  225. package/typechain-types/factories/ActionMintRedeem__factory.ts +38 -38
  226. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  227. package/typechain-types/factories/ActionSwapPTYT__factory.ts +3 -3
  228. package/typechain-types/factories/ActionSwapPT__factory.ts +27 -27
  229. package/typechain-types/factories/ActionSwapYT__factory.ts +21 -21
  230. package/typechain-types/factories/Errors__factory.ts +27 -27
  231. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +30 -30
  232. package/typechain-types/factories/IPActionMintRedeem__factory.ts +34 -34
  233. package/typechain-types/factories/IPActionSwapPTYT__factory.ts +2 -2
  234. package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -20
  235. package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -20
  236. package/typechain-types/factories/IPAllAction__factory.ts +106 -106
  237. package/typechain-types/factories/IPMarketSwapCallback__factory.ts +1 -1
  238. package/typechain-types/factories/IPMarket__factory.ts +18 -18
  239. package/typechain-types/factories/IPPrincipalToken__factory.ts +1 -1
  240. package/typechain-types/factories/IPYieldContractFactory__factory.ts +3 -3
  241. package/typechain-types/factories/IPYieldToken__factory.ts +6 -6
  242. package/typechain-types/factories/IStandardizedYield__factory.ts +658 -0
  243. package/typechain-types/factories/MarketMathStatic__factory.ts +6 -6
  244. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  245. package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +1124 -0
  246. package/typechain-types/factories/Pendle3CrvHelper__factory.ts +3 -3
  247. package/typechain-types/factories/PendleConvexLPSY__factory.ts +963 -0
  248. package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
  249. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  250. package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +89 -0
  251. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +90 -1
  252. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +90 -1
  253. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  254. package/typechain-types/factories/PendleMarket__factory.ts +21 -21
  255. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  256. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  257. package/typechain-types/factories/PendlePrincipalToken__factory.ts +7 -7
  258. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  259. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1095 -0
  260. package/typechain-types/factories/PendleRouter__factory.ts +1 -1
  261. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  262. package/typechain-types/factories/PendleWstEthSY__factory.ts +924 -0
  263. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +3 -3
  264. package/typechain-types/factories/PendleYieldToken__factory.ts +27 -27
  265. package/typechain-types/factories/RouterStatic__factory.ts +57 -57
  266. package/typechain-types/factories/SYBaseWithRewards__factory.ts +867 -0
  267. package/typechain-types/factories/SYBase__factory.ts +795 -0
  268. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  269. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  270. package/typechain-types/hardhat.d.ts +33 -51
  271. package/typechain-types/index.ts +14 -18
  272. package/build/artifacts/contracts/core/SuperComposableYield/PYIndex.sol/PYIndexLib.dbg.json +0 -4
  273. package/build/artifacts/contracts/core/SuperComposableYield/SCYBase.sol/SCYBase.dbg.json +0 -4
  274. package/build/artifacts/contracts/core/SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +0 -4
  275. package/build/artifacts/contracts/core/SuperComposableYield/SCYUtils.sol/SCYUtils.dbg.json +0 -4
  276. package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +0 -4
  277. package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +0 -4
  278. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.dbg.json +0 -4
  279. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.json +0 -1030
  280. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.dbg.json +0 -4
  281. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.json +0 -1025
  282. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.dbg.json +0 -4
  283. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
  284. package/build/artifacts/contracts/core/SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +0 -4
  285. package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +0 -4
  286. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.dbg.json +0 -4
  287. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.json +0 -190
  288. package/contracts/core/SuperComposableYield/SCYUtils.sol +0 -34
  289. package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol +0 -135
  290. package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol +0 -96
  291. package/contracts/deployments/43113-core.json +0 -16
  292. package/contracts/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
  293. package/contracts/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
  294. package/contracts/deployments/80001-core.json +0 -15
  295. package/contracts/deployments/80001-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
  296. package/contracts/deployments/80001-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
  297. package/contracts/interfaces/ICelerMessageBus.sol +0 -28
  298. package/contracts/interfaces/ICelerMessageReceiverApp.sol +0 -25
  299. package/contracts/offchain-helpers/ImplicitSwapfeeContract.sol +0 -26
@@ -28,7 +28,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
28
28
  }
29
29
 
30
30
  struct AssetAmount {
31
- ISuperComposableYield.AssetType assetType;
31
+ IStandardizedYield.AssetType assetType;
32
32
  address assetAddress;
33
33
  uint256 amount;
34
34
  }
@@ -51,7 +51,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
51
51
  address market;
52
52
  uint256 lpBalance;
53
53
  TokenAmount ptBalance;
54
- TokenAmount scyBalance;
54
+ TokenAmount syBalance;
55
55
  AssetAmount assetBalance;
56
56
  }
57
57
 
@@ -139,17 +139,17 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
139
139
  external
140
140
  returns (
141
141
  address pt,
142
- address scy,
142
+ address sy,
143
143
  MarketState memory state,
144
144
  int256 impliedYield,
145
145
  uint256 exchangeRate
146
146
  )
147
147
  {
148
148
  IPMarket _market = IPMarket(market);
149
- (ISuperComposableYield SCY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
149
+ (IStandardizedYield SY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
150
150
 
151
151
  pt = address(PT);
152
- scy = address(SCY);
152
+ sy = address(SY);
153
153
  state = _market.readState();
154
154
  impliedYield = getPtImpliedYield(market);
155
155
  exchangeRate = MarketMathStatic.getExchangeRate(market);
@@ -179,19 +179,19 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
179
179
  }
180
180
  }
181
181
 
182
- function getUserSCYInfo(address scy, address user)
182
+ function getUserSYInfo(address sy, address user)
183
183
  external
184
184
  view
185
185
  returns (uint256 balance, TokenAmount[] memory rewards)
186
186
  {
187
- ISuperComposableYield SCY = ISuperComposableYield(scy);
188
- balance = SCY.balanceOf(scy);
189
- address[] memory rewardTokens = SCY.getRewardTokens();
187
+ IStandardizedYield SY = IStandardizedYield(sy);
188
+ balance = SY.balanceOf(sy);
189
+ address[] memory rewardTokens = SY.getRewardTokens();
190
190
  rewards = new TokenAmount[](rewardTokens.length);
191
191
  for (uint256 i = 0; i < rewardTokens.length; ++i) {
192
192
  address rewardToken = rewardTokens[i];
193
193
  rewards[i].token = rewardToken;
194
- (, rewards[i].amount) = IRewardManager(scy).userReward(rewardToken, user);
194
+ (, rewards[i].amount) = IRewardManager(sy).userReward(rewardToken, user);
195
195
  }
196
196
  }
197
197
 
@@ -204,7 +204,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
204
204
  IPYieldToken YT = IPYieldToken(userPYInfo.yt);
205
205
  userPYInfo.ytBalance = YT.balanceOf(user);
206
206
  userPYInfo.ptBalance = IPPrincipalToken(userPYInfo.pt).balanceOf(user);
207
- userPYInfo.unclaimedInterest.token = YT.SCY();
207
+ userPYInfo.unclaimedInterest.token = YT.SY();
208
208
  (, userPYInfo.unclaimedInterest.amount) = YT.userInterest(user);
209
209
  address[] memory rewardTokens = YT.getRewardTokens();
210
210
  TokenAmount[] memory unclaimedRewards = new TokenAmount[](rewardTokens.length);
@@ -235,8 +235,8 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
235
235
  userMarketInfo.market = market;
236
236
  userMarketInfo.lpBalance = userLp;
237
237
 
238
- (ISuperComposableYield SCY, IPPrincipalToken PT, ) = _market.readTokens();
239
- (userMarketInfo.assetBalance.assetType, userMarketInfo.assetBalance.assetAddress, ) = SCY
238
+ (IStandardizedYield SY, IPPrincipalToken PT, ) = _market.readTokens();
239
+ (userMarketInfo.assetBalance.assetType, userMarketInfo.assetBalance.assetAddress, ) = SY
240
240
  .assetInfo();
241
241
 
242
242
  MarketState memory state = _market.readState();
@@ -247,11 +247,11 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
247
247
  }
248
248
 
249
249
  uint256 userPt = (userLp * uint256(state.totalPt)) / totalLp;
250
- uint256 userScy = (userLp * uint256(state.totalScy)) / totalLp;
250
+ uint256 userSy = (userLp * uint256(state.totalSy)) / totalLp;
251
251
 
252
252
  userMarketInfo.ptBalance = TokenAmount(address(PT), userPt);
253
- userMarketInfo.scyBalance = TokenAmount(address(SCY), userScy);
254
- userMarketInfo.assetBalance.amount = (userScy * SCY.exchangeRate()) / Math.ONE;
253
+ userMarketInfo.syBalance = TokenAmount(address(SY), userSy);
254
+ userMarketInfo.assetBalance.amount = (userSy * SY.exchangeRate()) / Math.ONE;
255
255
  }
256
256
 
257
257
  function hasPYPosition(UserPYInfo calldata userPYInfo) public pure returns (bool hasPosition) {
@@ -263,21 +263,20 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
263
263
 
264
264
  // ============= MARKET ACTIONS =============
265
265
 
266
- function addLiquidityDualScyAndPtStatic(
266
+ function addLiquidityDualSyAndPtStatic(
267
267
  address market,
268
- uint256 netScyDesired,
268
+ uint256 netSyDesired,
269
269
  uint256 netPtDesired
270
270
  )
271
271
  external
272
272
  view
273
273
  returns (
274
274
  uint256 netLpOut,
275
- uint256 netScyUsed,
275
+ uint256 netSyUsed,
276
276
  uint256 netPtUsed
277
277
  )
278
278
  {
279
- return
280
- MarketMathStatic.addLiquidityDualScyAndPtStatic(market, netScyDesired, netPtDesired);
279
+ return MarketMathStatic.addLiquidityDualSyAndPtStatic(market, netSyDesired, netPtDesired);
281
280
  }
282
281
 
283
282
  function addLiquidityDualTokenAndPtStatic(
@@ -308,7 +307,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
308
307
  returns (
309
308
  uint256 netLpOut,
310
309
  uint256 netPtToSwap,
311
- uint256 netScyFee,
310
+ uint256 netSyFee,
312
311
  uint256 priceImpact
313
312
  )
314
313
  {
@@ -316,21 +315,17 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
316
315
  MarketMathStatic.addLiquiditySinglePtStatic(market, netPtIn, getDefaultApproxParams());
317
316
  }
318
317
 
319
- function addLiquiditySingleScyStatic(address market, uint256 netScyIn)
318
+ function addLiquiditySingleSyStatic(address market, uint256 netSyIn)
320
319
  public
321
320
  returns (
322
321
  uint256 netLpOut,
323
322
  uint256 netPtFromSwap,
324
- uint256 netScyFee,
323
+ uint256 netSyFee,
325
324
  uint256 priceImpact
326
325
  )
327
326
  {
328
327
  return
329
- MarketMathStatic.addLiquiditySingleScyStatic(
330
- market,
331
- netScyIn,
332
- getDefaultApproxParams()
333
- );
328
+ MarketMathStatic.addLiquiditySingleSyStatic(market, netSyIn, getDefaultApproxParams());
334
329
  }
335
330
 
336
331
  function addLiquiditySingleBaseTokenStatic(
@@ -342,7 +337,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
342
337
  returns (
343
338
  uint256 netLpOut,
344
339
  uint256 netPtFromSwap,
345
- uint256 netScyFee,
340
+ uint256 netSyFee,
346
341
  uint256 priceImpact
347
342
  )
348
343
  {
@@ -355,12 +350,12 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
355
350
  );
356
351
  }
357
352
 
358
- function removeLiquidityDualScyAndPtStatic(address market, uint256 netLpToRemove)
353
+ function removeLiquidityDualSyAndPtStatic(address market, uint256 netLpToRemove)
359
354
  external
360
355
  view
361
- returns (uint256 netScyOut, uint256 netPtOut)
356
+ returns (uint256 netSyOut, uint256 netPtOut)
362
357
  {
363
- return MarketMathStatic.removeLiquidityDualScyAndPtStatic(market, netLpToRemove);
358
+ return MarketMathStatic.removeLiquidityDualSyAndPtStatic(market, netLpToRemove);
364
359
  }
365
360
 
366
361
  function removeLiquidityDualTokenAndPtStatic(
@@ -377,7 +372,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
377
372
  returns (
378
373
  uint256 netPtOut,
379
374
  uint256 netPtFromSwap,
380
- uint256 netScyFee,
375
+ uint256 netSyFee,
381
376
  uint256 priceImpact
382
377
  )
383
378
  {
@@ -389,15 +384,15 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
389
384
  );
390
385
  }
391
386
 
392
- function removeLiquiditySingleScyStatic(address market, uint256 netLpToRemove)
387
+ function removeLiquiditySingleSyStatic(address market, uint256 netLpToRemove)
393
388
  public
394
389
  returns (
395
- uint256 netScyOut,
396
- uint256 netScyFee,
390
+ uint256 netSyOut,
391
+ uint256 netSyFee,
397
392
  uint256 priceImpact
398
393
  )
399
394
  {
400
- return MarketMathStatic.removeLiquiditySingleScyStatic(market, netLpToRemove);
395
+ return MarketMathStatic.removeLiquiditySingleSyStatic(market, netLpToRemove);
401
396
  }
402
397
 
403
398
  function removeLiquiditySingleBaseTokenStatic(
@@ -408,7 +403,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
408
403
  external
409
404
  returns (
410
405
  uint256 netBaseTokenOut,
411
- uint256 netScyFee,
406
+ uint256 netSyFee,
412
407
  uint256 priceImpact
413
408
  )
414
409
  {
@@ -420,54 +415,50 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
420
415
  );
421
416
  }
422
417
 
423
- function swapExactPtForScyStatic(address market, uint256 exactPtIn)
418
+ function swapExactPtForSyStatic(address market, uint256 exactPtIn)
424
419
  public
425
420
  returns (
426
- uint256 netScyOut,
427
- uint256 netScyFee,
421
+ uint256 netSyOut,
422
+ uint256 netSyFee,
428
423
  uint256 priceImpact
429
424
  )
430
425
  {
431
- return MarketMathStatic.swapExactPtForScyStatic(market, exactPtIn);
426
+ return MarketMathStatic.swapExactPtForSyStatic(market, exactPtIn);
432
427
  }
433
428
 
434
- function swapScyForExactPtStatic(address market, uint256 exactPtOut)
429
+ function swapSyForExactPtStatic(address market, uint256 exactPtOut)
435
430
  external
436
431
  returns (
437
- uint256 netScyIn,
438
- uint256 netScyFee,
432
+ uint256 netSyIn,
433
+ uint256 netSyFee,
439
434
  uint256 priceImpact
440
435
  )
441
436
  {
442
- return MarketMathStatic.swapScyForExactPtStatic(market, exactPtOut);
437
+ return MarketMathStatic.swapSyForExactPtStatic(market, exactPtOut);
443
438
  }
444
439
 
445
- function swapExactScyForPtStatic(address market, uint256 exactScyIn)
440
+ function swapExactSyForPtStatic(address market, uint256 exactSyIn)
446
441
  public
447
442
  returns (
448
443
  uint256 netPtOut,
449
- uint256 netScyFee,
444
+ uint256 netSyFee,
450
445
  uint256 priceImpact
451
446
  )
452
447
  {
453
448
  return
454
- MarketMathStatic.swapExactScyForPtStatic(market, exactScyIn, getDefaultApproxParams());
449
+ MarketMathStatic.swapExactSyForPtStatic(market, exactSyIn, getDefaultApproxParams());
455
450
  }
456
451
 
457
- function swapPtForExactScyStatic(address market, uint256 exactScyOut)
452
+ function swapPtForExactSyStatic(address market, uint256 exactSyOut)
458
453
  public
459
454
  returns (
460
455
  uint256 netPtIn,
461
- uint256 netScyFee,
456
+ uint256 netSyFee,
462
457
  uint256 priceImpact
463
458
  )
464
459
  {
465
460
  return
466
- MarketMathStatic.swapPtForExactScyStatic(
467
- market,
468
- exactScyOut,
469
- getDefaultApproxParams()
470
- );
461
+ MarketMathStatic.swapPtForExactSyStatic(market, exactSyOut, getDefaultApproxParams());
471
462
  }
472
463
 
473
464
  function swapExactBaseTokenForPtStatic(
@@ -478,7 +469,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
478
469
  external
479
470
  returns (
480
471
  uint256 netPtOut,
481
- uint256 netScyFee,
472
+ uint256 netSyFee,
482
473
  uint256 priceImpact
483
474
  )
484
475
  {
@@ -499,61 +490,57 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
499
490
  external
500
491
  returns (
501
492
  uint256 netBaseTokenOut,
502
- uint256 netScyFee,
493
+ uint256 netSyFee,
503
494
  uint256 priceImpact
504
495
  )
505
496
  {
506
497
  return MarketMathStatic.swapExactPtForBaseTokenStatic(market, exactPtIn, baseToken);
507
498
  }
508
499
 
509
- function swapScyForExactYtStatic(address market, uint256 exactYtOut)
500
+ function swapSyForExactYtStatic(address market, uint256 exactYtOut)
510
501
  external
511
502
  returns (
512
- uint256 netScyIn,
513
- uint256 netScyFee,
503
+ uint256 netSyIn,
504
+ uint256 netSyFee,
514
505
  uint256 priceImpact
515
506
  )
516
507
  {
517
- return MarketMathStatic.swapScyForExactYtStatic(market, exactYtOut);
508
+ return MarketMathStatic.swapSyForExactYtStatic(market, exactYtOut);
518
509
  }
519
510
 
520
- function swapExactScyForYtStatic(address market, uint256 exactScyIn)
511
+ function swapExactSyForYtStatic(address market, uint256 exactSyIn)
521
512
  public
522
513
  returns (
523
514
  uint256 netYtOut,
524
- uint256 netScyFee,
515
+ uint256 netSyFee,
525
516
  uint256 priceImpact
526
517
  )
527
518
  {
528
519
  return
529
- MarketMathStatic.swapExactScyForYtStatic(market, exactScyIn, getDefaultApproxParams());
520
+ MarketMathStatic.swapExactSyForYtStatic(market, exactSyIn, getDefaultApproxParams());
530
521
  }
531
522
 
532
- function swapExactYtForScyStatic(address market, uint256 exactYtIn)
523
+ function swapExactYtForSyStatic(address market, uint256 exactYtIn)
533
524
  public
534
525
  returns (
535
- uint256 netScyOut,
536
- uint256 netScyFee,
526
+ uint256 netSyOut,
527
+ uint256 netSyFee,
537
528
  uint256 priceImpact
538
529
  )
539
530
  {
540
- return MarketMathStatic.swapExactYtForScyStatic(market, exactYtIn);
531
+ return MarketMathStatic.swapExactYtForSyStatic(market, exactYtIn);
541
532
  }
542
533
 
543
- function swapYtForExactScyStatic(address market, uint256 exactScyOut)
534
+ function swapYtForExactSyStatic(address market, uint256 exactSyOut)
544
535
  external
545
536
  returns (
546
537
  uint256 netYtIn,
547
- uint256 netScyFee,
538
+ uint256 netSyFee,
548
539
  uint256 priceImpact
549
540
  )
550
541
  {
551
542
  return
552
- MarketMathStatic.swapYtForExactScyStatic(
553
- market,
554
- exactScyOut,
555
- getDefaultApproxParams()
556
- );
543
+ MarketMathStatic.swapYtForExactSyStatic(market, exactSyOut, getDefaultApproxParams());
557
544
  }
558
545
 
559
546
  function swapExactYtForBaseTokenStatic(
@@ -564,7 +551,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
564
551
  external
565
552
  returns (
566
553
  uint256 netBaseTokenOut,
567
- uint256 netScyFee,
554
+ uint256 netSyFee,
568
555
  uint256 priceImpact
569
556
  )
570
557
  {
@@ -579,7 +566,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
579
566
  external
580
567
  returns (
581
568
  uint256 netYtOut,
582
- uint256 netScyFee,
569
+ uint256 netSyFee,
583
570
  uint256 priceImpact
584
571
  )
585
572
  {
@@ -597,7 +584,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
597
584
  returns (
598
585
  uint256 netYtOut,
599
586
  uint256 totalPtToSwap,
600
- uint256 netScyFee,
587
+ uint256 netSyFee,
601
588
  uint256 priceImpact
602
589
  )
603
590
  {
@@ -609,7 +596,7 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
609
596
  returns (
610
597
  uint256 netPtOut,
611
598
  uint256 totalPtSwapped,
612
- uint256 netScyFee,
599
+ uint256 netSyFee,
613
600
  uint256 priceImpact
614
601
  )
615
602
  {
@@ -654,16 +641,16 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
654
641
 
655
642
  // ============= OTHER HELPERS =============
656
643
 
657
- function mintPYFromScyStatic(address YT, uint256 amountScyToMint)
644
+ function mintPYFromSyStatic(address YT, uint256 amountSyToMint)
658
645
  public
659
646
  returns (uint256 amountPY)
660
647
  {
661
648
  IPYieldToken _YT = IPYieldToken(YT);
662
649
  if (_YT.isExpired()) revert Errors.YCExpired();
663
- return amountScyToMint.mulDown(_YT.pyIndexCurrent());
650
+ return amountSyToMint.mulDown(_YT.pyIndexCurrent());
664
651
  }
665
652
 
666
- function redeemPYToScyStatic(address YT, uint256 amountPYToRedeem)
653
+ function redeemPYToSyStatic(address YT, uint256 amountPYToRedeem)
667
654
  public
668
655
  returns (uint256 amountPY)
669
656
  {
@@ -676,8 +663,8 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
676
663
  address baseToken,
677
664
  uint256 amountBaseToken
678
665
  ) external returns (uint256 amountPY) {
679
- ISuperComposableYield SCY = ISuperComposableYield(IPYieldToken(YT).SCY());
680
- return mintPYFromScyStatic(YT, SCY.previewDeposit(baseToken, amountBaseToken));
666
+ IStandardizedYield SY = IStandardizedYield(IPYieldToken(YT).SY());
667
+ return mintPYFromSyStatic(YT, SY.previewDeposit(baseToken, amountBaseToken));
681
668
  }
682
669
 
683
670
  function redeemPYToBaseStatic(
@@ -685,8 +672,8 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
685
672
  uint256 amountPYToRedeem,
686
673
  address baseToken
687
674
  ) external returns (uint256 amountBaseToken) {
688
- ISuperComposableYield SCY = ISuperComposableYield(IPYieldToken(YT).SCY());
689
- return SCY.previewRedeem(baseToken, redeemPYToScyStatic(YT, amountPYToRedeem));
675
+ IStandardizedYield SY = IStandardizedYield(IPYieldToken(YT).SY());
676
+ return SY.previewRedeem(baseToken, redeemPYToSyStatic(YT, amountPYToRedeem));
690
677
  }
691
678
 
692
679
  function getPtImpliedYield(address market) public view returns (int256) {
@@ -722,12 +709,12 @@ contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeabl
722
709
  returns (address[] memory tokensIn, address[] memory tokensOut)
723
710
  {
724
711
  if (pyToken != address(0)) {
725
- // SCY interface is shared between pt & yt
726
- ISuperComposableYield SCY = ISuperComposableYield(IPPrincipalToken(pyToken).SCY());
727
- return (SCY.getTokensIn(), SCY.getTokensOut());
712
+ // SY interface is shared between pt & yt
713
+ IStandardizedYield SY = IStandardizedYield(IPPrincipalToken(pyToken).SY());
714
+ return (SY.getTokensIn(), SY.getTokensOut());
728
715
  } else {
729
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
730
- return (SCY.getTokensIn(), SCY.getTokensOut());
716
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
717
+ return (SY.getTokensIn(), SY.getTokensOut());
731
718
  }
732
719
  }
733
720
  }