@pendle/core-v2 3.0.0 → 4.0.1
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 +553 -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 +845 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +4 -0
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +872 -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 +120 -0
- package/contracts/interfaces/IPRouterHelper.sol +6 -8
- package/contracts/limit/LimitMathCore.sol +158 -0
- package/contracts/limit/LimitRouterBase.sol +442 -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/deployments/merkle-distribution/2023-12-28.json +8225 -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 +93 -98
- 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 +981 -0
- package/typechain-types/PendleAaveV3SY.ts +1310 -0
- package/typechain-types/PendleLimitRouter.ts +238 -127
- 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 +50 -146
- 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 +860 -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 +152 -156
- 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
- package/deployments/5000-core.json +0 -31
- package/deployments/5000-markets/WSTETH-MANTLE-MARCH2024.json +0 -10
- package/deployments/5000-offchain-helper.json +0 -4
package/contracts/limit/Mock.sol
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
// import "../pendle/contracts/limit/PendleLimitRouter.sol";
|
|
2
|
-
import "./PendleLimitRouter.sol";
|
|
3
|
-
import "hardhat/console.sol";
|
|
4
|
-
|
|
5
|
-
contract PendleLimitRouterMock is PendleLimitRouter {
|
|
6
|
-
using PYIndexLib for PYIndex;
|
|
7
|
-
using PYIndexLib for IPYieldToken;
|
|
8
|
-
using PMath for uint256;
|
|
9
|
-
using PMath for int256;
|
|
10
|
-
|
|
11
|
-
uint256 public constant MAKE_SY = 1e18;
|
|
12
|
-
uint256 public constant MAKE_PT = 1e18;
|
|
13
|
-
uint256 public constant MAKE_YT = 1e18;
|
|
14
|
-
uint256 public constant R = 1021525557649751706;
|
|
15
|
-
uint256 public constant INDEX = 1034898125855333936;
|
|
16
|
-
uint256 public constant FEE_RATE = 1000524863070060643;
|
|
17
|
-
uint256 public constant IMPLIED_RATE = 40566962068769599;
|
|
18
|
-
|
|
19
|
-
constructor(address _WNATIVE) PendleLimitRouter(_WNATIVE) {}
|
|
20
|
-
|
|
21
|
-
function flashFill(FillOrderParams[] memory params, address receiver, uint256 maxInput, bytes memory callback)
|
|
22
|
-
external
|
|
23
|
-
returns (uint256 netOutputToTaker, uint256 netInputFromTaker, uint256 totalFee)
|
|
24
|
-
{
|
|
25
|
-
_validateOrdersSkipSig(params);
|
|
26
|
-
OrderType orderType = params[0].order.orderType;
|
|
27
|
-
if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
|
|
28
|
-
return flashFillTokenForPY(Args(orderType, params, receiver, maxInput, callback));
|
|
29
|
-
} else {
|
|
30
|
-
return flashFillPYForToken(Args(orderType, params, receiver, maxInput, callback));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function flashFillTokenForPY(Args memory a)
|
|
35
|
-
internal
|
|
36
|
-
returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee)
|
|
37
|
-
{
|
|
38
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndRemaining(a.params);
|
|
39
|
-
|
|
40
|
-
// Token => This
|
|
41
|
-
uint256[] memory fromMakers = _transferFromMakers_mintSy_updMakings(SY, a.params);
|
|
42
|
-
|
|
43
|
-
NormalResults memory out;
|
|
44
|
-
(totalSyFromTaker, totalPYToTaker, totalFee, out) = calcFlashBatch(a.params, YT, lnFeeRateRoot);
|
|
45
|
-
|
|
46
|
-
require(totalSyFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
47
|
-
|
|
48
|
-
// Taker => This
|
|
49
|
-
_transferFrom(IERC20(SY), msg.sender, address(this), totalSyFromTaker);
|
|
50
|
-
|
|
51
|
-
// This => YT
|
|
52
|
-
_transferOut(SY, YT, totalSyFromTaker + out.totalMaking - out.totalFee);
|
|
53
|
-
|
|
54
|
-
bool isPtToMaker = (a.orderType == OrderType.SY_FOR_PT);
|
|
55
|
-
address pyToMaker = isPtToMaker ? PT : YT;
|
|
56
|
-
{
|
|
57
|
-
address receiverPt = isPtToMaker ? address(this) : a.receiver;
|
|
58
|
-
address receiverYt = isPtToMaker ? a.receiver : address(this);
|
|
59
|
-
|
|
60
|
-
// PT => receiverPt, YT => receiverYt
|
|
61
|
-
IPYieldToken(YT).mintPY(receiverPt, receiverYt);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// This => Makers
|
|
65
|
-
_transferToMakers(IERC20(pyToMaker), address(this), a.params, out.netTakings);
|
|
66
|
-
|
|
67
|
-
// This => Fee
|
|
68
|
-
_transferOut(SY, feeRecipient, totalFee);
|
|
69
|
-
|
|
70
|
-
// toMakers == netTakings
|
|
71
|
-
_checkSafety_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function flashFillPYForToken(Args memory a)
|
|
75
|
-
internal
|
|
76
|
-
returns (uint256 totalSyToTaker, uint256 totalPYFromTaker, uint256 totalFee)
|
|
77
|
-
{
|
|
78
|
-
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndRemaining(a.params);
|
|
79
|
-
|
|
80
|
-
NormalResults memory out;
|
|
81
|
-
(totalPYFromTaker, totalSyToTaker, totalFee, out) = calcFlashBatch(a.params, YT, lnFeeRateRoot);
|
|
82
|
-
|
|
83
|
-
require(totalPYFromTaker <= a.maxTaking, "LOP: maxInput exceeded");
|
|
84
|
-
|
|
85
|
-
bool ptFromTaker = (a.orderType == OrderType.YT_FOR_SY);
|
|
86
|
-
address pyFromTaker = ptFromTaker ? PT : YT;
|
|
87
|
-
address pyFromMaker = ptFromTaker ? YT : PT;
|
|
88
|
-
|
|
89
|
-
// Taker => YT
|
|
90
|
-
_transferFrom(IERC20(pyFromTaker), msg.sender, YT, totalPYFromTaker);
|
|
91
|
-
// Maker => YT
|
|
92
|
-
_transferFromMakers(IERC20(pyFromMaker), a.params, YT, out.netMakings);
|
|
93
|
-
|
|
94
|
-
// YT => This
|
|
95
|
-
IPYieldToken(YT).redeemPY(address(this));
|
|
96
|
-
|
|
97
|
-
// This => Taker
|
|
98
|
-
_transferOut(SY, a.receiver, totalSyToTaker);
|
|
99
|
-
|
|
100
|
-
// This => Makers
|
|
101
|
-
uint256[] memory toMakers = _redeemSy_transferToMakers(SY, a.params, out.netTakings);
|
|
102
|
-
|
|
103
|
-
// This => Fee
|
|
104
|
-
_transferOut(SY, feeRecipient, totalFee);
|
|
105
|
-
|
|
106
|
-
// fromMakers == netMakings
|
|
107
|
-
_checkSafety_emitEvents(a.params, orderHashes, out.netMakings, toMakers, out.netFees, out.notionalVolumes);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function calcFlashBatch(FillOrderParams[] memory params, address YT, uint256 lnFeeRateRoot)
|
|
111
|
-
internal
|
|
112
|
-
returns (
|
|
113
|
-
uint256 netInputFromTaker,
|
|
114
|
-
uint256 netOutputToTaker,
|
|
115
|
-
uint256 netFee,
|
|
116
|
-
IPOrderMixinType.NormalResults memory out
|
|
117
|
-
)
|
|
118
|
-
{
|
|
119
|
-
function (uint256, uint256, uint256, PYIndex) internal pure returns (uint256, uint256) calcFlash =
|
|
120
|
-
getCalcFunctions2(params[0].order.orderType);
|
|
121
|
-
|
|
122
|
-
uint256 timeToExpiry = IPYieldToken(YT).expiry() - block.timestamp;
|
|
123
|
-
uint256 pyIndex = IPYieldToken(YT).pyIndexCurrent();
|
|
124
|
-
|
|
125
|
-
out = LimitMath.calcNormalBatch(params, timeToExpiry, pyIndex, lnFeeRateRoot);
|
|
126
|
-
(netInputFromTaker, netOutputToTaker) =
|
|
127
|
-
calcFlash(out.totalMaking, out.totalTaking, out.totalFee, PYIndex.wrap(pyIndex));
|
|
128
|
-
netFee = out.totalFee;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Proof of index.syToAsset(index.assetToSyUp(takePt)) >= takePt at end of this file
|
|
132
|
-
function calcSyForPtFlash(uint256 makeSy, uint256 takePt, uint256 fee, PYIndex index)
|
|
133
|
-
internal
|
|
134
|
-
pure
|
|
135
|
-
returns (uint256 syFromTaker, uint256 ytToTaker)
|
|
136
|
-
{
|
|
137
|
-
uint256 syToMintPy = index.assetToSyUp(takePt);
|
|
138
|
-
|
|
139
|
-
syFromTaker = syToMintPy - (makeSy - fee);
|
|
140
|
-
ytToTaker = takePt;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function calcPtForSyFlash(uint256 makePt, uint256 takeSy, uint256 fee, PYIndex index)
|
|
144
|
-
internal
|
|
145
|
-
pure
|
|
146
|
-
returns (uint256 ytFromTaker, uint256 syToTaker)
|
|
147
|
-
{
|
|
148
|
-
uint256 syRedeemFromPy = index.assetToSy(makePt);
|
|
149
|
-
syToTaker = syRedeemFromPy - (takeSy + fee);
|
|
150
|
-
|
|
151
|
-
ytFromTaker = makePt;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
function calcSyForYtFlash(uint256 makeSy, uint256 takeYt, uint256 fee, PYIndex index)
|
|
155
|
-
internal
|
|
156
|
-
pure
|
|
157
|
-
returns (uint256 syFromTaker, uint256 ptToTaker)
|
|
158
|
-
{
|
|
159
|
-
uint256 syToMintPy = index.assetToSyUp(takeYt);
|
|
160
|
-
|
|
161
|
-
syFromTaker = syToMintPy - (makeSy - fee);
|
|
162
|
-
ptToTaker = takeYt;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function calcYtForSyFlash(uint256 makeYt, uint256 takeSy, uint256 fee, PYIndex index)
|
|
166
|
-
internal
|
|
167
|
-
pure
|
|
168
|
-
returns (uint256 ptFromTaker, uint256 syToTaker)
|
|
169
|
-
{
|
|
170
|
-
uint256 syRedeemFromPy = index.assetToSy(makeYt);
|
|
171
|
-
|
|
172
|
-
syToTaker = syRedeemFromPy - (takeSy + fee);
|
|
173
|
-
ptFromTaker = makeYt;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/// @dev diff sig for calcNormal and calcFlash to avoid miscalling
|
|
177
|
-
function getCalcFunctions2(IPOrderMixinType.OrderType t)
|
|
178
|
-
internal
|
|
179
|
-
pure
|
|
180
|
-
returns (function (uint256, uint256, uint256, PYIndex) internal pure returns (uint256, uint256) calcFlash)
|
|
181
|
-
{
|
|
182
|
-
if (t == IPOrderMixinType.OrderType.SY_FOR_PT) {
|
|
183
|
-
return calcSyForPtFlash;
|
|
184
|
-
} else if (t == IPOrderMixinType.OrderType.PT_FOR_SY) {
|
|
185
|
-
return calcPtForSyFlash;
|
|
186
|
-
} else if (t == IPOrderMixinType.OrderType.SY_FOR_YT) {
|
|
187
|
-
return calcSyForYtFlash;
|
|
188
|
-
} else {
|
|
189
|
-
return calcYtForSyFlash;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function runAllTests(address YT) public {
|
|
194
|
-
testCalcSyForPtNormal();
|
|
195
|
-
testCalcPtForSyNormal();
|
|
196
|
-
testCalcSyForYtNormal();
|
|
197
|
-
testCalcYtForSyNormal();
|
|
198
|
-
testCalcSyForPtFlash();
|
|
199
|
-
testCalcPtForSyFlash();
|
|
200
|
-
testCalcSyForYtFlash();
|
|
201
|
-
testCalcYtForSyFlash();
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function normalFillTokenForPYStatic(FillOrderParams[] memory params)
|
|
205
|
-
public
|
|
206
|
-
returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee)
|
|
207
|
-
{
|
|
208
|
-
address YT = params[0].order.YT;
|
|
209
|
-
_updMaking(params);
|
|
210
|
-
_mintSyStatic(params);
|
|
211
|
-
NormalResults memory out = LimitMath.calcNormalBatch(params, YT, lnFeeRateRoot);
|
|
212
|
-
(actualMaking, actualTaking, totalFee) = (out.totalMaking - out.totalFee, out.totalTaking, out.totalFee);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function normalFillPYForTokenStatic(FillOrderParams[] memory params)
|
|
216
|
-
public
|
|
217
|
-
returns (
|
|
218
|
-
uint256 actualMaking,
|
|
219
|
-
uint256 actualTaking,
|
|
220
|
-
uint256 totalFee,
|
|
221
|
-
uint256 actualTokenOut,
|
|
222
|
-
uint256[] memory tokensOut
|
|
223
|
-
)
|
|
224
|
-
{
|
|
225
|
-
address YT = params[0].order.YT;
|
|
226
|
-
_updMaking(params);
|
|
227
|
-
NormalResults memory out = LimitMath.calcNormalBatch(params, YT, lnFeeRateRoot);
|
|
228
|
-
(actualMaking, actualTaking, totalFee) = (out.totalMaking, out.totalTaking + out.totalFee, out.totalFee);
|
|
229
|
-
|
|
230
|
-
tokensOut = _redeemSyStatic(params, out.netTakings);
|
|
231
|
-
|
|
232
|
-
for (uint256 i = 0; i < params.length; i = _inc1(i)) {
|
|
233
|
-
actualTokenOut += tokensOut[i];
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
function flashFillTokenForPYStatic(FillOrderParams[] memory params)
|
|
238
|
-
public
|
|
239
|
-
returns (uint256 totalPYToTaker, uint256 totalSyFromTaker, uint256 totalFee)
|
|
240
|
-
{
|
|
241
|
-
address YT = params[0].order.YT;
|
|
242
|
-
_updMaking(params);
|
|
243
|
-
_mintSyStatic(params);
|
|
244
|
-
NormalResults memory out;
|
|
245
|
-
(totalSyFromTaker, totalPYToTaker, totalFee, out) = calcFlashBatch(params, YT, lnFeeRateRoot);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
function flashFillPYForTokenStatic(FillOrderParams[] memory params)
|
|
249
|
-
public
|
|
250
|
-
returns (
|
|
251
|
-
uint256 totalSyToTaker,
|
|
252
|
-
uint256 totalPYFromTaker,
|
|
253
|
-
uint256 totalFee,
|
|
254
|
-
uint256 actualTokenOut,
|
|
255
|
-
uint256[] memory tokensOut
|
|
256
|
-
)
|
|
257
|
-
{
|
|
258
|
-
address YT = params[0].order.YT;
|
|
259
|
-
_updMaking(params);
|
|
260
|
-
NormalResults memory out;
|
|
261
|
-
(totalPYFromTaker, totalSyToTaker, totalFee, out) = calcFlashBatch(params, YT, lnFeeRateRoot);
|
|
262
|
-
|
|
263
|
-
tokensOut = _redeemSyStatic(params, out.netTakings);
|
|
264
|
-
for (uint256 i = 0; i < params.length; i = _inc1(i)) {
|
|
265
|
-
actualTokenOut += tokensOut[i];
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function _updMaking(FillOrderParams[] memory params) internal {
|
|
270
|
-
uint256 len = params.length;
|
|
271
|
-
|
|
272
|
-
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
273
|
-
FillOrderParams memory param = params[i];
|
|
274
|
-
|
|
275
|
-
uint256 remainingMakerAmount = _status[hashOrder(param.order)].remaining;
|
|
276
|
-
if (remainingMakerAmount == 0) remainingMakerAmount = param.order.makingAmount;
|
|
277
|
-
else remainingMakerAmount--;
|
|
278
|
-
|
|
279
|
-
uint256 netMaking = PMath.min(param.makingAmount, remainingMakerAmount);
|
|
280
|
-
|
|
281
|
-
param.makingAmount = netMaking;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function _mintSyStatic(FillOrderParams[] memory params) internal {
|
|
286
|
-
address YT = params[0].order.YT;
|
|
287
|
-
address SY = IPYieldToken(YT).SY();
|
|
288
|
-
|
|
289
|
-
uint256 len = params.length;
|
|
290
|
-
|
|
291
|
-
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
292
|
-
params[i].makingAmount =
|
|
293
|
-
IStandardizedYield(SY).previewDeposit(params[i].order.token, params[i].makingAmount);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function _redeemSyStatic(FillOrderParams[] memory params, uint256[] memory netSyOuts)
|
|
298
|
-
internal
|
|
299
|
-
returns (uint256[] memory tokensOut)
|
|
300
|
-
{
|
|
301
|
-
uint256 len = params.length;
|
|
302
|
-
tokensOut = new uint256[](len);
|
|
303
|
-
|
|
304
|
-
for (uint256 i = 0; i < len; i = _inc1(i)) {
|
|
305
|
-
FillOrderParams memory param = params[i];
|
|
306
|
-
uint256 netSyOut = netSyOuts[i];
|
|
307
|
-
|
|
308
|
-
if (netSyOut == 0) continue;
|
|
309
|
-
|
|
310
|
-
tokensOut[i] =
|
|
311
|
-
IStandardizedYield(IPYieldToken(param.order.YT).SY()).previewRedeem(param.order.token, netSyOut);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
function transferFromMakers_mintSy_updMakings(address SY, FillOrderParams[] memory params)
|
|
316
|
-
public
|
|
317
|
-
payable
|
|
318
|
-
returns (uint256[] memory newMakings)
|
|
319
|
-
{
|
|
320
|
-
newMakings = new uint256[](params.length);
|
|
321
|
-
_transferFromMakers_mintSy_updMakings(SY, params);
|
|
322
|
-
|
|
323
|
-
for (uint256 i = 0; i < params.length; i = _inc1(i)) {
|
|
324
|
-
newMakings[i] = params[i].makingAmount;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
function redeemSy_transferToMakers(address SY, FillOrderParams[] memory params, uint256[] memory netSyOuts)
|
|
329
|
-
public
|
|
330
|
-
returns (uint256[] memory toMakers)
|
|
331
|
-
{
|
|
332
|
-
return _redeemSy_transferToMakers(SY, params, netSyOuts);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function testCalcSyForPtNormal() public returns (uint256 takePt, uint256 fee) {
|
|
336
|
-
console.log("testCalcSyForPtNormal");
|
|
337
|
-
(takePt, fee,) = LimitMath.calcSyForPtNormal(MAKE_SY, R, PYIndex.wrap(INDEX), FEE_RATE);
|
|
338
|
-
console.log("takePt: %s, fee: %s", takePt, fee);
|
|
339
|
-
require(takePt == 1057174885125052923 && fee == 524863070060643);
|
|
340
|
-
|
|
341
|
-
// trade 1 SY (1.0349 asset) -> 1.0572 PT, fee of 0.00052486 SY (0.00054318 asset) 0.052% fee
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function testCalcPtForSyNormal() public returns (uint256 takeSy, uint256 fee) {
|
|
345
|
-
console.log("testCalcPtForSyNormal");
|
|
346
|
-
(takeSy, fee,) = LimitMath.calcPtForSyNormal(MAKE_PT, R, PYIndex.wrap(INDEX), FEE_RATE);
|
|
347
|
-
console.log("takeSy: %s, fee: %s", takeSy, fee);
|
|
348
|
-
require(takeSy == 945917287735898378 && fee == 496216605893315);
|
|
349
|
-
|
|
350
|
-
// trade 1 PT -> 0.94592 SY (0.97893 asset), fee of 0.00049622 SY (0.00051353 asset) 0.052459% fee
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
function testCalcSyForYtNormal() public returns (uint256 takeYt, uint256 fee) {
|
|
354
|
-
console.log("testCalcSyForYtNormal");
|
|
355
|
-
(takeYt, fee,) = LimitMath.calcSyForYtNormal(MAKE_SY, R, PYIndex.wrap(INDEX), FEE_RATE);
|
|
356
|
-
console.log("takeYt: %s, fee: %s", takeYt, fee);
|
|
357
|
-
require(takeYt == 49112543439135815980 && fee == 24370459612155973);
|
|
358
|
-
|
|
359
|
-
// trade 1 SY (1.0349 asset) -> 49.11254 YT, fee of 0.02437 SY (0.025221 asset) 2.437% fee
|
|
360
|
-
// PT / YT ratio = 46.45
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
function testCalcYtForSyNormal() public returns (uint256 takeSy, uint256 fee) {
|
|
364
|
-
console.log("testCalcYtForSyNormal");
|
|
365
|
-
(takeSy, fee,) = LimitMath.calcYtForSyNormal(MAKE_YT, R, PYIndex.wrap(INDEX), FEE_RATE);
|
|
366
|
-
console.log("takeSy: %s, fee: %s", takeSy, fee);
|
|
367
|
-
require(takeSy == 20361397109055853 && fee == 496477051664500);
|
|
368
|
-
|
|
369
|
-
// trade 1 YT -> 0.02036 SY (0.02107 asset), fee of 0.0004964770517 SY (0.0005138031711 asset) 2.438% fee
|
|
370
|
-
// PT / YT ratio = 46.45
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
function testCalcSyForPtFlash() public {
|
|
374
|
-
console.log("testCalcSyForPtFlash");
|
|
375
|
-
|
|
376
|
-
(uint256 takePt, uint256 fee) = testCalcSyForPtNormal();
|
|
377
|
-
(uint256 syFromTaker, uint256 ytToTaker) = calcSyForPtFlash(MAKE_SY, takePt, fee, PYIndex.wrap(INDEX));
|
|
378
|
-
|
|
379
|
-
console.log("syFromTaker: %s, ytToTaker: %s", syFromTaker, ytToTaker);
|
|
380
|
-
require(syFromTaker == 22050420719812349 && ytToTaker == 1057174885125052923);
|
|
381
|
-
|
|
382
|
-
// trade 1 SY (1.0349 asset) -> 1.0572 PT, fee of 0.00052486 SY (0.00054318 asset) 0.052% fee
|
|
383
|
-
// flash fill 0.02205 SY (0.02281 asset) to 1.0572 YT 2.38% fee
|
|
384
|
-
|
|
385
|
-
// rough formula syFromTaker = makeSy * (r-1) + makeSy * (f-1)
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
function testCalcPtForSyFlash() public {
|
|
389
|
-
console.log("testCalcPtForSyFlash");
|
|
390
|
-
|
|
391
|
-
(uint256 takeSy, uint256 fee) = testCalcPtForSyNormal();
|
|
392
|
-
(uint256 ytFromTaker, uint256 syToTaker) = calcPtForSyFlash(MAKE_PT, takeSy, fee, PYIndex.wrap(INDEX));
|
|
393
|
-
|
|
394
|
-
console.log("ytFromTaker: %s, syToTaker: %s", ytFromTaker, syToTaker);
|
|
395
|
-
require(ytFromTaker == 1e18 && syToTaker == 19865180503162537);
|
|
396
|
-
// trade 1 PT -> 0.94592 SY (0.97893 asset), fee of 0.00049622 SY (0.00051353 asset) 0.052459% fee
|
|
397
|
-
// flash fill 1 YT to 0.019865 SY (0.020558 asset) 2.498% fee
|
|
398
|
-
|
|
399
|
-
// rough formula syToTaker = takeSy * (r-1) - takeSy * (f-1)/f)
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
function testCalcSyForYtFlash() public {
|
|
403
|
-
console.log("testCalcSyForYtFlash");
|
|
404
|
-
|
|
405
|
-
(uint256 takeYt, uint256 fee) = testCalcSyForYtNormal();
|
|
406
|
-
(uint256 syFromTaker, uint256 ptToTaker) = calcSyForYtFlash(MAKE_SY, takeYt, fee, PYIndex.wrap(INDEX));
|
|
407
|
-
|
|
408
|
-
console.log("syFromTaker: %s, ptToTaker: %s", syFromTaker, ptToTaker);
|
|
409
|
-
require(syFromTaker == 46480774343370997703 && ptToTaker == 49112543439135815980);
|
|
410
|
-
// trade 1 SY (1.0349 asset) -> 49.11254 YT, fee of 0.02437 SY (0.025221 asset) 2.437% fee
|
|
411
|
-
// flash fill 46.48077 SY (48.07977 asset) to 49.11254 PT 0.052% fee
|
|
412
|
-
|
|
413
|
-
// rough formula syFromTaker = (makeSy + makeSy * (f-1)/f) / (r-1)
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
function testCalcYtForSyFlash() public {
|
|
417
|
-
console.log("testCalcYtForSyFlash");
|
|
418
|
-
|
|
419
|
-
(uint256 takeSy, uint256 fee) = testCalcYtForSyNormal();
|
|
420
|
-
(uint256 ptFromTaker, uint256 syToTaker) = calcYtForSyFlash(MAKE_YT, takeSy, fee, PYIndex.wrap(INDEX));
|
|
421
|
-
|
|
422
|
-
console.log("ptFromTaker: %s, syToTaker: %s", ptFromTaker, syToTaker);
|
|
423
|
-
require(ptFromTaker == 1e18 && syToTaker == 945420810684233877);
|
|
424
|
-
// trade 1 YT -> 0.02036 SY (0.02107 asset), fee of 0.0004968 SY (0.0005138 asset) 2.438% fee
|
|
425
|
-
// flash fill 1 PT to 0.94542 SY 0.0525% fee
|
|
426
|
-
|
|
427
|
-
// rough formula syToTaker = (takeSy - takeSy * (f-1)) / (r-1)
|
|
428
|
-
}
|
|
429
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../core/BulkSeller/BulkSellerMathCore.sol";
|
|
5
|
-
import "../core/BulkSeller/BulkSeller.sol";
|
|
6
|
-
|
|
7
|
-
contract BulkSellerOffchain {
|
|
8
|
-
using BulkSellerMathCore for BulkSellerState;
|
|
9
|
-
using PMath for uint256;
|
|
10
|
-
|
|
11
|
-
function calcCurrentRates(IPBulkSeller bulk) external view returns (uint256 rateTokenToSy, uint256 rateSyToToken) {
|
|
12
|
-
BulkSellerState memory state = bulk.readState();
|
|
13
|
-
address SY = bulk.SY();
|
|
14
|
-
address token = bulk.token();
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
uint256 hypoTotalToken = state.totalToken + state.totalSy.mulDown(state.rateSyToToken);
|
|
18
|
-
uint256 netSyFromToken = IStandardizedYield(SY).previewDeposit(token, hypoTotalToken);
|
|
19
|
-
|
|
20
|
-
rateTokenToSy = netSyFromToken.divDown(hypoTotalToken);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
uint256 hypoTotalSy = state.totalSy + state.totalToken.mulDown(state.rateTokenToSy);
|
|
25
|
-
uint256 netTokenFromSy = IStandardizedYield(SY).previewRedeem(token, hypoTotalSy);
|
|
26
|
-
rateSyToToken = netTokenFromSy.divDown(hypoTotalSy);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function getCurrentState(
|
|
31
|
-
IPBulkSeller bulk
|
|
32
|
-
) external view returns (BulkSellerState memory state, uint256 tokenProp, uint256 hypoTokenBal) {
|
|
33
|
-
state = bulk.readState();
|
|
34
|
-
|
|
35
|
-
tokenProp = state.getTokenProp();
|
|
36
|
-
hypoTokenBal = state.totalToken + IStandardizedYield(bulk.SY()).previewRedeem(bulk.token(), state.totalSy);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function calcCurrentRatesWithAmount(
|
|
40
|
-
IPBulkSeller bulk,
|
|
41
|
-
uint256 hypoTotalToken,
|
|
42
|
-
uint256 hypoTotalSy
|
|
43
|
-
) external view returns (uint256 rateTokenToSy, uint256 rateSyToToken) {
|
|
44
|
-
address SY = bulk.SY();
|
|
45
|
-
address token = bulk.token();
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
uint256 netSyFromToken = IStandardizedYield(SY).previewDeposit(token, hypoTotalToken);
|
|
49
|
-
rateTokenToSy = netSyFromToken.divDown(hypoTotalToken);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
uint256 netTokenFromSy = IStandardizedYield(SY).previewRedeem(token, hypoTotalSy);
|
|
54
|
-
rateSyToToken = netTokenFromSy.divDown(hypoTotalSy);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
5
|
-
import "../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "./base/StorageLayout.sol";
|
|
7
|
-
|
|
8
|
-
// solhint-disable no-empty-blocks
|
|
9
|
-
contract PendleRouterStatic is Proxy, StorageLayout {
|
|
10
|
-
constructor(address actionStorage) {
|
|
11
|
-
owner = msg.sender;
|
|
12
|
-
selectorToFacet[IPMiniDiamond.setFacetForSelectors.selector] = actionStorage;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function _implementation() internal view override returns (address res) {
|
|
16
|
-
res = selectorToFacet[msg.sig];
|
|
17
|
-
require(res != address(0), "selector not found");
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../../interfaces/IPMarket.sol";
|
|
5
|
-
import "../../../interfaces/IPRouterStatic.sol";
|
|
6
|
-
import "../../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
-
import "../../../interfaces/IPMarketFactory.sol";
|
|
8
|
-
import "../../../interfaces/IPBulkSellerFactory.sol";
|
|
9
|
-
import "../../../interfaces/IPBulkSeller.sol";
|
|
10
|
-
|
|
11
|
-
// solhint-disable no-empty-blocks
|
|
12
|
-
contract ActionInfoStatic is IPActionInfoStatic {
|
|
13
|
-
function getPY(address py) public view returns (address pt, address yt) {
|
|
14
|
-
try IPYieldToken(py).PT() returns (address _pt) {
|
|
15
|
-
pt = _pt;
|
|
16
|
-
yt = py;
|
|
17
|
-
} catch {
|
|
18
|
-
pt = py;
|
|
19
|
-
yt = IPPrincipalToken(py).YT();
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/// can be SY, PY or Market
|
|
24
|
-
function getTokensInOut(
|
|
25
|
-
address token
|
|
26
|
-
) external view returns (address[] memory tokensIn, address[] memory tokensOut) {
|
|
27
|
-
try IStandardizedYield(token).getTokensIn() returns (address[] memory res) {
|
|
28
|
-
return (res, IStandardizedYield(token).getTokensOut());
|
|
29
|
-
} catch {}
|
|
30
|
-
|
|
31
|
-
try IPYieldToken(token).SY() returns (address SY) {
|
|
32
|
-
return (IStandardizedYield(SY).getTokensIn(), IStandardizedYield(SY).getTokensOut());
|
|
33
|
-
} catch {}
|
|
34
|
-
|
|
35
|
-
try IPMarket(token).readTokens() returns (IStandardizedYield SY, IPPrincipalToken, IPYieldToken) {
|
|
36
|
-
return (SY.getTokensIn(), SY.getTokensOut());
|
|
37
|
-
} catch {}
|
|
38
|
-
|
|
39
|
-
revert("invalid token");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function getUserSYInfo(address sy, address user) external returns (UserSYInfo memory res) {
|
|
43
|
-
IStandardizedYield SY = IStandardizedYield(sy);
|
|
44
|
-
|
|
45
|
-
// SY
|
|
46
|
-
res.syBalance = TokenAmount(sy, _balanceOf(sy, user));
|
|
47
|
-
|
|
48
|
-
// Rewards
|
|
49
|
-
uint256[] memory rewardsOut = SY.claimRewards(user);
|
|
50
|
-
address[] memory rewardTokens = SY.getRewardTokens();
|
|
51
|
-
|
|
52
|
-
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function getUserPYInfo(address py, address user) external returns (UserPYInfo memory res) {
|
|
56
|
-
(address _PT, address _YT) = getPY(py);
|
|
57
|
-
IPYieldToken YT = IPYieldToken(_YT);
|
|
58
|
-
|
|
59
|
-
// PT / YT
|
|
60
|
-
res.ytBalance = TokenAmount(_YT, _balanceOf(_YT, user));
|
|
61
|
-
res.ptBalance = TokenAmount(_PT, _balanceOf(_PT, user));
|
|
62
|
-
|
|
63
|
-
// interest
|
|
64
|
-
(uint256 interestOut, uint256[] memory rewardsOut) = YT.redeemDueInterestAndRewards(user, true, true);
|
|
65
|
-
|
|
66
|
-
res.unclaimedInterest = TokenAmount(YT.SY(), interestOut);
|
|
67
|
-
|
|
68
|
-
// Rewards
|
|
69
|
-
address[] memory rewardTokens = YT.getRewardTokens();
|
|
70
|
-
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function getUserMarketInfo(address market, address user) external returns (UserMarketInfo memory res) {
|
|
74
|
-
IPMarket _market = IPMarket(market);
|
|
75
|
-
MarketState memory state = _market.readState(address(this));
|
|
76
|
-
|
|
77
|
-
if (uint256(state.totalLp) == 0) return res; // market not initialized
|
|
78
|
-
|
|
79
|
-
// LP PT SY
|
|
80
|
-
(IStandardizedYield SY, IPPrincipalToken PT, ) = _market.readTokens();
|
|
81
|
-
|
|
82
|
-
uint256 userLp = _balanceOf(market, user);
|
|
83
|
-
uint256 userPt = (userLp * uint256(state.totalPt)) / uint256(state.totalLp);
|
|
84
|
-
uint256 userSy = (userLp * uint256(state.totalSy)) / uint256(state.totalLp);
|
|
85
|
-
|
|
86
|
-
res.lpBalance = TokenAmount(market, userLp);
|
|
87
|
-
res.ptBalance = TokenAmount(address(PT), userPt);
|
|
88
|
-
res.syBalance = TokenAmount(address(SY), userSy);
|
|
89
|
-
|
|
90
|
-
// Rewards
|
|
91
|
-
uint256[] memory rewardsOut = _market.redeemRewards(user);
|
|
92
|
-
address[] memory rewardTokens = _market.getRewardTokens();
|
|
93
|
-
|
|
94
|
-
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function _zipTokenAmounts(
|
|
98
|
-
address[] memory tokens,
|
|
99
|
-
uint256[] memory amounts
|
|
100
|
-
) internal pure returns (TokenAmount[] memory res) {
|
|
101
|
-
res = new TokenAmount[](tokens.length);
|
|
102
|
-
|
|
103
|
-
for (uint256 i = 0; i < tokens.length; i++) {
|
|
104
|
-
res[i] = TokenAmount(tokens[i], amounts[i]);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function _balanceOf(address token, address user) internal view returns (uint256) {
|
|
109
|
-
return IERC20(token).balanceOf(user);
|
|
110
|
-
}
|
|
111
|
-
}
|