@pendle/core-v2 2.17.7-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.
Files changed (216) hide show
  1. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
  3. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  5. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
  6. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  8. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
  11. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  12. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  13. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  14. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  15. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  17. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  19. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
  20. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
  21. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
  22. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  23. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  24. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  25. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  26. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  27. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  28. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  29. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  30. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  31. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  32. package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
  33. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
  35. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
  36. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
  37. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
  38. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
  39. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
  40. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
  42. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.dbg.json +1 -1
  44. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +1 -1
  47. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  49. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
  53. package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
  64. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  66. package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.dbg.json +1 -1
  67. package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.json +32 -17
  68. package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.dbg.json +1 -1
  69. package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.json +32 -17
  70. package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.dbg.json +1 -1
  71. package/build/artifacts/contracts/core/TradingBot/BotSimulationLib.sol/BotSimulationLib.json +2 -2
  72. package/build/artifacts/contracts/core/TradingBot/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.dbg.json +4 -0
  73. package/build/artifacts/contracts/core/TradingBot/LongYieldDecisionHelper.sol/LongYieldDecisionHelper.json +1190 -0
  74. package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.dbg.json +1 -1
  75. package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.json +301 -397
  76. package/build/artifacts/contracts/core/TradingBot/MarketExtLib.sol/MarketExtLib.dbg.json +1 -1
  77. package/build/artifacts/contracts/core/TradingBot/SpecSegmentLib.sol/SpecSegmentLib.dbg.json +4 -0
  78. package/build/artifacts/contracts/core/TradingBot/SpecSegmentLib.sol/SpecSegmentLib.json +10 -0
  79. package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.json +32 -17
  81. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  83. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  85. package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
  86. package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
  87. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
  88. package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
  89. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  90. package/build/artifacts/contracts/core/libraries/TokenAmountLib.sol/TokenAmountLib.dbg.json +1 -1
  91. package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
  93. package/build/artifacts/contracts/interfaces/Balancer/IERC4626LinearPool.sol/IERC4626LinearPool.dbg.json +1 -1
  94. package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
  95. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
  96. package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
  97. package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
  100. package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  102. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  103. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  104. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  105. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  106. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  107. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  108. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
  112. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/TradingBot/IBotDecisionHelper.sol/IBotDecisionHelper.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/TradingBot/IBotDecisionHelper.sol/IBotDecisionHelper.json +542 -581
  119. package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.dbg.json +1 -1
  120. package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.json +256 -325
  121. package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.json +6 -17
  123. package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
  124. package/build/artifacts/contracts/offchain-helpers/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
  125. package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
  126. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
  127. package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
  128. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
  129. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
  130. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
  131. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
  132. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
  133. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
  134. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
  135. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
  136. package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
  137. package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
  138. package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
  139. package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
  140. package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
  141. package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
  142. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  143. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  144. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  145. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  146. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  147. package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
  148. package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
  149. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  150. package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
  151. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  152. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  153. package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
  154. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
  155. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
  156. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IHashflow.sol/IHashflow.dbg.json +1 -1
  157. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
  158. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
  159. package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
  160. package/contracts/core/TradingBot/BotActionCallback.sol +1 -1
  161. package/contracts/core/TradingBot/BotActionHelper.sol +1 -3
  162. package/contracts/core/TradingBot/BotSimulationLib.sol +2 -1
  163. package/contracts/core/TradingBot/LongYieldDecisionHelper.sol +413 -0
  164. package/contracts/core/TradingBot/LongYieldTradingBot.sol +63 -91
  165. package/contracts/core/TradingBot/SpecSegmentLib.sol +62 -0
  166. package/contracts/core/TradingBot/TradingBotBase.sol +14 -9
  167. package/contracts/interfaces/TradingBot/IBotDecisionHelper.sol +41 -57
  168. package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +24 -34
  169. package/contracts/interfaces/TradingBot/ITradingBotBase.sol +1 -3
  170. package/package.json +1 -1
  171. package/typechain-types/BotActionCallback.ts +40 -22
  172. package/typechain-types/BotActionHelper.ts +40 -22
  173. package/typechain-types/BotDecisionHelper.ts +221 -187
  174. package/typechain-types/IAnkrBNB.ts +150 -0
  175. package/typechain-types/IAnkrLiquidStaking.ts +253 -0
  176. package/typechain-types/IBotDecisionHelper.ts +142 -212
  177. package/typechain-types/ILongYieldTradingBot.ts +147 -230
  178. package/typechain-types/ISwETH.ts +123 -0
  179. package/typechain-types/ITradingBotBase.ts +14 -22
  180. package/typechain-types/LongYieldDecisionHelper.ts +598 -0
  181. package/typechain-types/LongYieldTradingBot.ts +191 -248
  182. package/typechain-types/PendleAnkrBNBSY.ts +1235 -0
  183. package/typechain-types/PendleAuraWstethAnkreth.ts +1511 -0
  184. package/typechain-types/PendleSwETH.ts +1216 -0
  185. package/typechain-types/PendleThenaSY.ts +153 -0
  186. package/typechain-types/PendleWbEthSY.ts +1229 -0
  187. package/typechain-types/ThenaLpHelper.ts +19 -0
  188. package/typechain-types/ThenaMath.ts +87 -0
  189. package/typechain-types/ThenaPreview.ts +19 -0
  190. package/typechain-types/TradingBotBase.ts +40 -22
  191. package/typechain-types/factories/BotActionCallback__factory.ts +31 -16
  192. package/typechain-types/factories/BotActionHelper__factory.ts +31 -16
  193. package/typechain-types/factories/BotDecisionHelper__factory.ts +490 -421
  194. package/typechain-types/factories/IAnkrBNB__factory.ts +74 -0
  195. package/typechain-types/factories/IAnkrLiquidStaking__factory.ts +123 -0
  196. package/typechain-types/factories/IBotDecisionHelper__factory.ts +540 -579
  197. package/typechain-types/factories/ILongYieldTradingBot__factory.ts +255 -324
  198. package/typechain-types/factories/ISwETH__factory.ts +53 -0
  199. package/typechain-types/factories/ITradingBotBase__factory.ts +6 -17
  200. package/typechain-types/factories/LongYieldDecisionHelper__factory.ts +1247 -0
  201. package/typechain-types/factories/LongYieldTradingBot__factory.ts +301 -393
  202. package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1100 -0
  203. package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1244 -0
  204. package/typechain-types/factories/PendleSwETH__factory.ts +1022 -0
  205. package/typechain-types/factories/PendleThenaSY__factory.ts +85 -1
  206. package/typechain-types/factories/PendleWbEthSY__factory.ts +1049 -0
  207. package/typechain-types/factories/PtAndLpToAsset__factory.ts +1 -1
  208. package/typechain-types/factories/ThenaLpHelper__factory.ts +13 -0
  209. package/typechain-types/factories/ThenaMath__factory.ts +36 -0
  210. package/typechain-types/factories/ThenaPreview__factory.ts +14 -1
  211. package/typechain-types/factories/TradingBotBase__factory.ts +31 -16
  212. package/typechain-types/hardhat.d.ts +4 -40
  213. package/typechain-types/index.ts +2 -10
  214. package/build/artifacts/contracts/core/TradingBot/BotDecisionHelper.sol/BotDecisionHelper.dbg.json +0 -4
  215. package/build/artifacts/contracts/core/TradingBot/BotDecisionHelper.sol/BotDecisionHelper.json +0 -1070
  216. package/contracts/core/TradingBot/BotDecisionHelper.sol +0 -306
