@pendle/core-v2 2.17.6-tradingbot → 2.18.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/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/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/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/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/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/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/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/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/BotActionCallback.sol/BotActionCallback.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.json +678 -0
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.json +678 -0
- package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.json +10 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.json +1190 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.json +1671 -0
- package/build/artifacts/contracts/core/TradingBot/MarketExtLib.sol/MarketExtLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/MarketExtLib.sol/MarketExtLib.json +24 -0
- package/build/artifacts/contracts/core/TradingBot/SpecSegmentLib.sol/SpecSegmentLib.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/SpecSegmentLib.sol/SpecSegmentLib.json +10 -0
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.json +628 -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/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/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/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.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/ICamelotPair.sol/ICamelotPair.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/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/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.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/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/IStandardizedYield.sol/IStandardizedYield.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 +878 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.json +1084 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.json +429 -0
- 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/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/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/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/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/TradingBot/BotActionCallback.sol +1 -1
- package/contracts/core/TradingBot/BotActionHelper.sol +1 -3
- package/contracts/core/TradingBot/BotSimulationLib.sol +2 -1
- package/contracts/core/TradingBot/LongYieldDecisionHelper.sol +413 -0
- package/contracts/core/TradingBot/LongYieldTradingBot.sol +63 -91
- package/contracts/core/TradingBot/SpecSegmentLib.sol +62 -0
- package/contracts/core/TradingBot/TradingBotBase.sol +14 -9
- package/contracts/interfaces/TradingBot/IBotDecisionHelper.sol +41 -57
- package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +24 -34
- package/contracts/interfaces/TradingBot/ITradingBotBase.sol +1 -3
- 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/BotActionCallback.ts +76 -22
- package/typechain-types/BotActionHelper.ts +76 -22
- package/typechain-types/BotDecisionHelper.ts +561 -0
- package/typechain-types/IAnkrBNB.ts +150 -0
- package/typechain-types/IAnkrLiquidStaking.ts +253 -0
- package/typechain-types/IBotDecisionHelper.ts +437 -0
- package/typechain-types/ILongYieldTradingBot.ts +567 -298
- package/typechain-types/IPActionMarketAuxStatic.ts +38 -191
- package/typechain-types/IPActionMarketCoreStatic.ts +134 -600
- package/typechain-types/IPActionMintRedeemStatic.ts +26 -92
- package/typechain-types/IPRouterStatic.ts +197 -888
- package/typechain-types/ISwETH.ts +123 -0
- package/typechain-types/ITradingBotBase.ts +90 -22
- package/typechain-types/LongYieldDecisionHelper.ts +598 -0
- package/typechain-types/LongYieldTradingBot.ts +248 -361
- package/typechain-types/PendleAnkrBNBSY.ts +1235 -0
- package/typechain-types/PendleAuraWstethAnkreth.ts +1511 -0
- package/typechain-types/PendleSwETH.ts +1216 -0
- package/typechain-types/PendleThenaSY.ts +153 -0
- package/typechain-types/PendleWbEthSY.ts +1229 -0
- package/typechain-types/ThenaLpHelper.ts +19 -0
- package/typechain-types/ThenaMath.ts +87 -0
- package/typechain-types/ThenaPreview.ts +19 -0
- package/typechain-types/TradingBotBase.ts +76 -22
- 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/BotActionCallback__factory.ts +56 -16
- package/typechain-types/factories/BotActionHelper__factory.ts +56 -16
- package/typechain-types/factories/BotDecisionHelper__factory.ts +1192 -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/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/IBotDecisionHelper__factory.ts +893 -0
- package/typechain-types/factories/ILongYieldTradingBot__factory.ts +586 -391
- 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/IPRouterStatic__factory.ts +32 -146
- package/typechain-types/factories/ISwETH__factory.ts +53 -0
- package/typechain-types/factories/ITradingBotBase__factory.ts +54 -15
- package/typechain-types/factories/LongYieldDecisionHelper__factory.ts +1247 -0
- package/typechain-types/factories/LongYieldTradingBot__factory.ts +363 -575
- 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/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/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1244 -0
- package/typechain-types/factories/PendleCamelotV1VolatileSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- 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/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/PendleMarketFactory__factory.ts +1 -1
- 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/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/PendleSwETH__factory.ts +1022 -0
- package/typechain-types/factories/PendleThenaSY__factory.ts +85 -1
- 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/ThenaLpHelper__factory.ts +13 -0
- package/typechain-types/factories/ThenaMath__factory.ts +36 -0
- package/typechain-types/factories/ThenaPreview__factory.ts +14 -1
- package/typechain-types/factories/TradingBotBase__factory.ts +56 -16
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +81 -36
- package/typechain-types/index.ts +18 -8
- 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/PendleBinanceEth.sol/PendleBinanceEth.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBinanceEth.sol/PendleBinanceEth.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/TradingBot/BotDecisionHelper.sol +0 -306
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "IWBETH",
|
|
4
|
-
"sourceName": "contracts/interfaces/BinanceEth/IWBETH.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "uint256",
|
|
10
|
-
"name": "amount",
|
|
11
|
-
"type": "uint256"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"internalType": "address",
|
|
15
|
-
"name": "referral",
|
|
16
|
-
"type": "address"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"name": "deposit",
|
|
20
|
-
"outputs": [],
|
|
21
|
-
"stateMutability": "nonpayable",
|
|
22
|
-
"type": "function"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"inputs": [],
|
|
26
|
-
"name": "exchangeRate",
|
|
27
|
-
"outputs": [
|
|
28
|
-
{
|
|
29
|
-
"internalType": "uint256",
|
|
30
|
-
"name": "_exchangeRate",
|
|
31
|
-
"type": "uint256"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"stateMutability": "view",
|
|
35
|
-
"type": "function"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"bytecode": "0x",
|
|
39
|
-
"deployedBytecode": "0x",
|
|
40
|
-
"linkReferences": {},
|
|
41
|
-
"deployedLinkReferences": {}
|
|
42
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "PtAndLpToAsset",
|
|
4
|
-
"sourceName": "contracts/offchain-helpers/PtAndLpToAsset.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "int256",
|
|
10
|
-
"name": "exchangeRate",
|
|
11
|
-
"type": "int256"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"name": "MarketExchangeRateBelowOne",
|
|
15
|
-
"type": "error"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"inputs": [],
|
|
19
|
-
"name": "MarketExpired",
|
|
20
|
-
"type": "error"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"inputs": [],
|
|
24
|
-
"name": "MarketProportionMustNotEqualOne",
|
|
25
|
-
"type": "error"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"inputs": [
|
|
29
|
-
{
|
|
30
|
-
"internalType": "int256",
|
|
31
|
-
"name": "rateScalar",
|
|
32
|
-
"type": "int256"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"name": "MarketRateScalarBelowZero",
|
|
36
|
-
"type": "error"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"inputs": [
|
|
40
|
-
{
|
|
41
|
-
"internalType": "int256",
|
|
42
|
-
"name": "totalPt",
|
|
43
|
-
"type": "int256"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"internalType": "int256",
|
|
47
|
-
"name": "totalAsset",
|
|
48
|
-
"type": "int256"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"name": "MarketZeroTotalPtOrTotalAsset",
|
|
52
|
-
"type": "error"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"internalType": "contract IPMarket",
|
|
58
|
-
"name": "market",
|
|
59
|
-
"type": "address"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"name": "getLpToAssetRate",
|
|
63
|
-
"outputs": [
|
|
64
|
-
{
|
|
65
|
-
"internalType": "uint256",
|
|
66
|
-
"name": "lpToAssetRate",
|
|
67
|
-
"type": "uint256"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"stateMutability": "view",
|
|
71
|
-
"type": "function"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"inputs": [
|
|
75
|
-
{
|
|
76
|
-
"internalType": "contract IPMarket",
|
|
77
|
-
"name": "market",
|
|
78
|
-
"type": "address"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"name": "getPtToAssetRate",
|
|
82
|
-
"outputs": [
|
|
83
|
-
{
|
|
84
|
-
"internalType": "uint256",
|
|
85
|
-
"name": "ptToAssetRate",
|
|
86
|
-
"type": "uint256"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"stateMutability": "view",
|
|
90
|
-
"type": "function"
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"bytecode": "0x608060405234801561001057600080fd5b50611541806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063955ee4e71461003b578063f2344deb14610060575b600080fd5b61004e610049366004611232565b610073565b60405190815260200160405180910390f35b61004e61006e366004611232565b61014d565b600080826001600160a01b031663794052f360006040518263ffffffff1660e01b81526004016100a3919061124f565b61012060405180830381865afa1580156100c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e591906112a5565b905060006100f2846101db565b90506000610101838342610402565b9050600061011b610113878686610508565b85519061062a565b826020015161012a919061133d565b905061014384604001518261064f90919063ffffffff16565b9695505050505050565b600080826001600160a01b031663794052f360006040518263ffffffff1660e01b815260040161017d919061124f565b61012060405180830381865afa15801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906112a5565b90506101d483826101cf866101db565b610508565b9392505050565b6000806000836001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190611365565b92505091506000826001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ab91906113b2565b90506000826001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031191906113b2565b9050826001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037591906113cb565b80156103ea575043836001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103df91906113ed565b6001600160801b0316145b156103f85795945050505050565b6101438282610675565b61042d6040518060800160405280600081526020016000815260200160008152602001600081525090565b60a084015182106104515760405163b2094b5960e01b815260040160405180910390fd5b6000828560a001516104639190611416565b905061046f858261068b565b825260208501516104819085906106ec565b60208301528451158061049657506020820151155b156104c9578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044015b60405180910390fd5b6104e78560000151866101000151846020015185600001518561072b565b604083015260c08501516104fb90826107ac565b6060830152509392505050565b6000428360a00151116105f1576000846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611365565b505090506105e983826001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e391906113b2565b906107e5565b9150506101d4565b6000428460a001516106039190611416565b90506000610616856101000151836107ac565b9050610143670de0b6b3a76400008261064f565b6000806106378385611429565b9050670de0b6b3a7640000815b059150505b92915050565b600080610664670de0b6b3a764000085611429565b905082818161064457610644611459565b600081831161068457816101d4565b5090919050565b600061069682610814565b6106ad6106a86201518061016d61146f565b610814565b84608001516106bc9190611429565b6106c69190611486565b90506000811361064957604051630e520c3b60e11b8152600481018290526024016104c0565b600080600083126106fe576001610702565b6000195b90506107196106a8856107148661082e565b610840565b6107239082611429565b949350505050565b60008061073886846107ac565b9050670de0b6b3a76400008112156107665760405163329e322960e21b8152600481018290526024016104c0565b600061077c610775878a61133d565b899061064f565b905060006107898261085f565b9050610795818761064f565b61079f90846114b4565b9998505050505050505050565b6000806107be6201518061016d61146f565b6107c8848661146f565b6107d291906114db565b90506107236107e082610814565b6108b2565b6000806107fa670de0b6b3a76400008561146f565b905082818161080b5761080b611459565b04949350505050565b60006001600160ff1b0382111561082a57600080fd5b5090565b600080821361082a57610649826114ef565b6000670de0b6b3a7640000610855848461146f565b6101d491906114db565b6000670de0b6b3a764000082036108895760405163a9c8b14d60e01b815260040160405180910390fd5b60006108a76108a084670de0b6b3a76400006114b4565b849061064f565b90506101d481610cc7565b6000680238fd42c5cf03ffff1982121580156108d7575068070c1cc73b00c800008213155b6109165760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016104c0565b600082121561094e5761092b826000036108b2565b6a0c097ce7bc90715b34b9f160241b8161094757610947611459565b0592915050565b60006806f05b59d3b2000000831261098c57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b6109c2565b6803782dace9d900000083126109be57506803782dace9d8ffffff19909101906b1425982cf597cd205cef73806109c2565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a125768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610a4e576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610a8857682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610ac2576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610afb57680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610b345768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610b6d576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610ba65768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000808213610d085760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016104c0565b670c7d713b49da000082138015610d265750670f43fc2c04ee000082125b15610d4a57670de0b6b3a7640000610d3d83610d58565b8161094757610947611459565b61064982610e77565b919050565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610d9957610d99611459565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610eb857610eaf826a0c097ce7bc90715b34b9f160241b81610ea957610ea9611459565b05610e77565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610f035772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b8312610f3a576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312610f82576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a7008312610fbd576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf8508312610ff457693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261102b57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126110605768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261108b57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126110c0576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126110f5576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b2866038312611129576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261115d576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161118657611186611459565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b038116811461122f57600080fd5b50565b60006020828403121561124457600080fd5b81356101d48161121a565b6001600160a01b0391909116815260200190565b60405161012081016001600160401b038111828210171561129457634e487b7160e01b600052604160045260246000fd5b60405290565b8051610d538161121a565b600061012082840312156112b857600080fd5b6112c0611263565b8251815260208301516020820152604083015160408201526112e46060840161129a565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152508091505092915050565b634e487b7160e01b600052601160045260246000fd5b808201828112600083128015821682158216171561135d5761135d611327565b505092915050565b60008060006060848603121561137a57600080fd5b83516113858161121a565b60208501519093506113968161121a565b60408501519092506113a78161121a565b809150509250925092565b6000602082840312156113c457600080fd5b5051919050565b6000602082840312156113dd57600080fd5b815180151581146101d457600080fd5b6000602082840312156113ff57600080fd5b81516001600160801b03811681146101d457600080fd5b8181038181111561064957610649611327565b80820260008212600160ff1b8414161561144557611445611327565b818105831482151761064957610649611327565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761064957610649611327565b60008261149557611495611459565b600160ff1b8214600019841416156114af576114af611327565b500590565b81810360008312801583831316838312821617156114d4576114d4611327565b5092915050565b6000826114ea576114ea611459565b500490565b6000600160ff1b820161150457611504611327565b506000039056fea2646970667358221220cba632b8df668d47129725f92bc1418b1ab27be54aa6033e250c8c3d9527c3d864736f6c63430008110033",
|
|
94
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063955ee4e71461003b578063f2344deb14610060575b600080fd5b61004e610049366004611232565b610073565b60405190815260200160405180910390f35b61004e61006e366004611232565b61014d565b600080826001600160a01b031663794052f360006040518263ffffffff1660e01b81526004016100a3919061124f565b61012060405180830381865afa1580156100c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100e591906112a5565b905060006100f2846101db565b90506000610101838342610402565b9050600061011b610113878686610508565b85519061062a565b826020015161012a919061133d565b905061014384604001518261064f90919063ffffffff16565b9695505050505050565b600080826001600160a01b031663794052f360006040518263ffffffff1660e01b815260040161017d919061124f565b61012060405180830381865afa15801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906112a5565b90506101d483826101cf866101db565b610508565b9392505050565b6000806000836001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa15801561021e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102429190611365565b92505091506000826001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610287573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ab91906113b2565b90506000826001600160a01b031663d2a3584e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031191906113b2565b9050826001600160a01b031663516399df6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610351573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037591906113cb565b80156103ea575043836001600160a01b03166360e0a9e16040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103df91906113ed565b6001600160801b0316145b156103f85795945050505050565b6101438282610675565b61042d6040518060800160405280600081526020016000815260200160008152602001600081525090565b60a084015182106104515760405163b2094b5960e01b815260040160405180910390fd5b6000828560a001516104639190611416565b905061046f858261068b565b825260208501516104819085906106ec565b60208301528451158061049657506020820151155b156104c9578451602083015160405163b1c4aefb60e01b8152600481019290925260248201526044015b60405180910390fd5b6104e78560000151866101000151846020015185600001518561072b565b604083015260c08501516104fb90826107ac565b6060830152509392505050565b6000428360a00151116105f1576000846001600160a01b0316632c8ce6bc6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610555573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105799190611365565b505090506105e983826001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e391906113b2565b906107e5565b9150506101d4565b6000428460a001516106039190611416565b90506000610616856101000151836107ac565b9050610143670de0b6b3a76400008261064f565b6000806106378385611429565b9050670de0b6b3a7640000815b059150505b92915050565b600080610664670de0b6b3a764000085611429565b905082818161064457610644611459565b600081831161068457816101d4565b5090919050565b600061069682610814565b6106ad6106a86201518061016d61146f565b610814565b84608001516106bc9190611429565b6106c69190611486565b90506000811361064957604051630e520c3b60e11b8152600481018290526024016104c0565b600080600083126106fe576001610702565b6000195b90506107196106a8856107148661082e565b610840565b6107239082611429565b949350505050565b60008061073886846107ac565b9050670de0b6b3a76400008112156107665760405163329e322960e21b8152600481018290526024016104c0565b600061077c610775878a61133d565b899061064f565b905060006107898261085f565b9050610795818761064f565b61079f90846114b4565b9998505050505050505050565b6000806107be6201518061016d61146f565b6107c8848661146f565b6107d291906114db565b90506107236107e082610814565b6108b2565b6000806107fa670de0b6b3a76400008561146f565b905082818161080b5761080b611459565b04949350505050565b60006001600160ff1b0382111561082a57600080fd5b5090565b600080821361082a57610649826114ef565b6000670de0b6b3a7640000610855848461146f565b6101d491906114db565b6000670de0b6b3a764000082036108895760405163a9c8b14d60e01b815260040160405180910390fd5b60006108a76108a084670de0b6b3a76400006114b4565b849061064f565b90506101d481610cc7565b6000680238fd42c5cf03ffff1982121580156108d7575068070c1cc73b00c800008213155b6109165760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908195e1c1bdb995b9d60821b60448201526064016104c0565b600082121561094e5761092b826000036108b2565b6a0c097ce7bc90715b34b9f160241b8161094757610947611459565b0592915050565b60006806f05b59d3b2000000831261098c57506806f05b59d3b1ffffff199091019072195e54c5dd42177f53a27172fa9ec63026282760241b6109c2565b6803782dace9d900000083126109be57506803782dace9d8ffffff19909101906b1425982cf597cd205cef73806109c2565b5060015b6064929092029168056bc75e2d6310000068ad78ebc5ac620000008412610a125768ad78ebc5ac61ffffff199093019268056bc75e2d631000006e01855144814a7ff805980ff008400082020590505b6856bc75e2d6310000008412610a4e576856bc75e2d630ffffff199093019268056bc75e2d631000006b02df0ab5a80a22c61ab5a70082020590505b682b5e3af16b188000008412610a8857682b5e3af16b187fffff199093019268056bc75e2d63100000693f1fce3da636ea5cf85082020590505b6815af1d78b58c4000008412610ac2576815af1d78b58c3fffff199093019268056bc75e2d63100000690127fa27722cc06cc5e282020590505b680ad78ebc5ac62000008412610afb57680ad78ebc5ac61fffff199093019268056bc75e2d6310000068280e60114edb805d0382020590505b68056bc75e2d631000008412610b345768056bc75e2d630fffff199093019268056bc75e2d63100000680ebc5fb4174612111082020590505b6802b5e3af16b18800008412610b6d576802b5e3af16b187ffff199093019268056bc75e2d631000006808f00f760a4b2db55d82020590505b68015af1d78b58c400008412610ba65768015af1d78b58c3ffff199093019268056bc75e2d631000006806f5f177578893793782020590505b68056bc75e2d631000008481019085906002908280020505918201919050600368056bc75e2d631000008783020505918201919050600468056bc75e2d631000008783020505918201919050600568056bc75e2d631000008783020505918201919050600668056bc75e2d631000008783020505918201919050600768056bc75e2d631000008783020505918201919050600868056bc75e2d631000008783020505918201919050600968056bc75e2d631000008783020505918201919050600a68056bc75e2d631000008783020505918201919050600b68056bc75e2d631000008783020505918201919050600c68056bc75e2d631000008783020505918201919050606468056bc75e2d63100000848402058502059695505050505050565b6000808213610d085760405162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b60448201526064016104c0565b670c7d713b49da000082138015610d265750670f43fc2c04ee000082125b15610d4a57670de0b6b3a7640000610d3d83610d58565b8161094757610947611459565b61064982610e77565b919050565b670de0b6b3a7640000026000806a0c097ce7bc90715b34b9f160241b808401906ec097ce7bc90715b34b9f0fffffffff1985010281610d9957610d99611459565b05905060006a0c097ce7bc90715b34b9f160241b82800205905081806a0c097ce7bc90715b34b9f160241b81840205915060038205016a0c097ce7bc90715b34b9f160241b82840205915060058205016a0c097ce7bc90715b34b9f160241b82840205915060078205016a0c097ce7bc90715b34b9f160241b82840205915060098205016a0c097ce7bc90715b34b9f160241b828402059150600b8205016a0c097ce7bc90715b34b9f160241b828402059150600d8205016a0c097ce7bc90715b34b9f160241b828402059150600f82050160020295945050505050565b6000670de0b6b3a7640000821215610eb857610eaf826a0c097ce7bc90715b34b9f160241b81610ea957610ea9611459565b05610e77565b60000392915050565b6000775803bcc5cb9634ba4cfb2213f784019318ed4dcb6017880f60361b8312610f035772195e54c5dd42177f53a27172fa9ec63026282760241b830592506806f05b59d3b2000000015b6f8bcc0026baae9e45e470190267a230cf60191b8312610f3a576b1425982cf597cd205cef7380830592506803782dace9d9000000015b606492830292026e01855144814a7ff805980ff00840008312610f82576e01855144814a7ff805980ff008400068056bc75e2d63100000840205925068ad78ebc5ac62000000015b6b02df0ab5a80a22c61ab5a7008312610fbd576b02df0ab5a80a22c61ab5a70068056bc75e2d6310000084020592506856bc75e2d631000000015b693f1fce3da636ea5cf8508312610ff457693f1fce3da636ea5cf85068056bc75e2d631000008402059250682b5e3af16b18800000015b690127fa27722cc06cc5e2831261102b57690127fa27722cc06cc5e268056bc75e2d6310000084020592506815af1d78b58c400000015b68280e60114edb805d0383126110605768280e60114edb805d0368056bc75e2d631000008402059250680ad78ebc5ac6200000015b680ebc5fb41746121110831261108b57680ebc5fb4174612111068056bc75e2d631000009384020592015b6808f00f760a4b2db55d83126110c0576808f00f760a4b2db55d68056bc75e2d6310000084020592506802b5e3af16b1880000015b6806f5f177578893793783126110f5576806f5f177578893793768056bc75e2d63100000840205925068015af1d78b58c40000015b6806248f33704b2866038312611129576806248f33704b28660368056bc75e2d63100000840205925067ad78ebc5ac620000015b6805c548670b9510e7ac831261115d576805c548670b9510e7ac68056bc75e2d6310000084020592506756bc75e2d6310000015b600068056bc75e2d63100000840168056bc75e2d63100000808603028161118657611186611459565b059050600068056bc75e2d63100000828002059050818068056bc75e2d63100000818402059150600382050168056bc75e2d63100000828402059150600582050168056bc75e2d63100000828402059150600782050168056bc75e2d63100000828402059150600982050168056bc75e2d63100000828402059150600b820501600202606485820105979650505050505050565b6001600160a01b038116811461122f57600080fd5b50565b60006020828403121561124457600080fd5b81356101d48161121a565b6001600160a01b0391909116815260200190565b60405161012081016001600160401b038111828210171561129457634e487b7160e01b600052604160045260246000fd5b60405290565b8051610d538161121a565b600061012082840312156112b857600080fd5b6112c0611263565b8251815260208301516020820152604083015160408201526112e46060840161129a565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152508091505092915050565b634e487b7160e01b600052601160045260246000fd5b808201828112600083128015821682158216171561135d5761135d611327565b505092915050565b60008060006060848603121561137a57600080fd5b83516113858161121a565b60208501519093506113968161121a565b60408501519092506113a78161121a565b809150509250925092565b6000602082840312156113c457600080fd5b5051919050565b6000602082840312156113dd57600080fd5b815180151581146101d457600080fd5b6000602082840312156113ff57600080fd5b81516001600160801b03811681146101d457600080fd5b8181038181111561064957610649611327565b80820260008212600160ff1b8414161561144557611445611327565b818105831482151761064957610649611327565b634e487b7160e01b600052601260045260246000fd5b808202811582820484141761064957610649611327565b60008261149557611495611459565b600160ff1b8214600019841416156114af576114af611327565b500590565b81810360008312801583831316838312821617156114d4576114d4611327565b5092915050565b6000826114ea576114ea611459565b500490565b6000600160ff1b820161150457611504611327565b506000039056fea2646970667358221220cba632b8df668d47129725f92bc1418b1ab27be54aa6033e250c8c3d9527c3d864736f6c63430008110033",
|
|
95
|
-
"linkReferences": {},
|
|
96
|
-
"deployedLinkReferences": {}
|
|
97
|
-
}
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.0;
|
|
3
|
-
|
|
4
|
-
import "./BotSimulationLib.sol";
|
|
5
|
-
import "../libraries/Errors.sol";
|
|
6
|
-
import "../../interfaces/TradingBot/IBotDecisionHelper.sol";
|
|
7
|
-
|
|
8
|
-
contract BotDecisionHelper is IBotDecisionHelper {
|
|
9
|
-
using MarketExtLib for MarketExtState;
|
|
10
|
-
using MarketExtLib for ApproxParams;
|
|
11
|
-
using MarketMathCore for MarketState;
|
|
12
|
-
using MarketApproxPtInLib for MarketState;
|
|
13
|
-
using BotSimulationLib for BotState;
|
|
14
|
-
using PYIndexLib for PYIndex;
|
|
15
|
-
using Math for uint256;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Binary search for the smallest parameter `botParam` for the corresponding rebalancing action
|
|
19
|
-
* such that the bot reaches desired target, otherwise give the largest `botParam` possible
|
|
20
|
-
* that action doesn't revert.
|
|
21
|
-
*
|
|
22
|
-
* @param action Action to take, from which target is derived
|
|
23
|
-
* @param botParams ApproxParams for `botParam`
|
|
24
|
-
* @param intParams ApproxParams for internal action's approximation (e.g. for router's swap)
|
|
25
|
-
*
|
|
26
|
-
* For `botParams`, eps = the precision such that slightly lower
|
|
27
|
-
* (param = (return value) * (1 - eps)) does not reach target
|
|
28
|
-
*
|
|
29
|
-
* - Returns `botParams.guessOffchain` if it reaches target, and slightly lower does not
|
|
30
|
-
* - Reverts if `botParams.guessMin` is invalid, or returns `botParams.guessMin` if reaches
|
|
31
|
-
* target
|
|
32
|
-
* - Returns `botParams.guessMax` if it is valid & does not reach target
|
|
33
|
-
* - Otherwise, binary search for `guess` such that it reaches target, and slightly lower does
|
|
34
|
-
* not
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
function searchForBotParam(
|
|
38
|
-
BotState memory bot,
|
|
39
|
-
MarketExtState memory marketExt,
|
|
40
|
-
LongTradingSpecs memory specs,
|
|
41
|
-
ActionType action,
|
|
42
|
-
ApproxParams memory botParams,
|
|
43
|
-
ApproxParams memory intParams
|
|
44
|
-
) public pure returns (uint256, RebalanceResult) {
|
|
45
|
-
RebalanceDetails memory rebalance = RebalanceDetails(bot, marketExt, specs, action);
|
|
46
|
-
|
|
47
|
-
if (botParams.guessOffchain != 0) {
|
|
48
|
-
uint256 guessOffchainMinusDelta = botParams.guessOffchain.mulDown(
|
|
49
|
-
Math.ONE - botParams.eps
|
|
50
|
-
);
|
|
51
|
-
if (
|
|
52
|
-
_rebalanceResult(rebalance, botParams.guessOffchain, intParams) ==
|
|
53
|
-
RebalanceResult.TARGET_REACHED &&
|
|
54
|
-
_rebalanceResult(rebalance, guessOffchainMinusDelta, intParams) ==
|
|
55
|
-
RebalanceResult.TARGET_NOT_REACHED
|
|
56
|
-
) return (botParams.guessOffchain, RebalanceResult.TARGET_REACHED);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
{
|
|
60
|
-
uint256 guessUpperBound = _weakUpperBound(bot, marketExt, action);
|
|
61
|
-
if (botParams.guessMax > guessUpperBound) botParams.guessMax = guessUpperBound;
|
|
62
|
-
if (botParams.guessMin > botParams.guessMax)
|
|
63
|
-
revert Errors.BotBinarySearchInvalidRange(
|
|
64
|
-
uint256(action),
|
|
65
|
-
botParams.guessMin,
|
|
66
|
-
botParams.guessMax
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
_rebalanceResult(rebalance, botParams.guessMax, intParams) ==
|
|
71
|
-
RebalanceResult.TARGET_NOT_REACHED
|
|
72
|
-
) return (botParams.guessMax, RebalanceResult.TARGET_NOT_REACHED);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
RebalanceResult guessMinResult = _rebalanceResult(
|
|
77
|
-
rebalance,
|
|
78
|
-
botParams.guessMin,
|
|
79
|
-
intParams
|
|
80
|
-
);
|
|
81
|
-
if (guessMinResult == RebalanceResult.FAIL)
|
|
82
|
-
revert Errors.BotBinarySearchGuessMinInvalid(uint256(action), botParams.guessMin);
|
|
83
|
-
if (guessMinResult == RebalanceResult.TARGET_REACHED)
|
|
84
|
-
return (botParams.guessMin, RebalanceResult.TARGET_REACHED);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
for (uint256 iter = 0; iter < botParams.maxIteration; ++iter) {
|
|
88
|
-
uint256 guess = botParams.guessMin + (botParams.guessMax - botParams.guessMin) / 2;
|
|
89
|
-
|
|
90
|
-
if (
|
|
91
|
-
_rebalanceResult(rebalance, guess, intParams) == RebalanceResult.TARGET_NOT_REACHED
|
|
92
|
-
) {
|
|
93
|
-
botParams.guessMin = guess;
|
|
94
|
-
} else {
|
|
95
|
-
botParams.guessMax = guess;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (Math.isASmallerApproxB(botParams.guessMin, botParams.guessMax, botParams.eps)) {
|
|
99
|
-
if (
|
|
100
|
-
_rebalanceResult(rebalance, botParams.guessMin, intParams) ==
|
|
101
|
-
RebalanceResult.FAIL
|
|
102
|
-
)
|
|
103
|
-
return (
|
|
104
|
-
botParams.guessMin,
|
|
105
|
-
_rebalanceResult(rebalance, botParams.guessMin, intParams)
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
return (
|
|
109
|
-
botParams.guessMax,
|
|
110
|
-
_rebalanceResult(rebalance, botParams.guessMax, intParams)
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
revert Errors.BotBinarySearchFail();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Given the rebalancing action and its `botParam`, binary search for the optimal internal
|
|
120
|
-
* parameter `intParam` for the internal action's approximation (e.g. for router's swap)
|
|
121
|
-
*/
|
|
122
|
-
function searchForIntParam(
|
|
123
|
-
MarketExtState memory marketExt,
|
|
124
|
-
ActionType action,
|
|
125
|
-
uint256 botParam,
|
|
126
|
-
ApproxParams memory intParams
|
|
127
|
-
) public pure returns (uint256) {
|
|
128
|
-
if (action == ActionType.RemoveLiqToYt) {
|
|
129
|
-
(, uint256 totalPtToSwap) = marketExt.clone().removeLiqToYt(botParam, intParams);
|
|
130
|
-
return totalPtToSwap;
|
|
131
|
-
} else {
|
|
132
|
-
return 0;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function strategyState(
|
|
137
|
-
BotState memory bot,
|
|
138
|
-
MarketExtState memory marketExt,
|
|
139
|
-
LongTradingSpecs memory specs
|
|
140
|
-
) public pure returns (StrategyState memory currentState) {
|
|
141
|
-
(, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio) = botExtStats(
|
|
142
|
-
bot,
|
|
143
|
-
marketExt
|
|
144
|
-
);
|
|
145
|
-
|
|
146
|
-
if (iy < specs.lowerIyLimit) {
|
|
147
|
-
currentState.iyFlag = StrategyFlag.TOO_LOW;
|
|
148
|
-
} else if (specs.upperIyLimit < iy && currentYtPtRatio > specs.ytPtRatioLimit) {
|
|
149
|
-
currentState.iyFlag = StrategyFlag.TOO_HIGH;
|
|
150
|
-
} else {
|
|
151
|
-
currentState.iyFlag = StrategyFlag.GOOD;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (currentSyRatio > specs.floatingSyRatioLimit) {
|
|
155
|
-
currentState.syRatioFlag = StrategyFlag.TOO_HIGH;
|
|
156
|
-
} else {
|
|
157
|
-
currentState.syRatioFlag = StrategyFlag.GOOD;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function actionToTake(
|
|
162
|
-
BotState memory botState,
|
|
163
|
-
StrategyState memory currentState
|
|
164
|
-
) public pure returns (ActionType) {
|
|
165
|
-
if (currentState.iyFlag == StrategyFlag.TOO_LOW) {
|
|
166
|
-
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
167
|
-
if (botState.syBalance == 0) return ActionType.NONE;
|
|
168
|
-
return ActionType.SwapSyToYt;
|
|
169
|
-
} else {
|
|
170
|
-
if (botState.lpBalance == 0) return ActionType.NONE;
|
|
171
|
-
return ActionType.RemoveLiqToYt;
|
|
172
|
-
}
|
|
173
|
-
} else if (currentState.iyFlag == StrategyFlag.GOOD) {
|
|
174
|
-
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
175
|
-
if (botState.syBalance == 0) return ActionType.NONE;
|
|
176
|
-
return ActionType.AddLiqKeepYt;
|
|
177
|
-
} else {
|
|
178
|
-
return ActionType.NONE;
|
|
179
|
-
}
|
|
180
|
-
} else {
|
|
181
|
-
if (currentState.syRatioFlag == StrategyFlag.TOO_HIGH) {
|
|
182
|
-
if (botState.syBalance == 0) return ActionType.NONE;
|
|
183
|
-
return ActionType.AddLiqFromSy;
|
|
184
|
-
} else {
|
|
185
|
-
if (botState.ytBalance == 0) return ActionType.NONE;
|
|
186
|
-
return ActionType.AddLiqFromYt;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/// @dev Does not modify params, structs are cloned before simulation
|
|
192
|
-
function previewAction(
|
|
193
|
-
BotState memory botData,
|
|
194
|
-
MarketExtState memory marketExtData,
|
|
195
|
-
ActionType action,
|
|
196
|
-
uint256 botParam,
|
|
197
|
-
ApproxParams memory swapApproxParams
|
|
198
|
-
) public pure returns (bool success, BotState memory bot, MarketExtState memory marketExt) {
|
|
199
|
-
bot = botData.clone();
|
|
200
|
-
marketExt = marketExtData.clone();
|
|
201
|
-
|
|
202
|
-
if (action == ActionType.SwapSyToYt) {
|
|
203
|
-
success = bot.swapSyToYt(marketExt, botParam);
|
|
204
|
-
} else if (action == ActionType.AddLiqKeepYt) {
|
|
205
|
-
success = bot.addLiqKeepYt(marketExt, botParam);
|
|
206
|
-
} else if (action == ActionType.AddLiqFromSy) {
|
|
207
|
-
success = bot.addLiqFromSy(marketExt, botParam);
|
|
208
|
-
} else if (action == ActionType.AddLiqFromYt) {
|
|
209
|
-
success = bot.addLiqFromYt(marketExt, botParam);
|
|
210
|
-
} else if (action == ActionType.RemoveLiqToYt) {
|
|
211
|
-
success = bot.removeLiqToYt(marketExt, botParam, swapApproxParams);
|
|
212
|
-
} else {
|
|
213
|
-
success = false;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
function botExtStats(
|
|
218
|
-
BotState memory bot,
|
|
219
|
-
MarketExtState memory marketExt
|
|
220
|
-
)
|
|
221
|
-
public
|
|
222
|
-
pure
|
|
223
|
-
returns (uint256 tvlInSy, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio)
|
|
224
|
-
{
|
|
225
|
-
tvlInSy = bot.tvlInSy(marketExt);
|
|
226
|
-
|
|
227
|
-
iy = marketExt.impliedYield();
|
|
228
|
-
|
|
229
|
-
currentSyRatio = bot.syBalance.divDown(tvlInSy);
|
|
230
|
-
|
|
231
|
-
(, uint256 ptInLp) = marketExt.clone().removeLiqDual(bot.lpBalance);
|
|
232
|
-
currentYtPtRatio = (ptInLp == 0 ? type(uint256).max : bot.ytBalance.divDown(ptInLp));
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/// @dev Gives a weak upper bound so that MarketExtLib's simulation doesn't revert
|
|
236
|
-
function _weakUpperBound(
|
|
237
|
-
BotState memory bot,
|
|
238
|
-
MarketExtState memory marketExt,
|
|
239
|
-
ActionType action
|
|
240
|
-
) private pure returns (uint256) {
|
|
241
|
-
if (action == ActionType.SwapSyToYt) {
|
|
242
|
-
return marketExt.calcMaxPtIn();
|
|
243
|
-
} else if (action == ActionType.AddLiqKeepYt) {
|
|
244
|
-
return bot.syBalance;
|
|
245
|
-
} else if (action == ActionType.AddLiqFromSy) {
|
|
246
|
-
return marketExt.calcMaxPtOut();
|
|
247
|
-
} else if (action == ActionType.AddLiqFromYt) {
|
|
248
|
-
return marketExt.calcMaxPtOut();
|
|
249
|
-
} else if (action == ActionType.RemoveLiqToYt) {
|
|
250
|
-
return bot.lpBalance;
|
|
251
|
-
} else {
|
|
252
|
-
return 0;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
function _rebalanceResult(
|
|
257
|
-
RebalanceDetails memory rebalance,
|
|
258
|
-
uint256 botParam,
|
|
259
|
-
ApproxParams memory intParams
|
|
260
|
-
) private pure returns (RebalanceResult) {
|
|
261
|
-
(bool success, BotState memory bot, MarketExtState memory marketExt) = previewAction(
|
|
262
|
-
rebalance.bot,
|
|
263
|
-
rebalance.marketExt,
|
|
264
|
-
rebalance.action,
|
|
265
|
-
botParam,
|
|
266
|
-
intParams
|
|
267
|
-
);
|
|
268
|
-
|
|
269
|
-
if (!success) return RebalanceResult.FAIL;
|
|
270
|
-
if (_reachedTarget(bot, marketExt, rebalance.specs, rebalance.action)) {
|
|
271
|
-
return RebalanceResult.TARGET_REACHED;
|
|
272
|
-
}
|
|
273
|
-
return RebalanceResult.TARGET_NOT_REACHED;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
function _reachedTarget(
|
|
277
|
-
BotState memory bot,
|
|
278
|
-
MarketExtState memory marketExt,
|
|
279
|
-
LongTradingSpecs memory specs,
|
|
280
|
-
ActionType action
|
|
281
|
-
) private pure returns (bool) {
|
|
282
|
-
uint256 targetIy = (specs.lowerIyLimit + specs.upperIyLimit) / 2;
|
|
283
|
-
|
|
284
|
-
(, uint256 iy, uint256 currentSyRatio, uint256 currentYtPtRatio) = botExtStats(
|
|
285
|
-
bot,
|
|
286
|
-
marketExt
|
|
287
|
-
);
|
|
288
|
-
|
|
289
|
-
if (action == ActionType.SwapSyToYt) {
|
|
290
|
-
return iy >= targetIy || currentSyRatio <= specs.floatingSyRatioTarget;
|
|
291
|
-
} else if (action == ActionType.AddLiqKeepYt) {
|
|
292
|
-
return currentSyRatio <= specs.floatingSyRatioTarget;
|
|
293
|
-
} else if (action == ActionType.AddLiqFromSy) {
|
|
294
|
-
return
|
|
295
|
-
iy <= targetIy ||
|
|
296
|
-
currentSyRatio <= specs.floatingSyRatioTarget ||
|
|
297
|
-
currentYtPtRatio <= specs.ytPtRatioTarget;
|
|
298
|
-
} else if (action == ActionType.AddLiqFromYt) {
|
|
299
|
-
return iy <= targetIy || currentYtPtRatio <= specs.ytPtRatioTarget;
|
|
300
|
-
} else if (action == ActionType.RemoveLiqToYt) {
|
|
301
|
-
return iy >= targetIy;
|
|
302
|
-
} else {
|
|
303
|
-
return true;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|