@pendle/core-v2 2.19.0 → 2.20.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/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/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/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 +2332 -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/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/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 +813 -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/core/StandardizedYield/PYIndex.sol +14 -0
- package/contracts/core/TradingBot/DecisionHelper/BotDecisionHelperBase.sol +260 -0
- package/contracts/core/TradingBot/DecisionHelper/LongYieldDecisionHelper.sol +291 -0
- package/contracts/core/TradingBot/LongYieldTradingBot.sol +128 -0
- package/contracts/core/TradingBot/README.md +153 -0
- package/contracts/core/TradingBot/TradingBotBase.sol +254 -0
- package/contracts/core/TradingBot/libraries/BotSimulationLib.sol +155 -0
- package/contracts/core/TradingBot/libraries/LongYieldActionLib.sol +279 -0
- package/contracts/core/TradingBot/libraries/MarketExtLib.sol +310 -0
- package/contracts/core/TradingBot/libraries/SpecSegmentLib.sol +62 -0
- package/contracts/core/TradingBot/libraries/TvlLib.sol +57 -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/IPRouterStatic.sol +1 -5
- package/contracts/interfaces/IStandardizedYield.sol +10 -15
- package/contracts/interfaces/TradingBot/IBotDecisionHelper.sol +75 -0
- package/contracts/interfaces/TradingBot/ILongYieldDecisionHelper.sol +8 -0
- package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +51 -0
- package/contracts/interfaces/TradingBot/IShortYieldDecisionHelper.sol +7 -0
- package/contracts/interfaces/TradingBot/IShortYieldTradingBot.sol +27 -0
- package/contracts/interfaces/TradingBot/ITradingBotBase.sol +53 -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/AuraWethVethSY.ts +1598 -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/BotActionCallbackLib.ts +57 -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/IAnkrBNB.ts +150 -0
- package/typechain-types/IAnkrLiquidStaking.ts +253 -0
- package/typechain-types/IAutomate.ts +203 -0
- package/typechain-types/IBotDecisionHelper.ts +476 -0
- package/typechain-types/IFluxErc20.ts +298 -0
- package/typechain-types/IFluxInterestRateModel.ts +113 -0
- package/typechain-types/ILongYieldDecisionHelper.ts +512 -0
- package/typechain-types/ILongYieldTradingBot.ts +682 -0
- 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/IPMarketFactoryV2.ts +253 -0
- package/typechain-types/IPOracleForSy.ts +87 -0
- package/typechain-types/IPRouterStatic.ts +197 -888
- package/typechain-types/IPendlePreviewHelper.ts +147 -0
- package/typechain-types/IShortYieldDecisionHelper.ts +476 -0
- package/typechain-types/IShortYieldTradingBot.ts +574 -0
- package/typechain-types/{IExecutorHelper2.ts → ISwETH.ts} +40 -32
- package/typechain-types/ITaskTreasuryUpgradable.ts +160 -0
- package/typechain-types/IThenaFactory.ts +245 -0
- package/typechain-types/IThenaGaugeV2.ts +206 -0
- package/typechain-types/IThenaPair.ts +579 -0
- package/typechain-types/IThenaRouter.ts +313 -0
- package/typechain-types/IThenaSY.ts +81 -0
- package/typechain-types/ITradingBotBase.ts +373 -0
- package/typechain-types/IVersion.ts +81 -0
- package/typechain-types/{PendleSwapArbitrum.ts → IWBETH.ts} +50 -48
- 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 +2420 -0
- package/typechain-types/MarketExtLib.ts +81 -0
- package/typechain-types/PendleAnkrBNBSY.ts +1235 -0
- package/typechain-types/PendleAuraBalancerStableLPSYV3.ts +1599 -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/PendleERC20PermitUpgradable.ts +452 -0
- package/typechain-types/PendleERC20Upgradable.ts +348 -0
- package/typechain-types/PendleERC4626SY.ts +1216 -0
- package/typechain-types/PendleExternalRewardDistributor.ts +596 -0
- package/typechain-types/PendleFluxLendingSY.ts +1232 -0
- package/typechain-types/PendleGaugeV2.ts +225 -0
- package/typechain-types/PendleMantleStakedEthSY.ts +1222 -0
- package/typechain-types/PendleMarketFactoryV2.ts +932 -0
- package/typechain-types/PendleMarketV2.ts +1311 -0
- package/typechain-types/PendleOracleForSyProxy.ts +275 -0
- package/typechain-types/{PendleCamelotV1SY.ts → PendleThenaSY.ts} +214 -332
- package/typechain-types/PendleWbEthSY.ts +1229 -0
- package/typechain-types/SDKErrorsDirectory.ts +57 -0
- package/typechain-types/SYBaseUpgradable.ts +1132 -0
- package/typechain-types/SYBaseWithRewardsUpgradable.ts +1225 -0
- package/typechain-types/StarNFTV1.ts +880 -0
- package/typechain-types/SwETHSY.ts +1216 -0
- package/typechain-types/{PendleCamelotV1RouterHelper.ts → ThenaLpHelper.ts} +63 -5
- package/typechain-types/ThenaMath.ts +87 -0
- package/typechain-types/{CamelotV1PreviewHelper.ts → ThenaPreview.ts} +42 -63
- package/typechain-types/TradingBotBase.ts +1837 -0
- 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/AuraWethVethSY__factory.ts +1270 -0
- package/typechain-types/factories/AutomateReady__factory.ts +49 -0
- 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/BotActionCallbackLib__factory.ts +84 -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/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 +694 -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/ILongYieldDecisionHelper__factory.ts +717 -0
- package/typechain-types/factories/ILongYieldTradingBot__factory.ts +832 -0
- 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/{IPVotingEscrowSidechain__factory.ts → IPExternalRewardDistributor__factory.ts} +60 -44
- package/typechain-types/factories/IPMarketFactoryV2__factory.ts +181 -0
- package/typechain-types/factories/IPOracleForSy__factory.ts +36 -0
- package/typechain-types/factories/IPRouterStatic__factory.ts +32 -146
- package/typechain-types/factories/IPendlePreviewHelper__factory.ts +78 -0
- package/typechain-types/factories/IShortYieldDecisionHelper__factory.ts +698 -0
- package/typechain-types/factories/IShortYieldTradingBot__factory.ts +813 -0
- package/typechain-types/factories/ISwETH__factory.ts +53 -0
- package/typechain-types/factories/ITaskTreasuryUpgradable__factory.ts +76 -0
- package/typechain-types/factories/IThenaFactory__factory.ts +164 -0
- package/typechain-types/factories/IThenaGaugeV2__factory.ts +83 -0
- package/typechain-types/factories/IThenaPair__factory.ts +421 -0
- package/typechain-types/factories/IThenaRouter__factory.ts +200 -0
- package/typechain-types/factories/IThenaSY__factory.ts +36 -0
- package/typechain-types/factories/ITradingBotBase__factory.ts +366 -0
- package/typechain-types/factories/IVersion__factory.ts +36 -0
- package/typechain-types/factories/IWBETH__factory.ts +51 -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 +2333 -0
- package/typechain-types/factories/MarketExtLib__factory.ts +74 -0
- 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/PendleAuraBalancerStableLPSYV3__factory.ts +1212 -0
- 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/PendleERC20PermitUpgradable__factory.ts +401 -0
- package/typechain-types/factories/PendleERC20Upgradable__factory.ts +326 -0
- package/typechain-types/factories/PendleERC4626SY__factory.ts +1030 -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 +1038 -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/PendleGaugeV2__factory.ts +140 -0
- package/typechain-types/factories/PendleGlpSY__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 +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 -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 +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 +1352 -0
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWbEthSY__factory.ts +1049 -0
- 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/SYBaseUpgradable__factory.ts +889 -0
- package/typechain-types/factories/SYBaseWithRewardsUpgradable__factory.ts +959 -0
- package/typechain-types/factories/StarNFTV1__factory.ts +584 -0
- package/typechain-types/factories/SwETHSY__factory.ts +1022 -0
- package/typechain-types/factories/{PendleCamelotV1RouterHelper__factory.ts → ThenaLpHelper__factory.ts} +58 -13
- package/typechain-types/factories/ThenaMath__factory.ts +36 -0
- package/typechain-types/factories/ThenaPreview__factory.ts +319 -0
- package/typechain-types/factories/TradingBotBase__factory.ts +1656 -0
- 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 +153 -126
- package/typechain-types/index.ts +34 -18
- 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/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/offchain-helpers/PtAndLpToAsset.sol +0 -62
- package/deployments/42161-markets/RETH-ARBITRUM-JUNE2024.json +0 -10
- package/deployments/42161-markets/WSTETH-ARBITRUM-JUNE2024.json +0 -10
- package/typechain-types/IExecutorHelper1.ts +0 -643
- package/typechain-types/IExecutorHelperEthereum1.ts +0 -643
- package/typechain-types/IPVotingEscrowSidechain.ts +0 -155
- package/typechain-types/PendleCamelotRewardHelper.ts +0 -347
- package/typechain-types/PendleSwapEthereum.ts +0 -126
- package/typechain-types/factories/CamelotV1PreviewHelper__factory.ts +0 -400
- package/typechain-types/factories/IExecutorHelper1__factory.ts +0 -403
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +0 -407
- package/typechain-types/factories/PendleCamelotRewardHelper__factory.ts +0 -317
- package/typechain-types/factories/PendleCamelotV1SY__factory.ts +0 -1448
- package/typechain-types/factories/PendleSwapArbitrum__factory.ts +0 -129
- package/typechain-types/factories/PendleSwapEthereum__factory.ts +0 -129
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
1
|
pragma solidity ^0.8.17;
|
|
3
2
|
|
|
4
3
|
interface IPActionMarketCoreStatic {
|
|
@@ -6,14 +5,7 @@ interface IPActionMarketCoreStatic {
|
|
|
6
5
|
address market,
|
|
7
6
|
uint256 netSyDesired,
|
|
8
7
|
uint256 netPtDesired
|
|
9
|
-
)
|
|
10
|
-
external
|
|
11
|
-
view
|
|
12
|
-
returns (
|
|
13
|
-
uint256 netLpOut,
|
|
14
|
-
uint256 netSyUsed,
|
|
15
|
-
uint256 netPtUsed
|
|
16
|
-
);
|
|
8
|
+
) external view returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed);
|
|
17
9
|
|
|
18
10
|
function addLiquidityDualTokenAndPtStatic(
|
|
19
11
|
address market,
|
|
@@ -32,9 +24,11 @@ interface IPActionMarketCoreStatic {
|
|
|
32
24
|
uint256 netSyDesired
|
|
33
25
|
);
|
|
34
26
|
|
|
35
|
-
function addLiquiditySinglePtStatic(
|
|
27
|
+
function addLiquiditySinglePtStatic(
|
|
28
|
+
address market,
|
|
29
|
+
uint256 netPtIn
|
|
30
|
+
)
|
|
36
31
|
external
|
|
37
|
-
view
|
|
38
32
|
returns (
|
|
39
33
|
uint256 netLpOut,
|
|
40
34
|
uint256 netPtToSwap,
|
|
@@ -44,18 +38,16 @@ interface IPActionMarketCoreStatic {
|
|
|
44
38
|
uint256 netSyFromSwap
|
|
45
39
|
);
|
|
46
40
|
|
|
47
|
-
function addLiquiditySingleSyKeepYtStatic(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
uint256 netLpOut,
|
|
52
|
-
uint256 netYtOut,
|
|
53
|
-
uint256 netSyToPY
|
|
54
|
-
);
|
|
41
|
+
function addLiquiditySingleSyKeepYtStatic(
|
|
42
|
+
address market,
|
|
43
|
+
uint256 netSyIn
|
|
44
|
+
) external returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyToPY);
|
|
55
45
|
|
|
56
|
-
function addLiquiditySingleSyStatic(
|
|
46
|
+
function addLiquiditySingleSyStatic(
|
|
47
|
+
address market,
|
|
48
|
+
uint256 netSyIn
|
|
49
|
+
)
|
|
57
50
|
external
|
|
58
|
-
view
|
|
59
51
|
returns (
|
|
60
52
|
uint256 netLpOut,
|
|
61
53
|
uint256 netPtFromSwap,
|
|
@@ -72,13 +64,7 @@ interface IPActionMarketCoreStatic {
|
|
|
72
64
|
address bulk
|
|
73
65
|
)
|
|
74
66
|
external
|
|
75
|
-
|
|
76
|
-
returns (
|
|
77
|
-
uint256 netLpOut,
|
|
78
|
-
uint256 netYtOut,
|
|
79
|
-
uint256 netSyMinted,
|
|
80
|
-
uint256 netSyToPY
|
|
81
|
-
);
|
|
67
|
+
returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyMinted, uint256 netSyToPY);
|
|
82
68
|
|
|
83
69
|
function addLiquiditySingleTokenStatic(
|
|
84
70
|
address market,
|
|
@@ -87,7 +73,6 @@ interface IPActionMarketCoreStatic {
|
|
|
87
73
|
address bulk
|
|
88
74
|
)
|
|
89
75
|
external
|
|
90
|
-
view
|
|
91
76
|
returns (
|
|
92
77
|
uint256 netLpOut,
|
|
93
78
|
uint256 netPtFromSwap,
|
|
@@ -98,28 +83,23 @@ interface IPActionMarketCoreStatic {
|
|
|
98
83
|
uint256 netSyToSwap
|
|
99
84
|
);
|
|
100
85
|
|
|
101
|
-
function removeLiquidityDualSyAndPtStatic(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
86
|
+
function removeLiquidityDualSyAndPtStatic(
|
|
87
|
+
address market,
|
|
88
|
+
uint256 netLpToRemove
|
|
89
|
+
) external view returns (uint256 netSyOut, uint256 netPtOut);
|
|
105
90
|
|
|
106
91
|
function removeLiquidityDualTokenAndPtStatic(
|
|
107
92
|
address market,
|
|
108
93
|
uint256 netLpToRemove,
|
|
109
94
|
address tokenOut,
|
|
110
95
|
address bulk
|
|
111
|
-
)
|
|
112
|
-
external
|
|
113
|
-
view
|
|
114
|
-
returns (
|
|
115
|
-
uint256 netTokenOut,
|
|
116
|
-
uint256 netPtOut,
|
|
117
|
-
uint256 netSyToRedeem
|
|
118
|
-
);
|
|
96
|
+
) external view returns (uint256 netTokenOut, uint256 netPtOut, uint256 netSyToRedeem);
|
|
119
97
|
|
|
120
|
-
function removeLiquiditySinglePtStatic(
|
|
98
|
+
function removeLiquiditySinglePtStatic(
|
|
99
|
+
address market,
|
|
100
|
+
uint256 netLpToRemove
|
|
101
|
+
)
|
|
121
102
|
external
|
|
122
|
-
view
|
|
123
103
|
returns (
|
|
124
104
|
uint256 netPtOut,
|
|
125
105
|
uint256 netPtFromSwap,
|
|
@@ -130,9 +110,11 @@ interface IPActionMarketCoreStatic {
|
|
|
130
110
|
uint256 netPtFromBurn
|
|
131
111
|
);
|
|
132
112
|
|
|
133
|
-
function removeLiquiditySingleSyStatic(
|
|
113
|
+
function removeLiquiditySingleSyStatic(
|
|
114
|
+
address market,
|
|
115
|
+
uint256 netLpToRemove
|
|
116
|
+
)
|
|
134
117
|
external
|
|
135
|
-
view
|
|
136
118
|
returns (
|
|
137
119
|
uint256 netSyOut,
|
|
138
120
|
uint256 netSyFee,
|
|
@@ -150,7 +132,6 @@ interface IPActionMarketCoreStatic {
|
|
|
150
132
|
address bulk
|
|
151
133
|
)
|
|
152
134
|
external
|
|
153
|
-
view
|
|
154
135
|
returns (
|
|
155
136
|
uint256 netTokenOut,
|
|
156
137
|
uint256 netSyFee,
|
|
@@ -162,9 +143,11 @@ interface IPActionMarketCoreStatic {
|
|
|
162
143
|
uint256 netSyFromSwap
|
|
163
144
|
);
|
|
164
145
|
|
|
165
|
-
function swapExactPtForSyStatic(
|
|
146
|
+
function swapExactPtForSyStatic(
|
|
147
|
+
address market,
|
|
148
|
+
uint256 exactPtIn
|
|
149
|
+
)
|
|
166
150
|
external
|
|
167
|
-
view
|
|
168
151
|
returns (
|
|
169
152
|
uint256 netSyOut,
|
|
170
153
|
uint256 netSyFee,
|
|
@@ -179,7 +162,6 @@ interface IPActionMarketCoreStatic {
|
|
|
179
162
|
address bulk
|
|
180
163
|
)
|
|
181
164
|
external
|
|
182
|
-
view
|
|
183
165
|
returns (
|
|
184
166
|
uint256 netTokenOut,
|
|
185
167
|
uint256 netSyToRedeem,
|
|
@@ -188,9 +170,11 @@ interface IPActionMarketCoreStatic {
|
|
|
188
170
|
uint256 exchangeRateAfter
|
|
189
171
|
);
|
|
190
172
|
|
|
191
|
-
function swapExactPtForYtStatic(
|
|
173
|
+
function swapExactPtForYtStatic(
|
|
174
|
+
address market,
|
|
175
|
+
uint256 exactPtIn
|
|
176
|
+
)
|
|
192
177
|
external
|
|
193
|
-
view
|
|
194
178
|
returns (
|
|
195
179
|
uint256 netYtOut,
|
|
196
180
|
uint256 totalPtToSwap,
|
|
@@ -199,9 +183,11 @@ interface IPActionMarketCoreStatic {
|
|
|
199
183
|
uint256 exchangeRateAfter
|
|
200
184
|
);
|
|
201
185
|
|
|
202
|
-
function swapExactSyForPtStatic(
|
|
186
|
+
function swapExactSyForPtStatic(
|
|
187
|
+
address market,
|
|
188
|
+
uint256 exactSyIn
|
|
189
|
+
)
|
|
203
190
|
external
|
|
204
|
-
view
|
|
205
191
|
returns (
|
|
206
192
|
uint256 netPtOut,
|
|
207
193
|
uint256 netSyFee,
|
|
@@ -209,9 +195,11 @@ interface IPActionMarketCoreStatic {
|
|
|
209
195
|
uint256 exchangeRateAfter
|
|
210
196
|
);
|
|
211
197
|
|
|
212
|
-
function swapExactSyForYtStatic(
|
|
198
|
+
function swapExactSyForYtStatic(
|
|
199
|
+
address market,
|
|
200
|
+
uint256 exactSyIn
|
|
201
|
+
)
|
|
213
202
|
external
|
|
214
|
-
view
|
|
215
203
|
returns (
|
|
216
204
|
uint256 netYtOut,
|
|
217
205
|
uint256 netSyFee,
|
|
@@ -226,7 +214,6 @@ interface IPActionMarketCoreStatic {
|
|
|
226
214
|
address bulk
|
|
227
215
|
)
|
|
228
216
|
external
|
|
229
|
-
view
|
|
230
217
|
returns (
|
|
231
218
|
uint256 netPtOut,
|
|
232
219
|
uint256 netSyMinted,
|
|
@@ -242,7 +229,6 @@ interface IPActionMarketCoreStatic {
|
|
|
242
229
|
address bulk
|
|
243
230
|
)
|
|
244
231
|
external
|
|
245
|
-
view
|
|
246
232
|
returns (
|
|
247
233
|
uint256 netYtOut,
|
|
248
234
|
uint256 netSyMinted,
|
|
@@ -251,9 +237,11 @@ interface IPActionMarketCoreStatic {
|
|
|
251
237
|
uint256 exchangeRateAfter
|
|
252
238
|
);
|
|
253
239
|
|
|
254
|
-
function swapExactYtForPtStatic(
|
|
240
|
+
function swapExactYtForPtStatic(
|
|
241
|
+
address market,
|
|
242
|
+
uint256 exactYtIn
|
|
243
|
+
)
|
|
255
244
|
external
|
|
256
|
-
view
|
|
257
245
|
returns (
|
|
258
246
|
uint256 netPtOut,
|
|
259
247
|
uint256 totalPtSwapped,
|
|
@@ -262,9 +250,11 @@ interface IPActionMarketCoreStatic {
|
|
|
262
250
|
uint256 exchangeRateAfter
|
|
263
251
|
);
|
|
264
252
|
|
|
265
|
-
function swapExactYtForSyStatic(
|
|
253
|
+
function swapExactYtForSyStatic(
|
|
254
|
+
address market,
|
|
255
|
+
uint256 exactYtIn
|
|
256
|
+
)
|
|
266
257
|
external
|
|
267
|
-
view
|
|
268
258
|
returns (
|
|
269
259
|
uint256 netSyOut,
|
|
270
260
|
uint256 netSyFee,
|
|
@@ -282,7 +272,6 @@ interface IPActionMarketCoreStatic {
|
|
|
282
272
|
address bulk
|
|
283
273
|
)
|
|
284
274
|
external
|
|
285
|
-
view
|
|
286
275
|
returns (
|
|
287
276
|
uint256 netTokenOut,
|
|
288
277
|
uint256 netSyFee,
|
|
@@ -294,9 +283,11 @@ interface IPActionMarketCoreStatic {
|
|
|
294
283
|
uint256 netPYToRedeemSyOutInt
|
|
295
284
|
);
|
|
296
285
|
|
|
297
|
-
function swapPtForExactSyStatic(
|
|
286
|
+
function swapPtForExactSyStatic(
|
|
287
|
+
address market,
|
|
288
|
+
uint256 exactSyOut
|
|
289
|
+
)
|
|
298
290
|
external
|
|
299
|
-
view
|
|
300
291
|
returns (
|
|
301
292
|
uint256 netPtIn,
|
|
302
293
|
uint256 netSyFee,
|
|
@@ -304,9 +295,11 @@ interface IPActionMarketCoreStatic {
|
|
|
304
295
|
uint256 exchangeRateAfter
|
|
305
296
|
);
|
|
306
297
|
|
|
307
|
-
function swapSyForExactPtStatic(
|
|
298
|
+
function swapSyForExactPtStatic(
|
|
299
|
+
address market,
|
|
300
|
+
uint256 exactPtOut
|
|
301
|
+
)
|
|
308
302
|
external
|
|
309
|
-
view
|
|
310
303
|
returns (
|
|
311
304
|
uint256 netSyIn,
|
|
312
305
|
uint256 netSyFee,
|
|
@@ -314,9 +307,11 @@ interface IPActionMarketCoreStatic {
|
|
|
314
307
|
uint256 exchangeRateAfter
|
|
315
308
|
);
|
|
316
309
|
|
|
317
|
-
function swapSyForExactYtStatic(
|
|
310
|
+
function swapSyForExactYtStatic(
|
|
311
|
+
address market,
|
|
312
|
+
uint256 exactYtOut
|
|
313
|
+
)
|
|
318
314
|
external
|
|
319
|
-
view
|
|
320
315
|
returns (
|
|
321
316
|
uint256 netSyIn,
|
|
322
317
|
uint256 netSyFee,
|
|
@@ -326,9 +321,11 @@ interface IPActionMarketCoreStatic {
|
|
|
326
321
|
uint256 totalSyNeedInt
|
|
327
322
|
);
|
|
328
323
|
|
|
329
|
-
function swapYtForExactSyStatic(
|
|
324
|
+
function swapYtForExactSyStatic(
|
|
325
|
+
address market,
|
|
326
|
+
uint256 exactSyOut
|
|
327
|
+
)
|
|
330
328
|
external
|
|
331
|
-
view
|
|
332
329
|
returns (
|
|
333
330
|
uint256 netYtIn,
|
|
334
331
|
uint256 netSyFee,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
1
|
pragma solidity ^0.8.17;
|
|
3
2
|
|
|
4
3
|
interface IPActionMintRedeemStatic {
|
|
@@ -14,26 +13,19 @@ interface IPActionMintRedeemStatic {
|
|
|
14
13
|
address SY,
|
|
15
14
|
uint256 netTokenIn,
|
|
16
15
|
uint256 netSyIn
|
|
17
|
-
)
|
|
18
|
-
external
|
|
19
|
-
view
|
|
20
|
-
returns (
|
|
21
|
-
address bulk,
|
|
22
|
-
uint256 totalToken,
|
|
23
|
-
uint256 totalSy
|
|
24
|
-
);
|
|
16
|
+
) external view returns (address bulk, uint256 totalToken, uint256 totalSy);
|
|
25
17
|
|
|
26
|
-
function mintPyFromSyStatic(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
function mintPyFromSyStatic(
|
|
19
|
+
address YT,
|
|
20
|
+
uint256 netSyToMint
|
|
21
|
+
) external returns (uint256 netPYOut);
|
|
30
22
|
|
|
31
23
|
function mintPyFromTokenStatic(
|
|
32
24
|
address YT,
|
|
33
25
|
address tokenIn,
|
|
34
26
|
uint256 netTokenIn,
|
|
35
27
|
address bulk
|
|
36
|
-
) external
|
|
28
|
+
) external returns (uint256 netPyOut);
|
|
37
29
|
|
|
38
30
|
function mintSyFromTokenStatic(
|
|
39
31
|
address SY,
|
|
@@ -42,17 +34,17 @@ interface IPActionMintRedeemStatic {
|
|
|
42
34
|
address bulk
|
|
43
35
|
) external view returns (uint256 netSyOut);
|
|
44
36
|
|
|
45
|
-
function redeemPyToSyStatic(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
function redeemPyToSyStatic(
|
|
38
|
+
address YT,
|
|
39
|
+
uint256 netPYToRedeem
|
|
40
|
+
) external returns (uint256 netSyOut);
|
|
49
41
|
|
|
50
42
|
function redeemPyToTokenStatic(
|
|
51
43
|
address YT,
|
|
52
44
|
uint256 netPYToRedeem,
|
|
53
45
|
address tokenOut,
|
|
54
46
|
address bulk
|
|
55
|
-
) external
|
|
47
|
+
) external returns (uint256 netTokenOut);
|
|
56
48
|
|
|
57
49
|
function redeemSyToTokenStatic(
|
|
58
50
|
address SY,
|
|
@@ -60,8 +52,4 @@ interface IPActionMintRedeemStatic {
|
|
|
60
52
|
uint256 netSyIn,
|
|
61
53
|
address bulk
|
|
62
54
|
) external view returns (uint256 netTokenOut);
|
|
63
|
-
|
|
64
|
-
function pyIndexCurrentViewMarket(address market) external view returns (uint256);
|
|
65
|
-
|
|
66
|
-
function pyIndexCurrentViewYt(address yt) external view returns (uint256);
|
|
67
55
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
1
|
pragma solidity ^0.8.17;
|
|
3
2
|
|
|
4
3
|
import "./IPActionMarketAuxStatic.sol";
|
|
@@ -9,7 +8,6 @@ import "./IPActionVePendleStatic.sol";
|
|
|
9
8
|
import "./IPMiniDiamond.sol";
|
|
10
9
|
import "./IPActionStorageStatic.sol";
|
|
11
10
|
|
|
12
|
-
//solhint-disable-next-line no-empty-blocks
|
|
13
11
|
interface IPRouterStatic is
|
|
14
12
|
IPActionMintRedeemStatic,
|
|
15
13
|
IPActionInfoStatic,
|
|
@@ -18,6 +16,4 @@ interface IPRouterStatic is
|
|
|
18
16
|
IPActionVePendleStatic,
|
|
19
17
|
IPMiniDiamond,
|
|
20
18
|
IPActionStorageStatic
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
{}
|
|
@@ -146,29 +146,24 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
146
146
|
|
|
147
147
|
function isValidTokenOut(address token) external view returns (bool);
|
|
148
148
|
|
|
149
|
-
function previewDeposit(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
function previewDeposit(
|
|
150
|
+
address tokenIn,
|
|
151
|
+
uint256 amountTokenToDeposit
|
|
152
|
+
) external view returns (uint256 amountSharesOut);
|
|
153
153
|
|
|
154
|
-
function previewRedeem(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
function previewRedeem(
|
|
155
|
+
address tokenOut,
|
|
156
|
+
uint256 amountSharesToRedeem
|
|
157
|
+
) external view returns (uint256 amountTokenOut);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @notice This function contains information to interpret what the asset is
|
|
161
|
-
* @return assetType the type of the asset (0 for ERC20 tokens, 1 for AMM liquidity tokens
|
|
162
|
-
2 for bridged yield bearing tokens like wstETH, rETH on Arbi whose the underlying asset doesn't exist on the chain)
|
|
161
|
+
* @return assetType the type of the asset (0 for ERC20 tokens, 1 for AMM liquidity tokens)
|
|
163
162
|
* @return assetAddress the address of the asset
|
|
164
163
|
* @return assetDecimals the decimals of the asset
|
|
165
164
|
*/
|
|
166
165
|
function assetInfo()
|
|
167
166
|
external
|
|
168
167
|
view
|
|
169
|
-
returns (
|
|
170
|
-
AssetType assetType,
|
|
171
|
-
address assetAddress,
|
|
172
|
-
uint8 assetDecimals
|
|
173
|
-
);
|
|
168
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals);
|
|
174
169
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./ITradingBotBase.sol";
|
|
5
|
+
|
|
6
|
+
enum TradeActionType {
|
|
7
|
+
NONE,
|
|
8
|
+
AddLiqFromYt, // Sell YT for LP
|
|
9
|
+
RemoveLiqToYt // Zap out to YT,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
enum RebalanceType {
|
|
13
|
+
NONE,
|
|
14
|
+
AddLiqKeepYt,
|
|
15
|
+
RemoveLpAndYt,
|
|
16
|
+
SellYt
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface IBotDecisionHelper {
|
|
20
|
+
enum TradeActionResult {
|
|
21
|
+
TARGET_NOT_REACHED,
|
|
22
|
+
SUCCESS,
|
|
23
|
+
FAIL_OR_TARGET_EXCEED
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
struct RebalanceOutput {
|
|
27
|
+
RebalanceType rebalanceType;
|
|
28
|
+
uint256 amountIn;
|
|
29
|
+
uint256 amountOut;
|
|
30
|
+
uint256 amountOut2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
struct TradeParams {
|
|
34
|
+
StrategyData strategyData;
|
|
35
|
+
TradeActionType action;
|
|
36
|
+
uint256 targetIy;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
struct TradeResult {
|
|
40
|
+
TradeActionType action;
|
|
41
|
+
int currentBin;
|
|
42
|
+
uint256 targetIy;
|
|
43
|
+
uint256 guessBotParams;
|
|
44
|
+
uint256 guessIntParams;
|
|
45
|
+
uint256 amountOut;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getCurrentBin(StrategyData memory strategyData) external view returns (int256);
|
|
49
|
+
|
|
50
|
+
function searchForBotParam(
|
|
51
|
+
StrategyData memory strategyData,
|
|
52
|
+
TradeActionType action,
|
|
53
|
+
uint256 targetIy,
|
|
54
|
+
uint256 rebalanceAdditionalCheck,
|
|
55
|
+
ApproxParams memory botParams,
|
|
56
|
+
ApproxParams memory intParams
|
|
57
|
+
) external view returns (uint256);
|
|
58
|
+
|
|
59
|
+
function getRebalanceAction(address botAddress) external view returns (RebalanceOutput memory);
|
|
60
|
+
|
|
61
|
+
function getTradeAction(address botAddress) external view returns (TradeResult memory res);
|
|
62
|
+
|
|
63
|
+
function getBotPosition(
|
|
64
|
+
address botAddress
|
|
65
|
+
)
|
|
66
|
+
external
|
|
67
|
+
view
|
|
68
|
+
returns (
|
|
69
|
+
StrategyData memory strategyData,
|
|
70
|
+
uint256 tvlInSy,
|
|
71
|
+
uint256 iy,
|
|
72
|
+
uint256 currentSyRatio,
|
|
73
|
+
uint256 currentYtPtRatio
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./IBotDecisionHelper.sol";
|
|
5
|
+
|
|
6
|
+
interface ILongYieldDecisionHelper is IBotDecisionHelper {
|
|
7
|
+
function getAvailableZpiAmount(address botAddress) external returns (uint256 amountSyToZpi);
|
|
8
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./ITradingBotBase.sol";
|
|
5
|
+
import "./IBotDecisionHelper.sol";
|
|
6
|
+
|
|
7
|
+
interface ILongYieldTradingBot is ITradingBotBase {
|
|
8
|
+
event SwapSyToYt(ApproxParams botParams, uint256 maxSyIn, uint256 exactYtOut, uint256 netSyIn);
|
|
9
|
+
|
|
10
|
+
event AddLiqKeepYt(
|
|
11
|
+
uint256 netSyIn,
|
|
12
|
+
uint256 netLpOut,
|
|
13
|
+
uint256 netYtOut
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
event AddLiqFromSy(ApproxParams botParams, uint256 maxSyIn, uint256 netSyIn, uint256 netLpOut);
|
|
17
|
+
|
|
18
|
+
event AddLiqFromYt(ApproxParams botParams, uint256 netYtIn, uint256 netLpOut);
|
|
19
|
+
|
|
20
|
+
event RemoveLiqToYt(ApproxParams botParams, uint256 netLpIn, uint256 netYtOut);
|
|
21
|
+
|
|
22
|
+
struct AddLiqFromYtInput {
|
|
23
|
+
ApproxParams botParams;
|
|
24
|
+
uint256 minLpOut;
|
|
25
|
+
uint256 targetIy;
|
|
26
|
+
int256 currentBin;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
struct RemoveLiqToYtInput {
|
|
30
|
+
ApproxParams botParams;
|
|
31
|
+
ApproxParams guessTotalPtToSwap;
|
|
32
|
+
uint256 minYtOut;
|
|
33
|
+
uint256 targetIy;
|
|
34
|
+
int256 currentBin;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
function addLiqKeepYt(
|
|
39
|
+
uint256 netSyIn,
|
|
40
|
+
uint256 minLpOut,
|
|
41
|
+
uint256 minYtOut
|
|
42
|
+
) external returns (uint256 netLpOut, uint256 netYtOut);
|
|
43
|
+
|
|
44
|
+
function addLiqFromYt(
|
|
45
|
+
AddLiqFromYtInput calldata inputParams
|
|
46
|
+
) external returns (uint256 netPtFromSwap, uint256 netLpOut, uint256 netYtIn);
|
|
47
|
+
|
|
48
|
+
function removeLiqToYt(
|
|
49
|
+
RemoveLiqToYtInput calldata inputParams
|
|
50
|
+
) external returns (uint256 netLpRemoved, uint256 netYtOut);
|
|
51
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./ITradingBotBase.sol";
|
|
5
|
+
import "./IBotDecisionHelper.sol";
|
|
6
|
+
|
|
7
|
+
interface IShortYieldTradingBot is ITradingBotBase {
|
|
8
|
+
event MintPy(uint256 netSyIn, uint256 netPyOut);
|
|
9
|
+
|
|
10
|
+
event SwapPtForYt(SwapInput inputParams, uint256 netYtOut);
|
|
11
|
+
|
|
12
|
+
event SwapYtForPt(SwapInput inputParams, uint256 netPtOut);
|
|
13
|
+
|
|
14
|
+
struct SwapInput {
|
|
15
|
+
ApproxParams botParams;
|
|
16
|
+
ApproxParams guessTotalPtToSwap;
|
|
17
|
+
uint256 minAmountOut;
|
|
18
|
+
uint256 targetIy;
|
|
19
|
+
int256 currentBin;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function mintPY(uint256 netSyIn, uint256 minPyOut) external returns (uint256 netPyOut);
|
|
23
|
+
|
|
24
|
+
function swapPtForYt(SwapInput calldata inputParams) external returns (uint256 netYtOut);
|
|
25
|
+
|
|
26
|
+
function swapYtForPt(SwapInput calldata inputParams) external returns (uint256 netPtOut);
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../IPAllAction.sol";
|
|
5
|
+
import "../../core/libraries/TokenAmountLib.sol";
|
|
6
|
+
import "../../core/TradingBot/libraries/MarketExtLib.sol";
|
|
7
|
+
|
|
8
|
+
struct BotState {
|
|
9
|
+
uint256 lpBalance;
|
|
10
|
+
uint256 ytBalance;
|
|
11
|
+
uint256 ptBalance;
|
|
12
|
+
uint256 syBalance;
|
|
13
|
+
uint256 buyBins;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
struct TradingSpecs {
|
|
17
|
+
uint256 buyYtIy;
|
|
18
|
+
uint256 sellYtIy;
|
|
19
|
+
uint256 targetSyRatio;
|
|
20
|
+
uint256 bufferSyRatio;
|
|
21
|
+
uint256 targetYtPtRatio;
|
|
22
|
+
uint256 numOfBins;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
struct StrategyData {
|
|
26
|
+
BotState botState;
|
|
27
|
+
MarketExtState marketExt;
|
|
28
|
+
TradingSpecs specs;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
interface ITradingBotBase {
|
|
32
|
+
struct MultiApproval {
|
|
33
|
+
address[] tokens;
|
|
34
|
+
address spender;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
event DepositSy(uint256 netSyIn);
|
|
38
|
+
|
|
39
|
+
event DepositToken(address indexed token, uint256 netTokenIn);
|
|
40
|
+
|
|
41
|
+
event WithdrawFunds(address indexed token, uint256 amount);
|
|
42
|
+
|
|
43
|
+
event ClaimAndCompound(uint256 netSyOut);
|
|
44
|
+
|
|
45
|
+
function compound(
|
|
46
|
+
TokenInput calldata inp,
|
|
47
|
+
uint256 minSyOut
|
|
48
|
+
) external returns (uint256 netSyOut);
|
|
49
|
+
|
|
50
|
+
function readStrategyData() external view returns (StrategyData memory strategyData);
|
|
51
|
+
|
|
52
|
+
function setSpecs(TradingSpecs calldata _specs) external;
|
|
53
|
+
}
|