@pendle/core-v2 2.20.0 → 2.21.0-tradingbot
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/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- 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/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/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.json +0 -19
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -21
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.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/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/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/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/FixedPoint.sol/FixedPoint.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/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/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- 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/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/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/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
- 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/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/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/TradingBot/DecisionHelper/BotDecisionHelperBase.sol/BotDecisionHelperBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/DecisionHelper/BotDecisionHelperBase.sol/BotDecisionHelperBase.json +816 -0
- package/build/artifacts/contracts/core/TradingBot/DecisionHelper/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/DecisionHelper/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.json +1411 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.json +2240 -0
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.json +1641 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/BotSimulationLib.sol/BotSimulationLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/BotSimulationLib.sol/BotSimulationLib.json +10 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/LongYieldActionLib.sol/LongYieldActionLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/LongYieldActionLib.sol/LongYieldActionLib.json +154 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/MarketExtLib.sol/MarketExtLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/MarketExtLib.sol/MarketExtLib.json +24 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/SpecSegmentLib.sol/SpecSegmentLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/SpecSegmentLib.sol/SpecSegmentLib.json +10 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/TvlLib.sol/TvlLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/libraries/TvlLib.sol/TvlLib.json +262 -0
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +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/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 +151 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/TokenAmountLib.sol/TokenAmountLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/libraries/TokenAmountLib.sol/TokenAmountLib.json +10 -0
- 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/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +1 -1
- 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/IGauge.sol/IGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotFactory.sol/ICamelotFactory.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/ICamelotYieldBooster.sol/ICamelotYieldBooster.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/ConvexCurve/ICrvDepositor.sol/ICrvDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICvxCrv.sol/ICvxCrv.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.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/Frax/IFrxEthMinter.sol/IFrxEthMinter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGlpManager.sol/IGlpManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IVaultPriceFeed.sol/IVaultPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
- 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/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- 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/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.json +6 -82
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.json +22 -22
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.json +4 -42
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- 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/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.json +0 -19
- 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/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +0 -19
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.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/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +32 -146
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.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/IPYieldContractFactory.sol/IPYieldContractFactory.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/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/IStargateStaking.sol/IStargateStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/TradingBot/IBotDecisionHelper.sol/IBotDecisionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/IBotDecisionHelper.sol/IBotDecisionHelper.json +679 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldDecisionHelper.sol/ILongYieldDecisionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldDecisionHelper.sol/ILongYieldDecisionHelper.json +698 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.json +745 -0
- package/build/artifacts/contracts/interfaces/TradingBot/IShortYieldDecisionHelper.sol/IShortYieldDecisionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/IShortYieldDecisionHelper.sol/IShortYieldDecisionHelper.json +679 -0
- package/build/artifacts/contracts/interfaces/TradingBot/IShortYieldTradingBot.sol/IShortYieldTradingBot.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/IShortYieldTradingBot.sol/IShortYieldTradingBot.json +794 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.json +351 -0
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.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/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- 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/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +8 -84
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +24 -24
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +6 -44
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.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/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IHashflow.sol/IHashflow.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +0 -4
- package/contracts/core/Market/PendleGauge.sol +2 -3
- package/contracts/core/StandardizedYield/PYIndex.sol +14 -0
- package/contracts/core/TradingBot/DecisionHelper/BotDecisionHelperBase.sol +265 -0
- package/contracts/core/TradingBot/DecisionHelper/LongYieldDecisionHelper.sol +333 -0
- package/contracts/core/TradingBot/LongYieldTradingBot.sol +144 -0
- package/contracts/core/TradingBot/TradingBotBase.sol +253 -0
- package/contracts/core/TradingBot/libraries/BotSimulationLib.sol +99 -0
- package/contracts/core/TradingBot/libraries/LongYieldActionLib.sol +308 -0
- package/contracts/core/TradingBot/libraries/MarketExtLib.sol +272 -0
- package/contracts/core/TradingBot/libraries/SpecSegmentLib.sol +78 -0
- package/contracts/core/TradingBot/libraries/TvlLib.sol +69 -0
- package/contracts/core/libraries/Errors.sol +12 -0
- package/contracts/core/libraries/TokenAmountLib.sol +47 -0
- package/contracts/interfaces/IPActionInfoStatic.sol +7 -8
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +14 -21
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +67 -70
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +11 -23
- package/contracts/interfaces/IPGauge.sol +0 -3
- package/contracts/interfaces/IPRouterStatic.sol +1 -5
- package/contracts/interfaces/IStandardizedYield.sol +10 -15
- package/contracts/interfaces/TradingBot/IBotDecisionHelper.sol +76 -0
- package/contracts/interfaces/TradingBot/ILongYieldDecisionHelper.sol +8 -0
- package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +74 -0
- package/contracts/interfaces/TradingBot/IShortYieldDecisionHelper.sol +7 -0
- package/contracts/interfaces/TradingBot/IShortYieldTradingBot.sol +27 -0
- package/contracts/interfaces/TradingBot/ITradingBotBase.sol +54 -0
- package/contracts/offchain-helpers/BulkSellerOffchain.sol +8 -11
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +11 -14
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +37 -96
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +80 -88
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +14 -43
- package/contracts/oracles/PendleLpOracleLib.sol +1 -1
- package/deployments/core.ts +29 -0
- package/deployments/index.ts +4 -0
- package/deployments/markets/ape-june-29-2023.ts +3 -0
- package/deployments/markets/balancer-reth-dec-28-2023.ts +3 -0
- package/deployments/markets/balancer-wsteth-jun-27-2024.ts +3 -0
- package/deployments/markets/curve-fraxusdc-march-30-2023.ts +3 -0
- package/deployments/markets/index.ts +17 -0
- package/deployments/markets/looks-march-30-2023.ts +3 -0
- package/deployments/markets/steth-june-29-2023.ts +3 -0
- package/deployments/markets/steth-march-30-2023.ts +3 -0
- package/deployments/markets/types.ts +9 -0
- package/deployments/misc.ts +23 -0
- package/package.json +1 -1
- package/typechain-types/ActionMarketAuxStatic.ts +38 -191
- package/typechain-types/ActionMarketCoreStatic.ts +134 -600
- package/typechain-types/ActionMintRedeemStatic.ts +26 -92
- package/typechain-types/AuraEthxBbAWethSY.ts +1532 -0
- package/typechain-types/AuraSwEthBbAWethSYV2.ts +1532 -0
- package/typechain-types/AutomateReady.ts +102 -0
- package/typechain-types/AutomationBase.ts +57 -0
- package/typechain-types/AutomationCompatible.ts +140 -0
- package/typechain-types/AutomationCompatibleInterface.ts +141 -0
- package/typechain-types/BotDecisionHelperBase.ts +508 -0
- package/typechain-types/ChainlinkRelayerAutomation.ts +305 -0
- package/typechain-types/ChainlinkRelayerGelato.ts +311 -0
- package/typechain-types/ComposableStablePreviewProxy.ts +352 -0
- package/typechain-types/ComposableStablePreviewV4.ts +217 -0
- package/typechain-types/ComposableStablePreviewV5.ts +217 -0
- package/typechain-types/{CamelotV1Preview.ts → HLPPricingHelper.ts} +50 -84
- package/typechain-types/IAnkrBNB.ts +150 -0
- package/typechain-types/IAnkrLiquidStaking.ts +253 -0
- package/typechain-types/IAutomate.ts +203 -0
- package/typechain-types/IBotDecisionHelper.ts +208 -239
- package/typechain-types/IEUSD.ts +194 -0
- package/typechain-types/IFluxErc20.ts +298 -0
- package/typechain-types/IFluxInterestRateModel.ts +113 -0
- package/typechain-types/IHLPStaking.ts +154 -0
- package/typechain-types/IHMXCalculator.ts +96 -0
- package/typechain-types/IHMXCompounder.ts +122 -0
- package/typechain-types/IHMXStaking.ts +165 -0
- package/typechain-types/IHMXVester.ts +163 -0
- package/typechain-types/IInterestUSTP.ts +156 -0
- package/typechain-types/IKyberElasticFactory.ts +734 -0
- package/typechain-types/IKyberElasticPool.ts +514 -0
- package/typechain-types/IKyberElasticRouter.ts +315 -0
- package/typechain-types/IKyberLiquidityMining.ts +968 -0
- package/typechain-types/IKyberMathHelper.ts +231 -0
- package/typechain-types/IKyberPositionManager.ts +773 -0
- package/typechain-types/ILongYieldDecisionHelper.ts +512 -0
- package/typechain-types/ILongYieldTradingBot.ts +197 -502
- package/typechain-types/IOpsProxyFactory.ts +93 -0
- package/typechain-types/IPActionMarketAuxStatic.ts +38 -191
- package/typechain-types/IPActionMarketCoreStatic.ts +134 -600
- package/typechain-types/IPActionMintRedeemStatic.ts +26 -92
- package/typechain-types/IPComposableStablePreview.ts +217 -0
- package/typechain-types/IPExternalRewardDistributor.ts +198 -0
- package/typechain-types/IPGauge.ts +3 -23
- package/typechain-types/IPMarket.ts +0 -18
- package/typechain-types/IPMarketFactoryV2.ts +253 -0
- package/typechain-types/{ICamelotSY.ts → IPOracleForSy.ts} +13 -26
- package/typechain-types/IPRouterStatic.ts +197 -888
- package/typechain-types/IRebasingUSTP.ts +133 -0
- package/typechain-types/IShortYieldDecisionHelper.ts +476 -0
- package/typechain-types/IShortYieldTradingBot.ts +574 -0
- package/typechain-types/IStaderStakeManager.ts +700 -0
- package/typechain-types/{IExecutorHelper2.ts → ISwETH.ts} +40 -32
- package/typechain-types/ITaskTreasuryUpgradable.ts +160 -0
- package/typechain-types/ITradingBotBase.ts +97 -247
- package/typechain-types/IUSTP.ts +127 -0
- package/typechain-types/IVersion.ts +81 -0
- package/typechain-types/KyberMathHelper.ts +583 -0
- package/typechain-types/KyberNftManagerBase.ts +364 -0
- package/typechain-types/LegacyNFTHelper.ts +87 -0
- package/typechain-types/LongYieldActionLib.ts +57 -0
- package/typechain-types/LongYieldDecisionHelper.ts +663 -0
- package/typechain-types/LongYieldTradingBot.ts +1374 -437
- package/typechain-types/PendleAnkrBNBSY.ts +1235 -0
- package/typechain-types/PendleAuraWethVethSY.ts +1511 -0
- package/typechain-types/PendleAuraWstethAnkreth.ts +1511 -0
- package/typechain-types/PendleBridgedLSDSY.ts +1222 -0
- package/typechain-types/PendleChainlinkReceiver.ts +239 -0
- package/typechain-types/PendleChainlinkRelayer.ts +158 -0
- package/typechain-types/{PendleBinanceEth.ts → PendleERC4626SY.ts} +18 -31
- package/typechain-types/PendleETHXSY.ts +1231 -0
- package/typechain-types/PendleEUSDSY.ts +1216 -0
- package/typechain-types/PendleExternalRewardDistributor.ts +596 -0
- package/typechain-types/PendleFluxLendingSY.ts +1232 -0
- package/typechain-types/PendleGauge.ts +3 -23
- package/typechain-types/PendleGaugeV2.ts +225 -0
- package/typechain-types/PendleHlpSY.ts +1517 -0
- package/typechain-types/PendleIUSTPSY.ts +1255 -0
- package/typechain-types/{PendleCamelotV1SY.ts → PendleKyberElasticSY.ts} +385 -516
- package/typechain-types/PendleMantleStakedEthSY.ts +1222 -0
- package/typechain-types/PendleMarket.ts +0 -18
- package/typechain-types/PendleMarketFactoryV2.ts +932 -0
- package/typechain-types/PendleMarketV2.ts +1311 -0
- package/typechain-types/PendleMulticallV2.ts +241 -0
- package/typechain-types/PendleOracleForSyProxy.ts +275 -0
- package/typechain-types/SDKErrorsDirectory.ts +57 -0
- package/typechain-types/StarNFTV1.ts +880 -0
- package/typechain-types/SwETHSY.ts +1216 -0
- package/typechain-types/TradingBotBase.ts +1275 -157
- package/typechain-types/TvlLib.ts +215 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +7 -83
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +23 -23
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +5 -43
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1240 -0
- package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1244 -0
- package/typechain-types/factories/{ICamelotSY__factory.ts → AutomateReady__factory.ts} +9 -9
- package/typechain-types/factories/AutomationBase__factory.ts +69 -0
- package/typechain-types/factories/AutomationCompatibleInterface__factory.ts +67 -0
- package/typechain-types/factories/AutomationCompatible__factory.ts +72 -0
- package/typechain-types/factories/BotDecisionHelperBase__factory.ts +835 -0
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerFactory__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -1
- package/typechain-types/factories/ChainlinkRelayerAutomation__factory.ts +238 -0
- package/typechain-types/factories/ChainlinkRelayerGelato__factory.ts +263 -0
- package/typechain-types/factories/ComposableStablePreviewProxy__factory.ts +288 -0
- package/typechain-types/factories/ComposableStablePreviewV4__factory.ts +190 -0
- package/typechain-types/factories/ComposableStablePreviewV5__factory.ts +190 -0
- package/typechain-types/factories/Errors__factory.ts +150 -1
- package/typechain-types/factories/HLPPricingHelper__factory.ts +311 -0
- package/typechain-types/factories/IAnkrBNB__factory.ts +74 -0
- package/typechain-types/factories/IAnkrLiquidStaking__factory.ts +123 -0
- package/typechain-types/factories/IAutomate__factory.ts +126 -0
- package/typechain-types/factories/IBotDecisionHelper__factory.ts +377 -615
- package/typechain-types/factories/IEUSD__factory.ts +101 -0
- package/typechain-types/factories/IFluxErc20__factory.ts +178 -0
- package/typechain-types/factories/{IExecutorHelper2__factory.ts → IFluxInterestRateModel__factory.ts} +19 -15
- package/typechain-types/factories/IHLPStaking__factory.ts +67 -0
- package/typechain-types/factories/IHMXCalculator__factory.ts +45 -0
- package/typechain-types/factories/IHMXCompounder__factory.ts +59 -0
- package/typechain-types/factories/IHMXStaking__factory.ts +78 -0
- package/typechain-types/factories/IHMXVester__factory.ts +85 -0
- package/typechain-types/factories/IInterestUSTP__factory.ts +75 -0
- package/typechain-types/factories/IKyberElasticFactory__factory.ts +455 -0
- package/typechain-types/factories/IKyberElasticPool__factory.ts +315 -0
- package/typechain-types/factories/IKyberElasticRouter__factory.ts +240 -0
- package/typechain-types/factories/IKyberLiquidityMining__factory.ts +913 -0
- package/typechain-types/factories/IKyberMathHelper__factory.ts +143 -0
- package/typechain-types/factories/IKyberPositionManager__factory.ts +633 -0
- package/typechain-types/factories/ILongYieldDecisionHelper__factory.ts +717 -0
- package/typechain-types/factories/ILongYieldTradingBot__factory.ts +250 -658
- package/typechain-types/factories/IOpsProxyFactory__factory.ts +50 -0
- package/typechain-types/factories/IPActionMarketAuxStatic__factory.ts +6 -82
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +22 -22
- package/typechain-types/factories/IPActionMintRedeemStatic__factory.ts +4 -42
- package/typechain-types/factories/IPComposableStablePreview__factory.ts +152 -0
- package/typechain-types/factories/IPExternalRewardDistributor__factory.ts +128 -0
- package/typechain-types/factories/IPGauge__factory.ts +0 -19
- package/typechain-types/factories/IPMarketFactoryV2__factory.ts +181 -0
- package/typechain-types/factories/IPMarket__factory.ts +0 -19
- package/typechain-types/factories/IPOracleForSy__factory.ts +36 -0
- package/typechain-types/factories/IPRouterStatic__factory.ts +32 -146
- package/typechain-types/factories/IRebasingUSTP__factory.ts +49 -0
- package/typechain-types/factories/IShortYieldDecisionHelper__factory.ts +698 -0
- package/typechain-types/factories/IShortYieldTradingBot__factory.ts +813 -0
- package/typechain-types/factories/IStaderStakeManager__factory.ts +435 -0
- package/typechain-types/factories/ISwETH__factory.ts +53 -0
- package/typechain-types/factories/ITaskTreasuryUpgradable__factory.ts +76 -0
- package/typechain-types/factories/ITradingBotBase__factory.ts +138 -227
- package/typechain-types/factories/IUSTP__factory.ts +46 -0
- package/typechain-types/factories/IVersion__factory.ts +36 -0
- package/typechain-types/factories/KyberMathHelper__factory.ts +417 -0
- package/typechain-types/factories/KyberNftManagerBase__factory.ts +279 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +83 -0
- package/typechain-types/factories/LongYieldActionLib__factory.ts +207 -0
- package/typechain-types/factories/LongYieldDecisionHelper__factory.ts +1468 -0
- package/typechain-types/factories/LongYieldTradingBot__factory.ts +1153 -748
- package/typechain-types/factories/MarketExtLib__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1100 -0
- 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 +1231 -0
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1244 -0
- package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1064 -0
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkReceiver__factory.ts +216 -0
- package/typechain-types/factories/PendleChainlinkRelayer__factory.ts +180 -0
- 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 +1030 -0
- package/typechain-types/factories/PendleETHXSY__factory.ts +1059 -0
- package/typechain-types/factories/PendleEUSDSY__factory.ts +1022 -0
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +437 -0
- 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 +1049 -0
- package/typechain-types/factories/PendleGDaiSY__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/{CamelotV1LpHelper__factory.ts → PendleGaugeV2__factory.ts} +50 -53
- package/typechain-types/factories/PendleGauge__factory.ts +0 -19
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleHlpSY__factory.ts +1283 -0
- package/typechain-types/factories/PendleIUSTPSY__factory.ts +1061 -0
- package/typechain-types/factories/PendleKyberElasticSY__factory.ts +1512 -0
- 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 +1068 -0
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +770 -0
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__factory.ts +1299 -0
- package/typechain-types/factories/PendleMarket__factory.ts +1 -20
- package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV2__factory.ts +212 -0
- package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +211 -0
- 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 +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__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/SDKErrorsDirectory__factory.ts +1596 -0
- package/typechain-types/factories/StarNFTV1__factory.ts +584 -0
- package/typechain-types/factories/SwETHSY__factory.ts +1022 -0
- package/typechain-types/factories/ThenaPreview__factory.ts +1 -1
- package/typechain-types/factories/TradingBotBase__factory.ts +1258 -230
- package/typechain-types/factories/TvlLib__factory.ts +309 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +115 -232
- package/typechain-types/index.ts +34 -50
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +0 -976
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.json +0 -979
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/BinanceEth/IWBETH.sol/IWBETH.json +0 -42
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.json +0 -97
- package/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol +0 -120
- package/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol +0 -108
- package/contracts/interfaces/BinanceEth/IWBETH.sol +0 -9
- package/contracts/offchain-helpers/PtAndLpToAsset.sol +0 -62
- package/deployments/42161-markets/RETH-ARBITRUM-JUNE2025.json +0 -10
- package/deployments/42161-markets/WSTETH-ARBITRUM-JUNE2024.json +0 -10
- package/deployments/42161-markets/WSTETH-ARBITRUM-JUNE2025.json +0 -10
- package/deployments/56-core.json +0 -28
- package/deployments/56-markets/THENA-FRXETH-ETH-JUNE2024.json +0 -10
- package/deployments/56-markets/WBETH-DEC2024.json +0 -10
- package/deployments/56-offchain-helper.json +0 -4
- package/typechain-types/BotActionCallback.ts +0 -763
- package/typechain-types/BotActionHelper.ts +0 -763
- package/typechain-types/BotDecisionHelper.ts +0 -527
- package/typechain-types/BotDecisionLib.ts +0 -335
- package/typechain-types/CamelotV1LpHelper.ts +0 -203
- package/typechain-types/IExecutorHelper1.ts +0 -643
- package/typechain-types/IExecutorHelperEthereum1.ts +0 -643
- package/typechain-types/PendleSwapArbitrum.ts +0 -126
- package/typechain-types/PendleSwapEthereum.ts +0 -126
- package/typechain-types/TradingBotOffchain.ts +0 -568
- package/typechain-types/factories/BotActionCallback__factory.ts +0 -678
- package/typechain-types/factories/BotActionHelper__factory.ts +0 -678
- package/typechain-types/factories/BotDecisionHelper__factory.ts +0 -1123
- package/typechain-types/factories/BotDecisionLib__factory.ts +0 -642
- package/typechain-types/factories/CamelotV1Preview__factory.ts +0 -309
- package/typechain-types/factories/IExecutorHelper1__factory.ts +0 -403
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +0 -407
- package/typechain-types/factories/PendleBinanceEth__factory.ts +0 -1052
- package/typechain-types/factories/PendleCamelotV1SY__factory.ts +0 -1595
- package/typechain-types/factories/PendleSwapArbitrum__factory.ts +0 -129
- package/typechain-types/factories/PendleSwapEthereum__factory.ts +0 -129
- package/typechain-types/factories/TradingBotOffchain__factory.ts +0 -1133
|
@@ -3,16 +3,15 @@ pragma solidity 0.8.17;
|
|
|
3
3
|
|
|
4
4
|
import "../core/BulkSeller/BulkSellerMathCore.sol";
|
|
5
5
|
import "../core/BulkSeller/BulkSeller.sol";
|
|
6
|
+
import "hardhat/console.sol";
|
|
6
7
|
|
|
7
8
|
contract BulkSellerOffchain {
|
|
8
9
|
using BulkSellerMathCore for BulkSellerState;
|
|
9
10
|
using Math for uint256;
|
|
10
11
|
|
|
11
|
-
function calcCurrentRates(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
returns (uint256 rateTokenToSy, uint256 rateSyToToken)
|
|
15
|
-
{
|
|
12
|
+
function calcCurrentRates(
|
|
13
|
+
IPBulkSeller bulk
|
|
14
|
+
) external view returns (uint256 rateTokenToSy, uint256 rateSyToToken) {
|
|
16
15
|
BulkSellerState memory state = bulk.readState();
|
|
17
16
|
address SY = bulk.SY();
|
|
18
17
|
address token = bulk.token();
|
|
@@ -31,14 +30,12 @@ contract BulkSellerOffchain {
|
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
function getCurrentState(
|
|
33
|
+
function getCurrentState(
|
|
34
|
+
IPBulkSeller bulk
|
|
35
|
+
)
|
|
35
36
|
external
|
|
36
37
|
view
|
|
37
|
-
returns (
|
|
38
|
-
BulkSellerState memory state,
|
|
39
|
-
uint256 tokenProp,
|
|
40
|
-
uint256 hypoTokenBal
|
|
41
|
-
)
|
|
38
|
+
returns (BulkSellerState memory state, uint256 tokenProp, uint256 hypoTokenBal)
|
|
42
39
|
{
|
|
43
40
|
state = bulk.readState();
|
|
44
41
|
|
|
@@ -21,11 +21,9 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/// can be SY, PY or Market
|
|
24
|
-
function getTokensInOut(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
returns (address[] memory tokensIn, address[] memory tokensOut)
|
|
28
|
-
{
|
|
24
|
+
function getTokensInOut(
|
|
25
|
+
address token
|
|
26
|
+
) external view returns (address[] memory tokensIn, address[] memory tokensOut) {
|
|
29
27
|
try IStandardizedYield(token).getTokensIn() returns (address[] memory res) {
|
|
30
28
|
return (res, IStandardizedYield(token).getTokensOut());
|
|
31
29
|
} catch {}
|
|
@@ -80,10 +78,10 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
80
78
|
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
81
79
|
}
|
|
82
80
|
|
|
83
|
-
function getUserMarketInfo(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
81
|
+
function getUserMarketInfo(
|
|
82
|
+
address market,
|
|
83
|
+
address user
|
|
84
|
+
) external returns (UserMarketInfo memory res) {
|
|
87
85
|
IPMarket _market = IPMarket(market);
|
|
88
86
|
MarketState memory state = _market.readState(address(this));
|
|
89
87
|
|
|
@@ -107,11 +105,10 @@ contract ActionInfoStatic is IPActionInfoStatic {
|
|
|
107
105
|
res.unclaimedRewards = _zipTokenAmounts(rewardTokens, rewardsOut);
|
|
108
106
|
}
|
|
109
107
|
|
|
110
|
-
function _zipTokenAmounts(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
{
|
|
108
|
+
function _zipTokenAmounts(
|
|
109
|
+
address[] memory tokens,
|
|
110
|
+
uint256[] memory amounts
|
|
111
|
+
) internal pure returns (TokenAmount[] memory res) {
|
|
115
112
|
res = new TokenAmount[](tokens.length);
|
|
116
113
|
|
|
117
114
|
for (uint256 i = 0; i < tokens.length; i++) {
|
|
@@ -13,9 +13,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
13
13
|
using PYIndexLib for PYIndex;
|
|
14
14
|
using PYIndexLib for IPYieldToken;
|
|
15
15
|
|
|
16
|
-
function getMarketState(
|
|
16
|
+
function getMarketState(
|
|
17
|
+
address market
|
|
18
|
+
)
|
|
17
19
|
public
|
|
18
|
-
view
|
|
19
20
|
returns (
|
|
20
21
|
address pt,
|
|
21
22
|
address yt,
|
|
@@ -25,7 +26,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
25
26
|
MarketState memory state
|
|
26
27
|
)
|
|
27
28
|
{
|
|
28
|
-
(IStandardizedYield SY, IPPrincipalToken PT, IPYieldToken YT) =
|
|
29
|
+
(IStandardizedYield SY, IPPrincipalToken PT, IPYieldToken YT) = IPMarket(market)
|
|
30
|
+
.readTokens();
|
|
31
|
+
|
|
29
32
|
pt = address(PT);
|
|
30
33
|
yt = address(YT);
|
|
31
34
|
sy = address(SY);
|
|
@@ -34,11 +37,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
34
37
|
marketExchangeRateExcludeFee = getTradeExchangeRateExcludeFee(market, state);
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
function getTradeExchangeRateExcludeFee(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
40
|
+
function getTradeExchangeRateExcludeFee(
|
|
41
|
+
address market,
|
|
42
|
+
MarketState memory state
|
|
43
|
+
) public returns (uint256) {
|
|
42
44
|
if (IPMarket(market).isExpired()) return Math.ONE;
|
|
43
45
|
|
|
44
46
|
MarketPreCompute memory comp = state.getMarketPreCompute(
|
|
@@ -55,11 +57,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
55
57
|
return preFeeExchangeRate.Uint();
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
function getTradeExchangeRateIncludeFee(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
60
|
+
function getTradeExchangeRateIncludeFee(
|
|
61
|
+
address market,
|
|
62
|
+
int256 netPtOut
|
|
63
|
+
) public returns (uint256) {
|
|
63
64
|
if (IPMarket(market).isExpired()) return Math.ONE;
|
|
64
65
|
|
|
65
66
|
int256 netPtToAccount = netPtOut;
|
|
@@ -87,21 +88,19 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
function calcPriceImpactPt(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{
|
|
91
|
+
function calcPriceImpactPt(
|
|
92
|
+
address market,
|
|
93
|
+
int256 netPtOut
|
|
94
|
+
) public returns (uint256 priceImpact) {
|
|
95
95
|
uint256 preTradeRate = getTradeExchangeRateIncludeFee(market, _getSign(netPtOut));
|
|
96
96
|
uint256 tradedRate = getTradeExchangeRateIncludeFee(market, netPtOut);
|
|
97
97
|
priceImpact = _calculateImpact(preTradeRate, tradedRate);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
function calcPriceImpactYt(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
{
|
|
100
|
+
function calcPriceImpactYt(
|
|
101
|
+
address market,
|
|
102
|
+
int256 netPtOut
|
|
103
|
+
) public returns (uint256 priceImpact) {
|
|
105
104
|
uint256 ytPreTradeRate = _calcVirtualYTPrice(
|
|
106
105
|
getTradeExchangeRateIncludeFee(market, _getSign(netPtOut))
|
|
107
106
|
);
|
|
@@ -111,11 +110,10 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
111
110
|
priceImpact = _calculateImpact(ytPreTradeRate, ytTradedRate);
|
|
112
111
|
}
|
|
113
112
|
|
|
114
|
-
function calcPriceImpactPY(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
{
|
|
113
|
+
function calcPriceImpactPY(
|
|
114
|
+
address market,
|
|
115
|
+
int256 netPtOut
|
|
116
|
+
) public returns (uint256 priceImpact) {
|
|
119
117
|
uint256 ptPreTradeRate = getTradeExchangeRateIncludeFee(market, _getSign(netPtOut));
|
|
120
118
|
uint256 ytPreTradeRate = _calcVirtualYTPrice(ptPreTradeRate);
|
|
121
119
|
uint256 ptTradeRate = getTradeExchangeRateIncludeFee(market, netPtOut);
|
|
@@ -126,50 +124,6 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
126
124
|
priceImpact = _calculateImpact(pyPreTradeRate, pyTradeRate);
|
|
127
125
|
}
|
|
128
126
|
|
|
129
|
-
function getLpToSyRate(address market) public view returns (uint256) {
|
|
130
|
-
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
131
|
-
return getLpToAssetRate(market).divDown(SY.exchangeRate());
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function getPtToSyRate(address market) public view returns (uint256) {
|
|
135
|
-
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
136
|
-
return getPtToAssetRate(market).divDown(SY.exchangeRate());
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function getLpToAssetRate(address market) public view returns (uint256) {
|
|
140
|
-
MarketState memory state = _readState(market);
|
|
141
|
-
PYIndex pyIndexCurrent = _pyIndex(market);
|
|
142
|
-
MarketPreCompute memory comp = state.getMarketPreCompute(pyIndexCurrent, block.timestamp);
|
|
143
|
-
|
|
144
|
-
int256 totalHypotheticalAsset = comp.totalAsset +
|
|
145
|
-
state.totalPt.mulDown(int256(_getPtToAssetRate(market, state, pyIndexCurrent)));
|
|
146
|
-
|
|
147
|
-
return uint256(totalHypotheticalAsset.divDown(state.totalLp));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function getPtToAssetRate(address market) public view returns (uint256) {
|
|
151
|
-
MarketState memory state = _readState(market);
|
|
152
|
-
return _getPtToAssetRate(market, state, _pyIndex(market));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function _getPtToAssetRate(
|
|
156
|
-
address market,
|
|
157
|
-
MarketState memory state,
|
|
158
|
-
PYIndex pyIndexCurrent
|
|
159
|
-
) internal view returns (uint256 ptToAssetRate) {
|
|
160
|
-
if (state.expiry <= block.timestamp) {
|
|
161
|
-
(IStandardizedYield SY, , ) = _readTokens(market);
|
|
162
|
-
return (SY.exchangeRate().divDown(PYIndex.unwrap(pyIndexCurrent)));
|
|
163
|
-
}
|
|
164
|
-
uint256 timeToExpiry = state.expiry - block.timestamp;
|
|
165
|
-
int256 assetToPtRate = MarketMathCore._getExchangeRateFromImpliedRate(
|
|
166
|
-
state.lastLnImpliedRate,
|
|
167
|
-
timeToExpiry
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
ptToAssetRate = uint256(Math.IONE.divDown(assetToPtRate));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
127
|
function _getPtImpliedYield(address market) internal view returns (int256) {
|
|
174
128
|
MarketState memory state = _readState(market);
|
|
175
129
|
|
|
@@ -177,11 +131,9 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
177
131
|
return lnImpliedRate.exp();
|
|
178
132
|
}
|
|
179
133
|
|
|
180
|
-
function _calcVirtualYTPrice(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
returns (uint256 ytAssetExchangeRate)
|
|
184
|
-
{
|
|
134
|
+
function _calcVirtualYTPrice(
|
|
135
|
+
uint256 ptAssetExchangeRate
|
|
136
|
+
) private pure returns (uint256 ytAssetExchangeRate) {
|
|
185
137
|
// 1 asset = EX pt
|
|
186
138
|
// 1 pt = 1/EX Asset
|
|
187
139
|
// 1 yt + 1/EX Asset = 1 Asset
|
|
@@ -194,31 +146,20 @@ contract ActionMarketAuxStatic is IPActionMarketAuxStatic {
|
|
|
194
146
|
return IPMarket(market).readState(address(this));
|
|
195
147
|
}
|
|
196
148
|
|
|
197
|
-
function _readTokens(address market)
|
|
198
|
-
internal
|
|
199
|
-
view
|
|
200
|
-
returns (
|
|
201
|
-
IStandardizedYield _SY,
|
|
202
|
-
IPPrincipalToken _PT,
|
|
203
|
-
IPYieldToken _YT
|
|
204
|
-
)
|
|
205
|
-
{
|
|
206
|
-
return IPMarket(market).readTokens();
|
|
207
|
-
}
|
|
208
|
-
|
|
209
149
|
function _getSign(int256 netPtOut) private pure returns (int256) {
|
|
210
150
|
return netPtOut > 0 ? int256(1) : int256(-1);
|
|
211
151
|
}
|
|
212
152
|
|
|
213
|
-
function _calculateImpact(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
{
|
|
153
|
+
function _calculateImpact(
|
|
154
|
+
uint256 rateBefore,
|
|
155
|
+
uint256 rateTraded
|
|
156
|
+
) private pure returns (uint256 impact) {
|
|
218
157
|
impact = (rateBefore.Int() - rateTraded.Int()).abs().divDown(rateBefore);
|
|
219
158
|
}
|
|
220
159
|
|
|
221
|
-
function _pyIndex(address market)
|
|
222
|
-
|
|
160
|
+
function _pyIndex(address market) internal returns (PYIndex index) {
|
|
161
|
+
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
162
|
+
|
|
163
|
+
return YT.newIndex();
|
|
223
164
|
}
|
|
224
165
|
}
|
|
@@ -22,15 +22,7 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
22
22
|
address market,
|
|
23
23
|
uint256 netSyDesired,
|
|
24
24
|
uint256 netPtDesired
|
|
25
|
-
)
|
|
26
|
-
public
|
|
27
|
-
view
|
|
28
|
-
returns (
|
|
29
|
-
uint256 netLpOut,
|
|
30
|
-
uint256 netSyUsed,
|
|
31
|
-
uint256 netPtUsed
|
|
32
|
-
)
|
|
33
|
-
{
|
|
25
|
+
) public view returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
34
26
|
MarketState memory state = _readState(market);
|
|
35
27
|
(, netLpOut, netSyUsed, netPtUsed) = state.addLiquidity(
|
|
36
28
|
netSyDesired,
|
|
@@ -71,9 +63,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
/// @dev netPtToSwap is the parameter to approx
|
|
74
|
-
function addLiquiditySinglePtStatic(
|
|
66
|
+
function addLiquiditySinglePtStatic(
|
|
67
|
+
address market,
|
|
68
|
+
uint256 netPtIn
|
|
69
|
+
)
|
|
75
70
|
public
|
|
76
|
-
view
|
|
77
71
|
returns (
|
|
78
72
|
uint256 netLpOut,
|
|
79
73
|
uint256 netPtToSwap,
|
|
@@ -111,9 +105,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
111
105
|
}
|
|
112
106
|
|
|
113
107
|
/// @dev netPtFromSwap is the parameter to approx
|
|
114
|
-
function addLiquiditySingleSyStatic(
|
|
108
|
+
function addLiquiditySingleSyStatic(
|
|
109
|
+
address market,
|
|
110
|
+
uint256 netSyIn
|
|
111
|
+
)
|
|
115
112
|
public
|
|
116
|
-
view
|
|
117
113
|
returns (
|
|
118
114
|
uint256 netLpOut,
|
|
119
115
|
uint256 netPtFromSwap,
|
|
@@ -157,7 +153,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
157
153
|
address bulk
|
|
158
154
|
)
|
|
159
155
|
public
|
|
160
|
-
view
|
|
161
156
|
returns (
|
|
162
157
|
uint256 netLpOut,
|
|
163
158
|
uint256 netPtFromSwap,
|
|
@@ -187,7 +182,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
187
182
|
address bulk
|
|
188
183
|
)
|
|
189
184
|
public
|
|
190
|
-
view
|
|
191
185
|
returns (
|
|
192
186
|
uint256 netLpOut,
|
|
193
187
|
uint256 netYtOut,
|
|
@@ -200,9 +194,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
200
194
|
(netLpOut, netYtOut, netSyToPY) = addLiquiditySingleSyKeepYtStatic(market, netSyMinted);
|
|
201
195
|
}
|
|
202
196
|
|
|
203
|
-
function addLiquiditySingleSyKeepYtStatic(
|
|
197
|
+
function addLiquiditySingleSyKeepYtStatic(
|
|
198
|
+
address market,
|
|
199
|
+
uint256 netSyIn
|
|
200
|
+
)
|
|
204
201
|
public
|
|
205
|
-
view
|
|
206
202
|
returns (
|
|
207
203
|
uint256 netLpOut,
|
|
208
204
|
uint256 netYtOut,
|
|
@@ -222,11 +218,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
222
218
|
(, netLpOut, , ) = state.addLiquidity(netSyIn - netSyToPY, netYtOut, block.timestamp);
|
|
223
219
|
}
|
|
224
220
|
|
|
225
|
-
function removeLiquidityDualSyAndPtStatic(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
{
|
|
221
|
+
function removeLiquidityDualSyAndPtStatic(
|
|
222
|
+
address market,
|
|
223
|
+
uint256 netLpToRemove
|
|
224
|
+
) public view returns (uint256 netSyOut, uint256 netPtOut) {
|
|
230
225
|
MarketState memory state = _readState(market);
|
|
231
226
|
(netSyOut, netPtOut) = state.removeLiquidity(netLpToRemove);
|
|
232
227
|
}
|
|
@@ -236,24 +231,18 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
236
231
|
uint256 netLpToRemove,
|
|
237
232
|
address tokenOut,
|
|
238
233
|
address bulk
|
|
239
|
-
)
|
|
240
|
-
public
|
|
241
|
-
view
|
|
242
|
-
returns (
|
|
243
|
-
uint256 netTokenOut,
|
|
244
|
-
uint256 netPtOut,
|
|
245
|
-
uint256 netSyToRedeem
|
|
246
|
-
)
|
|
247
|
-
{
|
|
234
|
+
) public view returns (uint256 netTokenOut, uint256 netPtOut, uint256 netSyToRedeem) {
|
|
248
235
|
(netSyToRedeem, netPtOut) = removeLiquidityDualSyAndPtStatic(market, netLpToRemove);
|
|
249
236
|
netTokenOut = _redeemSyToTokenStatic(market, tokenOut, netSyToRedeem, bulk);
|
|
250
237
|
}
|
|
251
238
|
|
|
252
239
|
/// @dev netPtFromSwap is the parameter to approx
|
|
253
240
|
/// @notice should revert post-expiry
|
|
254
|
-
function removeLiquiditySinglePtStatic(
|
|
241
|
+
function removeLiquiditySinglePtStatic(
|
|
242
|
+
address market,
|
|
243
|
+
uint256 netLpToRemove
|
|
244
|
+
)
|
|
255
245
|
public
|
|
256
|
-
view
|
|
257
246
|
returns (
|
|
258
247
|
uint256 netPtOut,
|
|
259
248
|
uint256 netPtFromSwap,
|
|
@@ -283,9 +272,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
283
272
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
284
273
|
}
|
|
285
274
|
|
|
286
|
-
function removeLiquiditySingleSyStatic(
|
|
275
|
+
function removeLiquiditySingleSyStatic(
|
|
276
|
+
address market,
|
|
277
|
+
uint256 netLpToRemove
|
|
278
|
+
)
|
|
287
279
|
public
|
|
288
|
-
view
|
|
289
280
|
returns (
|
|
290
281
|
uint256 netSyOut,
|
|
291
282
|
uint256 netSyFee,
|
|
@@ -326,7 +317,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
326
317
|
address bulk
|
|
327
318
|
)
|
|
328
319
|
public
|
|
329
|
-
view
|
|
330
320
|
returns (
|
|
331
321
|
uint256 netTokenOut,
|
|
332
322
|
uint256 netSyFee,
|
|
@@ -354,9 +344,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
354
344
|
|
|
355
345
|
// ============ SWAP PT ============
|
|
356
346
|
|
|
357
|
-
function swapExactPtForSyStatic(
|
|
347
|
+
function swapExactPtForSyStatic(
|
|
348
|
+
address market,
|
|
349
|
+
uint256 exactPtIn
|
|
350
|
+
)
|
|
358
351
|
public
|
|
359
|
-
view
|
|
360
352
|
returns (
|
|
361
353
|
uint256 netSyOut,
|
|
362
354
|
uint256 netSyFee,
|
|
@@ -374,15 +366,12 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
374
366
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
375
367
|
}
|
|
376
368
|
|
|
377
|
-
function swapSyForExactPtStatic(
|
|
369
|
+
function swapSyForExactPtStatic(
|
|
370
|
+
address market,
|
|
371
|
+
uint256 exactPtOut
|
|
372
|
+
)
|
|
378
373
|
public
|
|
379
|
-
|
|
380
|
-
returns (
|
|
381
|
-
uint256 netSyIn,
|
|
382
|
-
uint256 netSyFee,
|
|
383
|
-
uint256 priceImpact,
|
|
384
|
-
uint256 exchangeRateAfter
|
|
385
|
-
)
|
|
374
|
+
returns (uint256 netSyIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
386
375
|
{
|
|
387
376
|
MarketState memory state = _readState(market);
|
|
388
377
|
(netSyIn, netSyFee, ) = state.swapSyForExactPt(
|
|
@@ -395,9 +384,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
395
384
|
}
|
|
396
385
|
|
|
397
386
|
/// @dev netPtOut is the parameter to approx
|
|
398
|
-
function swapExactSyForPtStatic(
|
|
387
|
+
function swapExactSyForPtStatic(
|
|
388
|
+
address market,
|
|
389
|
+
uint256 exactSyIn
|
|
390
|
+
)
|
|
399
391
|
public
|
|
400
|
-
view
|
|
401
392
|
returns (
|
|
402
393
|
uint256 netPtOut,
|
|
403
394
|
uint256 netSyFee,
|
|
@@ -420,15 +411,12 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
420
411
|
}
|
|
421
412
|
|
|
422
413
|
/// @dev netPtIn is the parameter to approx
|
|
423
|
-
function swapPtForExactSyStatic(
|
|
414
|
+
function swapPtForExactSyStatic(
|
|
415
|
+
address market,
|
|
416
|
+
uint256 exactSyOut
|
|
417
|
+
)
|
|
424
418
|
public
|
|
425
|
-
|
|
426
|
-
returns (
|
|
427
|
-
uint256 netPtIn,
|
|
428
|
-
uint256 netSyFee,
|
|
429
|
-
uint256 priceImpact,
|
|
430
|
-
uint256 exchangeRateAfter
|
|
431
|
-
)
|
|
419
|
+
returns (uint256 netPtIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
432
420
|
{
|
|
433
421
|
MarketState memory state = _readState(market);
|
|
434
422
|
|
|
@@ -452,7 +440,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
452
440
|
address bulk
|
|
453
441
|
)
|
|
454
442
|
public
|
|
455
|
-
view
|
|
456
443
|
returns (
|
|
457
444
|
uint256 netPtOut,
|
|
458
445
|
uint256 netSyMinted,
|
|
@@ -476,7 +463,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
476
463
|
address bulk
|
|
477
464
|
)
|
|
478
465
|
public
|
|
479
|
-
view
|
|
480
466
|
returns (
|
|
481
467
|
uint256 netTokenOut,
|
|
482
468
|
uint256 netSyToRedeem,
|
|
@@ -495,9 +481,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
495
481
|
|
|
496
482
|
// ============ SWAP YT ============
|
|
497
483
|
|
|
498
|
-
function swapSyForExactYtStatic(
|
|
484
|
+
function swapSyForExactYtStatic(
|
|
485
|
+
address market,
|
|
486
|
+
uint256 exactYtOut
|
|
487
|
+
)
|
|
499
488
|
public
|
|
500
|
-
view
|
|
501
489
|
returns (
|
|
502
490
|
uint256 netSyIn,
|
|
503
491
|
uint256 netSyFee,
|
|
@@ -526,9 +514,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
526
514
|
}
|
|
527
515
|
|
|
528
516
|
/// @dev netYtOut is the parameter to approx
|
|
529
|
-
function swapExactSyForYtStatic(
|
|
517
|
+
function swapExactSyForYtStatic(
|
|
518
|
+
address market,
|
|
519
|
+
uint256 exactSyIn
|
|
520
|
+
)
|
|
530
521
|
public
|
|
531
|
-
view
|
|
532
522
|
returns (
|
|
533
523
|
uint256 netYtOut,
|
|
534
524
|
uint256 netSyFee,
|
|
@@ -553,9 +543,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
553
543
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
554
544
|
}
|
|
555
545
|
|
|
556
|
-
function swapExactYtForSyStatic(
|
|
546
|
+
function swapExactYtForSyStatic(
|
|
547
|
+
address market,
|
|
548
|
+
uint256 exactYtIn
|
|
549
|
+
)
|
|
557
550
|
public
|
|
558
|
-
view
|
|
559
551
|
returns (
|
|
560
552
|
uint256 netSyOut,
|
|
561
553
|
uint256 netSyFee,
|
|
@@ -589,7 +581,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
589
581
|
address bulk
|
|
590
582
|
)
|
|
591
583
|
public
|
|
592
|
-
view
|
|
593
584
|
returns (
|
|
594
585
|
uint256 netTokenOut,
|
|
595
586
|
uint256 netSyFee,
|
|
@@ -616,15 +607,12 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
616
607
|
}
|
|
617
608
|
|
|
618
609
|
/// @dev netYtIn is the parameter to approx
|
|
619
|
-
function swapYtForExactSyStatic(
|
|
610
|
+
function swapYtForExactSyStatic(
|
|
611
|
+
address market,
|
|
612
|
+
uint256 exactSyOut
|
|
613
|
+
)
|
|
620
614
|
public
|
|
621
|
-
|
|
622
|
-
returns (
|
|
623
|
-
uint256 netYtIn,
|
|
624
|
-
uint256 netSyFee,
|
|
625
|
-
uint256 priceImpact,
|
|
626
|
-
uint256 exchangeRateAfter
|
|
627
|
-
)
|
|
615
|
+
returns (uint256 netYtIn, uint256 netSyFee, uint256 priceImpact, uint256 exchangeRateAfter)
|
|
628
616
|
{
|
|
629
617
|
MarketState memory state = _readState(market);
|
|
630
618
|
|
|
@@ -650,7 +638,6 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
650
638
|
address bulk
|
|
651
639
|
)
|
|
652
640
|
public
|
|
653
|
-
view
|
|
654
641
|
returns (
|
|
655
642
|
uint256 netYtOut,
|
|
656
643
|
uint256 netSyMinted,
|
|
@@ -667,9 +654,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
667
654
|
}
|
|
668
655
|
|
|
669
656
|
// totalPtToSwap is the param to approx
|
|
670
|
-
function swapExactPtForYtStatic(
|
|
657
|
+
function swapExactPtForYtStatic(
|
|
658
|
+
address market,
|
|
659
|
+
uint256 exactPtIn
|
|
660
|
+
)
|
|
671
661
|
public
|
|
672
|
-
view
|
|
673
662
|
returns (
|
|
674
663
|
uint256 netYtOut,
|
|
675
664
|
uint256 totalPtToSwap,
|
|
@@ -695,9 +684,11 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
695
684
|
}
|
|
696
685
|
|
|
697
686
|
// totalPtSwapped is the param to approx
|
|
698
|
-
function swapExactYtForPtStatic(
|
|
687
|
+
function swapExactYtForPtStatic(
|
|
688
|
+
address market,
|
|
689
|
+
uint256 exactYtIn
|
|
690
|
+
)
|
|
699
691
|
public
|
|
700
|
-
view
|
|
701
692
|
returns (
|
|
702
693
|
uint256 netPtOut,
|
|
703
694
|
uint256 totalPtSwapped,
|
|
@@ -723,15 +714,15 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
723
714
|
exchangeRateAfter = _getTradeExchangeRateExcludeFee(market, state);
|
|
724
715
|
}
|
|
725
716
|
|
|
726
|
-
function _calcPriceImpactPY(address market, int256 netPtOut) internal
|
|
717
|
+
function _calcPriceImpactPY(address market, int256 netPtOut) internal returns (uint256) {
|
|
727
718
|
return IPRouterStatic(address(this)).calcPriceImpactPY(market, netPtOut);
|
|
728
719
|
}
|
|
729
720
|
|
|
730
|
-
function _calcPriceImpactPt(address market, int256 netPtOut) internal
|
|
721
|
+
function _calcPriceImpactPt(address market, int256 netPtOut) internal returns (uint256) {
|
|
731
722
|
return IPRouterStatic(address(this)).calcPriceImpactPt(market, netPtOut);
|
|
732
723
|
}
|
|
733
724
|
|
|
734
|
-
function _calcPriceImpactYt(address market, int256 netPtOut) internal
|
|
725
|
+
function _calcPriceImpactYt(address market, int256 netPtOut) internal returns (uint256) {
|
|
735
726
|
return IPRouterStatic(address(this)).calcPriceImpactYt(market, netPtOut);
|
|
736
727
|
}
|
|
737
728
|
|
|
@@ -765,11 +756,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
765
756
|
);
|
|
766
757
|
}
|
|
767
758
|
|
|
768
|
-
function _getTradeExchangeRateExcludeFee(
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
{
|
|
759
|
+
function _getTradeExchangeRateExcludeFee(
|
|
760
|
+
address market,
|
|
761
|
+
MarketState memory state
|
|
762
|
+
) internal returns (uint256) {
|
|
773
763
|
return IPRouterStatic(address(this)).getTradeExchangeRateExcludeFee(market, state);
|
|
774
764
|
}
|
|
775
765
|
|
|
@@ -777,8 +767,10 @@ contract ActionMarketCoreStatic is StorageLayout, IPActionMarketCoreStatic {
|
|
|
777
767
|
return IPMarket(market).readState(address(this));
|
|
778
768
|
}
|
|
779
769
|
|
|
780
|
-
function _pyIndex(address market)
|
|
781
|
-
|
|
770
|
+
function _pyIndex(address market) internal returns (PYIndex index) {
|
|
771
|
+
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
772
|
+
|
|
773
|
+
return YT.newIndex();
|
|
782
774
|
}
|
|
783
775
|
|
|
784
776
|
function _getSyMarket(address market) internal view returns (address) {
|