@pendle/core-v2 0.13.1-testnet → 0.15.0-mainnet
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.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +89 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +91 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +91 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +28 -28
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol/PYIndexLib.json +3 -3
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYBase.sol/SCYBase.json → StandardizedYield/SYBase.sol/SYBase.json} +11 -11
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.json → StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json} +11 -11
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/SCYUtils.sol/SCYUtils.json → StandardizedYield/SYUtils.sol/SYUtils.json} +4 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +3 -3
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.json → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json} +17 -17
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +1018 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.json → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.json} +47 -47
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +5 -5
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +851 -0
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +4 -4
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +4 -4
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +24 -24
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +28 -28
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.json +19 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +30 -30
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +34 -34
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +20 -20
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.json +2 -2
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +20 -20
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +106 -106
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +18 -18
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.json +3 -3
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.json +6 -6
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{ISuperComposableYield.sol/ISuperComposableYield.json → IStandardizedYield.sol/IStandardizedYield.json} +5 -5
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +7 -7
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +116 -116
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +35 -35
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +12 -12
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +41 -41
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +28 -28
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +4 -4
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +22 -22
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -1
- package/contracts/core/Market/MarketMathCore.sol +51 -54
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarket.sol +49 -49
- package/contracts/core/Market/PendleMarketFactory.sol +1 -1
- package/contracts/core/RewardManager/RewardManager.sol +1 -1
- package/contracts/core/{SuperComposableYield → StandardizedYield}/PYIndex.sol +16 -16
- package/contracts/core/{SuperComposableYield/SCYBase.sol → StandardizedYield/SYBase.sol} +16 -21
- package/contracts/core/{SuperComposableYield/SCYBaseWithRewards.sol → StandardizedYield/SYBaseWithRewards.sol} +9 -12
- package/contracts/core/StandardizedYield/SYUtils.sol +26 -0
- package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/BenQi/PendleQiTokenHelper.sol +1 -1
- package/contracts/core/{SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol → StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol} +10 -10
- package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +167 -0
- package/contracts/core/{SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol → StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol} +51 -70
- package/contracts/core/{SuperComposableYield → StandardizedYield}/implementations/Convex/Pendle3CrvHelper.sol +7 -7
- package/contracts/core/{SuperComposableYield/implementations/PendleWstEthSCY.sol → StandardizedYield/implementations/PendleWstEthSY.sol} +13 -10
- package/contracts/core/YieldContracts/InterestManagerYT.sol +7 -7
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +15 -15
- package/contracts/core/YieldContracts/PendleYieldToken.sol +72 -72
- package/contracts/core/erc20/PendleERC20Permit.sol +1 -1
- package/contracts/core/libraries/Errors.sol +22 -22
- package/contracts/core/libraries/TokenHelper.sol +0 -33
- package/contracts/interfaces/Curve/ICrvPool.sol +2 -0
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +27 -27
- package/contracts/interfaces/IPActionMintRedeem.sol +30 -30
- package/contracts/interfaces/IPActionSwapPT.sol +16 -16
- package/contracts/interfaces/IPActionSwapPTYT.sol +2 -2
- package/contracts/interfaces/IPActionSwapYT.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +14 -19
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -1
- package/contracts/interfaces/IPPrincipalToken.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +3 -3
- package/contracts/interfaces/IPYieldToken.sol +7 -9
- package/contracts/interfaces/{ISuperComposableYield.sol → IStandardizedYield.sol} +6 -6
- package/contracts/offchain-helpers/MarketMathStatic.sol +116 -131
- package/contracts/offchain-helpers/RouterStatic.sol +80 -93
- package/contracts/router/ActionAddRemoveLiq.sol +99 -111
- package/contracts/router/ActionCallback.sol +46 -46
- package/contracts/router/ActionMintRedeem.sol +58 -58
- package/contracts/router/ActionSwapPT.sol +61 -69
- package/contracts/router/ActionSwapPTYT.sol +7 -7
- package/contracts/router/ActionSwapYT.sol +72 -79
- package/contracts/router/PendleRouter.sol +16 -16
- package/contracts/router/base/ActionBaseMintRedeem.sol +43 -43
- package/contracts/router/base/CallbackHelper.sol +20 -20
- package/contracts/router/base/MarketApproxLib.sol +166 -143
- package/contracts/router/kyberswap/KyberSwapHelper.sol +2 -2
- package/deployments/1-core.json +16 -0
- package/deployments/1-markets/STETH_MARCH_30.json +8 -0
- package/package.json +3 -3
- package/typechain-types/ActionAddRemoveLiq.ts +127 -129
- package/typechain-types/ActionCallback.ts +5 -5
- package/typechain-types/ActionMintRedeem.ts +139 -141
- package/typechain-types/ActionSwapPT.ts +73 -73
- package/typechain-types/ActionSwapPTYT.ts +2 -2
- package/typechain-types/ActionSwapYT.ts +73 -73
- package/typechain-types/ICrvPool.ts +16 -0
- package/typechain-types/IPActionAddRemoveLiq.ts +127 -129
- package/typechain-types/IPActionMintRedeem.ts +139 -141
- package/typechain-types/IPActionSwapPT.ts +73 -73
- package/typechain-types/IPActionSwapPTYT.ts +2 -2
- package/typechain-types/IPActionSwapYT.ts +73 -73
- package/typechain-types/IPAllAction.ts +402 -406
- package/typechain-types/IPMarket.ts +51 -54
- package/typechain-types/IPMarketSwapCallback.ts +5 -5
- package/typechain-types/IPPrincipalToken.ts +8 -8
- package/typechain-types/IPYieldContractFactory.ts +13 -13
- package/typechain-types/IPYieldToken.ts +17 -17
- package/typechain-types/IStandardizedYield.ts +895 -0
- package/typechain-types/MarketMathStatic.ts +27 -27
- package/typechain-types/Pendle3CrvAndTokenSY.ts +1243 -0
- package/typechain-types/Pendle3CrvHelper.ts +13 -13
- package/typechain-types/PendleConvexLPSY.ts +1189 -0
- package/typechain-types/PendleGaugeControllerBaseUpg.ts +125 -0
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +125 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +124 -0
- package/typechain-types/PendleMarket.ts +54 -57
- package/typechain-types/PendlePrincipalToken.ts +8 -8
- package/typechain-types/PendleQiTokenSY.ts +1166 -0
- package/typechain-types/PendleWstEthSY.ts +1038 -0
- package/typechain-types/PendleYieldContractFactory.ts +8 -8
- package/typechain-types/PendleYieldToken.ts +41 -44
- package/typechain-types/RouterStatic.ts +196 -196
- package/typechain-types/SYBase.ts +1001 -0
- package/typechain-types/SYBaseWithRewards.ts +1094 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +34 -34
- package/typechain-types/factories/ActionCallback__factory.ts +11 -11
- package/typechain-types/factories/ActionMintRedeem__factory.ts +38 -38
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +3 -3
- package/typechain-types/factories/ActionSwapPT__factory.ts +27 -27
- package/typechain-types/factories/ActionSwapYT__factory.ts +21 -21
- package/typechain-types/factories/Errors__factory.ts +27 -27
- package/typechain-types/factories/ICrvPool__factory.ts +19 -0
- package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +30 -30
- package/typechain-types/factories/IPActionMintRedeem__factory.ts +34 -34
- package/typechain-types/factories/IPActionSwapPTYT__factory.ts +2 -2
- package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -20
- package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -20
- package/typechain-types/factories/IPAllAction__factory.ts +106 -106
- package/typechain-types/factories/IPMarketSwapCallback__factory.ts +1 -1
- package/typechain-types/factories/IPMarket__factory.ts +18 -18
- package/typechain-types/factories/IPPrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/IPYieldContractFactory__factory.ts +3 -3
- package/typechain-types/factories/IPYieldToken__factory.ts +6 -6
- package/typechain-types/factories/IStandardizedYield__factory.ts +658 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +6 -6
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +1106 -0
- package/typechain-types/factories/Pendle3CrvHelper__factory.ts +3 -3
- package/typechain-types/factories/PendleConvexLPSY__factory.ts +963 -0
- package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +89 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +90 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +90 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +21 -21
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +7 -7
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1095 -0
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +924 -0
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +3 -3
- package/typechain-types/factories/PendleYieldToken__factory.ts +27 -27
- package/typechain-types/factories/RouterStatic__factory.ts +57 -57
- package/typechain-types/factories/SYBaseWithRewards__factory.ts +867 -0
- package/typechain-types/factories/SYBase__factory.ts +795 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +33 -51
- package/typechain-types/index.ts +14 -18
- package/build/artifacts/contracts/core/SuperComposableYield/PYIndex.sol/PYIndexLib.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYBase.sol/SCYBase.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYBaseWithRewards.sol/SCYBaseWithRewards.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/SCYUtils.sol/SCYUtils.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/BenQi/PendleQiTokenSCY.sol/PendleQiTokenSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol/Pendle3CrvAndTokenSCY.json +0 -1030
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol/PendleConvexCurveLP2PoolSCY.json +0 -1025
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLPSCY.sol/PendleConvexCurveLPSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.dbg.json +0 -4
- package/build/artifacts/contracts/core/SuperComposableYield/implementations/PendleWstEthSCY.sol/PendleWstEthSCY.json +0 -851
- package/build/artifacts/contracts/interfaces/ISuperComposableYield.sol/ISuperComposableYield.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.json +0 -190
- package/contracts/core/SuperComposableYield/SCYUtils.sol +0 -34
- package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSCY.sol +0 -135
- package/contracts/core/SuperComposableYield/implementations/Convex/ConvexCurveLP/PendleConvexCurveLP2PoolSCY.sol +0 -96
- package/contracts/deployments/43113-core.json +0 -16
- package/contracts/deployments/43113-helper.json +0 -3
- package/contracts/deployments/43113-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
- package/contracts/deployments/43113-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
- package/contracts/deployments/43113-testenv.json +0 -22
- package/contracts/deployments/80001-core.json +0 -15
- package/contracts/deployments/80001-markets/benqi-market-QI-USDC-FEB-2ND.json +0 -8
- package/contracts/deployments/80001-markets/benqi-market-QI-WETH-DEC-1ST.json +0 -8
- package/contracts/deployments/80001-testenv.json +0 -22
- package/contracts/offchain-helpers/ImplicitSwapfeeContract.sol +0 -26
|
@@ -5,38 +5,38 @@ import "../router/base/MarketApproxLib.sol";
|
|
|
5
5
|
import "../router/kyberswap/KyberSwapHelper.sol";
|
|
6
6
|
|
|
7
7
|
interface IPActionMintRedeem {
|
|
8
|
-
event
|
|
8
|
+
event MintSyFromToken(
|
|
9
9
|
address indexed caller,
|
|
10
10
|
address indexed receiver,
|
|
11
|
-
address indexed
|
|
11
|
+
address indexed SY,
|
|
12
12
|
address tokenIn,
|
|
13
13
|
uint256 netTokenIn,
|
|
14
|
-
uint256
|
|
14
|
+
uint256 netSyOut
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
-
event
|
|
17
|
+
event RedeemSyToToken(
|
|
18
18
|
address indexed caller,
|
|
19
19
|
address indexed receiver,
|
|
20
|
-
address indexed
|
|
21
|
-
uint256
|
|
20
|
+
address indexed SY,
|
|
21
|
+
uint256 netSyIn,
|
|
22
22
|
address tokenOut,
|
|
23
23
|
uint256 netTokenOut
|
|
24
24
|
);
|
|
25
25
|
|
|
26
|
-
event
|
|
26
|
+
event MintPyFromSy(
|
|
27
27
|
address indexed caller,
|
|
28
28
|
address indexed receiver,
|
|
29
29
|
address indexed YT,
|
|
30
|
-
uint256
|
|
30
|
+
uint256 netSyIn,
|
|
31
31
|
uint256 netPyOut
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
event
|
|
34
|
+
event RedeemPyToSy(
|
|
35
35
|
address indexed caller,
|
|
36
36
|
address indexed receiver,
|
|
37
37
|
address indexed YT,
|
|
38
38
|
uint256 netPyIn,
|
|
39
|
-
uint256
|
|
39
|
+
uint256 netSyOut
|
|
40
40
|
);
|
|
41
41
|
|
|
42
42
|
event MintPyFromToken(
|
|
@@ -59,10 +59,10 @@ interface IPActionMintRedeem {
|
|
|
59
59
|
|
|
60
60
|
event RedeemDueInterestAndRewards(
|
|
61
61
|
address indexed user,
|
|
62
|
-
address[]
|
|
62
|
+
address[] sys,
|
|
63
63
|
address[] yts,
|
|
64
64
|
address[] markets,
|
|
65
|
-
uint256[][]
|
|
65
|
+
uint256[][] syRewards,
|
|
66
66
|
uint256[] ytInterests,
|
|
67
67
|
uint256[][] ytRewards,
|
|
68
68
|
uint256[][] marketRewards
|
|
@@ -70,24 +70,24 @@ interface IPActionMintRedeem {
|
|
|
70
70
|
|
|
71
71
|
event RedeemDueInterestAndRewardsThenSwapAll(
|
|
72
72
|
address indexed user,
|
|
73
|
-
address[]
|
|
73
|
+
address[] sys,
|
|
74
74
|
address[] yts,
|
|
75
75
|
address[] markets,
|
|
76
76
|
address indexed tokenOut,
|
|
77
77
|
uint256 netTokenOut
|
|
78
78
|
);
|
|
79
79
|
|
|
80
|
-
function
|
|
80
|
+
function mintSyFromToken(
|
|
81
81
|
address receiver,
|
|
82
|
-
address
|
|
83
|
-
uint256
|
|
82
|
+
address SY,
|
|
83
|
+
uint256 minSyOut,
|
|
84
84
|
TokenInput calldata input
|
|
85
|
-
) external payable returns (uint256
|
|
85
|
+
) external payable returns (uint256 netSyOut);
|
|
86
86
|
|
|
87
|
-
function
|
|
87
|
+
function redeemSyToToken(
|
|
88
88
|
address receiver,
|
|
89
|
-
address
|
|
90
|
-
uint256
|
|
89
|
+
address SY,
|
|
90
|
+
uint256 netSyIn,
|
|
91
91
|
TokenOutput calldata output
|
|
92
92
|
) external returns (uint256 netTokenOut);
|
|
93
93
|
|
|
@@ -105,29 +105,29 @@ interface IPActionMintRedeem {
|
|
|
105
105
|
TokenOutput calldata output
|
|
106
106
|
) external returns (uint256 netTokenOut);
|
|
107
107
|
|
|
108
|
-
function
|
|
108
|
+
function mintPyFromSy(
|
|
109
109
|
address receiver,
|
|
110
110
|
address YT,
|
|
111
|
-
uint256
|
|
111
|
+
uint256 netSyIn,
|
|
112
112
|
uint256 minPyOut
|
|
113
113
|
) external returns (uint256 netPyOut);
|
|
114
114
|
|
|
115
|
-
function
|
|
115
|
+
function redeemPyToSy(
|
|
116
116
|
address receiver,
|
|
117
117
|
address YT,
|
|
118
118
|
uint256 netPyIn,
|
|
119
|
-
uint256
|
|
120
|
-
) external returns (uint256
|
|
119
|
+
uint256 minSyOut
|
|
120
|
+
) external returns (uint256 netSyOut);
|
|
121
121
|
|
|
122
122
|
function redeemDueInterestAndRewards(
|
|
123
123
|
address user,
|
|
124
|
-
address[] calldata
|
|
124
|
+
address[] calldata sys,
|
|
125
125
|
address[] calldata yts,
|
|
126
126
|
address[] calldata markets
|
|
127
127
|
)
|
|
128
128
|
external
|
|
129
129
|
returns (
|
|
130
|
-
uint256[][] memory
|
|
130
|
+
uint256[][] memory syRewards,
|
|
131
131
|
uint256[] memory ytInterests,
|
|
132
132
|
uint256[][] memory ytRewards,
|
|
133
133
|
uint256[][] memory marketRewards
|
|
@@ -136,8 +136,8 @@ interface IPActionMintRedeem {
|
|
|
136
136
|
struct RouterYtRedeemStruct {
|
|
137
137
|
address[] yts;
|
|
138
138
|
// key-value pair
|
|
139
|
-
address[]
|
|
140
|
-
address[]
|
|
139
|
+
address[] syAddrs;
|
|
140
|
+
address[] tokenRedeemSys;
|
|
141
141
|
//
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -151,7 +151,7 @@ interface IPActionMintRedeem {
|
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function redeemDueInterestAndRewardsThenSwapAll(
|
|
154
|
-
address[] calldata
|
|
154
|
+
address[] calldata sys,
|
|
155
155
|
RouterYtRedeemStruct calldata dataYT,
|
|
156
156
|
address[] calldata markets,
|
|
157
157
|
RouterSwapAllStruct calldata dataSwap
|
|
@@ -5,12 +5,12 @@ import "../router/base/MarketApproxLib.sol";
|
|
|
5
5
|
import "../router/kyberswap/KyberSwapHelper.sol";
|
|
6
6
|
|
|
7
7
|
interface IPActionSwapPT {
|
|
8
|
-
event
|
|
8
|
+
event SwapPtAndSy(
|
|
9
9
|
address indexed caller,
|
|
10
10
|
address indexed market,
|
|
11
11
|
address indexed receiver,
|
|
12
12
|
int256 netPtToAccount,
|
|
13
|
-
int256
|
|
13
|
+
int256 netSyToAccount
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
event SwapPtAndToken(
|
|
@@ -22,35 +22,35 @@ interface IPActionSwapPT {
|
|
|
22
22
|
int256 netTokenToAccount
|
|
23
23
|
);
|
|
24
24
|
|
|
25
|
-
function
|
|
25
|
+
function swapExactPtForSy(
|
|
26
26
|
address receiver,
|
|
27
27
|
address market,
|
|
28
28
|
uint256 exactPtIn,
|
|
29
|
-
uint256
|
|
30
|
-
) external returns (uint256
|
|
29
|
+
uint256 minSyOut
|
|
30
|
+
) external returns (uint256 netSyOut, uint256 netSyFee);
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function swapPtForExactSy(
|
|
33
33
|
address receiver,
|
|
34
34
|
address market,
|
|
35
|
-
uint256
|
|
35
|
+
uint256 exactSyOut,
|
|
36
36
|
uint256 maxPtIn,
|
|
37
37
|
ApproxParams calldata guessPtIn
|
|
38
|
-
) external returns (uint256 netPtIn, uint256
|
|
38
|
+
) external returns (uint256 netPtIn, uint256 netSyFee);
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
function swapSyForExactPt(
|
|
41
41
|
address receiver,
|
|
42
42
|
address market,
|
|
43
43
|
uint256 exactPtOut,
|
|
44
|
-
uint256
|
|
45
|
-
) external returns (uint256
|
|
44
|
+
uint256 maxSyIn
|
|
45
|
+
) external returns (uint256 netSyIn, uint256 netSyFee);
|
|
46
46
|
|
|
47
|
-
function
|
|
47
|
+
function swapExactSyForPt(
|
|
48
48
|
address receiver,
|
|
49
49
|
address market,
|
|
50
|
-
uint256
|
|
50
|
+
uint256 exactSyIn,
|
|
51
51
|
uint256 minPtOut,
|
|
52
52
|
ApproxParams calldata guessPtOut
|
|
53
|
-
) external returns (uint256 netPtOut, uint256
|
|
53
|
+
) external returns (uint256 netPtOut, uint256 netSyFee);
|
|
54
54
|
|
|
55
55
|
function swapExactTokenForPt(
|
|
56
56
|
address receiver,
|
|
@@ -58,12 +58,12 @@ interface IPActionSwapPT {
|
|
|
58
58
|
uint256 minPtOut,
|
|
59
59
|
ApproxParams calldata guessPtOut,
|
|
60
60
|
TokenInput calldata input
|
|
61
|
-
) external payable returns (uint256 netPtOut, uint256
|
|
61
|
+
) external payable returns (uint256 netPtOut, uint256 netSyFee);
|
|
62
62
|
|
|
63
63
|
function swapExactPtForToken(
|
|
64
64
|
address receiver,
|
|
65
65
|
address market,
|
|
66
66
|
uint256 exactPtIn,
|
|
67
67
|
TokenOutput calldata output
|
|
68
|
-
) external returns (uint256 netTokenOut, uint256
|
|
68
|
+
) external returns (uint256 netTokenOut, uint256 netSyFee);
|
|
69
69
|
}
|
|
@@ -19,7 +19,7 @@ interface IPActionSwapPTYT {
|
|
|
19
19
|
uint256 exactPtIn,
|
|
20
20
|
uint256 minYtOut,
|
|
21
21
|
ApproxParams calldata guessTotalPtToSwap
|
|
22
|
-
) external returns (uint256 netYtOut, uint256
|
|
22
|
+
) external returns (uint256 netYtOut, uint256 netSyFee);
|
|
23
23
|
|
|
24
24
|
function swapExactYtForPt(
|
|
25
25
|
address receiver,
|
|
@@ -27,5 +27,5 @@ interface IPActionSwapPTYT {
|
|
|
27
27
|
uint256 exactYtIn,
|
|
28
28
|
uint256 minPtOut,
|
|
29
29
|
ApproxParams calldata guessTotalPtSwapped
|
|
30
|
-
) external returns (uint256 netPtOut, uint256
|
|
30
|
+
) external returns (uint256 netPtOut, uint256 netSyFee);
|
|
31
31
|
}
|
|
@@ -5,12 +5,12 @@ import "../router/base/MarketApproxLib.sol";
|
|
|
5
5
|
import "../router/kyberswap/KyberSwapHelper.sol";
|
|
6
6
|
|
|
7
7
|
interface IPActionSwapYT {
|
|
8
|
-
event
|
|
8
|
+
event SwapYtAndSy(
|
|
9
9
|
address indexed caller,
|
|
10
10
|
address indexed market,
|
|
11
11
|
address indexed receiver,
|
|
12
12
|
int256 netYtToAccount,
|
|
13
|
-
int256
|
|
13
|
+
int256 netSyToAccount
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
event SwapYtAndToken(
|
|
@@ -22,35 +22,35 @@ interface IPActionSwapYT {
|
|
|
22
22
|
int256 netTokenToAccount
|
|
23
23
|
);
|
|
24
24
|
|
|
25
|
-
function
|
|
25
|
+
function swapExactSyForYt(
|
|
26
26
|
address receiver,
|
|
27
27
|
address market,
|
|
28
|
-
uint256
|
|
28
|
+
uint256 exactSyIn,
|
|
29
29
|
uint256 minYtOut,
|
|
30
30
|
ApproxParams memory guessYtOut
|
|
31
|
-
) external returns (uint256 netYtOut, uint256
|
|
31
|
+
) external returns (uint256 netYtOut, uint256 netSyFee);
|
|
32
32
|
|
|
33
|
-
function
|
|
33
|
+
function swapExactYtForSy(
|
|
34
34
|
address receiver,
|
|
35
35
|
address market,
|
|
36
36
|
uint256 exactYtIn,
|
|
37
|
-
uint256
|
|
38
|
-
) external returns (uint256
|
|
37
|
+
uint256 minSyOut
|
|
38
|
+
) external returns (uint256 netSyOut, uint256 netSyFee);
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
function swapSyForExactYt(
|
|
41
41
|
address receiver,
|
|
42
42
|
address market,
|
|
43
43
|
uint256 exactYtOut,
|
|
44
|
-
uint256
|
|
45
|
-
) external returns (uint256
|
|
44
|
+
uint256 maxSyIn
|
|
45
|
+
) external returns (uint256 netSyIn, uint256 netSyFee);
|
|
46
46
|
|
|
47
|
-
function
|
|
47
|
+
function swapYtForExactSy(
|
|
48
48
|
address receiver,
|
|
49
49
|
address market,
|
|
50
|
-
uint256
|
|
50
|
+
uint256 exactSyOut,
|
|
51
51
|
uint256 maxYtIn,
|
|
52
52
|
ApproxParams memory guessYtIn
|
|
53
|
-
) external returns (uint256 netYtIn, uint256
|
|
53
|
+
) external returns (uint256 netYtIn, uint256 netSyFee);
|
|
54
54
|
|
|
55
55
|
function swapExactTokenForYt(
|
|
56
56
|
address receiver,
|
|
@@ -58,12 +58,12 @@ interface IPActionSwapYT {
|
|
|
58
58
|
uint256 minYtOut,
|
|
59
59
|
ApproxParams memory guessYtOut,
|
|
60
60
|
TokenInput calldata input
|
|
61
|
-
) external payable returns (uint256 netYtOut, uint256
|
|
61
|
+
) external payable returns (uint256 netYtOut, uint256 netSyFee);
|
|
62
62
|
|
|
63
63
|
function swapExactYtForToken(
|
|
64
64
|
address receiver,
|
|
65
65
|
address market,
|
|
66
66
|
uint256 netYtIn,
|
|
67
67
|
TokenOutput calldata output
|
|
68
|
-
) external returns (uint256 netTokenOut, uint256
|
|
68
|
+
) external returns (uint256 netTokenOut, uint256 netSyFee);
|
|
69
69
|
}
|
|
@@ -4,7 +4,7 @@ pragma solidity 0.8.17;
|
|
|
4
4
|
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
5
5
|
import "./IPPrincipalToken.sol";
|
|
6
6
|
import "./IPYieldToken.sol";
|
|
7
|
-
import "./
|
|
7
|
+
import "./IStandardizedYield.sol";
|
|
8
8
|
import "./IPGauge.sol";
|
|
9
9
|
import "../core/Market/MarketMathCore.sol";
|
|
10
10
|
|
|
@@ -12,24 +12,19 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
12
12
|
event Mint(
|
|
13
13
|
address indexed receiver,
|
|
14
14
|
uint256 netLpMinted,
|
|
15
|
-
uint256
|
|
15
|
+
uint256 netSyUsed,
|
|
16
16
|
uint256 netPtUsed
|
|
17
17
|
);
|
|
18
18
|
|
|
19
19
|
event Burn(
|
|
20
|
-
address indexed
|
|
20
|
+
address indexed receiverSy,
|
|
21
21
|
address indexed receiverPt,
|
|
22
22
|
uint256 netLpBurned,
|
|
23
|
-
uint256
|
|
23
|
+
uint256 netSyOut,
|
|
24
24
|
uint256 netPtOut
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
event Swap(
|
|
28
|
-
address indexed receiver,
|
|
29
|
-
int256 netPtOut,
|
|
30
|
-
int256 netScyOut,
|
|
31
|
-
uint256 netScyToReserve
|
|
32
|
-
);
|
|
27
|
+
event Swap(address indexed receiver, int256 netPtOut, int256 netSyOut, uint256 netSyToReserve);
|
|
33
28
|
|
|
34
29
|
event UpdateImpliedRate(uint256 indexed timestamp, uint256 lnLastImpliedRate);
|
|
35
30
|
|
|
@@ -40,33 +35,33 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
40
35
|
|
|
41
36
|
function mint(
|
|
42
37
|
address receiver,
|
|
43
|
-
uint256
|
|
38
|
+
uint256 netSyDesired,
|
|
44
39
|
uint256 netPtDesired
|
|
45
40
|
)
|
|
46
41
|
external
|
|
47
42
|
returns (
|
|
48
43
|
uint256 netLpOut,
|
|
49
|
-
uint256
|
|
44
|
+
uint256 netSyUsed,
|
|
50
45
|
uint256 netPtUsed
|
|
51
46
|
);
|
|
52
47
|
|
|
53
48
|
function burn(
|
|
54
|
-
address
|
|
49
|
+
address receiverSy,
|
|
55
50
|
address receiverPt,
|
|
56
51
|
uint256 netLpToBurn
|
|
57
|
-
) external returns (uint256
|
|
52
|
+
) external returns (uint256 netSyOut, uint256 netPtOut);
|
|
58
53
|
|
|
59
|
-
function
|
|
54
|
+
function swapExactPtForSy(
|
|
60
55
|
address receiver,
|
|
61
56
|
uint256 exactPtIn,
|
|
62
57
|
bytes calldata data
|
|
63
|
-
) external returns (uint256
|
|
58
|
+
) external returns (uint256 netSyOut, uint256 netSyToReserve);
|
|
64
59
|
|
|
65
|
-
function
|
|
60
|
+
function swapSyForExactPt(
|
|
66
61
|
address receiver,
|
|
67
62
|
uint256 exactPtOut,
|
|
68
63
|
bytes calldata data
|
|
69
|
-
) external returns (uint256
|
|
64
|
+
) external returns (uint256 netSyIn, uint256 netSyToReserve);
|
|
70
65
|
|
|
71
66
|
function redeemRewards(address user) external returns (uint256[] memory);
|
|
72
67
|
|
|
@@ -83,7 +78,7 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
83
78
|
external
|
|
84
79
|
view
|
|
85
80
|
returns (
|
|
86
|
-
|
|
81
|
+
IStandardizedYield _SY,
|
|
87
82
|
IPPrincipalToken _PT,
|
|
88
83
|
IPYieldToken _YT
|
|
89
84
|
);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
pragma solidity 0.8.17;
|
|
25
25
|
|
|
26
26
|
interface IPYieldContractFactory {
|
|
27
|
-
event CreateYieldContract(address indexed
|
|
27
|
+
event CreateYieldContract(address indexed SY, address PT, address YT, uint256 expiry);
|
|
28
28
|
|
|
29
29
|
event SetExpiryDivisor(uint256 newExpiryDivisor);
|
|
30
30
|
|
|
@@ -34,9 +34,9 @@ interface IPYieldContractFactory {
|
|
|
34
34
|
|
|
35
35
|
event SetTreasury(address indexed treasury);
|
|
36
36
|
|
|
37
|
-
function getPT(address
|
|
37
|
+
function getPT(address SY, uint256 expiry) external view returns (address);
|
|
38
38
|
|
|
39
|
-
function getYT(address
|
|
39
|
+
function getYT(address SY, uint256 expiry) external view returns (address);
|
|
40
40
|
|
|
41
41
|
function expiryDivisor() external view returns (uint96);
|
|
42
42
|
|
|
@@ -5,15 +5,13 @@ import "./IRewardManager.sol";
|
|
|
5
5
|
import "./IPInterestManagerYT.sol";
|
|
6
6
|
|
|
7
7
|
interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
8
|
-
event NewInterestIndex(
|
|
9
|
-
uint256 indexed newIndex
|
|
10
|
-
);
|
|
8
|
+
event NewInterestIndex(uint256 indexed newIndex);
|
|
11
9
|
|
|
12
10
|
event Mint(
|
|
13
11
|
address indexed caller,
|
|
14
12
|
address indexed receiverPT,
|
|
15
13
|
address indexed receiverYT,
|
|
16
|
-
uint256
|
|
14
|
+
uint256 amountSyToMint,
|
|
17
15
|
uint256 amountPYOut
|
|
18
16
|
);
|
|
19
17
|
|
|
@@ -21,22 +19,22 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
21
19
|
address indexed caller,
|
|
22
20
|
address indexed receiver,
|
|
23
21
|
uint256 amountPYToRedeem,
|
|
24
|
-
uint256
|
|
22
|
+
uint256 amountSyOut
|
|
25
23
|
);
|
|
26
24
|
|
|
27
25
|
event RedeemRewards(address indexed user, uint256[] amountRewardsOut);
|
|
28
26
|
|
|
29
27
|
event RedeemInterest(address indexed user, uint256 interestOut);
|
|
30
28
|
|
|
31
|
-
event WithdrawFeeToTreasury(uint256[] amountRewardsOut, uint256
|
|
29
|
+
event WithdrawFeeToTreasury(uint256[] amountRewardsOut, uint256 syOut);
|
|
32
30
|
|
|
33
31
|
function mintPY(address receiverPT, address receiverYT) external returns (uint256 amountPYOut);
|
|
34
32
|
|
|
35
|
-
function redeemPY(address receiver) external returns (uint256
|
|
33
|
+
function redeemPY(address receiver) external returns (uint256 amountSyOut);
|
|
36
34
|
|
|
37
35
|
function redeemPYMulti(address[] calldata receivers, uint256[] calldata amountPYToRedeems)
|
|
38
36
|
external
|
|
39
|
-
returns (uint256[] memory
|
|
37
|
+
returns (uint256[] memory amountSyOuts);
|
|
40
38
|
|
|
41
39
|
function redeemDueInterestAndRewards(
|
|
42
40
|
address user,
|
|
@@ -52,7 +50,7 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
52
50
|
|
|
53
51
|
function getRewardTokens() external view returns (address[] memory);
|
|
54
52
|
|
|
55
|
-
function
|
|
53
|
+
function SY() external view returns (address);
|
|
56
54
|
|
|
57
55
|
function PT() external view returns (address);
|
|
58
56
|
|
|
@@ -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
|
|
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
|
|
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
|
|
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 *
|
|
96
|
-
* @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of
|
|
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
|
|
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);
|