@pendle/core-v2 0.16.2-testnet → 0.16.3-testnet

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 (319) hide show
  1. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
  2. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +15 -2
  3. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
  4. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
  5. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +15 -2
  6. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
  7. package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.json +13 -0
  8. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +1 -1
  9. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
  10. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +15 -2
  11. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +1 -1
  12. package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +15 -2
  13. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
  14. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +13 -0
  15. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
  16. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +15 -2
  17. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
  18. package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +15 -2
  19. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
  20. package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +15 -2
  21. package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
  22. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
  23. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +15 -2
  24. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
  25. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +15 -2
  26. package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
  27. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
  28. package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
  29. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
  30. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
  31. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
  32. package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
  33. package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
  34. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +4 -0
  35. package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +695 -0
  36. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +4 -0
  37. package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +531 -0
  38. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +4 -0
  39. package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +10 -0
  40. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
  41. package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
  42. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
  43. package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
  44. package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
  45. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
  46. package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
  47. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
  48. package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +15 -2
  49. package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
  50. package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
  51. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
  52. package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
  53. package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
  54. package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
  55. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
  56. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
  57. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
  58. package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
  59. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
  60. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +4 -0
  61. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +89 -0
  62. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
  63. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
  64. package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
  65. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
  66. package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +15 -2
  67. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
  68. package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +15 -2
  69. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
  70. package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
  71. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
  72. package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
  73. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
  74. package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
  75. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
  76. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
  77. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
  78. package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
  79. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
  80. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.json +13 -0
  81. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
  82. package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.json +2 -2
  83. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
  84. package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +208 -2
  85. package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
  86. package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
  87. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
  88. package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.json +30 -83
  89. package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +1 -1
  90. package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
  91. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
  92. package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.json +91 -17
  93. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
  94. package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.json +50 -0
  95. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
  96. package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.json +20 -0
  97. package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
  98. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
  99. package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.json +20 -0
  100. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
  101. package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.json +181 -17
  102. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +4 -0
  103. package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.json +173 -0
  104. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +4 -0
  105. package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.json +86 -0
  106. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +4 -0
  107. package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.json +34 -0
  108. package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
  109. package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
  110. package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
  111. package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
  112. package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
  113. package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
  114. package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
  115. package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
  116. package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
  117. package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +1 -1
  118. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
  119. package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.json +45 -0
  120. package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
  121. package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +1 -1
  122. package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
  123. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
  124. package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +15 -2
  125. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +4 -0
  126. package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +67 -0
  127. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.dbg.json +1 -1
  128. package/build/artifacts/contracts/offchain-helpers/ImplicitSwapfeeContract.sol/ImplicitSwapfeeContract.json +2 -2
  129. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
  130. package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -36
  131. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
  132. package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +237 -61
  133. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
  134. package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +120 -41
  135. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
  136. package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
  137. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
  138. package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +79 -24
  139. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
  140. package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
  141. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
  142. package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +49 -24
  143. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
  144. package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
  145. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
  146. package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +49 -24
  147. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
  148. package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +15 -2
  149. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
  150. package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.json +14 -1
  151. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
  152. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
  153. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
  154. package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
  155. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
  156. package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +191 -2
  157. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +4 -0
  158. package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.json +35 -0
  159. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
  160. package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.json +1 -1
  161. package/contracts/core/BulkSeller/BulkSeller.sol +250 -0
  162. package/contracts/core/BulkSeller/BulkSellerFactory.sol +89 -0
  163. package/contracts/core/BulkSeller/BulkSellerMathCore.sol +143 -0
  164. package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/PendleConvexLPSY.sol +2 -4
  165. package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +107 -0
  166. package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +19 -4
  167. package/contracts/core/libraries/Errors.sol +17 -0
  168. package/contracts/interfaces/Curve/ICrvPool.sol +9 -27
  169. package/contracts/interfaces/IPActionAddRemoveLiq.sol +3 -5
  170. package/contracts/interfaces/IPActionMintRedeem.sol +2 -0
  171. package/contracts/interfaces/IPBulkSeller.sol +28 -0
  172. package/contracts/interfaces/IPBulkSellerFactory.sol +12 -0
  173. package/contracts/interfaces/IPBulkSellerSYCallback.sol +10 -0
  174. package/contracts/interfaces/IStETH.sol +6 -0
  175. package/contracts/offchain-helpers/BulkSellerOffchain.sol +43 -0
  176. package/contracts/offchain-helpers/MarketMathStatic.sol +0 -144
  177. package/contracts/offchain-helpers/RouterStatic.sol +167 -51
  178. package/contracts/router/ActionAddRemoveLiq.sol +60 -44
  179. package/contracts/router/ActionMintRedeem.sol +19 -15
  180. package/contracts/router/ActionSwapPT.sol +3 -3
  181. package/contracts/router/ActionSwapYT.sol +11 -4
  182. package/contracts/router/base/ActionBaseMintRedeem.sol +73 -74
  183. package/contracts/router/kyberswap/AggregationRouterHelper.sol +17 -1
  184. package/contracts/router/kyberswap/IAggregatorRouterHelper.sol +10 -0
  185. package/contracts/router/kyberswap/KyberSwapHelper.sol +17 -8
  186. package/deployments/43113-core.json +3 -2
  187. package/deployments/43113-markets/benqi-market-QI-AVAX-FEB-2ND.json +9 -0
  188. package/deployments/80001-core.json +3 -2
  189. package/package.json +3 -2
  190. package/typechain-types/AccessControl.ts +360 -0
  191. package/typechain-types/ActionAddRemoveLiq.ts +83 -52
  192. package/typechain-types/ActionBaseMintRedeem.ts +27 -8
  193. package/typechain-types/ActionMintRedeem.ts +68 -17
  194. package/typechain-types/ActionSwapPT.ts +53 -12
  195. package/typechain-types/ActionSwapYT.ts +53 -12
  196. package/typechain-types/AggregationRouterHelper.ts +287 -3
  197. package/typechain-types/BaseSplitCodeFactoryContract.ts +9 -0
  198. package/typechain-types/BeaconProxy.ts +97 -0
  199. package/typechain-types/BoringOwnableUpgradeable.ts +9 -0
  200. package/typechain-types/BulkSeller.ts +776 -0
  201. package/typechain-types/BulkSellerFactory.ts +707 -0
  202. package/typechain-types/BulkSellerOffchain.ts +117 -0
  203. package/typechain-types/Curve3CrvPoolHelper.ts +236 -0
  204. package/typechain-types/CurveFraxUsdcPoolHelper.ts +158 -0
  205. package/typechain-types/CurveUsdd3CrvPoolHelper.ts +184 -0
  206. package/typechain-types/ERC165.ts +102 -0
  207. package/typechain-types/IAccessControl.ts +305 -0
  208. package/typechain-types/IAggregationRouterHelper.ts +108 -0
  209. package/typechain-types/ICrvPool.ts +66 -164
  210. package/typechain-types/IERC165.ts +102 -0
  211. package/typechain-types/IPActionAddRemoveLiq.ts +56 -44
  212. package/typechain-types/IPActionMintRedeem.ts +41 -9
  213. package/typechain-types/IPActionSwapPT.ts +26 -4
  214. package/typechain-types/IPActionSwapYT.ts +26 -4
  215. package/typechain-types/IPAllAction.ts +77 -55
  216. package/typechain-types/IPBulkSeller.ts +290 -0
  217. package/typechain-types/IPBulkSellerCallback.ts +115 -0
  218. package/typechain-types/IPBulkSellerFactory.ts +147 -0
  219. package/typechain-types/IStETH.ts +56 -0
  220. package/typechain-types/ITriCrvPool.ts +345 -0
  221. package/typechain-types/Initializable.ts +68 -0
  222. package/typechain-types/KyberSwapHelper.ts +8 -8
  223. package/typechain-types/MarketMathStatic.ts +0 -50
  224. package/typechain-types/PendleCurveFraxUsdcSY.ts +1228 -0
  225. package/typechain-types/PendleCurveUsdd3CrvSY.ts +1299 -0
  226. package/typechain-types/PendleFeeDistributor.ts +9 -0
  227. package/typechain-types/PendleFeeDistributorFactory.ts +9 -0
  228. package/typechain-types/PendleGaugeControllerBaseUpg.ts +9 -0
  229. package/typechain-types/PendleGaugeControllerMainchainUpg.ts +9 -0
  230. package/typechain-types/PendleGaugeControllerSidechainUpg.ts +9 -0
  231. package/typechain-types/PendleMarketFactory.ts +9 -0
  232. package/typechain-types/PendleMsgReceiveEndpointUpg.ts +9 -0
  233. package/typechain-types/PendleMsgSendEndpointUpg.ts +9 -0
  234. package/typechain-types/PendleMsgSenderAppUpg.ts +9 -0
  235. package/typechain-types/PendlePrincipalToken.ts +9 -0
  236. package/typechain-types/PendleRouter.ts +9 -0
  237. package/typechain-types/PendleVotingControllerUpg.ts +9 -0
  238. package/typechain-types/PendleYieldContractFactory.ts +9 -0
  239. package/typechain-types/ReentrancyGuardUpgradeable.ts +68 -0
  240. package/typechain-types/RouterStatic.ts +203 -22
  241. package/typechain-types/VotingEscrowPendleMainchain.ts +9 -0
  242. package/typechain-types/VotingEscrowPendleSidechain.ts +9 -0
  243. package/typechain-types/factories/AccessControl__factory.ts +227 -0
  244. package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +131 -59
  245. package/typechain-types/factories/ActionBaseMintRedeem__factory.ts +14 -1
  246. package/typechain-types/factories/ActionCallback__factory.ts +1 -1
  247. package/typechain-types/factories/ActionMintRedeem__factory.ts +90 -42
  248. package/typechain-types/factories/ActionMisc__factory.ts +1 -1
  249. package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
  250. package/typechain-types/factories/ActionSwapPT__factory.ts +60 -42
  251. package/typechain-types/factories/ActionSwapYT__factory.ts +60 -42
  252. package/typechain-types/factories/AggregationRouterHelper__factory.ts +190 -1
  253. package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +14 -1
  254. package/typechain-types/factories/BaseSplitCodeFactory__factory.ts +1 -1
  255. package/typechain-types/factories/BeaconProxy__factory.ts +141 -0
  256. package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
  257. package/typechain-types/factories/BoringOwnableUpgradeable__factory.ts +13 -0
  258. package/typechain-types/factories/BulkSellerFactory__factory.ts +584 -0
  259. package/typechain-types/factories/BulkSellerOffchain__factory.ts +120 -0
  260. package/typechain-types/factories/BulkSeller__factory.ts +745 -0
  261. package/typechain-types/factories/Curve3CrvPoolHelper__factory.ts +220 -0
  262. package/typechain-types/factories/CurveFraxUsdcPoolHelper__factory.ts +146 -0
  263. package/typechain-types/factories/CurveUsdd3CrvPoolHelper__factory.ts +172 -0
  264. package/typechain-types/factories/ERC165__factory.ts +39 -0
  265. package/typechain-types/factories/ERC20__factory.ts +1 -1
  266. package/typechain-types/factories/Errors__factory.ts +207 -1
  267. package/typechain-types/factories/IAccessControl__factory.ts +198 -0
  268. package/typechain-types/factories/IAggregationRouterHelper__factory.ts +54 -0
  269. package/typechain-types/factories/ICrvPool__factory.ts +30 -83
  270. package/typechain-types/factories/IERC165__factory.ts +42 -0
  271. package/typechain-types/factories/IPActionAddRemoveLiq__factory.ts +91 -17
  272. package/typechain-types/factories/IPActionMintRedeem__factory.ts +50 -0
  273. package/typechain-types/factories/IPActionSwapPT__factory.ts +20 -0
  274. package/typechain-types/factories/IPActionSwapYT__factory.ts +20 -0
  275. package/typechain-types/factories/IPAllAction__factory.ts +181 -17
  276. package/typechain-types/factories/IPBulkSellerCallback__factory.ts +53 -0
  277. package/typechain-types/factories/IPBulkSellerFactory__factory.ts +101 -0
  278. package/typechain-types/factories/IPBulkSeller__factory.ts +185 -0
  279. package/typechain-types/factories/IStETH__factory.ts +45 -0
  280. package/typechain-types/factories/ITriCrvPool__factory.ts +225 -0
  281. package/typechain-types/factories/ImplicitSwapfeeContract__factory.ts +1 -1
  282. package/typechain-types/factories/Initializable__factory.ts +36 -0
  283. package/typechain-types/factories/KyberSwapHelper__factory.ts +1 -1
  284. package/typechain-types/factories/MarketMathStatic__factory.ts +1 -35
  285. package/typechain-types/factories/OracleLib__factory.ts +1 -1
  286. package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1068 -0
  287. package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1168 -0
  288. package/typechain-types/factories/PendleERC20Permit__factory.ts +1 -1
  289. package/typechain-types/factories/PendleERC20__factory.ts +1 -1
  290. package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +14 -1
  291. package/typechain-types/factories/PendleFeeDistributor__factory.ts +14 -1
  292. package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +13 -0
  293. package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +14 -1
  294. package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +14 -1
  295. package/typechain-types/factories/PendleMarketFactory__factory.ts +14 -1
  296. package/typechain-types/factories/PendleMarket__factory.ts +1 -1
  297. package/typechain-types/factories/PendleMsgReceiveEndpointUpg__factory.ts +14 -1
  298. package/typechain-types/factories/PendleMsgSendEndpointUpg__factory.ts +14 -1
  299. package/typechain-types/factories/PendleMsgSenderAppUpg__factory.ts +13 -0
  300. package/typechain-types/factories/PendlePrincipalToken__factory.ts +14 -1
  301. package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
  302. package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
  303. package/typechain-types/factories/PendleRouter__factory.ts +14 -1
  304. package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +14 -1
  305. package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
  306. package/typechain-types/factories/PendleYieldContractFactory__factory.ts +14 -1
  307. package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
  308. package/typechain-types/factories/ReentrancyGuardUpgradeable__factory.ts +43 -0
  309. package/typechain-types/factories/RouterStatic__factory.ts +182 -2
  310. package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +14 -1
  311. package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +14 -1
  312. package/typechain-types/hardhat.d.ts +139 -13
  313. package/typechain-types/index.ts +30 -4
  314. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.dbg.json +0 -4
  315. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol/Pendle3CrvAndTokenSY.json +0 -1018
  316. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.dbg.json +0 -4
  317. package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol/Pendle3CrvHelper.json +0 -76
  318. package/contracts/core/StandardizedYield/implementations/Convex/ConvexCurveLP/Pendle3CrvAndTokenSY.sol +0 -167
  319. package/contracts/core/StandardizedYield/implementations/Convex/Pendle3CrvHelper.sol +0 -83