@@ -104,12 +104,6 @@ const _abi = [
104
104
  name: "botParams",
105
105
  type: "tuple",
106
106
  },
107
- {
108
- indexed: false,
109
- internalType: "uint256",
110
- name: "maxYtIn",
111
- type: "uint256",
112
- },
113
107
  {
114
108
  indexed: false,
115
109
  internalType: "uint256",
@@ -129,45 +123,6 @@ const _abi = [
129
123
  {
130
124
  anonymous: false,
131
125
  inputs: [
132
- {
133
- components: [
134
- {
135
- internalType: "uint256",
136
- name: "guessMin",
137
- type: "uint256",
138
- },
139
- {
140
- internalType: "uint256",
141
- name: "guessMax",
142
- type: "uint256",
143
- },
144
- {
145
- internalType: "uint256",
146
- name: "guessOffchain",
147
- type: "uint256",
148
- },
149
- {
150
- internalType: "uint256",
151
- name: "maxIteration",
152
- type: "uint256",
153
- },
154
- {
155
- internalType: "uint256",
156
- name: "eps",
157
- type: "uint256",
158
- },
159
- ],
160
- indexed: false,
161
- internalType: "struct ApproxParams",
162
- name: "botParams",
163
- type: "tuple",
164
- },
165
- {
166
- indexed: false,
167
- internalType: "uint256",
168
- name: "maxSyIn",
169
- type: "uint256",
170
- },
171
126
  {
172
127
  indexed: false,
173
128
  internalType: "uint256",
@@ -277,12 +232,6 @@ const _abi = [
277
232
  name: "botParams",
278
233
  type: "tuple",
279
234
  },
280
- {
281
- indexed: false,
282
- internalType: "uint256",
283
- name: "maxLpRemoved",
284
- type: "uint256",
285
- },
286
235
  {
287
236
  indexed: false,
288
237
  internalType: "uint256",
@@ -381,111 +330,57 @@ const _abi = [
381
330
  {
382
331
  components: [
383
332
  {
384
- internalType: "uint256",
385
- name: "guessMin",
386
- type: "uint256",
387
- },
388
- {
389
- internalType: "uint256",
390
- name: "guessMax",
391
- type: "uint256",
392
- },
393
- {
394
- internalType: "uint256",
395
- name: "guessOffchain",
396
- type: "uint256",
397
- },
398
- {
399
- internalType: "uint256",
400
- name: "maxIteration",
401
- type: "uint256",
402
- },
403
- {
404
- internalType: "uint256",
405
- name: "eps",
406
- type: "uint256",
407
- },
408
- ],
409
- internalType: "struct ApproxParams",
410
- name: "botParams",
411
- type: "tuple",
412
- },
413
- {
414
- internalType: "uint256",
415
- name: "minLpOut",
416
- type: "uint256",
417
- },
418
- {
419
- internalType: "uint256",
420
- name: "maxSyIn",
421
- type: "uint256",
422
- },
423
- ],
424
- name: "addLiqFromSy",
425
- outputs: [
426
- {
427
- internalType: "uint256",
428
- name: "netPtFromSwap",
429
- type: "uint256",
430
- },
431
- {
432
- internalType: "uint256",
433
- name: "netLpOut",
434
- type: "uint256",
435
- },
436
- {
437
- internalType: "uint256",
438
- name: "netSyIn",
439
- type: "uint256",
440
- },
441
- ],
442
- stateMutability: "nonpayable",
443
- type: "function",
444
- },
445
- {
446
- inputs: [
447
- {
448
- components: [
449
- {
450
- internalType: "uint256",
451
- name: "guessMin",
452
- type: "uint256",
453
- },
454
- {
455
- internalType: "uint256",
456
- name: "guessMax",
457
- type: "uint256",
333
+ components: [
334
+ {
335
+ internalType: "uint256",
336
+ name: "guessMin",
337
+ type: "uint256",
338
+ },
339
+ {
340
+ internalType: "uint256",
341
+ name: "guessMax",
342
+ type: "uint256",
343
+ },
344
+ {
345
+ internalType: "uint256",
346
+ name: "guessOffchain",
347
+ type: "uint256",
348
+ },
349
+ {
350
+ internalType: "uint256",
351
+ name: "maxIteration",
352
+ type: "uint256",
353
+ },
354
+ {
355
+ internalType: "uint256",
356
+ name: "eps",
357
+ type: "uint256",
358
+ },
359
+ ],
360
+ internalType: "struct ApproxParams",
361
+ name: "botParams",
362
+ type: "tuple",
458
363
  },
459
364
  {
460
365
  internalType: "uint256",
461
- name: "guessOffchain",
366
+ name: "minLpOut",
462
367
  type: "uint256",
463
368
  },
464
369
  {
465
370
  internalType: "uint256",
466
- name: "maxIteration",
371
+ name: "targetIy",
467
372
  type: "uint256",
468
373
  },
469
374
  {
470
- internalType: "uint256",
471
- name: "eps",
472
- type: "uint256",
375
+ internalType: "int256",
376
+ name: "currentBin",
377
+ type: "int256",
473
378
  },
474
379
  ],
475
- internalType: "struct ApproxParams",
476
- name: "botParams",
380
+ internalType: "struct ILongYieldTradingBot.AddLiqFromYtInput",
381
+ name: "inputParams",
477
382
  type: "tuple",
478
383
  },
479
- {
480
- internalType: "uint256",
481
- name: "minLpOut",
482
- type: "uint256",
483
- },
484
- {
485
- internalType: "uint256",
486
- name: "maxYtIn",
487
- type: "uint256",
488
- },
489
384
  ],
490
385
  name: "addLiqFromYt",
491
386
  outputs: [
@@ -510,46 +405,9 @@ const _abi = [
510
405
  },
511
406
  {
512
407
  inputs: [
513
- {
514
- internalType: "address",
515
- name: "router",
516
- type: "address",
517
- },
518
- {
519
- components: [
520
- {
521
- internalType: "uint256",
522
- name: "guessMin",
523
- type: "uint256",
524
- },
525
- {
526
- internalType: "uint256",
527
- name: "guessMax",
528
- type: "uint256",
529
- },
530
- {
531
- internalType: "uint256",
532
- name: "guessOffchain",
533
- type: "uint256",
534
- },
535
- {
536
- internalType: "uint256",
537
- name: "maxIteration",
538
- type: "uint256",
539
- },
540
- {
541
- internalType: "uint256",
542
- name: "eps",
543
- type: "uint256",
544
- },
545
- ],
546
- internalType: "struct ApproxParams",
547
- name: "botParams",
548
- type: "tuple",
549
- },
550
408
  {
551
409
  internalType: "uint256",
552
- name: "maxSyIn",
410
+ name: "netSyIn",
553
411
  type: "uint256",
554
412
  },
555
413
  {
@@ -565,11 +423,6 @@ const _abi = [
565
423
  ],
566
424
  name: "addLiqKeepYt",
567
425
  outputs: [
568
- {
569
- internalType: "uint256",
570
- name: "netSyIn",
571
- type: "uint256",
572
- },
573
426
  {
574
427
  internalType: "uint256",
575
428
  name: "netLpOut",
@@ -611,11 +464,6 @@ const _abi = [
611
464
  },
612
465
  {
613
466
  inputs: [
614
- {
615
- internalType: "address",
616
- name: "router",
617
- type: "address",
618
- },
619
467
  {
620
468
  components: [
621
469
  {
@@ -737,11 +585,6 @@ const _abi = [
737
585
  },
738
586
  {
739
587
  inputs: [
740
- {
741
- internalType: "address",
742
- name: "router",
743
- type: "address",
744
- },
745
588
  {
746
589
  components: [
747
590
  {
@@ -833,6 +676,11 @@ const _abi = [
833
676
  name: "syBalance",
834
677
  type: "uint256",
835
678
  },
679
+ {
680
+ internalType: "uint256",
681
+ name: "buyBins",
682
+ type: "uint256",
683
+ },
836
684
  ],
837
685
  internalType: "struct BotState",
838
686
  name: "botState",
@@ -843,13 +691,7 @@ const _abi = [
843
691
  type: "function",
844
692
  },
845
693
  {
846
- inputs: [
847
- {
848
- internalType: "address",
849
- name: "router",
850
- type: "address",
851
- },
852
- ],
694
+ inputs: [],
853
695
  name: "readMarketExtState",
854
696
  outputs: [
855
697
  {
@@ -926,81 +768,241 @@ const _abi = [
926
768
  type: "function",
927
769
  },
928
770
  {
929
- inputs: [
771
+ inputs: [],
772
+ name: "readStrategyData",
773
+ outputs: [
930
774
  {
931
775
  components: [
932
776
  {
933
- internalType: "uint256",
934
- name: "guessMin",
935
- type: "uint256",
936
- },
937
- {
938
- internalType: "uint256",
939
- name: "guessMax",
940
- type: "uint256",
941
- },
942
- {
943
- internalType: "uint256",
944
- name: "guessOffchain",
945
- type: "uint256",
777
+ components: [
778
+ {
779
+ internalType: "uint256",
780
+ name: "lpBalance",
781
+ type: "uint256",
782
+ },
783
+ {
784
+ internalType: "uint256",
785
+ name: "ytBalance",
786
+ type: "uint256",
787
+ },
788
+ {
789
+ internalType: "uint256",
790
+ name: "syBalance",
791
+ type: "uint256",
792
+ },
793
+ {
794
+ internalType: "uint256",
795
+ name: "buyBins",
796
+ type: "uint256",
797
+ },
798
+ ],
799
+ internalType: "struct BotState",
800
+ name: "botState",
801
+ type: "tuple",
946
802
  },
947
803
  {
948
- internalType: "uint256",
949
- name: "maxIteration",
950
- type: "uint256",
804
+ components: [
805
+ {
806
+ components: [
807
+ {
808
+ internalType: "int256",
809
+ name: "totalPt",
810
+ type: "int256",
811
+ },
812
+ {
813
+ internalType: "int256",
814
+ name: "totalSy",
815
+ type: "int256",
816
+ },
817
+ {
818
+ internalType: "int256",
819
+ name: "totalLp",
820
+ type: "int256",
821
+ },
822
+ {
823
+ internalType: "address",
824
+ name: "treasury",
825
+ type: "address",
826
+ },
827
+ {
828
+ internalType: "int256",
829
+ name: "scalarRoot",
830
+ type: "int256",
831
+ },
832
+ {
833
+ internalType: "uint256",
834
+ name: "expiry",
835
+ type: "uint256",
836
+ },
837
+ {
838
+ internalType: "uint256",
839
+ name: "lnFeeRateRoot",
840
+ type: "uint256",
841
+ },
842
+ {
843
+ internalType: "uint256",
844
+ name: "reserveFeePercent",
845
+ type: "uint256",
846
+ },
847
+ {
848
+ internalType: "uint256",
849
+ name: "lastLnImpliedRate",
850
+ type: "uint256",
851
+ },
852
+ ],
853
+ internalType: "struct MarketState",
854
+ name: "state",
855
+ type: "tuple",
856
+ },
857
+ {
858
+ internalType: "PYIndex",
859
+ name: "index",
860
+ type: "uint256",
861
+ },
862
+ {
863
+ internalType: "uint256",
864
+ name: "blockTime",
865
+ type: "uint256",
866
+ },
867
+ ],
868
+ internalType: "struct MarketExtState",
869
+ name: "marketExt",
870
+ type: "tuple",
951
871
  },
952
872
  {
953
- internalType: "uint256",
954
- name: "eps",
955
- type: "uint256",
873
+ components: [
874
+ {
875
+ internalType: "uint256",
876
+ name: "buyYtIy",
877
+ type: "uint256",
878
+ },
879
+ {
880
+ internalType: "uint256",
881
+ name: "sellYtIy",
882
+ type: "uint256",
883
+ },
884
+ {
885
+ internalType: "uint256",
886
+ name: "targetSyRatio",
887
+ type: "uint256",
888
+ },
889
+ {
890
+ internalType: "uint256",
891
+ name: "maxSyRatio",
892
+ type: "uint256",
893
+ },
894
+ {
895
+ internalType: "uint256",
896
+ name: "minYtPtRatio",
897
+ type: "uint256",
898
+ },
899
+ {
900
+ internalType: "uint256",
901
+ name: "numOfBins",
902
+ type: "uint256",
903
+ },
904
+ ],
905
+ internalType: "struct LongTradingSpecs",
906
+ name: "specs",
907
+ type: "tuple",
956
908
  },
957
909
  ],
958
- internalType: "struct ApproxParams",
959
- name: "botParams",
910
+ internalType: "struct StrategyData",
911
+ name: "strategyData",
960
912
  type: "tuple",
961
913
  },
914
+ ],
915
+ stateMutability: "nonpayable",
916
+ type: "function",
917
+ },
918
+ {
919
+ inputs: [
962
920
  {
963
921
  components: [
964
922
  {
965
- internalType: "uint256",
966
- name: "guessMin",
967
- type: "uint256",
923
+ components: [
924
+ {
925
+ internalType: "uint256",
926
+ name: "guessMin",
927
+ type: "uint256",
928
+ },
929
+ {
930
+ internalType: "uint256",
931
+ name: "guessMax",
932
+ type: "uint256",
933
+ },
934
+ {
935
+ internalType: "uint256",
936
+ name: "guessOffchain",
937
+ type: "uint256",
938
+ },
939
+ {
940
+ internalType: "uint256",
941
+ name: "maxIteration",
942
+ type: "uint256",
943
+ },
944
+ {
945
+ internalType: "uint256",
946
+ name: "eps",
947
+ type: "uint256",
948
+ },
949
+ ],
950
+ internalType: "struct ApproxParams",
951
+ name: "botParams",
952
+ type: "tuple",
968
953
  },
969
954
  {
970
- internalType: "uint256",
971
- name: "guessMax",
972
- type: "uint256",
955
+ components: [
956
+ {
957
+ internalType: "uint256",
958
+ name: "guessMin",
959
+ type: "uint256",
960
+ },
961
+ {
962
+ internalType: "uint256",
963
+ name: "guessMax",
964
+ type: "uint256",
965
+ },
966
+ {
967
+ internalType: "uint256",
968
+ name: "guessOffchain",
969
+ type: "uint256",
970
+ },
971
+ {
972
+ internalType: "uint256",
973
+ name: "maxIteration",
974
+ type: "uint256",
975
+ },
976
+ {
977
+ internalType: "uint256",
978
+ name: "eps",
979
+ type: "uint256",
980
+ },
981
+ ],
982
+ internalType: "struct ApproxParams",
983
+ name: "guessTotalPtToSwap",
984
+ type: "tuple",
973
985
  },
974
986
  {
975
987
  internalType: "uint256",
976
- name: "guessOffchain",
988
+ name: "minYtOut",
977
989
  type: "uint256",
978
990
  },
979
991
  {
980
992
  internalType: "uint256",
981
- name: "maxIteration",
993
+ name: "targetIy",
982
994
  type: "uint256",
983
995
  },
984
996
  {
985
- internalType: "uint256",
986
- name: "eps",
987
- type: "uint256",
997
+ internalType: "int256",
998
+ name: "currentBin",
999
+ type: "int256",
988
1000
  },
989
1001
  ],
990
- internalType: "struct ApproxParams",
991
- name: "guessTotalPtToSwap",
1002
+ internalType: "struct ILongYieldTradingBot.RemoveLiqToYtInput",
1003
+ name: "inputParams",
992
1004
  type: "tuple",
993
1005
  },
994
- {
995
- internalType: "uint256",
996
- name: "maxLpRemoved",
997
- type: "uint256",
998
- },
999
- {
1000
- internalType: "uint256",
1001
- name: "minYtOut",
1002
- type: "uint256",
1003
- },
1004
1006
  ],
1005
1007
  name: "removeLiqToYt",
1006
1008
  outputs: [
@@ -1014,11 +1016,6 @@ const _abi = [
1014
1016
  name: "netYtOut",
1015
1017
  type: "uint256",
1016
1018
  },
1017
- {
1018
- internalType: "uint256",
1019
- name: "totalPtToSwap",
1020
- type: "uint256",
1021
- },
1022
1019
  ],
1023
1020
  stateMutability: "nonpayable",
1024
1021
  type: "function",
@@ -1029,32 +1026,32 @@ const _abi = [
1029
1026
  components: [
1030
1027
  {
1031
1028
  internalType: "uint256",
1032
- name: "lowerIyLimit",
1029
+ name: "buyYtIy",
1033
1030
  type: "uint256",
1034
1031
  },
1035
1032
  {
1036
1033
  internalType: "uint256",
1037
- name: "upperIyLimit",
1034
+ name: "sellYtIy",
1038
1035
  type: "uint256",
1039
1036
  },
1040
1037
  {
1041
1038
  internalType: "uint256",
1042
- name: "floatingSyRatioLimit",
1039
+ name: "targetSyRatio",
1043
1040
  type: "uint256",
1044
1041
  },
1045
1042
  {
1046
1043
  internalType: "uint256",
1047
- name: "floatingSyRatioTarget",
1044
+ name: "maxSyRatio",
1048
1045
  type: "uint256",
1049
1046
  },
1050
1047
  {
1051
1048
  internalType: "uint256",
1052
- name: "ytPtRatioLimit",
1049
+ name: "minYtPtRatio",
1053
1050
  type: "uint256",
1054
1051
  },
1055
1052
  {
1056
1053
  internalType: "uint256",
1057
- name: "ytPtRatioTarget",
1054
+ name: "numOfBins",
1058
1055
  type: "uint256",
1059
1056
  },
1060
1057
  ],
@@ -1068,72 +1065,6 @@ const _abi = [
1068
1065
  stateMutability: "nonpayable",
1069
1066
  type: "function",
1070
1067
  },
1071
- {
1072
- inputs: [
1073
- {
1074
- internalType: "address",
1075
- name: "router",
1076
- type: "address",
1077
- },
1078
- {
1079
- components: [
1080
- {
1081
- internalType: "uint256",
1082
- name: "guessMin",
1083
- type: "uint256",
1084
- },
1085
- {
1086
- internalType: "uint256",
1087
- name: "guessMax",
1088
- type: "uint256",
1089
- },
1090
- {
1091
- internalType: "uint256",
1092
- name: "guessOffchain",
1093
- type: "uint256",
1094
- },
1095
- {
1096
- internalType: "uint256",
1097
- name: "maxIteration",
1098
- type: "uint256",
1099
- },
1100
- {
1101
- internalType: "uint256",
1102
- name: "eps",
1103
- type: "uint256",
1104
- },
1105
- ],
1106
- internalType: "struct ApproxParams",
1107
- name: "botParams",
1108
- type: "tuple",
1109
- },
1110
- {
1111
- internalType: "uint256",
1112
- name: "minYtOut",
1113
- type: "uint256",
1114
- },
1115
- {
1116
- internalType: "uint256",
1117
- name: "maxSyIn",
1118
- type: "uint256",
1119
- },
1120
- ],
1121
- name: "swapSyToYt",
1122
- outputs: [
1123
- {
1124
- internalType: "uint256",
1125
- name: "exactYtOut",
1126
- type: "uint256",
1127
- },
1128
- {
1129
- internalType: "uint256",
1130
- name: "netSyIn",
1131
- type: "uint256",
1132
- },
1133
- ],
1134
- stateMutability: "nonpayable",
1135
- type: "function",
1136
- },
1137
1068
  {
1138
1069
  inputs: [
1139
1070
  {