@pendle/core-v2 2.9.0-mainnet → 2.10.1-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/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +492 -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/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.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/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +7 -2
- package/build/artifacts/contracts/core/libraries/math/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.json +169 -0
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/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/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +200 -0
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol/PendlePtUsdChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseCallback.sol/ActionBaseCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/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/OneInchAggregationRouterHelper.sol/OneInchAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapArbitrum.sol/PendleSwapArbitrum.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapArbitrum.sol/PendleSwapArbitrum.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapEthereum.sol/PendleSwapEthereum.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwapEthereum.sol/PendleSwapEthereum.json +2 -2
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol +166 -0
- package/contracts/core/libraries/Errors.sol +1 -0
- package/contracts/interfaces/IPFeeDistributor.sol +3 -4
- package/contracts/interfaces/IPFeeDistributorV2.sol +46 -0
- package/contracts/offchain-helpers/EmptyUUPS.sol +16 -0
- package/contracts/oracles/samples/PendlePtGlpOracle.sol +1 -1
- package/deployments/1-core.json +2 -1
- package/package.json +1 -1
- package/typechain-types/EmptyUUPS.ts +352 -0
- package/typechain-types/IChronosFactory.ts +245 -0
- package/typechain-types/IChronosPair.ts +631 -0
- package/typechain-types/IChronosRouter.ts +311 -0
- package/typechain-types/IERC721Receiver.ts +120 -0
- package/typechain-types/IMaGauge.ts +1246 -0
- package/typechain-types/IMaLPNFT.ts +1146 -0
- package/typechain-types/IPFeeDistributorV2.ts +287 -0
- package/typechain-types/IPair.ts +553 -0
- package/typechain-types/IPairFactory.ts +245 -0
- package/typechain-types/PendleChronosChrEthSY.ts +1520 -0
- package/typechain-types/PendleChronosNFTManager.ts +217 -0
- package/typechain-types/PendleChronosVolatilePairBase.ts +134 -0
- package/typechain-types/PendleFeeDistributorV2.ts +722 -0
- 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 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/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/EmptyUUPS__factory.ts +250 -0
- package/typechain-types/factories/Errors__factory.ts +6 -1
- package/typechain-types/factories/IChronosFactory__factory.ts +167 -0
- package/typechain-types/factories/IChronosPair__factory.ts +473 -0
- package/typechain-types/factories/IChronosRouter__factory.ts +210 -0
- package/typechain-types/factories/IERC721Receiver__factory.ts +60 -0
- package/typechain-types/factories/IMaGauge__factory.ts +740 -0
- package/typechain-types/factories/IMaLPNFT__factory.ts +702 -0
- package/typechain-types/factories/IPFeeDistributorV2__factory.ts +184 -0
- package/typechain-types/factories/IPairFactory__factory.ts +164 -0
- package/typechain-types/factories/IPair__factory.ts +392 -0
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleChronosChrEthSY__factory.ts +1323 -0
- package/typechain-types/factories/PendleChronosNFTManager__factory.ts +161 -0
- package/typechain-types/factories/PendleChronosVolatilePairBase__factory.ts +95 -0
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +549 -0
- 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/PendlePtGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePtOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapArbitrum__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapEthereum__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/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 +102 -30
- package/typechain-types/index.ts +24 -8
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -592
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +0 -219
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity 0.8.17;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
|
-
import "../../core/libraries/BoringOwnableUpgradeable.sol";
|
|
7
|
-
import "../../core/libraries/Errors.sol";
|
|
8
|
-
import "../../interfaces/IPFeeDistributor.sol";
|
|
9
|
-
import "../../interfaces/IPVotingEscrowMainchain.sol";
|
|
10
|
-
import "../../interfaces/IPVotingController.sol";
|
|
11
|
-
import "../libraries/WeekMath.sol";
|
|
12
|
-
import "../libraries/VeHistoryLib.sol";
|
|
13
|
-
import "../../core/libraries/ArrayLib.sol";
|
|
14
|
-
|
|
15
|
-
contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeable, IPFeeDistributor {
|
|
16
|
-
using SafeERC20 for IERC20;
|
|
17
|
-
using VeBalanceLib for VeBalance;
|
|
18
|
-
using ArrayLib for uint256[];
|
|
19
|
-
|
|
20
|
-
address public immutable votingController;
|
|
21
|
-
address public immutable vePendle;
|
|
22
|
-
address public immutable token;
|
|
23
|
-
|
|
24
|
-
address[] public allPools;
|
|
25
|
-
|
|
26
|
-
// [pool] => lastFundedWeek
|
|
27
|
-
mapping(address => uint256) public lastFundedWeek;
|
|
28
|
-
|
|
29
|
-
// [pool, user] => UserInfo
|
|
30
|
-
mapping(address => mapping(address => UserInfo)) public userInfo;
|
|
31
|
-
|
|
32
|
-
// [pool, epoch] => [fee]
|
|
33
|
-
mapping(address => mapping(uint256 => uint256)) public fees;
|
|
34
|
-
|
|
35
|
-
modifier ensureValidPool(address pool) {
|
|
36
|
-
if (lastFundedWeek[pool] == 0) revert Errors.FDInvalidPool(pool);
|
|
37
|
-
_;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
constructor(address _votingController, address _vePendle, address _rewardToken) initializer {
|
|
41
|
-
votingController = _votingController;
|
|
42
|
-
vePendle = _vePendle;
|
|
43
|
-
token = _rewardToken;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function addPool(address pool, uint256 _startWeek) external onlyOwner {
|
|
47
|
-
if (!WeekMath.isValidWTime(_startWeek) || _startWeek == 0)
|
|
48
|
-
revert Errors.FDInvalidStartEpoch(_startWeek);
|
|
49
|
-
|
|
50
|
-
if (lastFundedWeek[pool] != 0) revert Errors.FDPoolAlreadyExists(pool);
|
|
51
|
-
|
|
52
|
-
lastFundedWeek[pool] = _startWeek - WeekMath.WEEK;
|
|
53
|
-
allPools.push(pool);
|
|
54
|
-
|
|
55
|
-
emit PoolAdded(pool, _startWeek);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function getAllPools() external view returns (address[] memory) {
|
|
59
|
-
return allPools;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function fund(
|
|
63
|
-
address[] calldata pools,
|
|
64
|
-
uint256[][] calldata wTimes,
|
|
65
|
-
uint256[][] calldata amounts,
|
|
66
|
-
uint256 totalAmountToFund
|
|
67
|
-
) external onlyOwner {
|
|
68
|
-
uint256 length = pools.length;
|
|
69
|
-
if (wTimes.length != length || amounts.length != length)
|
|
70
|
-
revert Errors.ArrayLengthMismatch();
|
|
71
|
-
|
|
72
|
-
uint256 totalFunded = 0;
|
|
73
|
-
for (uint256 i = 0; i < length; ++i) {
|
|
74
|
-
_fund(pools[i], wTimes[i], amounts[i]);
|
|
75
|
-
totalFunded += amounts[i].sum();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (totalFunded != totalAmountToFund)
|
|
79
|
-
revert Errors.FDTotalAmountFundedNotMatch(totalFunded, totalAmountToFund);
|
|
80
|
-
|
|
81
|
-
IERC20(token).transferFrom(msg.sender, address(this), totalFunded);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _fund(
|
|
85
|
-
address pool,
|
|
86
|
-
uint256[] calldata wTimes,
|
|
87
|
-
uint256[] calldata amounts
|
|
88
|
-
) internal ensureValidPool(pool) {
|
|
89
|
-
if (wTimes.length != amounts.length) revert Errors.FDEpochLengthMismatch();
|
|
90
|
-
|
|
91
|
-
uint256 lastFunded = lastFundedWeek[pool];
|
|
92
|
-
|
|
93
|
-
uint256 curWeek = WeekMath.getCurrentWeekStart();
|
|
94
|
-
|
|
95
|
-
for (uint256 i = 0; i < amounts.length; ++i) {
|
|
96
|
-
uint256 wTime = wTimes[i];
|
|
97
|
-
uint256 amount = amounts[i];
|
|
98
|
-
|
|
99
|
-
if (wTime != lastFunded + WeekMath.WEEK)
|
|
100
|
-
revert Errors.FDInvalidWTimeFund(lastFunded, wTime);
|
|
101
|
-
|
|
102
|
-
fees[pool][wTime] += amount;
|
|
103
|
-
lastFunded += WeekMath.WEEK;
|
|
104
|
-
|
|
105
|
-
emit UpdateFee(pool, wTime, amount);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (lastFunded >= curWeek) revert Errors.FDInvalidWTimeFund(lastFunded, curWeek);
|
|
109
|
-
|
|
110
|
-
lastFundedWeek[pool] = lastFunded;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function claimReward(
|
|
114
|
-
address user,
|
|
115
|
-
address[] calldata pools
|
|
116
|
-
) external returns (uint256[] memory amountRewardOut) {
|
|
117
|
-
amountRewardOut = new uint256[](pools.length);
|
|
118
|
-
for (uint256 i = 0; i < pools.length; ) {
|
|
119
|
-
amountRewardOut[i] = _accumulateUserReward(pools[i], user);
|
|
120
|
-
unchecked {
|
|
121
|
-
i++;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
IERC20(token).safeTransfer(user, amountRewardOut.sum());
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function getAllActivePools() external view returns (address[] memory) {
|
|
128
|
-
return allPools;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function _accumulateUserReward(
|
|
132
|
-
address pool,
|
|
133
|
-
address user
|
|
134
|
-
) internal ensureValidPool(pool) returns (uint256 totalReward) {
|
|
135
|
-
uint256 length = _getUserCheckpointLength(pool, user);
|
|
136
|
-
if (length == 0) return 0;
|
|
137
|
-
|
|
138
|
-
uint256 lastWeek = lastFundedWeek[pool];
|
|
139
|
-
uint256 curWeek = userInfo[pool][user].firstUnclaimedWeek;
|
|
140
|
-
uint256 iter = userInfo[pool][user].iter;
|
|
141
|
-
|
|
142
|
-
if (curWeek > lastWeek) return 0; // nothing to account
|
|
143
|
-
|
|
144
|
-
Checkpoint memory checkpoint = _getUserCheckpointAt(pool, user, iter);
|
|
145
|
-
Checkpoint memory nextCheckpoint = checkpoint;
|
|
146
|
-
|
|
147
|
-
if (curWeek == 0) curWeek = checkpoint.timestamp + WeekMath.WEEK;
|
|
148
|
-
|
|
149
|
-
while (curWeek <= lastWeek) {
|
|
150
|
-
// we have at most one checkpoint per week
|
|
151
|
-
if (iter + 1 < length) {
|
|
152
|
-
if (nextCheckpoint.timestamp == checkpoint.timestamp) {
|
|
153
|
-
// next have been assigned to current checkpoint, so we need to get the next one
|
|
154
|
-
nextCheckpoint = _getUserCheckpointAt(pool, user, iter + 1);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (nextCheckpoint.timestamp < curWeek) {
|
|
158
|
-
iter++;
|
|
159
|
-
checkpoint = nextCheckpoint;
|
|
160
|
-
}
|
|
161
|
-
// Important invariant: checkpoint[iter] < curWeek <= checkpoint[iter+1]
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// assert(checkpoint.timestamp < curWeek); should always hold
|
|
165
|
-
|
|
166
|
-
uint256 userShare = checkpoint.value.getValueAt(uint128(curWeek));
|
|
167
|
-
if (userShare != 0) {
|
|
168
|
-
uint256 totalShare = _getPoolTotalSharesAt(pool, uint128(curWeek));
|
|
169
|
-
// userShare != 0 => totalShare != 0
|
|
170
|
-
uint256 amountRewardOut = (userShare * fees[pool][curWeek]) / totalShare;
|
|
171
|
-
totalReward += amountRewardOut;
|
|
172
|
-
emit ClaimReward(pool, user, curWeek, amountRewardOut);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
curWeek += WeekMath.WEEK;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
userInfo[pool][user] = UserInfo({
|
|
179
|
-
firstUnclaimedWeek: uint128(curWeek),
|
|
180
|
-
iter: uint128(iter)
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function _getPoolTotalSharesAt(address pool, uint128 wTime) internal view returns (uint256) {
|
|
185
|
-
if (pool == vePendle) {
|
|
186
|
-
return IPVotingEscrowMainchain(vePendle).totalSupplyAt(wTime);
|
|
187
|
-
} else {
|
|
188
|
-
return IPVotingController(votingController).getPoolTotalVoteAt(pool, wTime);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function _getUserCheckpointAt(
|
|
193
|
-
address pool,
|
|
194
|
-
address user,
|
|
195
|
-
uint256 index
|
|
196
|
-
) internal view returns (Checkpoint memory) {
|
|
197
|
-
if (pool == vePendle) {
|
|
198
|
-
return IPVotingEscrowMainchain(vePendle).getUserHistoryAt(user, index);
|
|
199
|
-
} else {
|
|
200
|
-
return IPVotingController(votingController).getUserPoolHistoryAt(user, pool, index);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function _getUserCheckpointLength(address pool, address user) internal view returns (uint256) {
|
|
205
|
-
if (pool == vePendle) {
|
|
206
|
-
return IPVotingEscrowMainchain(vePendle).getUserHistoryLength(user);
|
|
207
|
-
} else {
|
|
208
|
-
return IPVotingController(votingController).getUserPoolHistoryLength(user, pool);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function initialize() external initializer {
|
|
213
|
-
__BoringOwnable_init();
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// ----------------- upgrade-related -----------------
|
|
217
|
-
|
|
218
|
-
function _authorizeUpgrade(address) internal override onlyOwner {}
|
|
219
|
-
}
|