@pendle/core-v2 0.13.0-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 (293) 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/deployments/43113-helper.json +3 -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/deployments/43113-testenv.json +22 -0
  186. package/deployments/80001-core.json +15 -0
  187. package/deployments/80001-testenv.json +22 -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/ImplicitSwapfeeContract.ts +157 -0
  208. package/typechain-types/MarketMathStatic.ts +27 -27
  209. package/typechain-types/Pendle3CrvAndTokenSY.ts +1243 -0
  210. package/typechain-types/Pendle3CrvHelper.ts +13 -13
  211. package/typechain-types/PendleConvexLPSY.ts +1189 -0
  212. package/typechain-types/PendleGaugeControllerBaseUpg.ts +125 -0
  213. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +125 -0
  214. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +124 -0
  215. package/typechain-types/PendleMarket.ts +54 -57
  216. package/typechain-types/PendlePrincipalToken.ts +8 -8
  217. package/typechain-types/PendleQiTokenSY.ts +1166 -0
  218. package/typechain-types/PendleWstEthSY.ts +1040 -0
  219. package/typechain-types/PendleYieldContractFactory.ts +8 -8
  220. package/typechain-types/PendleYieldToken.ts +41 -44
  221. package/typechain-types/RouterStatic.ts +196 -196
  222. package/typechain-types/SYBase.ts +1001 -0
  223. package/typechain-types/SYBaseWithRewards.ts +1094 -0
  224. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +34 -34
  225. package/typechain-types/factories/ActionCallback__factory.ts +11 -11
  226. package/typechain-types/factories/ActionMintRedeem__factory.ts +38 -38
  227. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  228. package/typechain-types/factories/ActionSwapPTYT__factory.ts +3 -3
  229. package/typechain-types/factories/ActionSwapPT__factory.ts +27 -27
  230. package/typechain-types/factories/ActionSwapYT__factory.ts +21 -21
  231. package/typechain-types/factories/Errors__factory.ts +27 -27
  232. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +30 -30
  233. package/typechain-types/factories/IPActionMintRedeem__factory.ts +34 -34
  234. package/typechain-types/factories/IPActionSwapPTYT__factory.ts +2 -2
  235. package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -20
  236. package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -20
  237. package/typechain-types/factories/IPAllAction__factory.ts +106 -106
  238. package/typechain-types/factories/IPMarketSwapCallback__factory.ts +1 -1
  239. package/typechain-types/factories/IPMarket__factory.ts +18 -18
  240. package/typechain-types/factories/IPPrincipalToken__factory.ts +1 -1
  241. package/typechain-types/factories/IPYieldContractFactory__factory.ts +3 -3
  242. package/typechain-types/factories/IPYieldToken__factory.ts +6 -6
  243. package/typechain-types/factories/IStandardizedYield__factory.ts +658 -0
  244. package/typechain-types/factories/ImplicitSwapfeeContract__factory.ts +247 -0
  245. package/typechain-types/factories/MarketMathStatic__factory.ts +6 -6
  246. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  247. package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +1124 -0
  248. package/typechain-types/factories/Pendle3CrvHelper__factory.ts +3 -3
  249. package/typechain-types/factories/PendleConvexLPSY__factory.ts +963 -0
  250. package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
  251. package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
  252. package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +89 -0
  253. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +90 -1
  254. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +90 -1
  255. package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
  256. package/typechain-types/factories/PendleMarket__factory.ts +21 -21
  257. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
  258. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
  259. package/typechain-types/factories/PendlePrincipalToken__factory.ts +7 -7
  260. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  261. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1095 -0
  262. package/typechain-types/factories/PendleRouter__factory.ts +1 -1
  263. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
  264. package/typechain-types/factories/PendleWstEthSY__factory.ts +924 -0
  265. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +3 -3
  266. package/typechain-types/factories/PendleYieldToken__factory.ts +27 -27
  267. package/typechain-types/factories/RouterStatic__factory.ts +57 -57
  268. package/typechain-types/factories/SYBaseWithRewards__factory.ts +867 -0
  269. package/typechain-types/factories/SYBase__factory.ts +795 -0
  270. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
  271. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
  272. package/typechain-types/hardhat.d.ts +33 -42
  273. package/typechain-types/index.ts +14 -16
  274. package/build/artifacts/contracts/core/SuperComposableYield/PYIndex.sol/PYIndexLib.dbg.json +0 -4
  275. package/build/artifacts/contracts/core/SuperComposableYield/SCYBase.sol/SCYBase.dbg.json +0 -4
  276. package/build/artifacts/contracts/core/SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +0 -4
  277. package/build/artifacts/contracts/core/SuperComposableYield/SCYUtils.sol/SCYUtils.dbg.json +0 -4
  278. package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +0 -4
  279. package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +0 -4
  280. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.dbg.json +0 -4
  281. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.json +0 -1030
  282. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.dbg.json +0 -4
  283. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.json +0 -1025
  284. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.dbg.json +0 -4
  285. package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
  286. package/build/artifacts/contracts/core/SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +0 -4
  287. package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +0 -4
  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/interfaces/ICelerMessageBus.sol +0 -28
  292. package/contracts/interfaces/ICelerMessageReceiverApp.sol +0 -25
  293. package/deployments/kovan.json +0 -31
