@pendle/core-v2 2.1.2-mainnet → 2.2.0-mainnet
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol/PendleAuraWethAnkrethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol/PendleAuraWethAnkrethSY.json +1192 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.json +2 -2
- 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/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +2 -2
- 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/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/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +2 -2
- 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/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +2 -2
- 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/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol/GLPPreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/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/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.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 +2 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.json +2 -2
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IBooster.sol/IBooster.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICrvDepositor.sol/ICrvDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/ICvxCrv.sol/ICvxCrv.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGMXVault.sol/IGMXVault.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IGlpManager.sol/IGlpManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IRewardRouterV2.sol/IRewardRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/GMX/IVaultPriceFeed.sol/IVaultPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiComptroller.sol/IBenQiComptroller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBenQiInterestRateModel.sol/IBenQiInterestRateModel.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondCut.sol/IDiamondCut.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IDiamondLoupe.sol/IDiamondLoupe.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IERC4626.sol/IERC4626.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksFeeSharing.sol/ILooksFeeSharing.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILooksStaking.sol/ILooksStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.json +307 -0
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.json +269 -0
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.json +1260 -0
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IAToken.sol/IAToken.json → IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.json} +114 -93
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.json +184 -0
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.json +40 -0
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerSYCallback.sol/IPBulkSellerCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.json +55 -0
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +2322 -0
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiAvax.sol/IQiAvax.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiErc20.sol/IQiErc20.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IQiToken.sol/IQiToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLPStaking.sol/IStargateLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargatePool.sol/IStargatePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- 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/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +30 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +307 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +333 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +1397 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +310 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +228 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +93 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.json +10 -0
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.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/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/1inch/I1inchAggregationRouterV5.sol/I1inchAggregationRouterV5.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapAggregator.sol/PendleSwapAggregator.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol/KyberAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IHashflow.sol/IHashflow.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +4 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +3 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +7 -10
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +8 -10
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +16 -8
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +3 -5
- package/contracts/LiquidityMining/README.md +49 -46
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +9 -14
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +4 -10
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +23 -36
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +18 -24
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +3 -4
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +20 -26
- package/contracts/core/BulkSeller/BulkSeller.sol +1 -5
- package/contracts/core/BulkSeller/BulkSellerFactory.sol +4 -5
- package/contracts/core/BulkSeller/BulkSellerMathCore.sol +20 -25
- package/contracts/core/Market/MarketMathCore.sol +23 -69
- package/contracts/core/Market/OracleLib.sol +4 -4
- package/contracts/core/Market/PendleGauge.sol +7 -20
- package/contracts/core/Market/PendleMarket.sol +5 -15
- package/contracts/core/Market/PendleMarketFactory.sol +3 -9
- package/contracts/core/RewardManager/RewardManager.sol +4 -6
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +4 -4
- package/contracts/core/StandardizedYield/PYIndex.sol +7 -36
- package/contracts/core/StandardizedYield/SYBase.sol +20 -26
- package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +7 -19
- package/contracts/core/StandardizedYield/SYUtils.sol +4 -5
- package/contracts/core/StandardizedYield/StEthHelper.sol +12 -16
- package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +14 -24
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSY.sol +126 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +12 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +12 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +1 -5
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +28 -44
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +28 -47
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +6 -10
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +6 -10
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol +13 -22
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +20 -27
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +20 -27
- package/contracts/core/StandardizedYield/implementations/Convex/README.md +4 -4
- package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +32 -40
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +10 -12
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +14 -18
- package/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol +32 -48
- package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +6 -7
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +14 -24
- package/contracts/core/StandardizedYield/implementations/GLP/README.md +15 -13
- package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +12 -38
- package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +13 -23
- package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +13 -23
- package/contracts/core/YieldContracts/PendleYieldToken.sol +28 -44
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +4 -4
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +1 -1
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +24 -38
- package/contracts/core/erc20/PendleERC20.sol +14 -44
- package/contracts/core/libraries/ArrayLib.sol +20 -9
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +5 -7
- package/contracts/core/libraries/BoringOwnableUpgradeable.sol +1 -5
- package/contracts/core/libraries/Errors.sol +0 -2
- package/contracts/core/libraries/StringLib.sol +14 -20
- package/contracts/core/libraries/TokenHelper.sol +6 -31
- package/contracts/core/libraries/math/LogExpMath.sol +2 -2
- package/contracts/core/libraries/math/Math.sol +3 -15
- package/contracts/interfaces/Balancer/IComposableStable.sol +4 -14
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +4 -13
- package/contracts/interfaces/Balancer/IVault.sol +4 -6
- package/contracts/interfaces/ConvexCurve/IBooster.sol +4 -16
- package/contracts/interfaces/ConvexCurve/ICrvDepositor.sol +1 -5
- package/contracts/interfaces/ConvexCurve/IRewards.sol +1 -4
- package/contracts/interfaces/Curve/ICrvPool.sol +12 -11
- package/contracts/interfaces/Curve/ITriCrvPool.sol +4 -4
- package/contracts/interfaces/GMX/IGMXVault.sol +4 -4
- package/contracts/interfaces/GMX/IRewardRouterV2.sol +4 -4
- package/contracts/interfaces/IApeStaking.sol +3 -4
- package/contracts/interfaces/IDiamondLoupe.sol +3 -1
- package/contracts/interfaces/IERC4626.sol +1 -5
- package/contracts/interfaces/IPActionAddRemoveLiq.sol +2 -15
- package/contracts/interfaces/IPActionInfoStatic.sol +43 -0
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +34 -0
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +335 -0
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +55 -0
- package/contracts/interfaces/IPActionStorageStatic.sol +24 -0
- package/contracts/interfaces/IPActionVePendleStatic.sol +9 -0
- package/contracts/interfaces/IPBulkSellerSYCallback.sol +1 -5
- package/contracts/interfaces/IPFeeDistributor.sol +4 -3
- package/contracts/interfaces/IPGaugeController.sol +3 -9
- package/contracts/interfaces/IPInterestManagerYT.sol +3 -4
- package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -6
- package/contracts/interfaces/IPMarket.sol +5 -16
- package/contracts/interfaces/IPMarketFactory.sol +3 -8
- package/contracts/interfaces/IPMarketSwapCallback.sol +1 -5
- package/contracts/interfaces/IPMiniDiamond.sol +12 -0
- package/contracts/interfaces/IPRouterStatic.sol +19 -0
- package/contracts/interfaces/IPVotingController.sol +5 -6
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +8 -7
- package/contracts/interfaces/IPYieldToken.sol +4 -3
- package/contracts/interfaces/IPYieldTokenV2.sol +4 -3
- package/contracts/interfaces/IRewardManager.sol +4 -4
- package/contracts/interfaces/IStETH.sol +4 -3
- package/contracts/interfaces/IStandardizedYield.sol +10 -14
- package/contracts/interfaces/IStargateRouter.sol +1 -5
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +4 -1
- package/contracts/offchain-helpers/BulkSellerOffchain.sol +7 -11
- package/contracts/offchain-helpers/Multicall2.sol +14 -24
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +19 -0
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +122 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +165 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +780 -0
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +158 -0
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +76 -0
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +55 -0
- package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +21 -0
- package/contracts/router/ActionAddRemoveLiq.sol +2 -17
- package/contracts/router/ActionSwapYT.sol +9 -3
- package/contracts/router/base/ActionBaseCallback.sol +2 -2
- package/contracts/router/base/ActionBaseMintRedeem.sol +4 -5
- package/contracts/router/base/CallbackHelper.sol +16 -27
- package/contracts/router/base/MarketApproxLib.sol +18 -82
- package/contracts/router/swap-aggregator/1inch/I1inchAggregationRouterV5.sol +4 -10
- package/contracts/router/swap-aggregator/1inch/OneInchAggregationRouterHelper.sol +4 -5
- package/contracts/router/swap-aggregator/IPSwapAggregator.sol +1 -5
- package/contracts/router/swap-aggregator/PendleSwapAggregator.sol +1 -5
- package/contracts/router/swap-aggregator/kyberswap/KyberAggregationRouterHelper.sol +4 -5
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutor.sol +9 -9
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IMetaAggregationRouterV2.sol +3 -4
- package/deployments/1-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/package.json +5 -4
- package/typechain-types/ActionMarketCoreStatic.ts +0 -4
- package/typechain-types/ActionStorageStatic.ts +5 -3
- package/typechain-types/IPActionMarketCoreStatic.ts +0 -4
- package/typechain-types/IPActionStorageStatic.ts +5 -3
- package/typechain-types/IPRouterStatic.ts +5 -7
- package/typechain-types/{SYBaseAutoCompound.ts → PendleAuraWethAnkrethSY.ts} +335 -15
- 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 +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -11
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +3 -3
- 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/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
- package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
- 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 +1 -1
- package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +0 -10
- package/typechain-types/factories/IPActionStorageStatic__factory.ts +2 -2
- package/typechain-types/factories/IPRouterStatic__factory.ts +2 -12
- package/typechain-types/factories/MetaStableMath__factory.ts +1 -1
- package/typechain-types/factories/MetaStablePreview__factory.ts +1 -1
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSY__factory.ts +1265 -0
- package/typechain-types/factories/PendleAuraWethRethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSY__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/PendleERC20Permit__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__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/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/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__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/PendleSwapAggregator__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +36 -63
- package/typechain-types/index.ts +10 -10
- package/build/artifacts/contracts/interfaces/IAToken.sol/IAToken.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAavePool.sol/IAavePool.json +0 -87
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IAaveRewardsController.sol/IAaveRewardsController.json +0 -59
- package/build/artifacts/contracts/interfaces/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.json +0 -34
- package/build/artifacts/contracts/interfaces/IEulerEToken.sol/IEulerEToken.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IEulerEToken.sol/IEulerEToken.json +0 -162
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IEulerMarkets.sol/IEulerMarkets.json +0 -87
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPGovernanceManager.sol/IPGovernanceManager.json +0 -24
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPPermissionsV2Upg.sol/IPermissionsV2Upg.json +0 -24
- package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IREDACTEDStaking.sol/IREDACTEDStaking.json +0 -92
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/ISAvax.sol/ISAvax.json +0 -199
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/ISJoe.sol/ISJoe.json +0 -168
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IWAvax.sol/IWAvax.json +0 -252
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.json +0 -132
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IYearnVault.sol/IYearnVault.json +0 -148
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +0 -259
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +0 -2825
- package/contracts/interfaces/IAToken.sol +0 -44
- package/contracts/interfaces/IAavePool.sol +0 -41
- package/contracts/interfaces/IAaveRewardsController.sol +0 -32
- package/contracts/interfaces/IBoringOwnableUpgradeable.sol +0 -10
- package/contracts/interfaces/IEulerEToken.sol +0 -60
- package/contracts/interfaces/IEulerMarkets.sol +0 -46
- package/contracts/interfaces/IPGovernanceManager.sol +0 -28
- package/contracts/interfaces/IPPermissionsV2Upg.sol +0 -28
- package/contracts/interfaces/IREDACTEDStaking.sol +0 -35
- package/contracts/interfaces/ISAvax.sol +0 -61
- package/contracts/interfaces/ISJoe.sol +0 -57
- package/contracts/interfaces/IWAvax.sol +0 -34
- package/contracts/interfaces/IWXBTRFLY.sol +0 -39
- package/contracts/interfaces/IYearnVault.sol +0 -46
- package/contracts/offchain-helpers/MarketMathStatic.sol +0 -572
- package/contracts/offchain-helpers/RouterStatic.sol +0 -929
- package/typechain-types/AccessControl.ts +0 -360
- package/typechain-types/ActionBaseMintRedeem.ts +0 -87
- package/typechain-types/ActionCallback.ts +0 -134
- package/typechain-types/ActionCore.ts +0 -1758
- package/typechain-types/ActionSCYAndPTBase.ts +0 -87
- package/typechain-types/ActionSCYAndPYBase.ts +0 -87
- package/typechain-types/ActionSCYAndYTBase.ts +0 -87
- package/typechain-types/ActionSwapPTYT.ts +0 -237
- package/typechain-types/ActionYT.ts +0 -509
- package/typechain-types/AggregationRouterHelper.ts +0 -392
- package/typechain-types/BaseSplitCodeFactory.ts +0 -118
- package/typechain-types/BoringOwnable.ts +0 -194
- package/typechain-types/BoringOwnableData.ts +0 -100
- package/typechain-types/BribeDistributor.ts +0 -363
- package/typechain-types/CelerReceiverUpg.ts +0 -372
- package/typechain-types/CelerSenderUpg.ts +0 -321
- package/typechain-types/Curve3CrvPoolHelper.ts +0 -236
- package/typechain-types/CurveFraxUsdcPoolHelper.ts +0 -158
- package/typechain-types/CurveUsdd3CrvPoolHelper.ts +0 -184
- package/typechain-types/DistributorBase.ts +0 -363
- package/typechain-types/ERC165.ts +0 -102
- package/typechain-types/ERC1967UpgradeUpgradeable.ts +0 -97
- package/typechain-types/EpochResultManager.ts +0 -261
- package/typechain-types/FeeDistributor.ts +0 -416
- package/typechain-types/FeeDistributorAbstract.ts +0 -240
- package/typechain-types/FeeDistributorVePendle.ts +0 -81
- package/typechain-types/FeeDistributorVoting.ts +0 -272
- package/typechain-types/FeeDistributorVotingFactory.ts +0 -293
- package/typechain-types/GMXPreviewHelper.ts +0 -121
- package/typechain-types/IAccessControl.ts +0 -305
- package/typechain-types/IAggregationRouterHelper.ts +0 -108
- package/typechain-types/IBeaconUpgradeable.ts +0 -87
- package/typechain-types/ICelerMessageBus.ts +0 -134
- package/typechain-types/ICelerMessageReceiverApp.ts +0 -120
- package/typechain-types/IERC165.ts +0 -102
- package/typechain-types/IERC1822ProxiableUpgradeable.ts +0 -87
- package/typechain-types/IERC20Upgradeable.ts +0 -300
- package/typechain-types/IKyberSwapAggregationRouterHelper.ts +0 -109
- package/typechain-types/IMetaAggregationRouter.ts +0 -213
- package/typechain-types/IMultihopRouter.ts +0 -209
- package/typechain-types/IMultihopRouterEthereum.ts +0 -209
- package/typechain-types/IPActionCore.ts +0 -1739
- package/typechain-types/IPActionSwapPTYT.ts +0 -237
- package/typechain-types/IPActionYT.ts +0 -490
- package/typechain-types/IPBatchSeller.ts +0 -234
- package/typechain-types/IPFeeDistributorFactory.ts +0 -101
- package/typechain-types/IPVotingControllerStorage.ts +0 -169
- package/typechain-types/IPVotingEscrow.ts +0 -344
- package/typechain-types/ISuperComposableYield.ts +0 -895
- package/typechain-types/ISwapAggregator.ts +0 -124
- package/typechain-types/ImplicitSwapfeeContract.ts +0 -149
- package/typechain-types/KyberSwapHelper.ts +0 -87
- package/typechain-types/OwnableUpgradeable.ts +0 -165
- package/typechain-types/Pendle3CrvAndTokenSCY.ts +0 -1215
- package/typechain-types/Pendle3CrvAndTokenSY.ts +0 -1243
- package/typechain-types/Pendle3CrvHelper.ts +0 -133
- package/typechain-types/Pendle3CrvTokenSCY.ts +0 -1150
- package/typechain-types/PendleAaveV3SCY.ts +0 -1088
- package/typechain-types/PendleApeStakingSY.ts +0 -1135
- package/typechain-types/PendleBatchSeller.ts +0 -648
- package/typechain-types/PendleConvex2TokensSY.ts +0 -1215
- package/typechain-types/PendleConvexCurveLP2PoolSCY.ts +0 -1215
- package/typechain-types/PendleConvexCurveLP3PoolSCY.ts +0 -1269
- package/typechain-types/PendleConvexCurveLP4PoolSCY.ts +0 -1288
- package/typechain-types/PendleConvexCurveLPSCY.ts +0 -1189
- package/typechain-types/PendleCvxCRVSCY.ts +0 -1104
- package/typechain-types/PendleERC4626SCY.ts +0 -950
- package/typechain-types/PendleEulerSCY.ts +0 -965
- package/typechain-types/PendleFeeDistributorAbstract.ts +0 -289
- package/typechain-types/PendleFeeDistributorFactory.ts +0 -591
- package/typechain-types/PendleFeeDistributorVoting.ts +0 -321
- package/typechain-types/PendleFeeDistributorVotingFactory.ts +0 -294
- package/typechain-types/PendleGovernanceManager.ts +0 -187
- package/typechain-types/PendleLooksStaking.ts +0 -1052
- package/typechain-types/PendleQiSAvaxSCY.ts +0 -1098
- package/typechain-types/PendleQiTokenSCY.ts +0 -1166
- package/typechain-types/PendleSAvaxSCY.ts +0 -962
- package/typechain-types/PendleSJoeSCY.ts +0 -1053
- package/typechain-types/PendleStargateSCY.ts +0 -1135
- package/typechain-types/PendleWstEthSCY.ts +0 -1040
- package/typechain-types/PendleYearnVaultSCY.ts +0 -963
- package/typechain-types/PermissionsV2Upg.ts +0 -87
- package/typechain-types/PtAMMArb.ts +0 -587
- package/typechain-types/SCYBase.ts +0 -1001
- package/typechain-types/SCYBaseWithDynamicRewards.ts +0 -1063
- package/typechain-types/SCYBaseWithRewards.ts +0 -1094
- package/typechain-types/SSTORE2DeployerContract.ts +0 -242
- package/typechain-types/StEthHelper.ts +0 -107
- package/typechain-types/SwapAggregator.ts +0 -406
- package/typechain-types/factories/AccessControl__factory.ts +0 -227
- package/typechain-types/factories/ActionBaseMintRedeem__factory.ts +0 -43
- package/typechain-types/factories/ActionCallback__factory.ts +0 -223
- package/typechain-types/factories/ActionCore__factory.ts +0 -1863
- package/typechain-types/factories/ActionSCYAndPTBase__factory.ts +0 -39
- package/typechain-types/factories/ActionSCYAndPYBase__factory.ts +0 -39
- package/typechain-types/factories/ActionSCYAndYTBase__factory.ts +0 -39
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +0 -396
- package/typechain-types/factories/ActionYT__factory.ts +0 -499
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +0 -281
- package/typechain-types/factories/BaseSplitCodeFactory__factory.ts +0 -102
- package/typechain-types/factories/BoringOwnableData__factory.ts +0 -90
- package/typechain-types/factories/BoringOwnable__factory.ts +0 -141
- package/typechain-types/factories/BribeDistributor__factory.ts +0 -303
- package/typechain-types/factories/CelerReceiverUpg__factory.ts +0 -205
- package/typechain-types/factories/CelerSenderUpg__factory.ts +0 -163
- package/typechain-types/factories/Curve3CrvPoolHelper__factory.ts +0 -220
- package/typechain-types/factories/CurveFraxUsdcPoolHelper__factory.ts +0 -146
- package/typechain-types/factories/CurveUsdd3CrvPoolHelper__factory.ts +0 -172
- package/typechain-types/factories/DistributorBase__factory.ts +0 -249
- package/typechain-types/factories/ERC165__factory.ts +0 -39
- package/typechain-types/factories/ERC1967UpgradeUpgradeable__factory.ts +0 -75
- package/typechain-types/factories/EpochResultManager__factory.ts +0 -146
- package/typechain-types/factories/FeeDistributorAbstract__factory.ts +0 -127
- package/typechain-types/factories/FeeDistributorVePendle__factory.ts +0 -97
- package/typechain-types/factories/FeeDistributorVotingFactory__factory.ts +0 -211
- package/typechain-types/factories/FeeDistributorVoting__factory.ts +0 -219
- package/typechain-types/factories/FeeDistributor__factory.ts +0 -339
- package/typechain-types/factories/GMXPreviewHelper__factory.ts +0 -65
- package/typechain-types/factories/IAccessControl__factory.ts +0 -198
- package/typechain-types/factories/IAggregationRouterHelper__factory.ts +0 -54
- package/typechain-types/factories/IBeaconUpgradeable__factory.ts +0 -39
- package/typechain-types/factories/ICelerMessageBus__factory.ts +0 -68
- package/typechain-types/factories/ICelerMessageReceiverApp__factory.ts +0 -64
- package/typechain-types/factories/IERC165__factory.ts +0 -42
- package/typechain-types/factories/IERC1822ProxiableUpgradeable__factory.ts +0 -43
- package/typechain-types/factories/IERC20Upgradeable__factory.ts +0 -209
- package/typechain-types/factories/IKyberSwapAggregationRouterHelper__factory.ts +0 -56
- package/typechain-types/factories/IMetaAggregationRouter__factory.ts +0 -202
- package/typechain-types/factories/IMultihopRouterEthereum__factory.ts +0 -155
- package/typechain-types/factories/IMultihopRouter__factory.ts +0 -151
- package/typechain-types/factories/IPActionCore__factory.ts +0 -1784
- package/typechain-types/factories/IPActionSwapPTYT__factory.ts +0 -205
- package/typechain-types/factories/IPActionYT__factory.ts +0 -435
- package/typechain-types/factories/IPBatchSeller__factory.ts +0 -132
- package/typechain-types/factories/IPFeeDistributorFactory__factory.ts +0 -86
- package/typechain-types/factories/IPVotingControllerStorage__factory.ts +0 -107
- package/typechain-types/factories/IPVotingEscrow__factory.ts +0 -250
- package/typechain-types/factories/ISuperComposableYield__factory.ts +0 -662
- package/typechain-types/factories/ISwapAggregator__factory.ts +0 -66
- package/typechain-types/factories/ImplicitSwapfeeContract__factory.ts +0 -239
- package/typechain-types/factories/KyberSwapHelper__factory.ts +0 -39
- package/typechain-types/factories/OwnableUpgradeable__factory.ts +0 -78
- package/typechain-types/factories/Pendle3CrvAndTokenSCY__factory.ts +0 -1130
- package/typechain-types/factories/Pendle3CrvAndTokenSY__factory.ts +0 -1106
- package/typechain-types/factories/Pendle3CrvHelper__factory.ts +0 -129
- package/typechain-types/factories/Pendle3CrvTokenSCY__factory.ts +0 -996
- package/typechain-types/factories/PendleAaveV3SCY__factory.ts +0 -874
- package/typechain-types/factories/PendleApeStakingSY__factory.ts +0 -981
- package/typechain-types/factories/PendleBatchSeller__factory.ts +0 -480
- package/typechain-types/factories/PendleConvex2TokensSY__factory.ts +0 -1093
- package/typechain-types/factories/PendleConvexCurveLP2PoolSCY__factory.ts +0 -1125
- package/typechain-types/factories/PendleConvexCurveLP3PoolSCY__factory.ts +0 -1067
- package/typechain-types/factories/PendleConvexCurveLP4PoolSCY__factory.ts +0 -1080
- package/typechain-types/factories/PendleConvexCurveLPSCY__factory.ts +0 -967
- package/typechain-types/factories/PendleCvxCRVSCY__factory.ts +0 -910
- package/typechain-types/factories/PendleERC4626SCY__factory.ts +0 -774
- package/typechain-types/factories/PendleEulerSCY__factory.ts +0 -805
- package/typechain-types/factories/PendleFeeDistributorAbstract__factory.ts +0 -183
- package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +0 -485
- package/typechain-types/factories/PendleFeeDistributorVotingFactory__factory.ts +0 -213
- package/typechain-types/factories/PendleFeeDistributorVoting__factory.ts +0 -275
- package/typechain-types/factories/PendleGovernanceManager__factory.ts +0 -149
- package/typechain-types/factories/PendleLooksStaking__factory.ts +0 -933
- package/typechain-types/factories/PendleQiSAvaxSCY__factory.ts +0 -917
- package/typechain-types/factories/PendleQiTokenSCY__factory.ts +0 -1095
- package/typechain-types/factories/PendleSAvaxSCY__factory.ts +0 -796
- package/typechain-types/factories/PendleSJoeSCY__factory.ts +0 -845
- package/typechain-types/factories/PendleStargateSCY__factory.ts +0 -952
- package/typechain-types/factories/PendleWstEthSCY__factory.ts +0 -924
- package/typechain-types/factories/PendleYearnVaultSCY__factory.ts +0 -787
- package/typechain-types/factories/PermissionsV2Upg__factory.ts +0 -39
- package/typechain-types/factories/PtAMMArb__factory.ts +0 -525
- package/typechain-types/factories/SCYBaseWithDynamicRewards__factory.ts +0 -775
- package/typechain-types/factories/SCYBaseWithRewards__factory.ts +0 -867
- package/typechain-types/factories/SCYBase__factory.ts +0 -798
- package/typechain-types/factories/SSTORE2DeployerContract__factory.ts +0 -191
- package/typechain-types/factories/SYBaseAutoCompound__factory.ts +0 -942
- package/typechain-types/factories/StEthHelper__factory.ts +0 -62
- package/typechain-types/factories/SwapAggregator__factory.ts +0 -309
package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol
CHANGED
|
@@ -9,11 +9,11 @@ library Curve3CrvPoolHelper {
|
|
|
9
9
|
using Math for uint256;
|
|
10
10
|
|
|
11
11
|
uint256 internal constant N_COINS = 3;
|
|
12
|
-
uint256 internal constant PRECISION = 10**18;
|
|
12
|
+
uint256 internal constant PRECISION = 10 ** 18;
|
|
13
13
|
uint256 internal constant RATE_0 = 1000000000000000000;
|
|
14
14
|
uint256 internal constant RATE_1 = 1000000000000000000000000000000;
|
|
15
15
|
uint256 internal constant RATE_2 = 1000000000000000000000000000000;
|
|
16
|
-
uint256 internal constant FEE_DENOMINATOR = 10**10;
|
|
16
|
+
uint256 internal constant FEE_DENOMINATOR = 10 ** 10;
|
|
17
17
|
|
|
18
18
|
address internal constant LP = 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490;
|
|
19
19
|
address internal constant POOL = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7;
|
|
@@ -23,11 +23,10 @@ library Curve3CrvPoolHelper {
|
|
|
23
23
|
|
|
24
24
|
// previewDeposit at the end of the file
|
|
25
25
|
|
|
26
|
-
function preview3CrvRedeem(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{
|
|
26
|
+
function preview3CrvRedeem(
|
|
27
|
+
address tokenOut,
|
|
28
|
+
uint256 amountSharesToRedeem
|
|
29
|
+
) internal view returns (uint256) {
|
|
31
30
|
return
|
|
32
31
|
ITriCrvPool(POOL).calc_withdraw_one_coin(
|
|
33
32
|
amountSharesToRedeem,
|
|
@@ -35,20 +34,20 @@ library Curve3CrvPoolHelper {
|
|
|
35
34
|
);
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
function deposit3Crv(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
37
|
+
function deposit3Crv(
|
|
38
|
+
address tokenIn,
|
|
39
|
+
uint256 amountTokenToDeposit
|
|
40
|
+
) internal returns (uint256) {
|
|
42
41
|
uint256 balBefore = IERC20(LP).balanceOf(address(this));
|
|
43
42
|
ITriCrvPool(POOL).add_liquidity(_getTokenAmounts(tokenIn, amountTokenToDeposit), 0);
|
|
44
43
|
uint256 balAfter = IERC20(LP).balanceOf(address(this));
|
|
45
44
|
return balAfter - balBefore;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
function redeem3Crv(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{
|
|
47
|
+
function redeem3Crv(
|
|
48
|
+
address tokenOut,
|
|
49
|
+
uint256 amountSharesToRedeem
|
|
50
|
+
) internal returns (uint256) {
|
|
52
51
|
uint256 balBefore = IERC20(tokenOut).balanceOf(address(this));
|
|
53
52
|
ITriCrvPool(POOL).remove_liquidity_one_coin(
|
|
54
53
|
amountSharesToRedeem,
|
|
@@ -59,11 +58,10 @@ library Curve3CrvPoolHelper {
|
|
|
59
58
|
return balAfter - balBefore;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
|
-
function _getTokenAmounts(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
61
|
+
function _getTokenAmounts(
|
|
62
|
+
address token,
|
|
63
|
+
uint256 amount
|
|
64
|
+
) internal pure returns (uint256[N_COINS] memory res) {
|
|
67
65
|
res[_get3CrvTokenIndex(token)] = amount;
|
|
68
66
|
}
|
|
69
67
|
|
|
@@ -85,11 +83,10 @@ library Curve3CrvPoolHelper {
|
|
|
85
83
|
// ----------------- Forking StableSwap3Pool's calculation -----------------
|
|
86
84
|
|
|
87
85
|
// fork of StableSwap3Pool.vy
|
|
88
|
-
function preview3CrvDeposit(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
86
|
+
function preview3CrvDeposit(
|
|
87
|
+
address token,
|
|
88
|
+
uint256 amount
|
|
89
|
+
) internal view returns (uint256 netLpOut, uint256 new_virtual_price) {
|
|
93
90
|
uint256[N_COINS] memory amounts = _getTokenAmounts(token, amount);
|
|
94
91
|
uint256[N_COINS] memory self_balances = _getBalances();
|
|
95
92
|
|
|
@@ -146,19 +143,16 @@ library Curve3CrvPoolHelper {
|
|
|
146
143
|
return (D * PRECISION) / token_supply;
|
|
147
144
|
}
|
|
148
145
|
|
|
149
|
-
function get_D_mem(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{
|
|
146
|
+
function get_D_mem(
|
|
147
|
+
uint256[N_COINS] memory balances,
|
|
148
|
+
uint256 amp
|
|
149
|
+
) internal pure returns (uint256) {
|
|
154
150
|
return get_D(_xp_mem(balances), amp);
|
|
155
151
|
}
|
|
156
152
|
|
|
157
|
-
function _xp_mem(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
returns (uint256[N_COINS] memory)
|
|
161
|
-
{
|
|
153
|
+
function _xp_mem(
|
|
154
|
+
uint256[N_COINS] memory balances
|
|
155
|
+
) internal pure returns (uint256[N_COINS] memory) {
|
|
162
156
|
uint256[N_COINS] memory result;
|
|
163
157
|
result[0] = (RATE_0 * balances[0]) / PRECISION;
|
|
164
158
|
result[1] = (RATE_1 * balances[1]) / PRECISION;
|
|
@@ -203,11 +197,9 @@ library Curve3CrvPoolHelper {
|
|
|
203
197
|
balances[2] = ITriCrvPool(POOL).balances(2);
|
|
204
198
|
}
|
|
205
199
|
|
|
206
|
-
function arrayClone(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
returns (uint256[N_COINS] memory res)
|
|
210
|
-
{
|
|
200
|
+
function arrayClone(
|
|
201
|
+
uint256[N_COINS] memory a
|
|
202
|
+
) internal pure returns (uint256[N_COINS] memory res) {
|
|
211
203
|
for (uint256 i = 0; i < N_COINS; ++i) {
|
|
212
204
|
res[i] = a[i];
|
|
213
205
|
}
|
package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol
CHANGED
|
@@ -8,10 +8,10 @@ import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
|
8
8
|
library CurveFraxUsdcPoolHelper {
|
|
9
9
|
uint256 internal constant N_COINS = 2;
|
|
10
10
|
uint256 internal constant A_PRECISION = 100;
|
|
11
|
-
uint256 internal constant PRECISION = 10**18;
|
|
11
|
+
uint256 internal constant PRECISION = 10 ** 18;
|
|
12
12
|
uint256 internal constant RATE_0 = 1000000000000000000;
|
|
13
13
|
uint256 internal constant RATE_1 = 1000000000000000000000000000000;
|
|
14
|
-
uint256 internal constant FEE_DENOMINATOR = 10**10;
|
|
14
|
+
uint256 internal constant FEE_DENOMINATOR = 10 ** 10;
|
|
15
15
|
|
|
16
16
|
address internal constant POOL = 0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2;
|
|
17
17
|
address internal constant LP = 0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC;
|
|
@@ -59,11 +59,10 @@ library CurveFraxUsdcPoolHelper {
|
|
|
59
59
|
return (total_supply * (D2 - D0)) / D0;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
function _get_D_mem(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
{
|
|
62
|
+
function _get_D_mem(
|
|
63
|
+
uint256[N_COINS] memory balances,
|
|
64
|
+
uint256 _amp
|
|
65
|
+
) internal pure returns (uint256) {
|
|
67
66
|
uint256[N_COINS] memory _xp;
|
|
68
67
|
_xp[0] = (RATE_0 * balances[0]) / PRECISION;
|
|
69
68
|
_xp[1] = (RATE_1 * balances[1]) / PRECISION;
|
|
@@ -117,11 +116,10 @@ library CurveFraxUsdcPoolHelper {
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
|
|
120
|
-
function _getTokenAmounts(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
{
|
|
119
|
+
function _getTokenAmounts(
|
|
120
|
+
address token,
|
|
121
|
+
uint256 amount
|
|
122
|
+
) internal pure returns (uint256[N_COINS] memory res) {
|
|
125
123
|
res[token == FRAX ? 0 : 1] = amount;
|
|
126
124
|
}
|
|
127
125
|
}
|
package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol
CHANGED
|
@@ -11,9 +11,9 @@ library CurveUsdd3CrvPoolHelper {
|
|
|
11
11
|
|
|
12
12
|
uint256 internal constant N_COINS = 2;
|
|
13
13
|
uint256 internal constant A_PRECISION = 100;
|
|
14
|
-
uint256 internal constant PRECISION = 10**18;
|
|
15
|
-
uint256 internal constant rate_multiplier = 10**18;
|
|
16
|
-
uint256 internal constant FEE_DENOMINATOR = 10**10;
|
|
14
|
+
uint256 internal constant PRECISION = 10 ** 18;
|
|
15
|
+
uint256 internal constant rate_multiplier = 10 ** 18;
|
|
16
|
+
uint256 internal constant FEE_DENOMINATOR = 10 ** 10;
|
|
17
17
|
|
|
18
18
|
// LP == POOL
|
|
19
19
|
address internal constant POOL = 0xe6b5CC1B4b47305c58392CE3D359B10282FC36Ea;
|
|
@@ -25,11 +25,10 @@ library CurveUsdd3CrvPoolHelper {
|
|
|
25
25
|
balances[1] = ICrvPool(POOL).balances(1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
function _getTokenAmounts(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
28
|
+
function _getTokenAmounts(
|
|
29
|
+
address token,
|
|
30
|
+
uint256 amount
|
|
31
|
+
) internal pure returns (uint256[N_COINS] memory res) {
|
|
33
32
|
res[token == USDD ? 0 : 1] = amount;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -95,11 +94,10 @@ library CurveUsdd3CrvPoolHelper {
|
|
|
95
94
|
return get_D(xp, _amp);
|
|
96
95
|
}
|
|
97
96
|
|
|
98
|
-
function _xp_mem(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
{
|
|
97
|
+
function _xp_mem(
|
|
98
|
+
uint256[N_COINS] memory _rates,
|
|
99
|
+
uint256[N_COINS] memory balances
|
|
100
|
+
) internal pure returns (uint256[N_COINS] memory) {
|
|
103
101
|
uint256[N_COINS] memory result;
|
|
104
102
|
for (uint256 i = 0; i < N_COINS; ++i) {
|
|
105
103
|
result[i] = (balances[i] * _rates[i]) / PRECISION;
|
|
@@ -140,11 +138,9 @@ library CurveUsdd3CrvPoolHelper {
|
|
|
140
138
|
assert(false);
|
|
141
139
|
}
|
|
142
140
|
|
|
143
|
-
function arrayClone(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
returns (uint256[N_COINS] memory res)
|
|
147
|
-
{
|
|
141
|
+
function arrayClone(
|
|
142
|
+
uint256[N_COINS] memory a
|
|
143
|
+
) internal pure returns (uint256[N_COINS] memory res) {
|
|
148
144
|
for (uint256 i = 0; i < N_COINS; ++i) {
|
|
149
145
|
res[i] = a[i];
|
|
150
146
|
}
|
|
@@ -35,11 +35,9 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
|
|
|
35
35
|
_safeApproveInf(crvLp, BOOSTER);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function _getPoolInfo(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
returns (address _crvLp, address _cvxRewardManager)
|
|
42
|
-
{
|
|
38
|
+
function _getPoolInfo(
|
|
39
|
+
uint256 _cvxPid
|
|
40
|
+
) internal view returns (address _crvLp, address _cvxRewardManager) {
|
|
43
41
|
if (_cvxPid > IBooster(BOOSTER).poolLength()) revert Errors.SYCurveInvalidPid();
|
|
44
42
|
|
|
45
43
|
(_crvLp, , , _cvxRewardManager, , ) = IBooster(BOOSTER).poolInfo(_cvxPid);
|
|
@@ -53,12 +51,10 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
|
|
|
53
51
|
* If any of the base pool tokens are deposited, it will first add liquidity to the curve pool and mint LP,
|
|
54
52
|
* which will then be deposited into convex
|
|
55
53
|
*/
|
|
56
|
-
function _deposit(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
returns (uint256 amountSharesOut)
|
|
61
|
-
{
|
|
54
|
+
function _deposit(
|
|
55
|
+
address tokenIn,
|
|
56
|
+
uint256 amount
|
|
57
|
+
) internal virtual override returns (uint256 amountSharesOut) {
|
|
62
58
|
if (tokenIn == crvLp) {
|
|
63
59
|
amountSharesOut = amount;
|
|
64
60
|
} else {
|
|
@@ -122,13 +118,10 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
|
|
|
122
118
|
MISC FUNCTIONS FOR METADATA
|
|
123
119
|
//////////////////////////////////////////////////////////////*/
|
|
124
120
|
|
|
125
|
-
function _previewDeposit(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
override
|
|
130
|
-
returns (uint256 amountSharesOut)
|
|
131
|
-
{
|
|
121
|
+
function _previewDeposit(
|
|
122
|
+
address tokenIn,
|
|
123
|
+
uint256 amountTokenToDeposit
|
|
124
|
+
) internal view virtual override returns (uint256 amountSharesOut) {
|
|
132
125
|
if (tokenIn == crvLp) {
|
|
133
126
|
amountSharesOut = amountTokenToDeposit;
|
|
134
127
|
} else {
|
|
@@ -136,13 +129,10 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
|
|
|
136
129
|
}
|
|
137
130
|
}
|
|
138
131
|
|
|
139
|
-
function _previewRedeem(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
override
|
|
144
|
-
returns (uint256 amountTokenOut)
|
|
145
|
-
{
|
|
132
|
+
function _previewRedeem(
|
|
133
|
+
address tokenOut,
|
|
134
|
+
uint256 amountSharesToRedeem
|
|
135
|
+
) internal view virtual override returns (uint256 amountTokenOut) {
|
|
146
136
|
if (tokenOut == crvLp) {
|
|
147
137
|
amountTokenOut = amountSharesToRedeem;
|
|
148
138
|
} else {
|
|
@@ -158,36 +148,30 @@ abstract contract PendleConvexLPSY is SYBaseWithRewards {
|
|
|
158
148
|
|
|
159
149
|
function isValidTokenOut(address token) public view virtual override returns (bool);
|
|
160
150
|
|
|
161
|
-
function _depositToCurve(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
function _depositToCurve(
|
|
152
|
+
address tokenIn,
|
|
153
|
+
uint256 amountTokenToDeposit
|
|
154
|
+
) internal virtual returns (uint256);
|
|
165
155
|
|
|
166
|
-
function _redeemFromCurve(
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
function _redeemFromCurve(
|
|
157
|
+
address tokenOut,
|
|
158
|
+
uint256 amountLpToRedeem
|
|
159
|
+
) internal virtual returns (uint256);
|
|
170
160
|
|
|
171
|
-
function _previewDepositToCurve(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
returns (uint256 amountLpOut);
|
|
161
|
+
function _previewDepositToCurve(
|
|
162
|
+
address token,
|
|
163
|
+
uint256 amountTokenToDeposit
|
|
164
|
+
) internal view virtual returns (uint256 amountLpOut);
|
|
176
165
|
|
|
177
|
-
function _previewRedeemFromCurve(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
returns (uint256 amountTokenOut);
|
|
166
|
+
function _previewRedeemFromCurve(
|
|
167
|
+
address token,
|
|
168
|
+
uint256 amountLpToRedeem
|
|
169
|
+
) internal view virtual returns (uint256 amountTokenOut);
|
|
182
170
|
|
|
183
171
|
function assetInfo()
|
|
184
172
|
external
|
|
185
173
|
view
|
|
186
|
-
returns (
|
|
187
|
-
AssetType assetType,
|
|
188
|
-
address assetAddress,
|
|
189
|
-
uint8 assetDecimals
|
|
190
|
-
)
|
|
174
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals)
|
|
191
175
|
{
|
|
192
176
|
return (AssetType.LIQUIDITY, crvLp, IERC20Metadata(crvLp).decimals());
|
|
193
177
|
}
|
|
@@ -10,7 +10,7 @@ abstract contract GLPPreviewHelper {
|
|
|
10
10
|
|
|
11
11
|
IGMXVault public immutable vault;
|
|
12
12
|
address internal immutable usdg;
|
|
13
|
-
uint256 public constant PRICE_PRECISION = 10**30;
|
|
13
|
+
uint256 public constant PRICE_PRECISION = 10 ** 30;
|
|
14
14
|
uint256 public constant BASIS_POINTS_DIVISOR = 10000;
|
|
15
15
|
|
|
16
16
|
constructor(address _vaultAddress) {
|
|
@@ -72,7 +72,7 @@ abstract contract GLPPreviewHelper {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function __collectSwapFees(
|
|
75
|
-
address
|
|
75
|
+
address /*_token*/,
|
|
76
76
|
uint256 _amount,
|
|
77
77
|
uint256 _feeBasisPoints
|
|
78
78
|
) private pure returns (uint256) {
|
|
@@ -127,11 +127,10 @@ abstract contract GLPPreviewHelper {
|
|
|
127
127
|
return _feeBasisPoints + taxBps;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
function __getTargetUsdgAmount(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
{
|
|
130
|
+
function __getTargetUsdgAmount(
|
|
131
|
+
address _token,
|
|
132
|
+
uint256 _burnedUsdg
|
|
133
|
+
) private view returns (uint256) {
|
|
135
134
|
uint256 supply = IERC20(usdg).totalSupply() - _burnedUsdg;
|
|
136
135
|
if (supply == 0) {
|
|
137
136
|
return 0;
|
|
@@ -55,12 +55,10 @@ contract PendleGlpSY is SYBaseWithRewards, GLPPreviewHelper {
|
|
|
55
55
|
/**
|
|
56
56
|
* @dev See {SYBase-_deposit}
|
|
57
57
|
*/
|
|
58
|
-
function _deposit(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
returns (uint256 amountSharesOut)
|
|
63
|
-
{
|
|
58
|
+
function _deposit(
|
|
59
|
+
address tokenIn,
|
|
60
|
+
uint256 amountDeposited
|
|
61
|
+
) internal virtual override returns (uint256 amountSharesOut) {
|
|
64
62
|
if (tokenIn == stakedGlp) {
|
|
65
63
|
// GLP is already staked in stakedGlp's transferFrom, called in _transferIn()
|
|
66
64
|
amountSharesOut = amountDeposited;
|
|
@@ -138,12 +136,10 @@ contract PendleGlpSY is SYBaseWithRewards, GLPPreviewHelper {
|
|
|
138
136
|
MISC FUNCTIONS FOR METADATA
|
|
139
137
|
//////////////////////////////////////////////////////////////*/
|
|
140
138
|
|
|
141
|
-
function _previewDeposit(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
returns (uint256 amountSharesOut)
|
|
146
|
-
{
|
|
139
|
+
function _previewDeposit(
|
|
140
|
+
address tokenIn,
|
|
141
|
+
uint256 amountTokenToDeposit
|
|
142
|
+
) internal view override returns (uint256 amountSharesOut) {
|
|
147
143
|
if (tokenIn == stakedGlp) amountSharesOut = amountTokenToDeposit;
|
|
148
144
|
else {
|
|
149
145
|
if (tokenIn == NATIVE) tokenIn = weth;
|
|
@@ -160,12 +156,10 @@ contract PendleGlpSY is SYBaseWithRewards, GLPPreviewHelper {
|
|
|
160
156
|
}
|
|
161
157
|
}
|
|
162
158
|
|
|
163
|
-
function _previewRedeem(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
returns (uint256 amountTokenOut)
|
|
168
|
-
{
|
|
159
|
+
function _previewRedeem(
|
|
160
|
+
address tokenOut,
|
|
161
|
+
uint256 amountSharesToRedeem
|
|
162
|
+
) internal view override returns (uint256 amountTokenOut) {
|
|
169
163
|
if (tokenOut == stakedGlp) amountTokenOut = amountSharesToRedeem;
|
|
170
164
|
else {
|
|
171
165
|
if (tokenOut == NATIVE) tokenOut = weth;
|
|
@@ -184,7 +178,7 @@ contract PendleGlpSY is SYBaseWithRewards, GLPPreviewHelper {
|
|
|
184
178
|
function _getGlpTokens() internal view returns (address[] memory res) {
|
|
185
179
|
res = new address[](0);
|
|
186
180
|
uint256 length = vault.allWhitelistedTokensLength();
|
|
187
|
-
for(uint256 i = 0; i < length; ++i) {
|
|
181
|
+
for (uint256 i = 0; i < length; ++i) {
|
|
188
182
|
address token = vault.allWhitelistedTokens(i);
|
|
189
183
|
if (vault.whitelistedTokens(token) && !res.contains(token)) {
|
|
190
184
|
res = res.append(token);
|
|
@@ -213,11 +207,7 @@ contract PendleGlpSY is SYBaseWithRewards, GLPPreviewHelper {
|
|
|
213
207
|
function assetInfo()
|
|
214
208
|
external
|
|
215
209
|
view
|
|
216
|
-
returns (
|
|
217
|
-
AssetType assetType,
|
|
218
|
-
address assetAddress,
|
|
219
|
-
uint8 assetDecimals
|
|
220
|
-
)
|
|
210
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals)
|
|
221
211
|
{
|
|
222
212
|
return (AssetType.LIQUIDITY, glp, IERC20Metadata(glp).decimals());
|
|
223
213
|
}
|
|
@@ -6,23 +6,23 @@ The SY supports mint-and-staking GLP with a whitelisted token (ETH, WBTC, etc) o
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
This contract contains the main logic ofk all SY operations, except GMX's Vault-related logic for preview functions. This part is contained in the abstract preview contract, which is inherited by the main contract.
|
|
9
|
+
- _The main contract_ for the SY is: `PendleGlpSY.sol`.
|
|
10
|
+
This contract contains the main logic ofk all SY operations, except GMX's Vault-related logic for preview functions. This part is contained in the abstract preview contract, which is inherited by the main contract.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
This contract simulates the logic of GMX's Vault to preview buying/selling USDG during deposit/redeem.
|
|
12
|
+
* _The preview contract_ is: `GMXPreviewHelper.sol`.
|
|
13
|
+
This contract simulates the logic of GMX's Vault to preview buying/selling USDG during deposit/redeem.
|
|
14
14
|
|
|
15
15
|
## About PendleGlpSY
|
|
16
16
|
|
|
17
17
|
A typical, ordinary SY contract.
|
|
18
18
|
|
|
19
19
|
- _Constructor_: Initialize global variables and approve whitelisted tokens to GMX's GlpManager, which would pull tokens in from the SY contract when minting GLP.
|
|
20
|
-
|
|
20
|
+
- There are two routers: _rewardRouter_ is used for claiming rewards,, _glpRouter_ is used to deposit/redeem; hence the two global router variables.
|
|
21
21
|
- _Deposit_:
|
|
22
|
-
|
|
22
|
+
- In case of receiving staked GLP, then staked GLP is already pulled in with \_transferIn() in SYBase.
|
|
23
23
|
**Note:** StakedGLP (sGLP) is a helper contract by GMX for users to transfer their staked GLP between each other, where staking and unstaking happen behind the scenes. It is not an ERC20 token, but it behaves similar enough to one so that we treat it is ERC20 in the contract.
|
|
24
|
-
|
|
25
|
-
- _Redeem_: Same as deposit, reversed. If user redeems in staked GLP, _transferOut() is used for staked GLP.
|
|
24
|
+
- Otherwise, use GlpRewardRouter to mint and stake.
|
|
25
|
+
- _Redeem_: Same as deposit, reversed. If user redeems in staked GLP, \_transferOut() is used for staked GLP.
|
|
26
26
|
- _Exchange rate_: The SY directly wraps GLP, so the exchange rate is always 1.
|
|
27
27
|
- _Preview deposit_: Mimics the logic of _\_addLiquidity()_ in GMX's GlpManager. The functions needs to preview _buyUSDG()_ of GMX's Vault, which is mimicked in GMXPreviewHelper.
|
|
28
28
|
- _Preview redeem_: Mimics the logic of _\_removeLiquidity()_ in GMX's GlpManager. The functions needs to preview _sellUSDG()_ of GMX's Vault, which is also mimicked in GMXPreviewHelper.
|
|
@@ -34,7 +34,8 @@ A typical, ordinary SY contract.
|
|
|
34
34
|
This contract's purpose is to support preview for _buyUSDG()_ and _sellUSDG()_ functions from GMX's Vault. The contracts has two view functions _buyUSDG()_ and _sellUSDG()_ which mimics their respective Vault counterpart's logic.
|
|
35
35
|
|
|
36
36
|
About _buyUSDG()_:
|
|
37
|
-
|
|
37
|
+
|
|
38
|
+
- First, _tokenAmount_ is calculated with \_transferIn(), which should give the same as the corresponding Vault function.
|
|
38
39
|
- _updateCumulativeFundingRate()_ in Vault should not impact amount out, so this is ignored.
|
|
39
40
|
- For _price_ and _usdgAmount_, the Vault view functions used in Vault's buyUSDG() should behave the same as during actual redeeming, so they are called directly from Vault.
|
|
40
41
|
- For _feeBasisPoints_, _getFeeBasisPoints()_ also behave the same as Vault, becacuse the extra parameter _\_burnedUsdg_ = 0 which has no affect on the return value.
|
|
@@ -42,20 +43,21 @@ About _buyUSDG()_:
|
|
|
42
43
|
- Finally, _mintAmount_ is calculated normally.
|
|
43
44
|
|
|
44
45
|
About _sellUSDG()_:
|
|
46
|
+
|
|
45
47
|
- Again, first _usdgAmount_ is calculated.
|
|
46
48
|
- _updateCumulativeFundingRate()_ in Vault should not impact amount out, so this is ignored.
|
|
47
49
|
- We directly call Vault's getRedemptionAmount() to calculate _redemptionAmount_. Although _useSwapPricing_ is set to true earlier in Vault's _sellUSDG()_, and _getRedemptionAmount()_ calls _getMaxPrice()_, which then calls priceFeed's _getPrice()_ with _useSwapPricing_ as a parameter, this parameter is then ignored in _getPrice()_. So we can ignore _useSwapPricing_, and Vault's _getRedemptionAmount()_ called in preview should behave the same as actual redeem.
|
|
48
|
-
- Next, _decreaseUsdgAmount() and USDG's _burn()_ are called. This affects USDG balances, which would later affect _getFeeBasisPoints()_.
|
|
50
|
+
- Next, _decreaseUsdgAmount() and USDG's \_burn()_ are called. This affects USDG balances, which would later affect _getFeeBasisPoints()_.
|
|
49
51
|
- _poolAmounts_ and _tokenBalances_ should not affect the amount out, so _\_decreasePoolAmount()_ and _\_updateTokenBalance()_ are ignored.
|
|
50
52
|
- For _feeBasisPoints_, we need _getFeeBasisPoints()_. But _usdgAmounts[\_token]_ has been decreased by _usdgAmount_, so we account for this by adding parameter _\_burnedUsdg_ in our "fake" _getFeeBasisPoints()_.
|
|
51
53
|
- Finally, _amountOut_ is calculated with _\_collectSwapFees()_.
|
|
52
54
|
|
|
53
55
|
Other helper functions:
|
|
56
|
+
|
|
54
57
|
- _\_transferIn()_: Mimics Vault's counterpart, should return the same value.
|
|
55
58
|
- _\_collectSwapFees()_: In Vault, this function only changes _feeReserves_ which does not affect deposit/redeem, so we only need the _afterFeeAmount_.
|
|
56
59
|
- _getFeeBasisPoints()_: Since USDG balances are affected in _sellUSDG()_, another parameter _\_burnedUsdg_ is introduced to account for this decrease in USDG. Namely, this affects:
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
- _initialAmount_: The new _usdgAmount[\_token]_ is different, which is calculated here similar to Vault's decreaseUsdgAmount().
|
|
61
|
+
- _getTargetUsdgAmount()_: The formula for the target amount concerns the total supply of USDG, which is affected by _burn()_ in _sellUSDG()_. This is accounted for in our "fake" _getTargetUsdgAmount()_, which takes _\_burnedUsdg_ as parameter and uses it to calculate the real _supply_.
|
|
59
62
|
|
|
60
63
|
In our tests, all - intermediate and final return - values perfectly matches between Vault's functions and our replicas.
|
|
61
|
-
|
|
@@ -26,14 +26,10 @@ contract PendleGDaiSY is SYBase {
|
|
|
26
26
|
* The underlying yield token is gDAI. If the base token deposited is DAI, the function
|
|
27
27
|
* deposits received DAI into the gDAI contract.
|
|
28
28
|
*/
|
|
29
|
-
function _deposit(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
returns (
|
|
34
|
-
uint256 /*amountSharesOut*/
|
|
35
|
-
)
|
|
36
|
-
{
|
|
29
|
+
function _deposit(
|
|
30
|
+
address tokenIn,
|
|
31
|
+
uint256 amountDeposited
|
|
32
|
+
) internal virtual override returns (uint256 /*amountSharesOut*/) {
|
|
37
33
|
if (tokenIn == gDAI) {
|
|
38
34
|
return amountDeposited;
|
|
39
35
|
} else {
|
|
@@ -48,14 +44,7 @@ contract PendleGDaiSY is SYBase {
|
|
|
48
44
|
address receiver,
|
|
49
45
|
address tokenOut,
|
|
50
46
|
uint256 amountSharesToRedeem
|
|
51
|
-
)
|
|
52
|
-
internal
|
|
53
|
-
virtual
|
|
54
|
-
override
|
|
55
|
-
returns (
|
|
56
|
-
uint256 /*amountTokenOut*/
|
|
57
|
-
)
|
|
58
|
-
{
|
|
47
|
+
) internal virtual override returns (uint256 /*amountTokenOut*/) {
|
|
59
48
|
_transferOut(tokenOut, receiver, amountSharesToRedeem);
|
|
60
49
|
return amountSharesToRedeem;
|
|
61
50
|
}
|
|
@@ -76,14 +65,10 @@ contract PendleGDaiSY is SYBase {
|
|
|
76
65
|
MISC FUNCTIONS FOR METADATA
|
|
77
66
|
//////////////////////////////////////////////////////////////*/
|
|
78
67
|
|
|
79
|
-
function _previewDeposit(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
returns (
|
|
84
|
-
uint256 /*amountSharesOut*/
|
|
85
|
-
)
|
|
86
|
-
{
|
|
68
|
+
function _previewDeposit(
|
|
69
|
+
address tokenIn,
|
|
70
|
+
uint256 amountTokenToDeposit
|
|
71
|
+
) internal view override returns (uint256 /*amountSharesOut*/) {
|
|
87
72
|
if (tokenIn == gDAI) {
|
|
88
73
|
return amountTokenToDeposit;
|
|
89
74
|
} else {
|
|
@@ -92,16 +77,9 @@ contract PendleGDaiSY is SYBase {
|
|
|
92
77
|
}
|
|
93
78
|
|
|
94
79
|
function _previewRedeem(
|
|
95
|
-
address
|
|
80
|
+
address /*tokenOut*/,
|
|
96
81
|
uint256 amountSharesToRedeem
|
|
97
|
-
)
|
|
98
|
-
internal
|
|
99
|
-
pure
|
|
100
|
-
override
|
|
101
|
-
returns (
|
|
102
|
-
uint256 /*amountTokenOut*/
|
|
103
|
-
)
|
|
104
|
-
{
|
|
82
|
+
) internal pure override returns (uint256 /*amountTokenOut*/) {
|
|
105
83
|
return amountSharesToRedeem;
|
|
106
84
|
}
|
|
107
85
|
|
|
@@ -127,11 +105,7 @@ contract PendleGDaiSY is SYBase {
|
|
|
127
105
|
function assetInfo()
|
|
128
106
|
external
|
|
129
107
|
view
|
|
130
|
-
returns (
|
|
131
|
-
AssetType assetType,
|
|
132
|
-
address assetAddress,
|
|
133
|
-
uint8 assetDecimals
|
|
134
|
-
)
|
|
108
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals)
|
|
135
109
|
{
|
|
136
110
|
return (AssetType.TOKEN, DAI, 18);
|
|
137
111
|
}
|