@pendle/core-v2 3.0.0 → 4.0.0
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/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -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/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.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 +2 -2
- 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/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.json +2 -2
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.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 +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseUpg.sol/SYBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewardsUpg.sol/SYBaseWithRewardsUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.json +1057 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol/AaveAdapterLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol/AaveAdapterLib.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol/WadRayMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol/WadRayMath.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol/ComposableStablePreviewProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol/ComposableStablePreviewV4.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol/ComposableStablePreviewV5.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol/PendleAuraBalancerStableLPSYV3Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol/PendleChainlinkReceiver.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol/PendleChainlinkRelayer.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol/FluxTokenLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/GMTokenPricingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2DataStore.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2Oracle.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol/IGMXV2Reader.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol/HLPPricingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol/KyberMathHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol/KyberNftManagerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/FullMath.sol/FullMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiqDeltaMath.sol/LiqDeltaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiquidityMath.sol/LiquidityMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/MathConstants.sol/MathConstants.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/QtyDeltaMath.sol/QtyDeltaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/QuadMath.sol/QuadMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/ReinvestmentMath.sol/ReinvestmentMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/SafeCast.sol/SafeCast.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/SwapMath.sol/SwapMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/libraries/TickMath.sol/TickMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/MlpPricingHelper.sol/MlpPricingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
- 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 +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Upg.sol/PendleERC20Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +18 -50
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3AToken.sol/IAaveV3AToken.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3AToken.sol/IAaveV3AToken.json +99 -0
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3Pool.sol/IAaveV3Pool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveV3Pool.sol/IAaveV3Pool.json +87 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IPComposableStablePreview.sol/IPComposableStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Flux/IFluxErc20.sol/IFluxErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Flux/IFluxInterestRateModel.sol/IFluxInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXPriceHelper.sol/IGMXPriceHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHLPStaking.sol/IHLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXCalculator.sol/IHMXCalculator.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXCompounder.sol/IHMXCompounder.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXStaking.sol/IHMXStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/HMX/IHMXVester.sol/IHMXVester.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IDailLikePermit.sol/IDaiLikePermit.json +59 -0
- package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.json +2614 -0
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.json +68 -0
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPActionMintRedeem.sol/IPActionMintRedeem.json → IPActionMiscV3.sol/IPActionMiscV3.json} +269 -22
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.json +1185 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.json +1364 -0
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +6215 -0
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +4 -0
- package/build/artifacts/contracts/{router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json → interfaces/IPLimitRouter.sol/IPLimitOrderType.json} +2 -2
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +541 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.json +45 -0
- package/build/artifacts/contracts/interfaces/IPLinearDistributor.sol/IPLinearDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV2.sol/IPMarketFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactoryV3.sol/IPMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPtOracle.sol/IPPtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.json +0 -25
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.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/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPendlePreviewHelper.sol/IPendlePreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLP.sol/IStargateLP.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticFactory.sol/IKyberElasticFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticPool.sol/IKyberElasticPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberElasticRouter.sol/IKyberElasticRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberLiquidityMining.sol/IKyberLiquidityMining.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberMathHelper.sol/IKyberMathHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Kyber/IKyberPositionManager.sol/IKyberPositionManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Lybra/IEUSD.sol/IEUSD.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/MUX/IMUXRewardRouter.sol/IMUXRewardRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Silo/ISilo.sol/ISilo.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Silo/ISiloIncentiveController.sol/ISiloIncentiveController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Silo/ISiloLens.sol/ISiloLens.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Stader/IStaderStakeManager.sol/IStaderStakeManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +4 -0
- package/build/artifacts/contracts/{core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json → limit/LimitMathCore.sol/LimitMathCore.json} +4 -4
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +4 -0
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.json +833 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +4 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +860 -0
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +4 -0
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.json +99 -0
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +10 -0
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +174 -0
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +84 -0
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2810 -0
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +116 -0
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +1016 -0
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +1323 -0
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +1518 -0
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +3 -33
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.dbg.json +4 -0
- package/build/artifacts/contracts/{interfaces/IPActionSwapPT.sol/IPActionSwapPT.json → router/PendleRouterHelper.sol/RouterV2InterfaceForRouterHelper.json} +163 -226
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +4 -0
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +179 -0
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +4 -0
- package/build/artifacts/contracts/{offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.json → router/base/ActionBase.sol/ActionBase.json} +2 -2
- 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/swap-aggregator/PendleSwap.sol/PendleSwapBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutorOptimistic.sol/IAggregationExecutorOptimistic.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol/IExecutorHelperL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol/InputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/BytesHelper.sol/BytesHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol/CalldataReader.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol/CalldataWriter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol/Common.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol/DexScaler.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol/ExecutorReader.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol/InputScalingHelperL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol/ScalingDataL2Lib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +11 -7
- package/contracts/core/StandardizedYield/SYBase.sol +1 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +94 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol +19 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol +126 -0
- package/contracts/core/libraries/Errors.sol +2 -3
- package/contracts/core/libraries/TokenHelper.sol +2 -0
- package/contracts/interfaces/AaveV3/IAaveV3AToken.sol +15 -0
- package/contracts/interfaces/AaveV3/IAaveV3Pool.sol +11 -0
- package/contracts/interfaces/IDailLikePermit.sol +17 -0
- package/contracts/interfaces/{IPActionAddRemoveLiq.sol → IPActionAddRemoveLiqV3.sol} +52 -40
- package/contracts/interfaces/IPActionCallbackV3.sol +7 -0
- package/contracts/interfaces/{IPActionMintRedeem.sol → IPActionMiscV3.sol} +38 -6
- package/contracts/interfaces/IPActionStorageStatic.sol +1 -1
- package/contracts/interfaces/{IPActionSwapPT.sol → IPActionSwapPTV3.sol} +21 -31
- package/contracts/interfaces/{IPActionSwapYT.sol → IPActionSwapYTV3.sol} +25 -35
- package/contracts/interfaces/IPAllActionTypeV3.sol +34 -0
- package/contracts/interfaces/IPAllActionV3.sol +19 -0
- package/contracts/interfaces/IPBulkSeller.sol +7 -1
- package/contracts/interfaces/IPLimitRouter.sol +118 -0
- package/contracts/interfaces/IPRouterHelper.sol +6 -8
- package/contracts/limit/LimitMathCore.sol +158 -0
- package/contracts/limit/LimitRouterBase.sol +440 -0
- package/contracts/limit/PendleLimitRouter.sol +65 -0
- package/contracts/limit/helpers/NonceManager.sol +30 -0
- package/contracts/offchain-helpers/BytesLib.sol +551 -0
- package/contracts/offchain-helpers/LimitBackendHelper.sol +109 -0
- package/contracts/offchain-helpers/SimulateHelper.sol +40 -0
- package/contracts/oracles/PendlePtOracle.sol +3 -2
- package/contracts/router/ActionAddRemoveLiqV3.sol +504 -0
- package/contracts/router/ActionCallbackV3.sol +141 -0
- package/contracts/router/ActionMiscV3.sol +164 -0
- package/contracts/router/ActionSwapPTV3.sol +87 -0
- package/contracts/router/ActionSwapYTV3.sol +240 -0
- package/contracts/router/PendleRouterHelper.sol +56 -14
- package/contracts/router/PendleRouterV3.sol +235 -0
- package/contracts/router/base/ActionBase.sol +289 -0
- package/contracts/router/base/CallbackHelper.sol +20 -81
- package/contracts/router/base/MarketApproxLib.sol +124 -99
- package/deployments/1-core.json +5 -3
- package/deployments/10-core.json +5 -3
- package/deployments/42161-core.json +6 -3
- package/deployments/42161-markets/AAVE-USDC-JUNE2024.json +11 -0
- package/deployments/42161-markets/WSTETH-ARBITRUM-MARCH2024.json +11 -0
- package/deployments/42161-markets/WSTETHSILO-ETH-MARCH2024.json +11 -0
- package/deployments/56-core.json +5 -3
- package/deployments/merkle-distribution/2023-11-30.json +7730 -0
- package/package.json +5 -5
- package/typechain-types/ActionAddRemoveLiqV3.ts +10 -7
- package/typechain-types/ActionCallbackV3.ts +164 -0
- package/typechain-types/ActionMarketCoreStatic.ts +18 -63
- package/typechain-types/ActionMintRedeemStatic.ts +10 -102
- package/typechain-types/ActionMiscV3.ts +36 -75
- package/typechain-types/ActionStorageStatic.ts +0 -55
- package/typechain-types/ActionSwapPTV3.ts +8 -5
- package/typechain-types/ActionSwapYTV3.ts +8 -49
- package/typechain-types/IAaveV3AToken.ts +204 -0
- package/typechain-types/IAaveV3Pool.ts +192 -0
- package/typechain-types/IPActionAddRemoveLiqV3.ts +10 -7
- package/typechain-types/IPActionCallbackV3.ts +164 -0
- package/typechain-types/IPActionMiscV3.ts +36 -75
- package/typechain-types/IPActionSwapPTV3.ts +8 -5
- package/typechain-types/IPActionSwapYTV3.ts +8 -5
- package/typechain-types/IPAllActionV3.ts +103 -90
- package/typechain-types/IPLimitRouter.ts +65 -87
- package/typechain-types/IPLimitRouterCallback.ts +120 -0
- package/typechain-types/IPRouterHelper.ts +6 -19
- package/typechain-types/LimitBackendHelper.ts +287 -0
- package/typechain-types/LimitRouterBase.ts +964 -0
- package/typechain-types/PendleAaveV3SY.ts +1310 -0
- package/typechain-types/PendleLimitRouter.ts +210 -116
- package/typechain-types/PendleOrderMixin.ts +292 -92
- package/typechain-types/PendleRouterHelper.ts +7 -23
- package/typechain-types/SimulateHelper.ts +42 -35
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +43 -13
- package/typechain-types/factories/ActionCallbackV3__factory.ts +169 -0
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -46
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -102
- package/typechain-types/factories/ActionMiscV3__factory.ts +35 -59
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -27
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +29 -9
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +29 -64
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
- package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
- package/typechain-types/factories/AuraWethVethSYUpg__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/CamelotRewardHelper__factory.ts +1 -1
- package/typechain-types/factories/CamelotV1VolatilePreview__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +17 -49
- package/typechain-types/factories/IAaveV3AToken__factory.ts +111 -0
- package/typechain-types/factories/IAaveV3Pool__factory.ts +99 -0
- package/typechain-types/factories/IPActionAddRemoveLiqV3__factory.ts +42 -12
- package/typechain-types/factories/IPActionCallbackV3__factory.ts +83 -0
- package/typechain-types/factories/IPActionMiscV3__factory.ts +18 -42
- package/typechain-types/factories/IPActionSwapPTV3__factory.ts +28 -8
- package/typechain-types/factories/IPActionSwapYTV3__factory.ts +28 -8
- package/typechain-types/factories/IPAllActionV3__factory.ts +150 -70
- package/typechain-types/factories/IPLimitRouterCallback__factory.ts +64 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +37 -145
- package/typechain-types/factories/IPRouterHelper__factory.ts +0 -25
- package/typechain-types/factories/LimitBackendHelper__factory.ts +232 -0
- package/typechain-types/factories/LimitRouterBase__factory.ts +848 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAaveV3SY__factory.ts +1130 -0
- package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
- package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethVethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC4626SY__factory.ts +1 -1
- package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
- package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGMV2TokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +139 -155
- package/typechain-types/factories/PendleLinearDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleLpGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleMlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleOrderMixin__factory.ts +254 -129
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendlePtGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper__factory.ts +2 -32
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV3__factory.ts +10 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL1__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL2__factory.ts +1 -1
- package/typechain-types/factories/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +71 -18
- package/typechain-types/factories/SwETHSY__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +64 -316
- package/typechain-types/index.ts +24 -70
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +0 -4
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +0 -642
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +0 -4
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +0 -521
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +0 -1427
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.json +0 -79
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +0 -708
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +0 -3503
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +0 -125
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +0 -30
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +0 -307
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +0 -409
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +0 -1397
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +0 -348
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +0 -228
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +0 -93
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +0 -1623
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +0 -753
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +0 -79
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +0 -720
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +0 -4
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +0 -976
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +0 -4
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +0 -190
- package/build/artifacts/contracts/router/PendleRouterHelper2.sol/PendleRouterHelper2.dbg.json +0 -4
- package/build/artifacts/contracts/router/PendleRouterHelper2.sol/PendleRouterHelper2.json +0 -145
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +0 -4
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.json +0 -141
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +0 -4
- package/contracts/core/BulkSeller/BulkSeller.sol +0 -215
- package/contracts/core/BulkSeller/BulkSellerFactory.sol +0 -71
- package/contracts/core/BulkSeller/BulkSellerMathCore.sol +0 -126
- package/contracts/interfaces/IPActionMisc.sol +0 -23
- package/contracts/interfaces/IPAllAction.sol +0 -21
- package/contracts/limit/Mock.sol +0 -429
- package/contracts/offchain-helpers/BulkSellerOffchain.sol +0 -57
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +0 -19
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +0 -111
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +0 -182
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +0 -682
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +0 -171
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +0 -72
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +0 -55
- package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +0 -21
- package/contracts/router/ActionAddRemoveLiq.sol +0 -525
- package/contracts/router/ActionMintRedeem.sol +0 -134
- package/contracts/router/ActionMisc.sol +0 -51
- package/contracts/router/ActionSwapPT.sol +0 -197
- package/contracts/router/ActionSwapYT.sol +0 -323
- package/contracts/router/PendleRouter.sol +0 -242
- package/contracts/router/PendleRouterHelper2.sol +0 -41
- package/contracts/router/base/ActionBaseCallback.sol +0 -152
- package/contracts/router/base/ActionBaseMintRedeem.sol +0 -182
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "./base/ActionBaseMintRedeem.sol";
|
|
5
|
-
import "../interfaces/IPActionAddRemoveLiq.sol";
|
|
6
|
-
import "../interfaces/IPMarket.sol";
|
|
7
|
-
import "../core/libraries/Errors.sol";
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @dev If market is expired, all actions will revert, except for the following:
|
|
11
|
-
* - removeLiquidityDualSyAndPt()
|
|
12
|
-
* - removeLiquidityDualTokenAndPt()
|
|
13
|
-
* - removeLiquiditySingleSy()
|
|
14
|
-
* - removeLiquiditySingleToken()
|
|
15
|
-
* This is because swapping and adding liquidity are not allowed on an expired market.
|
|
16
|
-
*/
|
|
17
|
-
contract ActionAddRemoveLiq is IPActionAddRemoveLiq, ActionBaseMintRedeem {
|
|
18
|
-
using PMath for uint256;
|
|
19
|
-
using PMath for int256;
|
|
20
|
-
using MarketMathCore for MarketState;
|
|
21
|
-
using MarketApproxPtInLib for MarketState;
|
|
22
|
-
using MarketApproxPtOutLib for MarketState;
|
|
23
|
-
using PYIndexLib for IPYieldToken;
|
|
24
|
-
using PYIndexLib for PYIndex;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @notice Adds liquidity to the SY/PT market, granting LP tokens in return
|
|
28
|
-
* @dev Will mint as much LP as possible given no more than `netSyDesired` and `netPtDesired`,
|
|
29
|
-
* while not changing the market's price
|
|
30
|
-
* @dev Only the necessary SY/PT amount will be transferred
|
|
31
|
-
* @dev Reverts if market is expired
|
|
32
|
-
*/
|
|
33
|
-
function addLiquidityDualSyAndPt(
|
|
34
|
-
address receiver,
|
|
35
|
-
address market,
|
|
36
|
-
uint256 netSyDesired,
|
|
37
|
-
uint256 netPtDesired,
|
|
38
|
-
uint256 minLpOut
|
|
39
|
-
) external returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
40
|
-
(IStandardizedYield SY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
|
|
41
|
-
|
|
42
|
-
// calculate the amount of SY and PT to be used
|
|
43
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
44
|
-
(, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(netSyDesired, netPtDesired, block.timestamp);
|
|
45
|
-
|
|
46
|
-
// early-check
|
|
47
|
-
if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
|
|
48
|
-
|
|
49
|
-
// execute the addLiquidity
|
|
50
|
-
_transferFrom(IERC20(SY), msg.sender, market, netSyUsed);
|
|
51
|
-
_transferFrom(IERC20(PT), msg.sender, market, netPtUsed);
|
|
52
|
-
|
|
53
|
-
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
|
|
54
|
-
|
|
55
|
-
// fail-safe
|
|
56
|
-
if (netLpOut < minLpOut) assert(false);
|
|
57
|
-
|
|
58
|
-
emit AddLiquidityDualSyAndPt(msg.sender, market, receiver, netSyUsed, netPtUsed, netLpOut);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @notice Adds liquidity to SY/PT market using PT + any token.
|
|
63
|
-
* @dev Input token is first swapped to SY-mintable token using Kyber, then SY is minted from
|
|
64
|
-
* such. Finally the SY/PT pair is added to the market
|
|
65
|
-
* @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
66
|
-
* @param netPtDesired maximum PT to be used
|
|
67
|
-
* @dev Only the necessary PT amount will be transferred
|
|
68
|
-
* @dev All SY minted must be used, otherwise the call will revert. Therefore it is recommended
|
|
69
|
-
* that `netPtDesired` is slightly higher than actual expected.
|
|
70
|
-
* @dev Reverts if market is expired
|
|
71
|
-
*/
|
|
72
|
-
function addLiquidityDualTokenAndPt(
|
|
73
|
-
address receiver,
|
|
74
|
-
address market,
|
|
75
|
-
TokenInput calldata input,
|
|
76
|
-
uint256 netPtDesired,
|
|
77
|
-
uint256 minLpOut
|
|
78
|
-
) external payable returns (uint256 netLpOut, uint256 netTokenUsed, uint256 netPtUsed) {
|
|
79
|
-
(IStandardizedYield SY, IPPrincipalToken PT, ) = IPMarket(market).readTokens();
|
|
80
|
-
|
|
81
|
-
uint256 netSyDesired = _mintSyFromToken(market, address(SY), 1, input);
|
|
82
|
-
uint256 netSyUsed;
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
// calc the amount of SY and PT to be used
|
|
86
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
87
|
-
(, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(netSyDesired, netPtDesired, block.timestamp);
|
|
88
|
-
|
|
89
|
-
if (netSyDesired != netSyUsed) revert Errors.RouterNotAllSyUsed(netSyDesired, netSyUsed);
|
|
90
|
-
if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
|
|
91
|
-
|
|
92
|
-
netTokenUsed = input.netTokenIn;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// SY has been minted and transferred to the market
|
|
96
|
-
_transferFrom(IERC20(PT), msg.sender, market, netPtUsed);
|
|
97
|
-
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
|
|
98
|
-
|
|
99
|
-
// fail-safe
|
|
100
|
-
if (netLpOut < minLpOut) assert(false);
|
|
101
|
-
|
|
102
|
-
emit AddLiquidityDualTokenAndPt(msg.sender, market, input.tokenIn, receiver, netTokenUsed, netPtUsed, netLpOut);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @notice Swaps partial PT to SY, then use them to add liquidity to SY/PT pair
|
|
107
|
-
* @param netPtIn amount of PT to be transferred in from caller
|
|
108
|
-
* @param guessPtSwapToSy approximate info for the swap
|
|
109
|
-
* @return netLpOut actual LP output, will not be lower than `minLpOut`
|
|
110
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
111
|
-
* @dev Reverts if market is expired
|
|
112
|
-
*/
|
|
113
|
-
function addLiquiditySinglePt(
|
|
114
|
-
address receiver,
|
|
115
|
-
address market,
|
|
116
|
-
uint256 netPtIn,
|
|
117
|
-
uint256 minLpOut,
|
|
118
|
-
ApproxParams calldata guessPtSwapToSy
|
|
119
|
-
) external returns (uint256 netLpOut, uint256 netSyFee) {
|
|
120
|
-
(, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
121
|
-
|
|
122
|
-
// calculate the amount of PT to swap
|
|
123
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
124
|
-
|
|
125
|
-
(uint256 netPtSwap, , ) = state.approxSwapPtToAddLiquidity(
|
|
126
|
-
YT.newIndex(),
|
|
127
|
-
netPtIn,
|
|
128
|
-
block.timestamp,
|
|
129
|
-
guessPtSwapToSy
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// execute the swap
|
|
133
|
-
_transferFrom(IERC20(PT), msg.sender, market, netPtIn);
|
|
134
|
-
|
|
135
|
-
uint256 netSyReceived;
|
|
136
|
-
(netSyReceived, netSyFee) = IPMarket(market).swapExactPtForSy(market, netPtSwap, EMPTY_BYTES);
|
|
137
|
-
|
|
138
|
-
// execute the addLiquidity
|
|
139
|
-
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyReceived, netPtIn - netPtSwap);
|
|
140
|
-
|
|
141
|
-
if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
|
|
142
|
-
|
|
143
|
-
emit AddLiquiditySinglePt(msg.sender, market, receiver, netPtIn, netLpOut);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @notice Swaps partial SY to PT, then use them to add liquidity to SY/PT pair
|
|
148
|
-
* @param netSyIn amount of SY to be transferred in from caller
|
|
149
|
-
* @param guessPtReceivedFromSy approx. output PT from the swap
|
|
150
|
-
* @return netLpOut actual LP output, will not be lower than `minLpOut`
|
|
151
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
152
|
-
* @dev Reverts if market is expired
|
|
153
|
-
*/
|
|
154
|
-
function addLiquiditySingleSy(
|
|
155
|
-
address receiver,
|
|
156
|
-
address market,
|
|
157
|
-
uint256 netSyIn,
|
|
158
|
-
uint256 minLpOut,
|
|
159
|
-
ApproxParams calldata guessPtReceivedFromSy
|
|
160
|
-
) external returns (uint256 netLpOut, uint256 netSyFee) {
|
|
161
|
-
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
162
|
-
|
|
163
|
-
// transfer SY to market
|
|
164
|
-
_transferFrom(IERC20(SY), msg.sender, market, netSyIn);
|
|
165
|
-
|
|
166
|
-
// mint LP
|
|
167
|
-
(netLpOut, netSyFee) = _addLiquiditySingleSy(receiver, market, YT, netSyIn, minLpOut, guessPtReceivedFromSy);
|
|
168
|
-
|
|
169
|
-
emit AddLiquiditySingleSy(msg.sender, market, receiver, netSyIn, netLpOut);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* @notice Adds liquidity using a single token input. The input token is first swapped through
|
|
174
|
-
* Kyberswap to a SY-mintable token, the rest is the same as `addLiquiditySingleSy()`
|
|
175
|
-
* @param guessPtReceivedFromSy approximate PT output for the SY-to-PT swap
|
|
176
|
-
* @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
177
|
-
* @return netLpOut actual LP output, will not be lower than `minLpOut`
|
|
178
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
179
|
-
* @dev Reverts if market is expired
|
|
180
|
-
*/
|
|
181
|
-
function addLiquiditySingleToken(
|
|
182
|
-
address receiver,
|
|
183
|
-
address market,
|
|
184
|
-
uint256 minLpOut,
|
|
185
|
-
ApproxParams calldata guessPtReceivedFromSy,
|
|
186
|
-
TokenInput calldata input
|
|
187
|
-
) external payable returns (uint256 netLpOut, uint256 netSyFee) {
|
|
188
|
-
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
189
|
-
|
|
190
|
-
// mint SY directly to the market
|
|
191
|
-
uint256 netSyUsed = _mintSyFromToken(market, address(SY), 1, input);
|
|
192
|
-
|
|
193
|
-
// mint LP
|
|
194
|
-
(netLpOut, netSyFee) = _addLiquiditySingleSy(receiver, market, YT, netSyUsed, minLpOut, guessPtReceivedFromSy);
|
|
195
|
-
|
|
196
|
-
emit AddLiquiditySingleToken(msg.sender, market, input.tokenIn, receiver, input.netTokenIn, netLpOut);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* @notice Mints partial SY to PT+YT, returns YT to user, then uses PT+SY to add liquidity
|
|
201
|
-
* @param netSyIn amount of SY to be transferred in from caller
|
|
202
|
-
* @return netLpOut actual LP output, will not be lower than `minLpOut`
|
|
203
|
-
* @return netYtOut actual YT output, will not be lower than `minYtOut`
|
|
204
|
-
* @dev Reverts if market is expired
|
|
205
|
-
*/
|
|
206
|
-
function addLiquiditySingleSyKeepYt(
|
|
207
|
-
address receiver,
|
|
208
|
-
address market,
|
|
209
|
-
uint256 netSyIn,
|
|
210
|
-
uint256 minLpOut,
|
|
211
|
-
uint256 minYtOut
|
|
212
|
-
) external returns (uint256 netLpOut, uint256 netYtOut) {
|
|
213
|
-
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
214
|
-
|
|
215
|
-
_transferIn(address(SY), msg.sender, netSyIn);
|
|
216
|
-
|
|
217
|
-
(netLpOut, netYtOut) = _addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyIn, minLpOut, minYtOut);
|
|
218
|
-
|
|
219
|
-
emit AddLiquiditySingleSyKeepYt(msg.sender, market, receiver, netSyIn, netLpOut, netYtOut);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* @notice Adds liquidity and returns leftover YT using a single token input. The input token
|
|
224
|
-
* is first swapped through Kyberswap to a SY-mintable token, the rest is the same as
|
|
225
|
-
* `addLiquiditySingleSyKeepYt()`
|
|
226
|
-
* @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
227
|
-
* @return netLpOut actual LP output, will not be lower than `minLpOut`
|
|
228
|
-
* @return netYtOut actual YT output, will not be lower than `minYtOut`
|
|
229
|
-
* @dev Reverts if market is expired
|
|
230
|
-
*/
|
|
231
|
-
function addLiquiditySingleTokenKeepYt(
|
|
232
|
-
address receiver,
|
|
233
|
-
address market,
|
|
234
|
-
uint256 minLpOut,
|
|
235
|
-
uint256 minYtOut,
|
|
236
|
-
TokenInput calldata input
|
|
237
|
-
) external returns (uint256 netLpOut, uint256 netYtOut) {
|
|
238
|
-
(IStandardizedYield SY, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
239
|
-
|
|
240
|
-
uint256 netSyUsed = _mintSyFromToken(address(this), address(SY), 1, input);
|
|
241
|
-
|
|
242
|
-
(netLpOut, netYtOut) = _addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyUsed, minLpOut, minYtOut);
|
|
243
|
-
|
|
244
|
-
emit AddLiquiditySingleTokenKeepYt(
|
|
245
|
-
msg.sender,
|
|
246
|
-
market,
|
|
247
|
-
input.tokenIn,
|
|
248
|
-
receiver,
|
|
249
|
-
input.netTokenIn,
|
|
250
|
-
netLpOut,
|
|
251
|
-
netYtOut
|
|
252
|
-
);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* @notice Burns LP token to remove SY/PT liquidity
|
|
257
|
-
* @param netLpToRemove amount of LP to be burned from caller
|
|
258
|
-
* @dev Will work even if market is expired
|
|
259
|
-
*/
|
|
260
|
-
function removeLiquidityDualSyAndPt(
|
|
261
|
-
address receiver,
|
|
262
|
-
address market,
|
|
263
|
-
uint256 netLpToRemove,
|
|
264
|
-
uint256 minSyOut,
|
|
265
|
-
uint256 minPtOut
|
|
266
|
-
) external returns (uint256 netSyOut, uint256 netPtOut) {
|
|
267
|
-
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
268
|
-
|
|
269
|
-
(netSyOut, netPtOut) = IPMarket(market).burn(receiver, receiver, netLpToRemove);
|
|
270
|
-
|
|
271
|
-
if (netSyOut < minSyOut) revert Errors.RouterInsufficientSyOut(netSyOut, minSyOut);
|
|
272
|
-
if (netPtOut < minPtOut) revert Errors.RouterInsufficientPtOut(netPtOut, minPtOut);
|
|
273
|
-
|
|
274
|
-
emit RemoveLiquidityDualSyAndPt(msg.sender, market, receiver, netLpToRemove, netPtOut, netSyOut);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* @notice Burns LP token to remove SY/PT liquidity, then redeems SY, finally (if needed)
|
|
279
|
-
* swaps SY redeemings through Kyberswap to desired output token.
|
|
280
|
-
* @param netLpToRemove amount of LP to be burned from caller
|
|
281
|
-
* @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
282
|
-
* @dev Will work even if market is expired
|
|
283
|
-
*/
|
|
284
|
-
function removeLiquidityDualTokenAndPt(
|
|
285
|
-
address receiver,
|
|
286
|
-
address market,
|
|
287
|
-
uint256 netLpToRemove,
|
|
288
|
-
TokenOutput calldata output,
|
|
289
|
-
uint256 minPtOut
|
|
290
|
-
) external returns (uint256 netTokenOut, uint256 netPtOut) {
|
|
291
|
-
(IStandardizedYield SY, , ) = IPMarket(market).readTokens();
|
|
292
|
-
|
|
293
|
-
// burn LP, SY sent to either SY or bulk, PT sent to receiver
|
|
294
|
-
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
295
|
-
|
|
296
|
-
uint256 netSyOut;
|
|
297
|
-
(netSyOut, netPtOut) = IPMarket(market).burn(_syOrBulk(address(SY), output), receiver, netLpToRemove);
|
|
298
|
-
|
|
299
|
-
if (netPtOut < minPtOut) revert Errors.RouterInsufficientPtOut(netPtOut, minPtOut);
|
|
300
|
-
|
|
301
|
-
// redeem SY to token
|
|
302
|
-
netTokenOut = _redeemSyToToken(receiver, address(SY), netSyOut, output, false);
|
|
303
|
-
|
|
304
|
-
emit RemoveLiquidityDualTokenAndPt(
|
|
305
|
-
msg.sender,
|
|
306
|
-
market,
|
|
307
|
-
output.tokenOut,
|
|
308
|
-
receiver,
|
|
309
|
-
netLpToRemove,
|
|
310
|
-
netPtOut,
|
|
311
|
-
netTokenOut
|
|
312
|
-
);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* @notice Removes SY/PT liquidity, then swaps all resulting SY to return only PT
|
|
317
|
-
* @param netLpToRemove amount of LP to be burned from caller
|
|
318
|
-
* @param guessPtReceivedFromSy approximate info for the swap
|
|
319
|
-
* @return netPtOut total PT output, will not be lower than `minPtOut`
|
|
320
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
321
|
-
* @dev Reverts if market is expired
|
|
322
|
-
*/
|
|
323
|
-
function removeLiquiditySinglePt(
|
|
324
|
-
address receiver,
|
|
325
|
-
address market,
|
|
326
|
-
uint256 netLpToRemove,
|
|
327
|
-
uint256 minPtOut,
|
|
328
|
-
ApproxParams calldata guessPtReceivedFromSy
|
|
329
|
-
) external returns (uint256 netPtOut, uint256 netSyFee) {
|
|
330
|
-
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
331
|
-
|
|
332
|
-
// calculate the total amount of PT received from burning & selling SY
|
|
333
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
334
|
-
(uint256 syFromBurn, uint256 ptFromBurn) = state.removeLiquidity(netLpToRemove);
|
|
335
|
-
(uint256 ptFromSwap, ) = state.approxSwapExactSyForPt(
|
|
336
|
-
YT.newIndex(),
|
|
337
|
-
syFromBurn,
|
|
338
|
-
block.timestamp,
|
|
339
|
-
guessPtReceivedFromSy
|
|
340
|
-
);
|
|
341
|
-
|
|
342
|
-
if (ptFromBurn + ptFromSwap < minPtOut)
|
|
343
|
-
revert Errors.RouterInsufficientPtOut(ptFromBurn + ptFromSwap, minPtOut);
|
|
344
|
-
|
|
345
|
-
// execute the burn & the swap
|
|
346
|
-
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
347
|
-
|
|
348
|
-
(, ptFromBurn) = IPMarket(market).burn(market, receiver, netLpToRemove);
|
|
349
|
-
(, netSyFee) = IPMarket(market).swapSyForExactPt(receiver, ptFromSwap, EMPTY_BYTES);
|
|
350
|
-
|
|
351
|
-
netPtOut = ptFromBurn + ptFromSwap;
|
|
352
|
-
|
|
353
|
-
// fail-safe
|
|
354
|
-
if (netPtOut < minPtOut) assert(false);
|
|
355
|
-
|
|
356
|
-
emit RemoveLiquiditySinglePt(msg.sender, market, receiver, netLpToRemove, netPtOut);
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* @notice Removes SY/PT liquidity, then converts all resulting PT to return only SY
|
|
361
|
-
* @dev Conversion is done with market swap if not expired, or with PT redeeming if expired
|
|
362
|
-
* @param netLpToRemove amount of LP to be burned from caller
|
|
363
|
-
* @return netSyOut total SY output, will not be lower than `minSyOut`
|
|
364
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
365
|
-
* @dev Will work even if market is expired
|
|
366
|
-
*/
|
|
367
|
-
function removeLiquiditySingleSy(
|
|
368
|
-
address receiver,
|
|
369
|
-
address market,
|
|
370
|
-
uint256 netLpToRemove,
|
|
371
|
-
uint256 minSyOut
|
|
372
|
-
) external returns (uint256 netSyOut, uint256 netSyFee) {
|
|
373
|
-
// transfer LP to market
|
|
374
|
-
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
375
|
-
|
|
376
|
-
// burn LP, SY sent to receiver
|
|
377
|
-
(netSyOut, netSyFee) = _removeLiquiditySingleSy(receiver, market, netLpToRemove, minSyOut);
|
|
378
|
-
|
|
379
|
-
emit RemoveLiquiditySingleSy(msg.sender, market, receiver, netLpToRemove, netSyOut);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* @notice Removes SY/PT liquidity, then converts all to desired output token.
|
|
384
|
-
* @dev inner workings of this function:
|
|
385
|
-
- Removes SY/PT liquidity to only SY (see `removeLiquiditySingleSy()`)
|
|
386
|
-
- Burns SY to redeem SY-mintable tokens
|
|
387
|
-
- (If needed) swaps resulting tokens to desired output token using Kyberswap
|
|
388
|
-
* @param netLpToRemove amount of LP to be burned from caller
|
|
389
|
-
* @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
390
|
-
* @return netTokenOut total token output, will not be lower than `output.minTokenOut`
|
|
391
|
-
* @return netSyFee amount of SY fee incurred from the swap
|
|
392
|
-
* @dev Will work even if market is expired
|
|
393
|
-
*/
|
|
394
|
-
function removeLiquiditySingleToken(
|
|
395
|
-
address receiver,
|
|
396
|
-
address market,
|
|
397
|
-
uint256 netLpToRemove,
|
|
398
|
-
TokenOutput calldata output
|
|
399
|
-
) external returns (uint256 netTokenOut, uint256 netSyFee) {
|
|
400
|
-
(IStandardizedYield SY, , ) = IPMarket(market).readTokens();
|
|
401
|
-
|
|
402
|
-
// transfer LP to market, burn LP, SY sent to either SY or bulk
|
|
403
|
-
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
404
|
-
|
|
405
|
-
uint256 netSyReceived;
|
|
406
|
-
|
|
407
|
-
(netSyReceived, netSyFee) = _removeLiquiditySingleSy(_syOrBulk(address(SY), output), market, netLpToRemove, 1);
|
|
408
|
-
|
|
409
|
-
// redeem SY to token
|
|
410
|
-
netTokenOut = _redeemSyToToken(receiver, address(SY), netSyReceived, output, false);
|
|
411
|
-
|
|
412
|
-
emit RemoveLiquiditySingleToken(msg.sender, market, output.tokenOut, receiver, netLpToRemove, netTokenOut);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/// @dev swaps SY to PT, then adds liquidity
|
|
416
|
-
function _addLiquiditySingleSy(
|
|
417
|
-
address receiver,
|
|
418
|
-
address market,
|
|
419
|
-
IPYieldToken YT,
|
|
420
|
-
uint256 netSyIn,
|
|
421
|
-
uint256 minLpOut,
|
|
422
|
-
ApproxParams calldata guessPtReceivedFromSy
|
|
423
|
-
) internal returns (uint256 netLpOut, uint256 netSyFee) {
|
|
424
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
425
|
-
|
|
426
|
-
// calculate the PT amount needed to add liquidity
|
|
427
|
-
(uint256 netPtFromSwap, , ) = state.approxSwapSyToAddLiquidity(
|
|
428
|
-
YT.newIndex(),
|
|
429
|
-
netSyIn,
|
|
430
|
-
block.timestamp,
|
|
431
|
-
guessPtReceivedFromSy
|
|
432
|
-
);
|
|
433
|
-
|
|
434
|
-
// execute the swap & the addLiquidity
|
|
435
|
-
uint256 netSySwapped;
|
|
436
|
-
(netSySwapped, netSyFee) = IPMarket(market).swapSyForExactPt(market, netPtFromSwap, EMPTY_BYTES);
|
|
437
|
-
|
|
438
|
-
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyIn - netSySwapped, netPtFromSwap);
|
|
439
|
-
|
|
440
|
-
if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* @dev algorithm:
|
|
445
|
-
- Split SY into a SY and b SY (with a + b = netSyIn)
|
|
446
|
-
- Mint PY with a SY ---> gives (a * pyIndex / ONE) PT + YT
|
|
447
|
-
- Mint LP with (a * pyIndex / ONE) PT and b SY
|
|
448
|
-
|
|
449
|
-
-> We want (a * pyIndex / ONE) / totalPt = b / totalSy
|
|
450
|
-
-> a * (1 + pyIndex * totalSy / ONE / totalPt) = netSyIn
|
|
451
|
-
-> a = (netSyIn * totalPt) / (totalPt + (pyIndex * totalSy / ONE))
|
|
452
|
-
-> a = (netSyIn * totalPt) / (totalPt + totalAsset)
|
|
453
|
-
*/
|
|
454
|
-
function _addLiquiditySingleSyKeepYt(
|
|
455
|
-
address receiver,
|
|
456
|
-
address market,
|
|
457
|
-
IStandardizedYield SY,
|
|
458
|
-
IPYieldToken YT,
|
|
459
|
-
uint256 netSyIn,
|
|
460
|
-
uint256 minLpOut,
|
|
461
|
-
uint256 minYtOut
|
|
462
|
-
) internal returns (uint256 netLpOut, uint256 netYtOut) {
|
|
463
|
-
MarketState memory state = IPMarket(market).readState(address(this));
|
|
464
|
-
|
|
465
|
-
PYIndex pyIndex = YT.newIndex();
|
|
466
|
-
|
|
467
|
-
uint256 netSyToPt = (netSyIn * state.totalPt.Uint()) /
|
|
468
|
-
(state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
|
|
469
|
-
|
|
470
|
-
// transfer SY to mint PY
|
|
471
|
-
_transferOut(address(SY), address(YT), netSyToPt);
|
|
472
|
-
|
|
473
|
-
// the rest of SY goes to market
|
|
474
|
-
_transferOut(address(SY), market, netSyIn - netSyToPt);
|
|
475
|
-
|
|
476
|
-
// PT goes to market, YT goes to receiver
|
|
477
|
-
netYtOut = YT.mintPY(market, receiver);
|
|
478
|
-
|
|
479
|
-
(netLpOut, , ) = IPMarket(market).mint(receiver, netSyIn - netSyToPt, netYtOut);
|
|
480
|
-
|
|
481
|
-
if (netLpOut < minLpOut) revert Errors.RouterInsufficientLpOut(netLpOut, minLpOut);
|
|
482
|
-
if (netYtOut < minYtOut) revert Errors.RouterInsufficientYtOut(netYtOut, minYtOut);
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/// @dev removes SY/PT liquidity, then converts PT to SY
|
|
486
|
-
function _removeLiquiditySingleSy(
|
|
487
|
-
address receiver,
|
|
488
|
-
address market,
|
|
489
|
-
uint256 netLpToRemove,
|
|
490
|
-
uint256 minSyOut
|
|
491
|
-
) internal returns (uint256 netSyOut, uint256 netSyFee) {
|
|
492
|
-
if (IPMarket(market).isExpired()) {
|
|
493
|
-
netSyOut = __removeLpToSyAfterExpiry(receiver, market, netLpToRemove);
|
|
494
|
-
} else {
|
|
495
|
-
(netSyOut, netSyFee) = __removeLpToSyBeforeExpiry(receiver, market, netLpToRemove);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
if (netSyOut < minSyOut) revert Errors.RouterInsufficientSyOut(netSyOut, minSyOut);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/// @dev converts PT to SY post-expiry
|
|
502
|
-
function __removeLpToSyAfterExpiry(
|
|
503
|
-
address receiver,
|
|
504
|
-
address market,
|
|
505
|
-
uint256 netLpToRemove
|
|
506
|
-
) internal returns (uint256 netSyOut) {
|
|
507
|
-
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
508
|
-
(uint256 syFromBurn, ) = IPMarket(market).burn(receiver, address(YT), netLpToRemove);
|
|
509
|
-
netSyOut = syFromBurn + YT.redeemPY(receiver);
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
/// @dev swaps PT to SY pre-expiry
|
|
513
|
-
function __removeLpToSyBeforeExpiry(
|
|
514
|
-
address receiver,
|
|
515
|
-
address market,
|
|
516
|
-
uint256 netLpToRemove
|
|
517
|
-
) internal returns (uint256 netSyOut, uint256 netSyFee) {
|
|
518
|
-
(uint256 syFromBurn, uint256 ptFromBurn) = IPMarket(market).burn(receiver, market, netLpToRemove);
|
|
519
|
-
|
|
520
|
-
uint256 syFromSwap;
|
|
521
|
-
(syFromSwap, netSyFee) = IPMarket(market).swapExactPtForSy(receiver, ptFromBurn, EMPTY_BYTES);
|
|
522
|
-
|
|
523
|
-
netSyOut = syFromBurn + syFromSwap;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "./base/ActionBaseMintRedeem.sol";
|
|
5
|
-
import "../interfaces/IPMarket.sol";
|
|
6
|
-
import "../interfaces/IPActionMintRedeem.sol";
|
|
7
|
-
import "../core/libraries/Errors.sol";
|
|
8
|
-
|
|
9
|
-
contract ActionMintRedeem is IPActionMintRedeem, ActionBaseMintRedeem {
|
|
10
|
-
using MarketMathCore for MarketState;
|
|
11
|
-
using PMath for uint256;
|
|
12
|
-
using PMath for int256;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @notice swaps input token for SY-mintable tokens (if needed), then mints SY from such
|
|
16
|
-
* @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
17
|
-
*/
|
|
18
|
-
function mintSyFromToken(
|
|
19
|
-
address receiver,
|
|
20
|
-
address SY,
|
|
21
|
-
uint256 minSyOut,
|
|
22
|
-
TokenInput calldata input
|
|
23
|
-
) external payable returns (uint256 netSyOut) {
|
|
24
|
-
netSyOut = _mintSyFromToken(receiver, SY, minSyOut, input);
|
|
25
|
-
emit MintSyFromToken(msg.sender, input.tokenIn, SY, receiver, input.netTokenIn, netSyOut);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @notice redeems SY for SY-mintable tokens, then (if needed) swaps resulting tokens for
|
|
30
|
-
* desired output token through Kyberswap
|
|
31
|
-
* @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
32
|
-
*/
|
|
33
|
-
function redeemSyToToken(
|
|
34
|
-
address receiver,
|
|
35
|
-
address SY,
|
|
36
|
-
uint256 netSyIn,
|
|
37
|
-
TokenOutput calldata output
|
|
38
|
-
) external returns (uint256 netTokenOut) {
|
|
39
|
-
netTokenOut = _redeemSyToToken(receiver, SY, netSyIn, output, true);
|
|
40
|
-
emit RedeemSyToToken(msg.sender, output.tokenOut, SY, receiver, netSyIn, netTokenOut);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @notice mints PY from any input token
|
|
45
|
-
* @dev swaps input token through Kyberswap to SY-mintable tokens first, then mints SY, finally
|
|
46
|
-
* mints PY from SY
|
|
47
|
-
* @param input data for input token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
48
|
-
* @dev reverts if PY is expired
|
|
49
|
-
*/
|
|
50
|
-
function mintPyFromToken(
|
|
51
|
-
address receiver,
|
|
52
|
-
address YT,
|
|
53
|
-
uint256 minPyOut,
|
|
54
|
-
TokenInput calldata input
|
|
55
|
-
) external payable returns (uint256 netPyOut) {
|
|
56
|
-
address SY = IPYieldToken(YT).SY();
|
|
57
|
-
|
|
58
|
-
uint256 netSyToMint = _mintSyFromToken(YT, SY, 0, input);
|
|
59
|
-
netPyOut = _mintPyFromSy(receiver, SY, YT, netSyToMint, minPyOut, false);
|
|
60
|
-
|
|
61
|
-
emit MintPyFromToken(msg.sender, input.tokenIn, YT, receiver, input.netTokenIn, netPyOut);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @notice redeems PY for token
|
|
66
|
-
* @dev redeems PT(+YT) for SY first, then redeems SY, finally swaps resulting tokens to output
|
|
67
|
-
* token through Kyberswap (if needed)
|
|
68
|
-
* @param output data for desired output token, see {`./kyberswap/KyberSwapHelper.sol`}
|
|
69
|
-
*/
|
|
70
|
-
function redeemPyToToken(
|
|
71
|
-
address receiver,
|
|
72
|
-
address YT,
|
|
73
|
-
uint256 netPyIn,
|
|
74
|
-
TokenOutput calldata output
|
|
75
|
-
) external returns (uint256 netTokenOut) {
|
|
76
|
-
address SY = IPYieldToken(YT).SY();
|
|
77
|
-
|
|
78
|
-
uint256 netSyToRedeem = _redeemPyToSy(_syOrBulk(SY, output), YT, netPyIn, 1);
|
|
79
|
-
netTokenOut = _redeemSyToToken(receiver, SY, netSyToRedeem, output, false);
|
|
80
|
-
|
|
81
|
-
emit RedeemPyToToken(msg.sender, output.tokenOut, YT, receiver, netPyIn, netTokenOut);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @notice mints PT+YT from input SY
|
|
86
|
-
* @dev reverts if the PY pair is expired
|
|
87
|
-
*/
|
|
88
|
-
function mintPyFromSy(
|
|
89
|
-
address receiver,
|
|
90
|
-
address YT,
|
|
91
|
-
uint256 netSyIn,
|
|
92
|
-
uint256 minPyOut
|
|
93
|
-
) external returns (uint256 netPyOut) {
|
|
94
|
-
netPyOut = _mintPyFromSy(receiver, IPYieldToken(YT).SY(), YT, netSyIn, minPyOut, true);
|
|
95
|
-
emit MintPyFromSy(msg.sender, receiver, YT, netSyIn, netPyOut);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/// @notice redeems PT(+YT) for its corresponding SY
|
|
99
|
-
function redeemPyToSy(
|
|
100
|
-
address receiver,
|
|
101
|
-
address YT,
|
|
102
|
-
uint256 netPyIn,
|
|
103
|
-
uint256 minSyOut
|
|
104
|
-
) external returns (uint256 netSyOut) {
|
|
105
|
-
netSyOut = _redeemPyToSy(receiver, YT, netPyIn, minSyOut);
|
|
106
|
-
emit RedeemPyToSy(msg.sender, receiver, YT, netPyIn, netSyOut);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* @notice A unified interface for redeeming rewards and interests for any SYs,
|
|
111
|
-
* YTs, and markets alike for `user`.
|
|
112
|
-
* @dev returns arrays of amounts claimed for each asset.
|
|
113
|
-
*/
|
|
114
|
-
function redeemDueInterestAndRewards(
|
|
115
|
-
address user,
|
|
116
|
-
address[] calldata sys,
|
|
117
|
-
address[] calldata yts,
|
|
118
|
-
address[] calldata markets
|
|
119
|
-
) external {
|
|
120
|
-
unchecked {
|
|
121
|
-
for (uint256 i = 0; i < sys.length; ++i) {
|
|
122
|
-
IStandardizedYield(sys[i]).claimRewards(user);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
for (uint256 i = 0; i < yts.length; ++i) {
|
|
126
|
-
IPYieldToken(yts[i]).redeemDueInterestAndRewards(user, true, true);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
for (uint256 i = 0; i < markets.length; ++i) {
|
|
130
|
-
IPMarket(markets[i]).redeemRewards(user);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|