@@ -24,14 +24,14 @@
24
24
  pragma solidity 0.8.17;
25
25
  import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
26
26
 
27
- interface ISuperComposableYield is IERC20Metadata {
27
+ interface IStandardizedYield is IERC20Metadata {
28
28
  /// @dev Emitted when any base tokens is deposited to mint shares
29
29
  event Deposit(
30
30
  address indexed caller,
31
31
  address indexed receiver,
32
32
  address indexed tokenIn,
33
33
  uint256 amountDeposited,
34
- uint256 amountScyOut
34
+ uint256 amountSyOut
35
35
  );
36
36
 
37
37
  /// @dev Emitted when any shares are redeemed for base tokens
@@ -39,7 +39,7 @@ interface ISuperComposableYield is IERC20Metadata {
39
39
  address indexed caller,
40
40
  address indexed receiver,
41
41
  address indexed tokenOut,
42
- uint256 amountScyToRedeem,
42
+ uint256 amountSyToRedeem,
43
43
  uint256 amountTokenOut
44
44
  );
45
45
 
@@ -92,10 +92,10 @@ interface ISuperComposableYield is IERC20Metadata {
92
92
  ) external returns (uint256 amountTokenOut);
93
93
 
94
94
  /**
95
- * @notice exchangeRate * scyBalance / 1e18 must return the asset balance of the account
96
- * @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of scy
95
+ * @notice exchangeRate * syBalance / 1e18 must return the asset balance of the account
96
+ * @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of sy
97
97
  he can mint must be X * exchangeRate / 1e18
98
- * @dev SCYUtils's assetToScy & scyToAsset should be used instead of raw multiplication
98
+ * @dev SYUtils's assetToSy & syToAsset should be used instead of raw multiplication
99
99
  & division
100
100
  */
101
101
  function exchangeRate() external view returns (uint256 res);
@@ -14,22 +14,22 @@ library MarketMathStatic {
14
14
  using PYIndexLib for PYIndex;
15
15
  using PYIndexLib for IPYieldToken;
16
16
 
17
- function addLiquidityDualScyAndPtStatic(
17
+ function addLiquidityDualSyAndPtStatic(
18
18
  address market,
19
- uint256 netScyDesired,
19
+ uint256 netSyDesired,
20
20
  uint256 netPtDesired
21
21
  )
22
22
  external
23
23
  view
24
24
  returns (
25
25
  uint256 netLpOut,
26
- uint256 netScyUsed,
26
+ uint256 netSyUsed,
27
27
  uint256 netPtUsed
28
28
  )
29
29
  {
30
30
  MarketState memory state = IPMarket(market).readState();
31
- (, netLpOut, netScyUsed, netPtUsed) = state.addLiquidity(
32
- netScyDesired,
31
+ (, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(
32
+ netSyDesired,
33
33
  netPtDesired,
34
34
  block.timestamp
35
35
  );
@@ -49,19 +49,19 @@ library MarketMathStatic {
49
49
  uint256 netPtUsed
50
50
  )
51
51
  {
52
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
52
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
53
53
 
54
- uint256 scyDesired = SCY.previewDeposit(tokenIn, netTokenDesired);
55
- uint256 scyUsed;
54
+ uint256 syDesired = SY.previewDeposit(tokenIn, netTokenDesired);
55
+ uint256 syUsed;
56
56
 
57
57
  MarketState memory state = IPMarket(market).readState();
58
- (, netLpOut, scyUsed, netPtUsed) = state.addLiquidity(
59
- scyDesired,
58
+ (, netLpOut, syUsed, netPtUsed) = state.addLiquidity(
59
+ syDesired,
60
60
  netPtDesired,
61
61
  block.timestamp
62
62
  );
63
63
 
64
- netTokenUsed = (netTokenDesired * scyUsed).rawDivUp(scyDesired);
64
+ netTokenUsed = (netTokenDesired * syUsed).rawDivUp(syDesired);
65
65
  }
66
66
 
67
67
  /// @dev netPtToSwap is the parameter to approx
@@ -74,7 +74,7 @@ library MarketMathStatic {
74
74
  returns (
75
75
  uint256 netLpOut,
76
76
  uint256 netPtToSwap,
77
- uint256 netScyFee,
77
+ uint256 netSyFee,
78
78
  uint256 priceImpact
79
79
  )
80
80
  {
@@ -89,14 +89,14 @@ library MarketMathStatic {
89
89
 
90
90
  state = IPMarket(market).readState(); // re-read
91
91
 
92
- uint256 netScyReceived;
93
- (netScyReceived, netScyFee) = state.swapExactPtForScy(
92
+ uint256 netSyReceived;
93
+ (netSyReceived, netSyFee) = state.swapExactPtForSy(
94
94
  pyIndex(market),
95
95
  netPtToSwap,
96
96
  block.timestamp
97
97
  );
98
98
  (, netLpOut, , ) = state.addLiquidity(
99
- netScyReceived,
99
+ netSyReceived,
100
100
  netPtIn - netPtToSwap,
101
101
  block.timestamp
102
102
  );
@@ -105,41 +105,37 @@ library MarketMathStatic {
105
105
  }
106
106
 
107
107
  /// @dev netPtFromSwap is the parameter to approx
108
- function addLiquiditySingleScyStatic(
108
+ function addLiquiditySingleSyStatic(
109
109
  address market,
110
- uint256 netScyIn,
110
+ uint256 netSyIn,
111
111
  ApproxParams memory approxParams
112
112
  )
113
113
  public
114
114
  returns (
115
115
  uint256 netLpOut,
116
116
  uint256 netPtFromSwap,
117
- uint256 netScyFee,
117
+ uint256 netSyFee,
118
118
  uint256 priceImpact
119
119
  )
120
120
  {
121
121
  MarketState memory state = IPMarket(market).readState();
122
122
 
123
- (netPtFromSwap, , ) = state.approxSwapScyToAddLiquidity(
123
+ (netPtFromSwap, , ) = state.approxSwapSyToAddLiquidity(
124
124
  pyIndex(market),
125
- netScyIn,
125
+ netSyIn,
126
126
  block.timestamp,
127
127
  approxParams
128
128
  );
129
129
 
130
130
  state = IPMarket(market).readState(); // re-read
131
131
 
132
- uint256 netScySwap;
133
- (netScySwap, netScyFee) = state.swapScyForExactPt(
132
+ uint256 netSySwap;
133
+ (netSySwap, netSyFee) = state.swapSyForExactPt(
134
134
  pyIndex(market),
135
135
  netPtFromSwap,
136
136
  block.timestamp
137
137
  );
138
- (, netLpOut, , ) = state.addLiquidity(
139
- netScyIn - netScySwap,
140
- netPtFromSwap,
141
- block.timestamp
142
- );
138
+ (, netLpOut, , ) = state.addLiquidity(netSyIn - netSySwap, netPtFromSwap, block.timestamp);
143
139
 
144
140
  priceImpact = calcPriceImpact(market, netPtFromSwap.Int());
145
141
  }
@@ -155,27 +151,27 @@ library MarketMathStatic {
155
151
  returns (
156
152
  uint256 netLpOut,
157
153
  uint256 netPtFromSwap,
158
- uint256 netScyFee,
154
+ uint256 netSyFee,
159
155
  uint256 priceImpact
160
156
  )
161
157
  {
162
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
158
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
163
159
 
164
160
  return
165
- addLiquiditySingleScyStatic(
161
+ addLiquiditySingleSyStatic(
166
162
  market,
167
- SCY.previewDeposit(baseToken, netBaseTokenIn),
163
+ SY.previewDeposit(baseToken, netBaseTokenIn),
168
164
  approxParams
169
165
  );
170
166
  }
171
167
 
172
- function removeLiquidityDualScyAndPtStatic(address market, uint256 netLpToRemove)
168
+ function removeLiquidityDualSyAndPtStatic(address market, uint256 netLpToRemove)
173
169
  external
174
170
  view
175
- returns (uint256 netScyOut, uint256 netPtOut)
171
+ returns (uint256 netSyOut, uint256 netPtOut)
176
172
  {
177
173
  MarketState memory state = IPMarket(market).readState();
178
- (netScyOut, netPtOut) = state.removeLiquidity(netLpToRemove);
174
+ (netSyOut, netPtOut) = state.removeLiquidity(netLpToRemove);
179
175
  }
180
176
 
181
177
  function removeLiquidityDualTokenAndPtStatic(
@@ -183,13 +179,13 @@ library MarketMathStatic {
183
179
  uint256 metLpToRemove,
184
180
  address tokenOut
185
181
  ) external view returns (uint256 netTokenOut, uint256 netPtOut) {
186
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
182
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
187
183
 
188
- uint256 netScyOut;
184
+ uint256 netSyOut;
189
185
  MarketState memory state = IPMarket(market).readState();
190
- (netScyOut, netPtOut) = state.removeLiquidity(metLpToRemove);
186
+ (netSyOut, netPtOut) = state.removeLiquidity(metLpToRemove);
191
187
 
192
- netTokenOut = SCY.previewRedeem(tokenOut, netScyOut);
188
+ netTokenOut = SY.previewRedeem(tokenOut, netSyOut);
193
189
  }
194
190
 
195
191
  /// @dev netPtFromSwap is the parameter to approx
@@ -202,16 +198,16 @@ library MarketMathStatic {
202
198
  returns (
203
199
  uint256 netPtOut,
204
200
  uint256 netPtFromSwap,
205
- uint256 netScyFee,
201
+ uint256 netSyFee,
206
202
  uint256 priceImpact
207
203
  )
208
204
  {
209
205
  MarketState memory state = IPMarket(market).readState();
210
206
 
211
- (uint256 scyFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
212
- (netPtFromSwap, netScyFee) = state.approxSwapExactScyForPt(
207
+ (uint256 syFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
208
+ (netPtFromSwap, netSyFee) = state.approxSwapExactSyForPt(
213
209
  pyIndex(market),
214
- scyFromBurn,
210
+ syFromBurn,
215
211
  block.timestamp,
216
212
  approxParams
217
213
  );
@@ -220,29 +216,29 @@ library MarketMathStatic {
220
216
  priceImpact = calcPriceImpact(market, netPtFromSwap.Int());
221
217
  }
222
218
 
223
- function removeLiquiditySingleScyStatic(address market, uint256 netLpToRemove)
219
+ function removeLiquiditySingleSyStatic(address market, uint256 netLpToRemove)
224
220
  public
225
221
  returns (
226
- uint256 netScyOut,
227
- uint256 netScyFee,
222
+ uint256 netSyOut,
223
+ uint256 netSyFee,
228
224
  uint256 priceImpact
229
225
  )
230
226
  {
231
227
  MarketState memory state = IPMarket(market).readState();
232
228
 
233
- (uint256 scyFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
229
+ (uint256 syFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
234
230
 
235
231
  if (IPMarket(market).isExpired()) {
236
- netScyOut = scyFromBurn + pyIndex(market).assetToScy(ptFromBurn);
232
+ netSyOut = syFromBurn + pyIndex(market).assetToSy(ptFromBurn);
237
233
  } else {
238
- uint256 scyFromSwap;
239
- (scyFromSwap, netScyFee) = state.swapExactPtForScy(
234
+ uint256 syFromSwap;
235
+ (syFromSwap, netSyFee) = state.swapExactPtForSy(
240
236
  pyIndex(market),
241
237
  ptFromBurn,
242
238
  block.timestamp
243
239
  );
244
240
 
245
- netScyOut = scyFromBurn + scyFromSwap;
241
+ netSyOut = syFromBurn + syFromSwap;
246
242
  priceImpact = calcPriceImpact(market, ptFromBurn.neg());
247
243
  }
248
244
  }
@@ -255,71 +251,60 @@ library MarketMathStatic {
255
251
  external
256
252
  returns (
257
253
  uint256 netBaseTokenOut,
258
- uint256 netScyFee,
254
+ uint256 netSyFee,
259
255
  uint256 priceImpact
260
256
  )
261
257
  {
262
- uint256 netScyOut;
263
- (netScyOut, netScyFee, priceImpact) = removeLiquiditySingleScyStatic(
264
- market,
265
- netLpToRemove
266
- );
258
+ uint256 netSyOut;
259
+ (netSyOut, netSyFee, priceImpact) = removeLiquiditySingleSyStatic(market, netLpToRemove);
267
260
 
268
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
269
- netBaseTokenOut = SCY.previewRedeem(baseToken, netScyOut);
261
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
262
+ netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
270
263
  }
271
264
 
272
- function swapExactPtForScyStatic(address market, uint256 exactPtIn)
265
+ function swapExactPtForSyStatic(address market, uint256 exactPtIn)
273
266
  public
274
267
  returns (
275
- uint256 netScyOut,
276
- uint256 netScyFee,
268
+ uint256 netSyOut,
269
+ uint256 netSyFee,
277
270
  uint256 priceImpact
278
271
  )
279
272
  {
280
273
  MarketState memory state = IPMarket(market).readState();
281
- (netScyOut, netScyFee) = state.swapExactPtForScy(
282
- pyIndex(market),
283
- exactPtIn,
284
- block.timestamp
285
- );
274
+ (netSyOut, netSyFee) = state.swapExactPtForSy(pyIndex(market), exactPtIn, block.timestamp);
286
275
  priceImpact = calcPriceImpact(market, exactPtIn.neg());
287
276
  }
288
277
 
289
- function swapScyForExactPtStatic(address market, uint256 exactPtOut)
278
+ function swapSyForExactPtStatic(address market, uint256 exactPtOut)
290
279
  external
291
280
  returns (
292
- uint256 netScyIn,
293
- uint256 netScyFee,
281
+ uint256 netSyIn,
282
+ uint256 netSyFee,
294
283
  uint256 priceImpact
295
284
  )
296
285
  {
297
286
  MarketState memory state = IPMarket(market).readState();
298
- (netScyIn, netScyFee) = state.swapScyForExactPt(
299
- pyIndex(market),
300
- exactPtOut,
301
- block.timestamp
302
- );
287
+ (netSyIn, netSyFee) = state.swapSyForExactPt(pyIndex(market), exactPtOut, block.timestamp);
303
288
  priceImpact = calcPriceImpact(market, exactPtOut.Int());
304
289
  }
305
290
 
306
291
  /// @dev netPtOut is the parameter to approx
307
- function swapExactScyForPtStatic(
292
+ function swapExactSyForPtStatic(
308
293
  address market,
309
- uint256 exactScyIn,
294
+ uint256 exactSyIn,
310
295
  ApproxParams memory approxParams
311
296
  )
312
297
  public
313
298
  returns (
314
299
  uint256 netPtOut,
315
- uint256 netScyFee,
300
+ uint256 netSyFee,
316
301
  uint256 priceImpact
317
302
  )
318
303
  {
319
304
  MarketState memory state = IPMarket(market).readState();
320
- (netPtOut, netScyFee) = state.approxSwapExactScyForPt(
305
+ (netPtOut, netSyFee) = state.approxSwapExactSyForPt(
321
306
  pyIndex(market),
322
- exactScyIn,
307
+ exactSyIn,
323
308
  block.timestamp,
324
309
  approxParams
325
310
  );
@@ -327,23 +312,23 @@ library MarketMathStatic {
327
312
  }
328
313
 
329
314
  /// @dev netPtIn is the parameter to approx
330
- function swapPtForExactScyStatic(
315
+ function swapPtForExactSyStatic(
331
316
  address market,
332
- uint256 exactScyOut,
317
+ uint256 exactSyOut,
333
318
  ApproxParams memory approxParams
334
319
  )
335
320
  public
336
321
  returns (
337
322
  uint256 netPtIn,
338
- uint256 netScyFee,
323
+ uint256 netSyFee,
339
324
  uint256 priceImpact
340
325
  )
341
326
  {
342
327
  MarketState memory state = IPMarket(market).readState();
343
328
 
344
- (netPtIn, , netScyFee) = state.approxSwapPtForExactScy(
329
+ (netPtIn, , netSyFee) = state.approxSwapPtForExactSy(
345
330
  pyIndex(market),
346
- exactScyOut,
331
+ exactSyOut,
347
332
  block.timestamp,
348
333
  approxParams
349
334
  );
@@ -360,16 +345,16 @@ library MarketMathStatic {
360
345
  external
361
346
  returns (
362
347
  uint256 netPtOut,
363
- uint256 netScyFee,
348
+ uint256 netSyFee,
364
349
  uint256 priceImpact
365
350
  )
366
351
  {
367
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
352
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
368
353
 
369
354
  return
370
- swapExactScyForPtStatic(
355
+ swapExactSyForPtStatic(
371
356
  market,
372
- SCY.previewDeposit(baseToken, amountBaseToken),
357
+ SY.previewDeposit(baseToken, amountBaseToken),
373
358
  approxParams
374
359
  );
375
360
  }
@@ -382,22 +367,22 @@ library MarketMathStatic {
382
367
  external
383
368
  returns (
384
369
  uint256 netBaseTokenOut,
385
- uint256 netScyFee,
370
+ uint256 netSyFee,
386
371
  uint256 priceImpact
387
372
  )
388
373
  {
389
- uint256 netScyOut;
390
- (netScyOut, netScyFee, priceImpact) = swapExactPtForScyStatic(market, exactPtIn);
374
+ uint256 netSyOut;
375
+ (netSyOut, netSyFee, priceImpact) = swapExactPtForSyStatic(market, exactPtIn);
391
376
 
392
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
393
- netBaseTokenOut = SCY.previewRedeem(baseToken, netScyOut);
377
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
378
+ netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
394
379
  }
395
380
 
396
- function swapScyForExactYtStatic(address market, uint256 exactYtOut)
381
+ function swapSyForExactYtStatic(address market, uint256 exactYtOut)
397
382
  external
398
383
  returns (
399
- uint256 netScyIn,
400
- uint256 netScyFee,
384
+ uint256 netSyIn,
385
+ uint256 netSyFee,
401
386
  uint256 priceImpact
402
387
  )
403
388
  {
@@ -405,38 +390,38 @@ library MarketMathStatic {
405
390
 
406
391
  PYIndex index = pyIndex(market);
407
392
 
408
- uint256 scyReceived;
409
- (scyReceived, netScyFee) = state.swapExactPtForScy(
393
+ uint256 syReceived;
394
+ (syReceived, netSyFee) = state.swapExactPtForSy(
410
395
  pyIndex(market),
411
396
  exactYtOut,
412
397
  block.timestamp
413
398
  );
414
399
 
415
- uint256 totalScyNeed = index.assetToScyUp(exactYtOut);
416
- netScyIn = totalScyNeed.subMax0(scyReceived);
400
+ uint256 totalSyNeed = index.assetToSyUp(exactYtOut);
401
+ netSyIn = totalSyNeed.subMax0(syReceived);
417
402
 
418
403
  priceImpact = calcPriceImpact(market, exactYtOut.neg());
419
404
  }
420
405
 
421
406
  /// @dev netYtOut is the parameter to approx
422
- function swapExactScyForYtStatic(
407
+ function swapExactSyForYtStatic(
423
408
  address market,
424
- uint256 exactScyIn,
409
+ uint256 exactSyIn,
425
410
  ApproxParams memory approxParams
426
411
  )
427
412
  public
428
413
  returns (
429
414
  uint256 netYtOut,
430
- uint256 netScyFee,
415
+ uint256 netSyFee,
431
416
  uint256 priceImpact
432
417
  )
433
418
  {
434
419
  MarketState memory state = IPMarket(market).readState();
435
420
  PYIndex index = pyIndex(market);
436
421
 
437
- (netYtOut, netScyFee) = state.approxSwapExactScyForYt(
422
+ (netYtOut, netSyFee) = state.approxSwapExactSyForYt(
438
423
  index,
439
- exactScyIn,
424
+ exactSyIn,
440
425
  block.timestamp,
441
426
  approxParams
442
427
  );
@@ -444,11 +429,11 @@ library MarketMathStatic {
444
429
  priceImpact = calcPriceImpact(market, netYtOut.neg());
445
430
  }
446
431
 
447
- function swapExactYtForScyStatic(address market, uint256 exactYtIn)
432
+ function swapExactYtForSyStatic(address market, uint256 exactYtIn)
448
433
  public
449
434
  returns (
450
- uint256 netScyOut,
451
- uint256 netScyFee,
435
+ uint256 netSyOut,
436
+ uint256 netSyFee,
452
437
  uint256 priceImpact
453
438
  )
454
439
  {
@@ -456,26 +441,26 @@ library MarketMathStatic {
456
441
 
457
442
  PYIndex index = pyIndex(market);
458
443
 
459
- uint256 scyOwed;
460
- (scyOwed, netScyFee) = state.swapScyForExactPt(index, exactYtIn, block.timestamp);
444
+ uint256 syOwed;
445
+ (syOwed, netSyFee) = state.swapSyForExactPt(index, exactYtIn, block.timestamp);
461
446
 
462
- uint256 amountPYToRepayScyOwed = index.scyToAssetUp(scyOwed);
463
- uint256 amountPYToRedeemScyOut = exactYtIn - amountPYToRepayScyOwed;
447
+ uint256 amountPYToRepaySyOwed = index.syToAssetUp(syOwed);
448
+ uint256 amountPYToRedeemSyOut = exactYtIn - amountPYToRepaySyOwed;
464
449
 
465
- netScyOut = index.assetToScy(amountPYToRedeemScyOut);
450
+ netSyOut = index.assetToSy(amountPYToRedeemSyOut);
466
451
  priceImpact = calcPriceImpact(market, exactYtIn.Int());
467
452
  }
468
453
 
469
454
  /// @dev netYtIn is the parameter to approx
470
- function swapYtForExactScyStatic(
455
+ function swapYtForExactSyStatic(
471
456
  address market,
472
- uint256 exactScyOut,
457
+ uint256 exactSyOut,
473
458
  ApproxParams memory approxParams
474
459
  )
475
460
  external
476
461
  returns (
477
462
  uint256 netYtIn,
478
- uint256 netScyFee,
463
+ uint256 netSyFee,
479
464
  uint256 priceImpact
480
465
  )
481
466
  {
@@ -483,9 +468,9 @@ library MarketMathStatic {
483
468
 
484
469
  PYIndex index = pyIndex(market);
485
470
 
486
- (netYtIn, , netScyFee) = state.approxSwapYtForExactScy(
471
+ (netYtIn, , netSyFee) = state.approxSwapYtForExactSy(
487
472
  index,
488
- exactScyOut,
473
+ exactSyOut,
489
474
  block.timestamp,
490
475
  approxParams
491
476
  );
@@ -500,15 +485,15 @@ library MarketMathStatic {
500
485
  external
501
486
  returns (
502
487
  uint256 netBaseTokenOut,
503
- uint256 netScyFee,
488
+ uint256 netSyFee,
504
489
  uint256 priceImpact
505
490
  )
506
491
  {
507
- uint256 netScyOut;
508
- (netScyOut, netScyFee, priceImpact) = swapExactYtForScyStatic(market, exactYtIn);
492
+ uint256 netSyOut;
493
+ (netSyOut, netSyFee, priceImpact) = swapExactYtForSyStatic(market, exactYtIn);
509
494
 
510
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
511
- netBaseTokenOut = SCY.previewRedeem(baseToken, netScyOut);
495
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
496
+ netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
512
497
  }
513
498
 
514
499
  /// @dev netYtOut is the parameter to approx
@@ -521,16 +506,16 @@ library MarketMathStatic {
521
506
  external
522
507
  returns (
523
508
  uint256 netYtOut,
524
- uint256 netScyFee,
509
+ uint256 netSyFee,
525
510
  uint256 priceImpact
526
511
  )
527
512
  {
528
- (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
513
+ (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
529
514
 
530
515
  return
531
- swapExactScyForYtStatic(
516
+ swapExactSyForYtStatic(
532
517
  market,
533
- SCY.previewDeposit(baseToken, amountBaseToken),
518
+ SY.previewDeposit(baseToken, amountBaseToken),
534
519
  approxParams
535
520
  );
536
521
  }
@@ -545,14 +530,14 @@ library MarketMathStatic {
545
530
  returns (
546
531
  uint256 netYtOut,
547
532
  uint256 totalPtToSwap,
548
- uint256 netScyFee,
533
+ uint256 netSyFee,
549
534
  uint256 priceImpact
550
535
  )
551
536
  {
552
537
  MarketState memory state = IPMarket(market).readState();
553
538
  PYIndex index = pyIndex(market);
554
539
 
555
- (netYtOut, totalPtToSwap, netScyFee) = state.approxSwapExactPtForYt(
540
+ (netYtOut, totalPtToSwap, netSyFee) = state.approxSwapExactPtForYt(
556
541
  index,
557
542
  exactPtIn,
558
543
  block.timestamp,
@@ -571,14 +556,14 @@ library MarketMathStatic {
571
556
  returns (
572
557
  uint256 netPtOut,
573
558
  uint256 totalPtSwapped,
574
- uint256 netScyFee,
559
+ uint256 netSyFee,
575
560
  uint256 priceImpact
576
561
  )
577
562
  {
578
563
  MarketState memory state = IPMarket(market).readState();
579
564
  PYIndex index = pyIndex(market);
580
565
 
581
- (netPtOut, totalPtSwapped, netScyFee) = state.approxSwapExactYtForPt(
566
+ (netPtOut, totalPtSwapped, netSyFee) = state.approxSwapExactYtForPt(
582
567
  index,
583
568
  exactYtIn,
584
569
  block.timestamp,