@pendle/core-v2 1.1.1-mainnet → 1.3.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/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 +4 -0
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +592 -0
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.json +141 -0
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.json +50 -0
- 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 +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.json +1296 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.json +1283 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +1218 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +1231 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.json +133 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.json +40 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +322 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.json +1171 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +10 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.json +133 -0
- 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 +143 -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 +143 -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 +143 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.json +141 -0
- 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 +143 -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 +143 -2
- 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/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/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +123 -5
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.json +10 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.json +24 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.json +133 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.json +328 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.json +467 -0
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{IPFeeDistributorFactory.sol/IPFeeDistributorFactory.json → Balancer/IGauge.sol/IGauge.json} +18 -33
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.json +30 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.json +398 -0
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.json +24 -0
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.json +278 -0
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.json +18 -0
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +43 -32
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.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/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/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +322 -0
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +2 -2
- 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/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.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/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.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/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.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/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouterEthereum.sol/IMultihopRouterEthereum.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/{IMultihopRouter.sol/IMultihopRouter.json → IMultihopRouterEthereum.sol/IMultihopRouterEthereum.json} +3 -3
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +224 -0
- package/contracts/core/BulkSeller/BulkSeller.sol +1 -1
- package/contracts/core/StandardizedYield/SYBase.sol +23 -5
- package/contracts/core/StandardizedYield/StEthHelper.sol +71 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol +170 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol +162 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +134 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +154 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +289 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol +618 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +68 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +322 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +390 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +329 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +30 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +189 -0
- package/contracts/core/libraries/ArrayLib.sol +12 -0
- package/contracts/core/libraries/Errors.sol +13 -2
- package/contracts/interfaces/Balancer/IAsset.sol +4 -0
- package/contracts/interfaces/Balancer/IBalancerFees.sol +6 -0
- package/contracts/interfaces/Balancer/IBalancerStablePreview.sol +22 -0
- package/contracts/interfaces/Balancer/IBasePool.sol +30 -0
- package/contracts/interfaces/Balancer/IComposableStable.sol +39 -0
- package/contracts/interfaces/Balancer/IGauge.sol +10 -0
- package/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol +6 -0
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +31 -0
- package/contracts/interfaces/Balancer/IRateProvider.sol +6 -0
- package/contracts/interfaces/Balancer/IVault.sol +78 -0
- package/contracts/interfaces/ConvexCurve/IRewards.sol +5 -0
- package/contracts/interfaces/IPFeeDistributor.sol +12 -10
- package/contracts/offchain-helpers/Multicall2.sol +103 -0
- package/contracts/router/kyberswap/AggregationRouterHelper.sol +47 -23
- package/contracts/router/kyberswap/{IMultihopRouter.sol → IMultihopRouterEthereum.sol} +11 -9
- package/deployments/1-core.json +2 -1
- package/deployments/1-markets/BALANCER-LP-AURA-RETH-WETH-28DEC.json +11 -0
- package/package.json +6 -6
- package/typechain-types/BribeDistributor.ts +363 -0
- package/typechain-types/ComposableStablePreview.ts +217 -0
- package/typechain-types/DistributorBase.ts +363 -0
- package/typechain-types/FeeDistributor.ts +416 -0
- package/typechain-types/IBalancerFees.ts +89 -0
- package/typechain-types/IBalancerStablePreview.ts +217 -0
- package/typechain-types/IBasePool.ts +482 -0
- package/typechain-types/IComposableStable.ts +730 -0
- package/typechain-types/IGauge.ts +160 -0
- package/typechain-types/ILiquidityGaugeFactory.ts +99 -0
- package/typechain-types/IMetaStablePool.ts +619 -0
- package/typechain-types/IMultihopRouterEthereum.ts +209 -0
- package/typechain-types/IPFeeDistributor.ts +61 -78
- package/typechain-types/IPFeeDistributorFactory.ts +53 -139
- package/typechain-types/IRateProvider.ts +81 -0
- package/typechain-types/IRewards.ts +35 -5
- package/typechain-types/IVault.ts +410 -0
- package/typechain-types/MetaStableMath.ts +113 -0
- package/typechain-types/MetaStablePreview.ts +501 -0
- package/typechain-types/Multicall2.ts +437 -0
- package/typechain-types/PendleAura3EthSY.ts +1639 -0
- package/typechain-types/PendleAuraBalancerStableLPSY.ts +1523 -0
- package/typechain-types/PendleAuraCbethWstethSY.ts +1626 -0
- package/typechain-types/PendleAuraWethRethSY.ts +1549 -0
- package/typechain-types/PendleAuraWethWstethSY.ts +1562 -0
- package/typechain-types/PendleConvexLPSY.ts +204 -0
- package/typechain-types/PendleCurveFraxUsdcSY.ts +204 -0
- package/typechain-types/PendleCurveUsdd3CrvSY.ts +204 -0
- package/typechain-types/PendleFeeDistributor.ts +409 -117
- package/typechain-types/PendleLooksStakingSY.ts +204 -0
- package/typechain-types/PendleQiTokenSY.ts +204 -0
- package/typechain-types/PendleWstEthSY.ts +204 -0
- package/typechain-types/SAPE.ts +204 -0
- package/typechain-types/SYBase.ts +204 -0
- package/typechain-types/SYBaseWithRewards.ts +204 -0
- package/typechain-types/StEthHelper.ts +107 -0
- package/typechain-types/StablePreviewBase.ts +217 -0
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionCallback__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/ActionSwapPTYT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/BribeDistributor__factory.ts +303 -0
- 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/ComposableStablePreview__factory.ts +190 -0
- package/typechain-types/factories/DistributorBase__factory.ts +249 -0
- package/typechain-types/factories/Errors__factory.ts +122 -4
- package/typechain-types/factories/FeeDistributor__factory.ts +339 -0
- package/typechain-types/factories/IBalancerFees__factory.ts +36 -0
- package/typechain-types/factories/IBalancerStablePreview__factory.ts +152 -0
- package/typechain-types/factories/IBasePool__factory.ts +340 -0
- package/typechain-types/factories/IComposableStable__factory.ts +482 -0
- package/typechain-types/factories/IGauge__factory.ts +70 -0
- package/typechain-types/factories/ILiquidityGaugeFactory__factory.ts +49 -0
- package/typechain-types/factories/IMetaStablePool__factory.ts +413 -0
- package/typechain-types/factories/IMultihopRouterEthereum__factory.ts +155 -0
- package/typechain-types/factories/IPFeeDistributorFactory__factory.ts +25 -34
- package/typechain-types/factories/IPFeeDistributor__factory.ts +42 -31
- package/typechain-types/factories/IRateProvider__factory.ts +36 -0
- package/typechain-types/factories/IRewards__factory.ts +18 -0
- package/typechain-types/factories/IVault__factory.ts +287 -0
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -1
- package/typechain-types/factories/MetaStableMath__factory.ts +93 -0
- package/typechain-types/factories/MetaStablePreview__factory.ts +375 -0
- package/typechain-types/factories/Multicall2__factory.ts +372 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAura3EthSY__factory.ts +1365 -0
- package/typechain-types/factories/PendleAuraBalancerStableLPSY__factory.ts +1190 -0
- package/typechain-types/factories/PendleAuraCbethWstethSY__factory.ts +1356 -0
- package/typechain-types/factories/PendleAuraWethRethSY__factory.ts +1291 -0
- package/typechain-types/factories/PendleAuraWethWstethSY__factory.ts +1304 -0
- package/typechain-types/factories/PendleConvexLPSY__factory.ts +141 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +142 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +142 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +341 -66
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +142 -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/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +142 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +142 -1
- package/typechain-types/factories/PendleYieldContractFactory__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 +142 -1
- package/typechain-types/factories/SYBaseWithRewards__factory.ts +141 -0
- package/typechain-types/factories/SYBase__factory.ts +141 -0
- package/typechain-types/factories/StEthHelper__factory.ts +62 -0
- package/typechain-types/factories/StablePreviewBase__factory.ts +148 -0
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +193 -40
- package/typechain-types/index.ts +44 -10
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.json +0 -131
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -310
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +0 -389
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouter.sol/IMultihopRouter.dbg.json +0 -4
- package/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol +0 -159
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol +0 -99
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol +0 -70
- package/contracts/interfaces/IPFeeDistributorFactory.sol +0 -14
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./IBasePool.sol";
|
|
5
|
+
import "./IRateProvider.sol";
|
|
6
|
+
|
|
7
|
+
interface IComposableStable is IBasePool {
|
|
8
|
+
function getLastJoinExitData()
|
|
9
|
+
external
|
|
10
|
+
view
|
|
11
|
+
returns (uint256 lastJoinExitAmplification, uint256 lastPostJoinExitInvariant);
|
|
12
|
+
|
|
13
|
+
function getAmplificationParameter()
|
|
14
|
+
external
|
|
15
|
+
view
|
|
16
|
+
returns (
|
|
17
|
+
uint256 value,
|
|
18
|
+
bool isUpdating,
|
|
19
|
+
uint256 precision
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
function getProtocolFeePercentageCache(uint256 feeType) external view returns (uint256);
|
|
23
|
+
|
|
24
|
+
function isTokenExemptFromYieldProtocolFee(IERC20 token) external view returns (bool);
|
|
25
|
+
|
|
26
|
+
function getTokenRateCache(IERC20 token)
|
|
27
|
+
external
|
|
28
|
+
view
|
|
29
|
+
returns (
|
|
30
|
+
uint256 rate,
|
|
31
|
+
uint256 oldRate,
|
|
32
|
+
uint256 duration,
|
|
33
|
+
uint256 expires
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
function getRateProviders() external view returns (IRateProvider[] memory);
|
|
37
|
+
|
|
38
|
+
function getBptIndex() external view returns (uint256);
|
|
39
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
interface IGauge {
|
|
5
|
+
function claim_rewards(address _addr, address _receiver) external;
|
|
6
|
+
|
|
7
|
+
function reward_count() external view returns (uint256);
|
|
8
|
+
|
|
9
|
+
function reward_tokens(uint256 arg0) external view returns (address);
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "./IBasePool.sol";
|
|
5
|
+
|
|
6
|
+
interface IMetaStablePool is IBasePool {
|
|
7
|
+
function getLastInvariant()
|
|
8
|
+
external
|
|
9
|
+
view
|
|
10
|
+
returns (uint256 lastInvariant, uint256 lastInvariantAmp);
|
|
11
|
+
|
|
12
|
+
function getAmplificationParameter()
|
|
13
|
+
external
|
|
14
|
+
view
|
|
15
|
+
returns (
|
|
16
|
+
uint256 value,
|
|
17
|
+
bool isUpdating,
|
|
18
|
+
uint256 precision
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
function getSwapFeePercentage() external view returns (uint256);
|
|
22
|
+
|
|
23
|
+
function getPriceRateCache(IERC20 token)
|
|
24
|
+
external
|
|
25
|
+
view
|
|
26
|
+
returns (
|
|
27
|
+
uint256 rate,
|
|
28
|
+
uint256 duration,
|
|
29
|
+
uint256 expires
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
+
import "./IAsset.sol";
|
|
6
|
+
|
|
7
|
+
interface IVault {
|
|
8
|
+
struct JoinPoolRequest {
|
|
9
|
+
address[] assets;
|
|
10
|
+
uint256[] maxAmountsIn;
|
|
11
|
+
bytes userData;
|
|
12
|
+
bool fromInternalBalance;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function joinPool(
|
|
16
|
+
bytes32 poolId,
|
|
17
|
+
address sender,
|
|
18
|
+
address recipient,
|
|
19
|
+
JoinPoolRequest memory request
|
|
20
|
+
) external payable;
|
|
21
|
+
|
|
22
|
+
struct ExitPoolRequest {
|
|
23
|
+
address[] assets;
|
|
24
|
+
uint256[] minAmountsOut;
|
|
25
|
+
bytes userData;
|
|
26
|
+
bool toInternalBalance;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function exitPool(
|
|
30
|
+
bytes32 poolId,
|
|
31
|
+
address sender,
|
|
32
|
+
address payable recipient,
|
|
33
|
+
ExitPoolRequest memory request
|
|
34
|
+
) external;
|
|
35
|
+
|
|
36
|
+
enum SwapKind {
|
|
37
|
+
GIVEN_IN,
|
|
38
|
+
GIVEN_OUT
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
struct SingleSwap {
|
|
42
|
+
bytes32 poolId;
|
|
43
|
+
SwapKind kind;
|
|
44
|
+
IAsset assetIn;
|
|
45
|
+
IAsset assetOut;
|
|
46
|
+
uint256 amount;
|
|
47
|
+
bytes userData;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
struct FundManagement {
|
|
51
|
+
address sender;
|
|
52
|
+
bool fromInternalBalance;
|
|
53
|
+
address payable recipient;
|
|
54
|
+
bool toInternalBalance;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function swap(
|
|
58
|
+
SingleSwap memory singleSwap,
|
|
59
|
+
FundManagement memory funds,
|
|
60
|
+
uint256 limit,
|
|
61
|
+
uint256 deadline
|
|
62
|
+
) external payable returns (uint256);
|
|
63
|
+
|
|
64
|
+
function getPoolTokens(bytes32 poolId)
|
|
65
|
+
external
|
|
66
|
+
view
|
|
67
|
+
returns (
|
|
68
|
+
IERC20[] memory tokens,
|
|
69
|
+
uint256[] memory balances,
|
|
70
|
+
uint256 lastChangeBlock
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
function WETH() external view returns (IERC20);
|
|
74
|
+
|
|
75
|
+
function getPool(bytes32 poolId) external view returns (address, uint8);
|
|
76
|
+
|
|
77
|
+
function getProtocolFeesCollector() external view returns (address);
|
|
78
|
+
}
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
pragma solidity 0.8.17;
|
|
3
3
|
|
|
4
4
|
interface IPFeeDistributor {
|
|
5
|
-
event
|
|
5
|
+
event UpdateFee(address indexed pool, uint256 indexed wTime, uint256 amount);
|
|
6
6
|
|
|
7
|
-
event ClaimReward(
|
|
8
|
-
address indexed user,
|
|
9
|
-
address indexed rewardToken,
|
|
10
|
-
uint256 lastEpochClaimed,
|
|
11
|
-
uint256 totalReward
|
|
12
|
-
);
|
|
7
|
+
event ClaimReward(address indexed pool, address indexed user, uint256 wTime, uint256 amount);
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
event PoolAdded(address indexed pool, uint256 indexed startWeek);
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
struct UserInfo {
|
|
12
|
+
uint128 firstUnclaimedWeek;
|
|
13
|
+
uint128 iter;
|
|
14
|
+
}
|
|
17
15
|
|
|
18
|
-
function
|
|
16
|
+
function claimReward(address user, address[] calldata pools)
|
|
17
|
+
external
|
|
18
|
+
returns (uint256[] memory amountRewardOut);
|
|
19
|
+
|
|
20
|
+
function getAllPools() external view returns (address[] memory);
|
|
19
21
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
pragma solidity >=0.5.0;
|
|
2
|
+
pragma experimental ABIEncoderV2;
|
|
3
|
+
|
|
4
|
+
/// @title Multicall2 - Aggregate results from multiple read-only function calls
|
|
5
|
+
/// @author Michael Elliot <mike@makerdao.com>
|
|
6
|
+
/// @author Joshua Levine <joshua@makerdao.com>
|
|
7
|
+
/// @author Nick Johnson <arachnid@notdot.net>
|
|
8
|
+
|
|
9
|
+
contract Multicall2 {
|
|
10
|
+
struct Call {
|
|
11
|
+
address target;
|
|
12
|
+
bytes callData;
|
|
13
|
+
}
|
|
14
|
+
struct Result {
|
|
15
|
+
bool success;
|
|
16
|
+
bytes returnData;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function aggregate(Call[] memory calls)
|
|
20
|
+
public
|
|
21
|
+
returns (uint256 blockNumber, bytes[] memory returnData)
|
|
22
|
+
{
|
|
23
|
+
blockNumber = block.number;
|
|
24
|
+
returnData = new bytes[](calls.length);
|
|
25
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
26
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
27
|
+
require(success, "Multicall aggregate: call failed");
|
|
28
|
+
returnData[i] = ret;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function blockAndAggregate(Call[] memory calls)
|
|
33
|
+
public
|
|
34
|
+
returns (
|
|
35
|
+
uint256 blockNumber,
|
|
36
|
+
bytes32 blockHash,
|
|
37
|
+
Result[] memory returnData
|
|
38
|
+
)
|
|
39
|
+
{
|
|
40
|
+
(blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {
|
|
44
|
+
blockHash = blockhash(blockNumber);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getBlockNumber() public view returns (uint256 blockNumber) {
|
|
48
|
+
blockNumber = block.number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getCurrentBlockCoinbase() public view returns (address coinbase) {
|
|
52
|
+
coinbase = block.coinbase;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {
|
|
56
|
+
difficulty = block.difficulty;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {
|
|
60
|
+
gaslimit = block.gaslimit;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {
|
|
64
|
+
timestamp = block.timestamp;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getEthBalance(address addr) public view returns (uint256 balance) {
|
|
68
|
+
balance = addr.balance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getLastBlockHash() public view returns (bytes32 blockHash) {
|
|
72
|
+
blockHash = blockhash(block.number - 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function tryAggregate(bool requireSuccess, Call[] memory calls)
|
|
76
|
+
public
|
|
77
|
+
returns (Result[] memory returnData)
|
|
78
|
+
{
|
|
79
|
+
returnData = new Result[](calls.length);
|
|
80
|
+
for (uint256 i = 0; i < calls.length; i++) {
|
|
81
|
+
(bool success, bytes memory ret) = calls[i].target.call(calls[i].callData);
|
|
82
|
+
|
|
83
|
+
if (requireSuccess) {
|
|
84
|
+
require(success, "Multicall2 aggregate: call failed");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
returnData[i] = Result(success, ret);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls)
|
|
92
|
+
public
|
|
93
|
+
returns (
|
|
94
|
+
uint256 blockNumber,
|
|
95
|
+
bytes32 blockHash,
|
|
96
|
+
Result[] memory returnData
|
|
97
|
+
)
|
|
98
|
+
{
|
|
99
|
+
blockNumber = block.number;
|
|
100
|
+
blockHash = blockhash(block.number);
|
|
101
|
+
returnData = tryAggregate(requireSuccess, calls);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
3
|
pragma solidity 0.8.17;
|
|
4
4
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
-
import "./
|
|
5
|
+
import "./IMultihopRouterEthereum.sol";
|
|
6
6
|
import "./IAggregatorRouterHelper.sol";
|
|
7
|
+
import "../../interfaces/IWETH.sol";
|
|
7
8
|
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
8
9
|
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
9
10
|
|
|
@@ -40,8 +41,7 @@ contract AggregationRouterHelper is
|
|
|
40
41
|
BALANCERV2,
|
|
41
42
|
KYBERRFQ,
|
|
42
43
|
DODO,
|
|
43
|
-
|
|
44
|
-
PLATYPUS
|
|
44
|
+
WSTETH
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
struct SwapDescription {
|
|
@@ -65,7 +65,7 @@ contract AggregationRouterHelper is
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
struct SwapExecutorDescription {
|
|
68
|
-
|
|
68
|
+
IMultihopRouterEthereum.Swap[][] swapSequences;
|
|
69
69
|
address tokenIn;
|
|
70
70
|
address tokenOut;
|
|
71
71
|
uint256 minTotalAmountOut;
|
|
@@ -80,6 +80,15 @@ contract AggregationRouterHelper is
|
|
|
80
80
|
returns (bytes memory)
|
|
81
81
|
{
|
|
82
82
|
bytes4 selector = bytes4(kybercall[:4]);
|
|
83
|
+
|
|
84
|
+
if (selector == IWETH.deposit.selector) {
|
|
85
|
+
return kybercall; // no scaling needed
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (selector == IWETH.withdraw.selector) {
|
|
89
|
+
return abi.encodeWithSelector(selector, newAmount);
|
|
90
|
+
}
|
|
91
|
+
|
|
83
92
|
(
|
|
84
93
|
address caller,
|
|
85
94
|
SwapDescription memory desc,
|
|
@@ -178,7 +187,7 @@ contract AggregationRouterHelper is
|
|
|
178
187
|
|
|
179
188
|
uint256 newTotalSwapAmount;
|
|
180
189
|
for (uint256 i = 0; i < swapExecutorDescription.swapSequences.length; i++) {
|
|
181
|
-
|
|
190
|
+
IMultihopRouterEthereum.Swap memory swap = swapExecutorDescription.swapSequences[i][0];
|
|
182
191
|
uint8 dexType = uint8(swap.dexOption >> 8);
|
|
183
192
|
uint256 value;
|
|
184
193
|
if (i == swapExecutorDescription.swapSequences.length - 1)
|
|
@@ -200,8 +209,8 @@ contract AggregationRouterHelper is
|
|
|
200
209
|
revert("kyber: can't scale kyberrfq");
|
|
201
210
|
} else if (dexType == uint8(DexType.DODO)) {
|
|
202
211
|
(swap.data, value) = _newDODOSwap(swap.data, value, oldAmount, newAmount);
|
|
203
|
-
} else if (dexType == uint8(DexType.
|
|
204
|
-
(swap.data, value) =
|
|
212
|
+
} else if (dexType == uint8(DexType.WSTETH)) {
|
|
213
|
+
(swap.data, value) = _newWrappedstETHSwap(swap.data, value, oldAmount, newAmount);
|
|
205
214
|
} else {
|
|
206
215
|
revert("AggregationExecutor: Dex type not supported");
|
|
207
216
|
}
|
|
@@ -216,7 +225,10 @@ contract AggregationRouterHelper is
|
|
|
216
225
|
uint256 oldAmount,
|
|
217
226
|
uint256 newAmount
|
|
218
227
|
) internal pure returns (bytes memory, uint256) {
|
|
219
|
-
|
|
228
|
+
IMultihopRouterEthereum.UniSwap memory uniSwap = abi.decode(
|
|
229
|
+
data,
|
|
230
|
+
(IMultihopRouterEthereum.UniSwap)
|
|
231
|
+
);
|
|
220
232
|
if (value > 0) uniSwap.collectAmount = value;
|
|
221
233
|
else uniSwap.collectAmount = (uniSwap.collectAmount * newAmount) / oldAmount;
|
|
222
234
|
return (abi.encode(uniSwap), uniSwap.collectAmount);
|
|
@@ -228,9 +240,9 @@ contract AggregationRouterHelper is
|
|
|
228
240
|
uint256 oldAmount,
|
|
229
241
|
uint256 newAmount
|
|
230
242
|
) internal pure returns (bytes memory, uint256) {
|
|
231
|
-
|
|
243
|
+
IMultihopRouterEthereum.StableSwap memory stableSwap = abi.decode(
|
|
232
244
|
data,
|
|
233
|
-
(
|
|
245
|
+
(IMultihopRouterEthereum.StableSwap)
|
|
234
246
|
);
|
|
235
247
|
if (value > 0) stableSwap.dx = value;
|
|
236
248
|
else stableSwap.dx = (stableSwap.dx * newAmount) / oldAmount;
|
|
@@ -243,7 +255,10 @@ contract AggregationRouterHelper is
|
|
|
243
255
|
uint256 oldAmount,
|
|
244
256
|
uint256 newAmount
|
|
245
257
|
) internal pure returns (bytes memory, uint256) {
|
|
246
|
-
|
|
258
|
+
IMultihopRouterEthereum.CurveSwap memory curveSwap = abi.decode(
|
|
259
|
+
data,
|
|
260
|
+
(IMultihopRouterEthereum.CurveSwap)
|
|
261
|
+
);
|
|
247
262
|
if (value > 0) curveSwap.dx = value;
|
|
248
263
|
else curveSwap.dx = (curveSwap.dx * newAmount) / oldAmount;
|
|
249
264
|
return (abi.encode(curveSwap), curveSwap.dx);
|
|
@@ -255,7 +270,10 @@ contract AggregationRouterHelper is
|
|
|
255
270
|
uint256 oldAmount,
|
|
256
271
|
uint256 newAmount
|
|
257
272
|
) internal pure returns (bytes memory, uint256) {
|
|
258
|
-
|
|
273
|
+
IMultihopRouterEthereum.UniSwap memory kyberDMMSwap = abi.decode(
|
|
274
|
+
data,
|
|
275
|
+
(IMultihopRouterEthereum.UniSwap)
|
|
276
|
+
);
|
|
259
277
|
if (value > 0) kyberDMMSwap.collectAmount = value;
|
|
260
278
|
else kyberDMMSwap.collectAmount = (kyberDMMSwap.collectAmount * newAmount) / oldAmount;
|
|
261
279
|
return (abi.encode(kyberDMMSwap), kyberDMMSwap.collectAmount);
|
|
@@ -267,9 +285,9 @@ contract AggregationRouterHelper is
|
|
|
267
285
|
uint256 oldAmount,
|
|
268
286
|
uint256 newAmount
|
|
269
287
|
) internal pure returns (bytes memory, uint256) {
|
|
270
|
-
|
|
288
|
+
IMultihopRouterEthereum.UniSwapV3ProMM memory uniSwapV3ProMM = abi.decode(
|
|
271
289
|
data,
|
|
272
|
-
(
|
|
290
|
+
(IMultihopRouterEthereum.UniSwapV3ProMM)
|
|
273
291
|
);
|
|
274
292
|
if (value > 0) uniSwapV3ProMM.swapAmount = value;
|
|
275
293
|
else uniSwapV3ProMM.swapAmount = (uniSwapV3ProMM.swapAmount * newAmount) / oldAmount;
|
|
@@ -282,9 +300,9 @@ contract AggregationRouterHelper is
|
|
|
282
300
|
uint256 oldAmount,
|
|
283
301
|
uint256 newAmount
|
|
284
302
|
) internal pure returns (bytes memory, uint256) {
|
|
285
|
-
|
|
303
|
+
IMultihopRouterEthereum.BalancerV2 memory balancerV2 = abi.decode(
|
|
286
304
|
data,
|
|
287
|
-
(
|
|
305
|
+
(IMultihopRouterEthereum.BalancerV2)
|
|
288
306
|
);
|
|
289
307
|
if (value > 0) balancerV2.amount = value;
|
|
290
308
|
else balancerV2.amount = (balancerV2.amount * newAmount) / oldAmount;
|
|
@@ -297,21 +315,27 @@ contract AggregationRouterHelper is
|
|
|
297
315
|
uint256 oldAmount,
|
|
298
316
|
uint256 newAmount
|
|
299
317
|
) internal pure returns (bytes memory, uint256) {
|
|
300
|
-
|
|
318
|
+
IMultihopRouterEthereum.DODO memory dodo = abi.decode(
|
|
319
|
+
data,
|
|
320
|
+
(IMultihopRouterEthereum.DODO)
|
|
321
|
+
);
|
|
301
322
|
if (value > 0) dodo.amount = value;
|
|
302
323
|
else dodo.amount = (dodo.amount * newAmount) / oldAmount;
|
|
303
324
|
return (abi.encode(dodo), dodo.amount);
|
|
304
325
|
}
|
|
305
326
|
|
|
306
|
-
function
|
|
327
|
+
function _newWrappedstETHSwap(
|
|
307
328
|
bytes memory data,
|
|
308
329
|
uint256 value,
|
|
309
330
|
uint256 oldAmount,
|
|
310
331
|
uint256 newAmount
|
|
311
332
|
) internal pure returns (bytes memory, uint256) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
333
|
+
IMultihopRouterEthereum.WSTETH memory wstEthData = abi.decode(
|
|
334
|
+
data,
|
|
335
|
+
(IMultihopRouterEthereum.WSTETH)
|
|
336
|
+
);
|
|
337
|
+
if (value > 0) wstEthData.amount = value;
|
|
338
|
+
else wstEthData.amount = (wstEthData.amount * newAmount) / oldAmount;
|
|
339
|
+
return (abi.encode(wstEthData), wstEthData.amount);
|
|
316
340
|
}
|
|
317
341
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
// SPDX-License-Identifier:
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
|
-
pragma solidity
|
|
3
|
+
pragma solidity 0.8.17;
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface IMultihopRouter {
|
|
5
|
+
interface IMultihopRouterEthereum {
|
|
8
6
|
enum DexType {
|
|
9
7
|
UNI,
|
|
10
8
|
STABLESWAP,
|
|
@@ -15,8 +13,7 @@ interface IMultihopRouter {
|
|
|
15
13
|
BALANCERV2,
|
|
16
14
|
KYBERRFQ,
|
|
17
15
|
DODO,
|
|
18
|
-
|
|
19
|
-
PLATYPUS
|
|
16
|
+
WSTETH
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
event Exchange(address pair, uint256 amountOut, address output);
|
|
@@ -32,13 +29,18 @@ interface IMultihopRouter {
|
|
|
32
29
|
// 6: balancerv2
|
|
33
30
|
// 7: kyber RFQ
|
|
34
31
|
// 8: dodo
|
|
35
|
-
// 9:
|
|
36
|
-
// 10: platypus
|
|
32
|
+
// 9: wstETH: Lido wrapped stETH
|
|
37
33
|
//dexId:
|
|
38
34
|
// 0: firebird
|
|
39
35
|
uint16 dexOption; //dexType(8bit) + dexId(8bit)
|
|
40
36
|
}
|
|
41
37
|
|
|
38
|
+
struct WSTETH {
|
|
39
|
+
address pool;
|
|
40
|
+
uint256 amount;
|
|
41
|
+
bool isWrapping;
|
|
42
|
+
}
|
|
43
|
+
|
|
42
44
|
struct UniSwap {
|
|
43
45
|
address pool;
|
|
44
46
|
address tokenIn;
|
package/deployments/1-core.json
CHANGED
|
@@ -25,5 +25,6 @@
|
|
|
25
25
|
"vePendle": "0x4f30A9D41B80ecC5B94306AB4364951AE3170210",
|
|
26
26
|
"senderEndpoint": "0x07b1014c88f14C9E910092526db57A20052E989F",
|
|
27
27
|
"votingController": "0x44087E105137a5095c008AaB6a6530182821F2F0",
|
|
28
|
-
"gaugeController": "0x47D74516B33eD5D70ddE7119A40839f6Fcc24e57"
|
|
28
|
+
"gaugeController": "0x47D74516B33eD5D70ddE7119A40839f6Fcc24e57",
|
|
29
|
+
"feeDistributor": "0xd7b34a6fDCb2A7ceD2115FF7f5fdD72aa6aA4dE2"
|
|
29
30
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SY rETH-WETH_BalancerLP Aura",
|
|
3
|
+
"SY": "0xdf7083f2A0F8a191ab5eEAFebE92ED21cD3Dd915",
|
|
4
|
+
"YT": "0x0F28A763198035825dFAdF3455cB5b8473a7c140",
|
|
5
|
+
"PT": "0xfbd85BF7A1E1bec0da6D12964B8c05471aE8f048",
|
|
6
|
+
"market": "0x5546d0f27BEd4075eA03a22c58F7016E24c94EA7",
|
|
7
|
+
"expiry": 1703721600,
|
|
8
|
+
"bulkSeller": "0xB2075aeEd11C2D261c3D80c957F495D18cF874ed",
|
|
9
|
+
"scalarRoot": "27500000000000000000",
|
|
10
|
+
"initAnchor": "1067325733000000000"
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@pendle/core-v2",
|
|
3
3
|
"description": "Core smart contracts of Pendle Protocol.",
|
|
4
4
|
"license": "BUSL-1.1",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.3.0-mainnet",
|
|
6
6
|
"homepage": "https://pendle.finance",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"pendle",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@typechain/ethers-v5": "^9.0.0",
|
|
27
27
|
"@typechain/hardhat": "^4.0.0",
|
|
28
|
-
"hardhat": "^2.12.
|
|
28
|
+
"hardhat": "^2.12.5",
|
|
29
29
|
"hardhat-contract-sizer": "^2.6.1",
|
|
30
30
|
"hardhat-storage-layout-diff": "^0.0.4",
|
|
31
|
-
"prettier": "^2.
|
|
32
|
-
"prettier-plugin-solidity": "^1.
|
|
31
|
+
"prettier": "^2.8.2",
|
|
32
|
+
"prettier-plugin-solidity": "^1.1.1",
|
|
33
33
|
"solc": "^0.8.17",
|
|
34
34
|
"solhint": "^3.3.7",
|
|
35
35
|
"ts-node": "^10.9.1",
|
|
36
36
|
"typechain": "^8.1.1",
|
|
37
|
-
"typescript": "^4.9.
|
|
37
|
+
"typescript": "^4.9.4"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"compile": "yarn hardhat compile",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"clean": "yarn hardhat clean",
|
|
43
43
|
"fcompile": "yarn clean && yarn compile"
|
|
44
44
|
},
|
|
45
|
-
"packageManager": "yarn@3.
|
|
45
|
+
"packageManager": "yarn@3.3.1",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@openzeppelin/contracts": "4.7.3",
|
|
48
48
|
"@openzeppelin/contracts-upgradeable": "4.7.3"
|