@@ -6,6 +6,12 @@ interface ICrvPool {
6
6
 
7
7
  function get_virtual_price() external view returns (uint256);
8
8
 
9
+ function lp_token() external view returns (address);
10
+
11
+ function fee() external view returns (uint256);
12
+
13
+ function admin_fee() external view returns (uint256);
14
+
9
15
  function get_dy(
10
16
  int128 i,
11
17
  int128 j,
@@ -20,52 +26,28 @@ interface ICrvPool {
20
26
  address _receiver
21
27
  ) external returns (uint256);
22
28
 
23
- function add_liquidity(
24
- uint256[] memory _deposit_amount,
25
- uint256 _min_amount,
26
- address _receiver
27
- ) external returns (uint256);
28
-
29
29
  function add_liquidity(
30
30
  uint256[2] memory _deposit_amount,
31
31
  uint256 _min_amount
32
32
  ) external;
33
33
 
34
- function add_liquidity(
35
- uint256[3] memory _deposit_amount,
36
- uint256 _min_amount
37
- ) external;
38
-
39
- function remove_liquidity(
40
- uint256 _burn_amount,
41
- uint256[] memory _min_amounts,
42
- address _receiver
43
- ) external returns (uint256[] memory);
44
-
45
34
  function remove_liquidity_one_coin(
46
35
  uint256 _burn_amount,
47
36
  int128 i,
48
37
  uint256 _min_amount
49
38
  ) external;
50
39
 
51
- function calc_token_amount(uint256[] memory _amounts, bool _is_deposit)
52
- external
53
- view
54
- returns (uint256);
55
-
56
40
  function calc_token_amount(uint256[2] memory _amounts, bool _is_deposit)
57
41
  external
58
42
  view
59
43
  returns (uint256);
60
44
 
61
- function calc_token_amount(uint256[3] memory _amounts, bool _is_deposit)
45
+ function calc_withdraw_one_coin(uint256 _burn_amount, int128 i)
62
46
  external
63
47
  view
64
48
  returns (uint256);
65
49
 
50
+ function balances(uint256 i) external view returns (uint256);
66
51
 
67
- function calc_withdraw_one_coin(uint256 _burn_amount, int128 i)
68
- external
69
- view
70
- returns (uint256);
52
+ function A_precise() external view returns (uint256);
71
53
  }
@@ -19,7 +19,7 @@ interface IPActionAddRemoveLiq {
19
19
  address indexed market,
20
20
  address indexed receiver,
21
21
  address tokenIn,
22
- uint256 tokenUsed,
22
+ uint256 netTokenUsed,
23
23
  uint256 netPtUsed,
24
24
  uint256 netLpOut
25
25
  );
@@ -110,8 +110,7 @@ interface IPActionAddRemoveLiq {
110
110
  function addLiquidityDualTokenAndPt(
111
111
  address receiver,
112
112
  address market,
113
- address tokenIn,
114
- uint256 netTokenDesired,
113
+ TokenInput calldata input,
115
114
  uint256 netPtDesired,
116
115
  uint256 minLpOut
117
116
  )
@@ -159,8 +158,7 @@ interface IPActionAddRemoveLiq {
159
158
  address receiver,
160
159
  address market,
161
160
  uint256 netLpToRemove,
162
- address tokenOut,
163
- uint256 minTokenOut,
161
+ TokenOutput calldata output,
164
162
  uint256 minPtOut
165
163
  ) external returns (uint256 netTokenOut, uint256 netPtOut);
166
164
 
@@ -138,6 +138,7 @@ interface IPActionMintRedeem {
138
138
  // key-value pair
139
139
  address[] syAddrs;
140
140
  address[] tokenRedeemSys;
141
+ bool[] useBulks;
141
142
  //
142
143
  }
143
144
 
@@ -146,6 +147,7 @@ interface IPActionMintRedeem {
146
147
  address[] tokens;
147
148
  bytes[] kybercalls;
148
149
  //
150
+ address kyberRouter;
149
151
  address outputToken;
150
152
  uint256 minTokenOut;
151
153
  }
@@ -0,0 +1,28 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.17;
3
+
4
+ import "../core/BulkSeller/BulkSellerMathCore.sol";
5
+
6
+ interface IPBulkSeller {
7
+ function swapExactSyForToken(
8
+ address receiver,
9
+ uint256 exactSyIn,
10
+ uint256 minTokenOut
11
+ ) external returns (uint256 netTokenOut);
12
+
13
+ function swapExactTokenForSy(
14
+ address receiver,
15
+ uint256 netTokenIn,
16
+ uint256 minSyOut
17
+ ) external returns (uint256 netSyOut);
18
+
19
+ function calcSwapExactTokenForSy(uint256 netTokenIn) external view returns (uint256 netSyOut);
20
+
21
+ function calcSwapExactSyForToken(uint256 netSyIn) external view returns (uint256 netTokenOut);
22
+
23
+ function SY() external view returns (address);
24
+
25
+ function token() external view returns (address);
26
+
27
+ function readState() external view returns (BulkSellerState memory);
28
+ }
@@ -0,0 +1,12 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.17;
3
+
4
+ interface IPBulkSellerFactory {
5
+ event UpgradedBeacon(address indexed implementation);
6
+
7
+ function get(address token, address SY) external view returns (address);
8
+
9
+ function isMaintainer(address addr) external view returns (bool);
10
+
11
+ function isAdmin(address addr) external view returns (bool);
12
+ }
@@ -0,0 +1,10 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.17;
3
+
4
+ interface IPBulkSellerCallback {
5
+ function swapCallback(
6
+ int256 ptToAccount,
7
+ int256 syToAccount,
8
+ bytes calldata data
9
+ ) external;
10
+ }
@@ -11,4 +11,10 @@ interface IStETH {
11
11
  function burnShares(address _account, uint256 _sharesAmount)
12
12
  external
13
13
  returns (uint256 newTotalShares);
14
+
15
+ function sharesOf(address account) external view returns (uint256);
16
+
17
+ function getTotalShares() external view returns (uint256);
18
+
19
+ function getTotalPooledEther() external view returns (uint256);
14
20
  }
@@ -0,0 +1,43 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity 0.8.17;
3
+
4
+ import "../core/BulkSeller/BulkSellerMathCore.sol";
5
+ import "../core/BulkSeller/BulkSeller.sol";
6
+
7
+ // upgradable bla bla
8
+ contract BulkSellerOffchain {
9
+ using BulkSellerMathCore for BulkSellerState;
10
+ using Math for uint256;
11
+
12
+ // rmb to add fee here
13
+ function calcCurrentRates(IPBulkSeller bulk)
14
+ external
15
+ view
16
+ returns (uint256 rateTokenToSy, uint256 rateSyToToken)
17
+ {
18
+ BulkSellerState memory state = bulk.readState();
19
+ address SY = bulk.SY();
20
+ address token = bulk.token();
21
+
22
+ {
23
+ uint256 hypoTotalToken = state.totalToken +
24
+ state.calcSwapExactSyForToken(state.totalSy);
25
+ uint256 netSyFromToken = IStandardizedYield(SY).previewDeposit(token, hypoTotalToken);
26
+
27
+ rateTokenToSy = netSyFromToken.divDown(hypoTotalToken);
28
+ }
29
+
30
+ {
31
+ uint256 hypoTotalSy = state.totalSy + state.calcSwapExactTokenForSy(state.totalToken);
32
+ uint256 netTokenFromSy = IStandardizedYield(SY).previewRedeem(token, hypoTotalSy);
33
+
34
+ rateSyToToken = netTokenFromSy.divDown(hypoTotalSy);
35
+ }
36
+ }
37
+
38
+ // TODO: pause contract when rate is bad compared to market
39
+ // TODO: Sound alarm if updates fail
40
+ // TODO: audit even the typescript code
41
+ // TODO: add a max with currentRate to guarantee no loss?
42
+ // TODO: pause immediately if lost enough money
43
+ }
@@ -140,31 +140,6 @@ library MarketMathStatic {
140
140
  priceImpact = calcPriceImpact(market, netPtFromSwap.Int());
141
141
  }
142
142
 
143
- /// @dev netPtFromSwap is the parameter to approx
144
- function addLiquiditySingleBaseTokenStatic(
145
- address market,
146
- address baseToken,
147
- uint256 netBaseTokenIn,
148
- ApproxParams memory approxParams
149
- )
150
- external
151
- returns (
152
- uint256 netLpOut,
153
- uint256 netPtFromSwap,
154
- uint256 netSyFee,
155
- uint256 priceImpact
156
- )
157
- {
158
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
159
-
160
- return
161
- addLiquiditySingleSyStatic(
162
- market,
163
- SY.previewDeposit(baseToken, netBaseTokenIn),
164
- approxParams
165
- );
166
- }
167
-
168
143
  function removeLiquidityDualSyAndPtStatic(address market, uint256 netLpToRemove)
169
144
  external
170
145
  view
@@ -174,20 +149,6 @@ library MarketMathStatic {
174
149
  (netSyOut, netPtOut) = state.removeLiquidity(netLpToRemove);
175
150
  }
176
151
 
177
- function removeLiquidityDualTokenAndPtStatic(
178
- address market,
179
- uint256 metLpToRemove,
180
- address tokenOut
181
- ) external view returns (uint256 netTokenOut, uint256 netPtOut) {
182
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
183
-
184
- uint256 netSyOut;
185
- MarketState memory state = IPMarket(market).readState();
186
- (netSyOut, netPtOut) = state.removeLiquidity(metLpToRemove);
187
-
188
- netTokenOut = SY.previewRedeem(tokenOut, netSyOut);
189
- }
190
-
191
152
  /// @dev netPtFromSwap is the parameter to approx
192
153
  function removeLiquiditySinglePtStatic(
193
154
  address market,
@@ -243,25 +204,6 @@ library MarketMathStatic {
243
204
  }
244
205
  }
245
206
 
246
- function removeLiquiditySingleBaseTokenStatic(
247
- address market,
248
- uint256 netLpToRemove,
249
- address baseToken
250
- )
251
- external
252
- returns (
253
- uint256 netBaseTokenOut,
254
- uint256 netSyFee,
255
- uint256 priceImpact
256
- )
257
- {
258
- uint256 netSyOut;
259
- (netSyOut, netSyFee, priceImpact) = removeLiquiditySingleSyStatic(market, netLpToRemove);
260
-
261
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
262
- netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
263
- }
264
-
265
207
  function swapExactPtForSyStatic(address market, uint256 exactPtIn)
266
208
  public
267
209
  returns (
@@ -335,49 +277,6 @@ library MarketMathStatic {
335
277
  priceImpact = calcPriceImpact(market, netPtIn.neg());
336
278
  }
337
279
 
338
- /// @dev netPtOut is the parameter to approx
339
- function swapExactBaseTokenForPtStatic(
340
- address market,
341
- address baseToken,
342
- uint256 amountBaseToken,
343
- ApproxParams memory approxParams
344
- )
345
- external
346
- returns (
347
- uint256 netPtOut,
348
- uint256 netSyFee,
349
- uint256 priceImpact
350
- )
351
- {
352
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
353
-
354
- return
355
- swapExactSyForPtStatic(
356
- market,
357
- SY.previewDeposit(baseToken, amountBaseToken),
358
- approxParams
359
- );
360
- }
361
-
362
- function swapExactPtForBaseTokenStatic(
363
- address market,
364
- uint256 exactPtIn,
365
- address baseToken
366
- )
367
- external
368
- returns (
369
- uint256 netBaseTokenOut,
370
- uint256 netSyFee,
371
- uint256 priceImpact
372
- )
373
- {
374
- uint256 netSyOut;
375
- (netSyOut, netSyFee, priceImpact) = swapExactPtForSyStatic(market, exactPtIn);
376
-
377
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
378
- netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
379
- }
380
-
381
280
  function swapSyForExactYtStatic(address market, uint256 exactYtOut)
382
281
  external
383
282
  returns (
@@ -477,49 +376,6 @@ library MarketMathStatic {
477
376
  priceImpact = calcPriceImpact(market, netYtIn.Int());
478
377
  }
479
378
 
480
- function swapExactYtForBaseTokenStatic(
481
- address market,
482
- uint256 exactYtIn,
483
- address baseToken
484
- )
485
- external
486
- returns (
487
- uint256 netBaseTokenOut,
488
- uint256 netSyFee,
489
- uint256 priceImpact
490
- )
491
- {
492
- uint256 netSyOut;
493
- (netSyOut, netSyFee, priceImpact) = swapExactYtForSyStatic(market, exactYtIn);
494
-
495
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
496
- netBaseTokenOut = SY.previewRedeem(baseToken, netSyOut);
497
- }
498
-
499
- /// @dev netYtOut is the parameter to approx
500
- function swapExactBaseTokenForYtStatic(
501
- address market,
502
- address baseToken,
503
- uint256 amountBaseToken,
504
- ApproxParams memory approxParams
505
- )
506
- external
507
- returns (
508
- uint256 netYtOut,
509
- uint256 netSyFee,
510
- uint256 priceImpact
511
- )
512
- {
513
- (IStandardizedYield SY, , ) = IPMarket(market).readTokens();
514
-
515
- return
516
- swapExactSyForYtStatic(
517
- market,
518
- SY.previewDeposit(baseToken, amountBaseToken),
519
- approxParams
520
- );
521
- }
522
-
523
379
  // totalPtToSwap is the param to approx
524
380
  function swapExactPtForYt(
525
381
  address market,