@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
@@ -1,57 +1,48 @@
1
1
  // SPDX-License-Identifier: GPL-3.0-or-later
2
2
  pragma solidity 0.8.17;
3
3
 
4
- import "../../../SCYBaseWithRewards.sol";
4
+ import "../../../SYBaseWithRewards.sol";
5
5
  import "../../../../../interfaces/ConvexCurve/IBooster.sol";
6
6
  import "../../../../../interfaces/ConvexCurve/IRewards.sol";
7
7
  import "../../../../../interfaces/Curve/ICrvPool.sol";
8
8
 
9
- abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
9
+ abstract contract PendleConvexLPSY is SYBaseWithRewards {
10
10
  using SafeERC20 for IERC20;
11
11
 
12
- uint256 public immutable pid;
13
- address public immutable booster;
14
- address public immutable baseRewards;
12
+ uint256 public immutable cvxPid;
13
+ address public immutable cvxRewardManager;
14
+
15
15
  address public immutable crvPool;
16
+ address public immutable crvLp;
16
17
 
17
- address public immutable CRV;
18
- address public immutable CVX;
19
- address public immutable LP;
18
+ address public constant BOOSTER = 0xF403C135812408BFbE8713b5A23a04b3D48AAE31;
19
+ address public constant CRV = 0xD533a949740bb3306d119CC777fa900bA034cd52;
20
+ address public constant CVX = 0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B;
20
21
 
21
22
  constructor(
22
23
  string memory _name,
23
24
  string memory _symbol,
24
- uint256 _pid,
25
- address _convexBooster,
26
- address _crvLpToken,
27
- address _cvx,
28
- address _baseCrvPool
29
- ) SCYBaseWithRewards(_name, _symbol, _crvLpToken) {
30
- pid = _pid;
31
- CVX = _cvx;
32
- crvPool = _baseCrvPool;
33
-
34
- booster = _convexBooster;
35
-
36
- (LP, baseRewards, CRV) = _getPoolInfo(pid);
37
- if (LP != _crvLpToken) revert Errors.SCYCurveInvalidPid();
38
-
39
- _safeApprove(LP, booster, type(uint256).max);
25
+ uint256 _cvxPid,
26
+ address _crvLp,
27
+ address _crvPool
28
+ ) SYBaseWithRewards(_name, _symbol, _crvLp) {
29
+ cvxPid = _cvxPid;
30
+ crvPool = _crvPool;
31
+
32
+ (crvLp, cvxRewardManager) = _getPoolInfo(cvxPid);
33
+ if (crvLp != _crvLp) revert Errors.SYCurveInvalidPid();
34
+
35
+ _safeApprove(crvLp, BOOSTER, type(uint256).max);
40
36
  }
41
37
 
42
- function _getPoolInfo(uint256 _pid)
38
+ function _getPoolInfo(uint256 _cvxPid)
43
39
  internal
44
40
  view
45
- returns (
46
- address lptoken,
47
- address crvRewards,
48
- address crv
49
- )
41
+ returns (address _crvLp, address _cvxRewardManager)
50
42
  {
51
- if (_pid > IBooster(booster).poolLength()) revert Errors.SCYCurveInvalidPid();
43
+ if (_cvxPid > IBooster(BOOSTER).poolLength()) revert Errors.SYCurveInvalidPid();
52
44
 
53
- (lptoken, , , crvRewards, , ) = IBooster(booster).poolInfo(_pid);
54
- crv = IBooster(booster).crv();
45
+ (_crvLp, , , _cvxRewardManager, , ) = IBooster(BOOSTER).poolInfo(_cvxPid);
55
46
  }
56
47
 
57
48
  /*///////////////////////////////////////////////////////////////
@@ -68,17 +59,13 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
68
59
  override
69
60
  returns (uint256 amountSharesOut)
70
61
  {
71
- if (tokenIn == LP) {
72
- IBooster(booster).deposit(pid, amount, true);
62
+ if (tokenIn == crvLp) {
73
63
  amountSharesOut = amount;
74
64
  } else {
75
- uint256 prevLpBalance = _selfBalance(LP);
76
- _depositToCurve(tokenIn, amount);
77
- amountSharesOut = _selfBalance(LP) - prevLpBalance;
78
-
79
- // Deposit LP Token received into Convex Booster
80
- IBooster(booster).deposit(pid, amountSharesOut, true);
65
+ amountSharesOut = _depositToCurve(tokenIn, amount);
81
66
  }
67
+
68
+ IBooster(BOOSTER).deposit(cvxPid, amountSharesOut, true);
82
69
  }
83
70
 
84
71
  /**
@@ -90,21 +77,14 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
90
77
  address tokenOut,
91
78
  uint256 amountSharesToRedeem
92
79
  ) internal virtual override returns (uint256 amountTokenOut) {
93
- IRewards(baseRewards).withdrawAndUnwrap(amountSharesToRedeem, false);
94
-
95
- if (_isBaseToken(tokenOut)) {
96
- uint256 prevBal = _selfBalance(tokenOut);
97
- ICrvPool(crvPool).remove_liquidity_one_coin(
98
- amountSharesToRedeem,
99
- Math.Int128(_getBaseTokenIndex(tokenOut)),
100
- 0
101
- );
102
- amountTokenOut = _selfBalance(tokenOut) - prevBal;
103
- } else {
104
- // 'tokenOut' is LP
80
+ IRewards(cvxRewardManager).withdrawAndUnwrap(amountSharesToRedeem, false);
81
+
82
+ if (tokenOut == crvLp) {
105
83
  amountTokenOut = amountSharesToRedeem;
84
+ } else {
85
+ amountTokenOut = _redeemFromCurve(tokenOut, amountSharesToRedeem);
106
86
  }
107
- if (receiver != address(this)) _transferOut(tokenOut, receiver, amountTokenOut);
87
+ _transferOut(tokenOut, receiver, amountTokenOut);
108
88
  }
109
89
 
110
90
  /*///////////////////////////////////////////////////////////////
@@ -135,7 +115,7 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
135
115
 
136
116
  function _redeemExternalReward() internal virtual override {
137
117
  // Redeem all extra rewards from the curve pool
138
- IRewards(baseRewards).getReward();
118
+ IRewards(cvxRewardManager).getReward();
139
119
  }
140
120
 
141
121
  /*///////////////////////////////////////////////////////////////
@@ -149,10 +129,9 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
149
129
  override
150
130
  returns (uint256 amountSharesOut)
151
131
  {
152
- if (tokenIn == LP) {
132
+ if (tokenIn == crvLp) {
153
133
  amountSharesOut = amountTokenToDeposit;
154
134
  } else {
155
- // Calculate expected amount of LpToken to receive
156
135
  amountSharesOut = _previewDepositToCurve(tokenIn, amountTokenToDeposit);
157
136
  }
158
137
  }
@@ -166,14 +145,10 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
166
145
  {
167
146
  uint256 amountLpTokenToReceive = (amountSharesToRedeem * exchangeRate()) / 1e18;
168
147
 
169
- if (tokenOut == LP) {
148
+ if (tokenOut == crvLp) {
170
149
  amountTokenOut = amountLpTokenToReceive;
171
150
  } else {
172
- // If 'tokenOut' is a CrvBaseToken, withdraw liquidity from curvePool to return the base token back to user.
173
- amountTokenOut = ICrvPool(crvPool).calc_withdraw_one_coin(
174
- amountLpTokenToReceive,
175
- Math.Int128(_getBaseTokenIndex(tokenOut))
176
- );
151
+ amountTokenOut = _previewRedeemFromCurve(tokenOut, amountLpTokenToReceive);
177
152
  }
178
153
  }
179
154
 
@@ -185,21 +160,27 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
185
160
 
186
161
  function isValidTokenOut(address token) public view virtual override returns (bool);
187
162
 
188
- function _depositToCurve(address token, uint256 amount) internal virtual;
163
+ function _depositToCurve(address tokenIn, uint256 amountTokenToDeposit)
164
+ internal
165
+ virtual
166
+ returns (uint256);
167
+
168
+ function _redeemFromCurve(address tokenOut, uint256 amountLpToRedeem)
169
+ internal
170
+ virtual
171
+ returns (uint256);
189
172
 
190
- function _previewDepositToCurve(address token, uint256 amount)
173
+ function _previewDepositToCurve(address token, uint256 amountTokenToDeposit)
191
174
  internal
192
175
  view
193
176
  virtual
194
177
  returns (uint256 amountLpOut);
195
178
 
196
- function _getBaseTokenIndex(address crvBaseToken)
179
+ function _previewRedeemFromCurve(address token, uint256 amountLpToRedeem)
197
180
  internal
198
181
  view
199
182
  virtual
200
- returns (uint256 index);
201
-
202
- function _isBaseToken(address token) internal view virtual returns (bool res);
183
+ returns (uint256 amountTokenOut);
203
184
 
204
185
  function assetInfo()
205
186
  external
@@ -210,6 +191,6 @@ abstract contract PendleConvexCurveLPSCY is SCYBaseWithRewards {
210
191
  uint8 assetDecimals
211
192
  )
212
193
  {
213
- return (AssetType.LIQUIDITY, LP, IERC20Metadata(LP).decimals());
194
+ return (AssetType.LIQUIDITY, crvLp, IERC20Metadata(crvLp).decimals());
214
195
  }
215
196
  }
@@ -8,11 +8,11 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
8
8
  library Pendle3CrvHelper {
9
9
  using Math for uint256;
10
10
 
11
- address public constant TOKEN = address(0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490);
12
- address public constant POOL = address(0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7);
13
- address public constant DAI = address(0x6B175474E89094C44Da98b954EedeAC495271d0F);
14
- address public constant USDC = address(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
15
- address public constant USDT = address(0xdAC17F958D2ee523a2206206994597C13D831ec7);
11
+ address public constant LP = 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490;
12
+ address public constant POOL = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7;
13
+ address public constant DAI = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
14
+ address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
15
+ address public constant USDT = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
16
16
 
17
17
  function preview3CrvDeposit(address tokenIn, uint256 amountTokenToDeposit)
18
18
  internal
@@ -42,9 +42,9 @@ library Pendle3CrvHelper {
42
42
  internal
43
43
  returns (uint256)
44
44
  {
45
- uint256 balBefore = IERC20(TOKEN).balanceOf(address(this));
45
+ uint256 balBefore = IERC20(LP).balanceOf(address(this));
46
46
  ICrvPool(POOL).add_liquidity(_getTokenAmounts(tokenIn, amountTokenToDeposit), 0);
47
- uint256 balAfter = IERC20(TOKEN).balanceOf(address(this));
47
+ uint256 balAfter = IERC20(LP).balanceOf(address(this));
48
48
  return balAfter - balBefore;
49
49
  }
50
50
 
@@ -1,12 +1,12 @@
1
1
  // SPDX-License-Identifier: GPL-3.0-or-later
2
2
  pragma solidity 0.8.17;
3
3
 
4
- import "../SCYBase.sol";
4
+ import "../SYBase.sol";
5
5
  import "../../../interfaces/IWstETH.sol";
6
6
  import "../../../interfaces/IWETH.sol";
7
7
  import "../../../interfaces/IStETH.sol";
8
8
 
9
- contract PendleWstEthSCY is SCYBase {
9
+ contract PendleWstEthSY is SYBase {
10
10
  address public immutable wETH;
11
11
  address public immutable stETH;
12
12
  address public immutable wstETH;
@@ -16,7 +16,7 @@ contract PendleWstEthSCY is SCYBase {
16
16
  string memory _symbol,
17
17
  address _wETH,
18
18
  address _wstETH
19
- ) SCYBase(_name, _symbol, _wstETH) {
19
+ ) SYBase(_name, _symbol, _wstETH) {
20
20
  wETH = _wETH;
21
21
  wstETH = _wstETH;
22
22
  stETH = IWstETH(wstETH).stETH();
@@ -28,7 +28,7 @@ contract PendleWstEthSCY is SCYBase {
28
28
  //////////////////////////////////////////////////////////////*/
29
29
 
30
30
  /**
31
- * @dev See {SCYBase-_deposit}
31
+ * @dev See {SYBase-_deposit}
32
32
  *
33
33
  * The underlying yield token is wstETH. If the base token deposited is stETH, the function wraps
34
34
  * it into wstETH first. Then the corresponding amount of shares is returned.
@@ -56,7 +56,7 @@ contract PendleWstEthSCY is SCYBase {
56
56
  }
57
57
 
58
58
  /**
59
- * @dev See {SCYBase-_redeem}
59
+ * @dev See {SYBase-_redeem}
60
60
  *
61
61
  * The shares are redeemed into the same amount of wstETH. If `tokenOut` is stETH, the function also
62
62
  * unwraps said amount of wstETH into stETH for redemption.
@@ -10,13 +10,13 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
10
10
 
11
11
  import "../libraries/math/Math.sol";
12
12
  import "../libraries/TokenHelper.sol";
13
- import "../SuperComposableYield/SCYUtils.sol";
13
+ import "../StandardizedYield/SYUtils.sol";
14
14
 
15
15
  /*
16
- With YT yielding more SCYs overtime, which is allowed to be redeemed by users, the reward distribution should
17
- be based on the amount of SCYs that their YT currently represent, plus with their dueInterest.
16
+ With YT yielding more SYs overtime, which is allowed to be redeemed by users, the reward distribution should
17
+ be based on the amount of SYs that their YT currently represent, plus with their dueInterest.
18
18
 
19
- It has been proven and tested that totalScyRedeemable will not change over time, unless users redeem their interest or redeemPY.
19
+ It has been proven and tested that totalSyRedeemable will not change over time, unless users redeem their interest or redeemPY.
20
20
 
21
21
  Due to this, it is required to update users' accruedReward STRICTLY BEFORE redeeming their interest.
22
22
  */
@@ -44,7 +44,7 @@ abstract contract InterestManagerYT is TokenHelper, IPInterestManagerYT {
44
44
 
45
45
  function _doTransferOutInterest(
46
46
  address user,
47
- address SCY,
47
+ address SY,
48
48
  address factory
49
49
  ) internal returns (uint256 interestAmount) {
50
50
  address treasury = IPYieldContractFactory(factory).treasury();
@@ -56,8 +56,8 @@ abstract contract InterestManagerYT is TokenHelper, IPInterestManagerYT {
56
56
  uint256 feeAmount = interestPreFee.mulDown(feeRate);
57
57
  interestAmount = interestPreFee - feeAmount;
58
58
 
59
- _transferOut(SCY, treasury, feeAmount);
60
- _transferOut(SCY, user, interestAmount);
59
+ _transferOut(SY, treasury, feeAmount);
60
+ _transferOut(SY, user, interestAmount);
61
61
  }
62
62
 
63
63
  // should only be callable from `_distributeInterestForTwo` & make sure user != address(0) && user != address(this)
@@ -12,7 +12,7 @@ import "../erc20/PendleERC20Permit.sol";
12
12
  import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
13
13
 
14
14
  contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalToken {
15
- address public immutable SCY;
15
+ address public immutable SY;
16
16
  address public immutable factory;
17
17
  uint256 public immutable expiry;
18
18
  address public YT;
@@ -28,13 +28,13 @@ contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalTo
28
28
  }
29
29
 
30
30
  constructor(
31
- address _SCY,
31
+ address _SY,
32
32
  string memory _name,
33
33
  string memory _symbol,
34
34
  uint8 __decimals,
35
35
  uint256 _expiry
36
36
  ) PendleERC20Permit(_name, _symbol, __decimals) {
37
- SCY = _SCY;
37
+ SY = _SY;
38
38
  expiry = _expiry;
39
39
  factory = msg.sender;
40
40
  }
@@ -57,7 +57,7 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
57
57
  address public treasury;
58
58
  uint96 public expiryDivisor;
59
59
 
60
- // SCY => expiry => address
60
+ // SY => expiry => address
61
61
  mapping(address => mapping(uint256 => address)) public getPT;
62
62
  mapping(address => mapping(uint256 => address)) public getYT;
63
63
  mapping(address => bool) public isPT;
@@ -89,21 +89,21 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
89
89
  }
90
90
 
91
91
  /**
92
- * @notice Create a pair of (PT, YT) from any SCY and valid expiry. Anyone can create a yield contract
92
+ * @notice Create a pair of (PT, YT) from any SY and valid expiry. Anyone can create a yield contract
93
93
  * @dev It's intentional to make expiry an uint32 to guard against fat fingers. uint32.max is year 2106
94
94
  */
95
- function createYieldContract(address SCY, uint32 expiry)
95
+ function createYieldContract(address SY, uint32 expiry)
96
96
  external
97
97
  returns (address PT, address YT)
98
98
  {
99
99
  if (MiniHelpers.isTimeInThePast(expiry) || expiry % expiryDivisor != 0)
100
100
  revert Errors.YCFactoryInvalidExpiry();
101
101
 
102
- if (getPT[SCY][expiry] != address(0)) revert Errors.YCFactoryYieldContractExisted();
102
+ if (getPT[SY][expiry] != address(0)) revert Errors.YCFactoryYieldContractExisted();
103
103
 
104
- ISuperComposableYield _SCY = ISuperComposableYield(SCY);
104
+ IStandardizedYield _SY = IStandardizedYield(SY);
105
105
 
106
- (, , uint8 assetDecimals) = _SCY.assetInfo();
106
+ (, , uint8 assetDecimals) = _SY.assetInfo();
107
107
 
108
108
  PT = Create2.deploy(
109
109
  0,
@@ -111,9 +111,9 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
111
111
  abi.encodePacked(
112
112
  type(PendlePrincipalToken).creationCode,
113
113
  abi.encode(
114
- SCY,
115
- PT_PREFIX.concat(_SCY.name(), expiry, " "),
116
- PT_PREFIX.concat(_SCY.symbol(), expiry, "-"),
114
+ SY,
115
+ PT_PREFIX.concat(_SY.name(), expiry, " "),
116
+ PT_PREFIX.concat(_SY.symbol(), expiry, "-"),
117
117
  assetDecimals,
118
118
  expiry
119
119
  )
@@ -124,10 +124,10 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
124
124
  0,
125
125
  bytes32(block.chainid),
126
126
  abi.encode(
127
- SCY,
127
+ SY,
128
128
  PT,
129
- YT_PREFIX.concat(_SCY.name(), expiry, " "),
130
- YT_PREFIX.concat(_SCY.symbol(), expiry, "-"),
129
+ YT_PREFIX.concat(_SY.name(), expiry, " "),
130
+ YT_PREFIX.concat(_SY.symbol(), expiry, "-"),
131
131
  assetDecimals,
132
132
  expiry
133
133
  ),
@@ -139,12 +139,12 @@ contract PendleYieldContractFactory is BoringOwnableUpgradeable, IPYieldContract
139
139
 
140
140
  IPPrincipalToken(PT).initialize(YT);
141
141
 
142
- getPT[SCY][expiry] = PT;
143
- getYT[SCY][expiry] = YT;
142
+ getPT[SY][expiry] = PT;
143
+ getYT[SY][expiry] = YT;
144
144
  isPT[PT] = true;
145
145
  isYT[YT] = true;
146
146
 
147
- emit CreateYieldContract(SCY, PT, YT, expiry);
147
+ emit CreateYieldContract(SY, PT, YT, expiry);
148
148
  }
149
149
 
150
150
  function setExpiryDivisor(uint96 newExpiryDivisor) public onlyOwner {