@pendle/core-v2 2.23.0 → 2.23.1-mantle
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/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/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/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/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- 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/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- 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/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- 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/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- 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/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- 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/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.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/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethVethSY.sol/PendleAuraWethVethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +1 -1
- 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/Linear/BbAPoolHelper.sol/BbAPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol/BbAWethHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol/LinearMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol/LinearPreview.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/MetaStablePreview.sol/MetaStablePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.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/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/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol/CamelotRewardHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- 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/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/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
- 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/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- 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/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- 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/Errors.sol/Errors.dbg.json +1 -1
- 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/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/Math.sol/Math.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrBNB.sol/IAnkrBNB.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Ankr/IAnkrLiquidStaking.sol/IAnkrLiquidStaking.dbg.json +1 -1
- 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/IERC4626LinearPool.sol/IERC4626LinearPool.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/BinanceEth/IWBETH.sol/IWBETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotFactory.sol/ICamelotFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTFactory.sol/ICamelotNFTFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTHandler.sol/ICamelotNFTHandler.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNFTPool.sol/ICamelotNFTPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPool.sol/ICamelotNitroPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol/ICamelotNitroPoolFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotPair.sol/ICamelotPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotRouter.sol/ICamelotRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/ICamelotYieldBooster.sol/ICamelotYieldBooster.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Camelot/IXGrail.sol/IXGrail.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/Frax/IFrxEthMinter.sol/IFrxEthMinter.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 +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMisc.sol/IPActionMisc.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/IPActionVePendleStatic.sol/IPActionVePendleStatic.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/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/IPFeeDistributorV2.sol/IPFeeDistributorV2.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 +1 -1
- 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/IPPtOracle.sol/IPPtOracle.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/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/IPendlePreviewHelper.sol/IPendlePreviewHelper.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/IStargateLP.sol/IStargateLP.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateStaking.sol/IStargateStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ISwETH.sol/ISwETH.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/interfaces/Thena/IThenaFactory.sol/IThenaFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaGaugeV2.sol/IThenaGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaPair.sol/IThenaPair.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Thena/IThenaRouter.sol/IThenaRouter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BoringLpSeller.sol/BoringLpSeller.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/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/LegacyNFTHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LegacyNFTHelper.sol/StarNFTV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PtAndLpToAsset.sol/PtAndLpToAsset.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- 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/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- 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/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- 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/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracle.sol/PendlePtOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePtOracleLib.sol/PendlePtOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendleLpGlpOracle.sol/PendleLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/PendlePtGlpOracle.sol/PendlePtGlpOracle.dbg.json +1 -1
- 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/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterHelper.sol/PendleRouterHelper.dbg.json +1 -1
- 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/MarketApproxPtOutLib.dbg.json +1 -1
- 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/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/KyberInputScalingHelper.sol/KyberInputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +4 -0
- package/contracts/core/Market/PendleExternalRewardDistributor.sol +126 -0
- package/contracts/core/Market/v2/PendleGaugeV2.sol +137 -0
- package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +170 -0
- package/contracts/core/Market/v2/PendleMarketV2.sol +373 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol +1 -607
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol +53 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol +600 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol +621 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +8 -0
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol +46 -0
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol +43 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol +120 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol +23 -0
- package/contracts/core/libraries/ArrayLib.sol +30 -0
- package/contracts/core/libraries/Errors.sol +2 -0
- package/contracts/interfaces/Balancer/IPComposableStablePreview.sol +23 -0
- package/contracts/interfaces/Balancer/IVersion.sol +13 -0
- package/contracts/interfaces/IPExternalRewardDistributor.sol +19 -0
- package/contracts/interfaces/IPMarketFactoryV2.sol +8 -0
- package/contracts/interfaces/IPOracleForSy.sol +7 -0
- package/contracts/router/swap-aggregator/PendleSwap.sol +1 -1
- package/deployments/5000-core.json +30 -0
- package/deployments/5000-markets/WSTETH-MANTLE-MARCH2024.json +10 -0
- package/deployments/merkle-distribution/2023-07-27.json +5525 -0
- package/package.json +7 -7
- package/typechain-types/BotActionCallback.ts +900 -0
- package/typechain-types/BotActionHelper.ts +950 -0
- package/typechain-types/BotDecisionHelper.ts +561 -0
- package/typechain-types/BotDecisionHelperBase.ts +484 -0
- package/typechain-types/BotDecisionLib.ts +335 -0
- package/typechain-types/CamelotV1LpHelper.ts +203 -0
- package/typechain-types/CamelotV1Preview.ts +431 -0
- package/typechain-types/IBotDecisionHelper.ts +452 -0
- package/typechain-types/ICamelotSY.ts +100 -0
- package/typechain-types/IExecutorHelper1.ts +643 -0
- package/typechain-types/IExecutorHelper2.ts +115 -0
- package/typechain-types/IExecutorHelperEthereum1.ts +643 -0
- package/typechain-types/IHashflow.ts +159 -0
- package/typechain-types/ILongYieldDecisionHelper.ts +486 -0
- package/typechain-types/ILongYieldTradingBot.ts +878 -0
- package/typechain-types/IPExternalRewardDistributor.ts +198 -0
- package/typechain-types/IPMarketFactoryV2.ts +253 -0
- package/typechain-types/IShortYieldDecisionHelper.ts +452 -0
- package/typechain-types/IShortYieldTradingBot.ts +770 -0
- package/typechain-types/ITradingBotBase.ts +569 -0
- package/typechain-types/LongYieldActionHelper.ts +900 -0
- package/typechain-types/LongYieldDecisionHelper.ts +601 -0
- package/typechain-types/LongYieldTradingBot.ts +1364 -0
- package/typechain-types/MarketExtLib.ts +81 -0
- package/typechain-types/PendleBinanceEth.ts +1229 -0
- package/typechain-types/PendleCamelotV1SY.ts +1961 -0
- package/typechain-types/PendleExternalRewardDistributor.ts +547 -0
- package/typechain-types/PendleGaugeV2.ts +225 -0
- package/typechain-types/PendleMarketFactoryV2.ts +930 -0
- package/typechain-types/PendleMarketV2.ts +1311 -0
- package/typechain-types/PendleSwETH.ts +1216 -0
- package/typechain-types/PendleSwapArbitrum.ts +126 -0
- package/typechain-types/PendleSwapEthereum.ts +126 -0
- package/typechain-types/ShortYieldActionHelper.ts +856 -0
- package/typechain-types/ShortYieldDecisionHelper.ts +601 -0
- package/typechain-types/ShortYieldTradingBot.ts +1212 -0
- package/typechain-types/TradingBotBase.ts +856 -0
- package/typechain-types/TradingBotOffchain.ts +568 -0
- package/typechain-types/factories/BotActionCallback__factory.ts +830 -0
- package/typechain-types/factories/BotActionHelper__factory.ts +947 -0
- package/typechain-types/factories/BotDecisionHelperBase__factory.ts +808 -0
- package/typechain-types/factories/BotDecisionHelper__factory.ts +1192 -0
- package/typechain-types/factories/BotDecisionLib__factory.ts +642 -0
- package/typechain-types/factories/CamelotV1LpHelper__factory.ts +143 -0
- package/typechain-types/factories/CamelotV1Preview__factory.ts +309 -0
- package/typechain-types/factories/IBotDecisionHelper__factory.ts +667 -0
- package/typechain-types/factories/ICamelotSY__factory.ts +49 -0
- package/typechain-types/factories/IExecutorHelper1__factory.ts +403 -0
- package/typechain-types/factories/IExecutorHelper2__factory.ts +55 -0
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +407 -0
- package/typechain-types/factories/IHashflow__factory.ts +113 -0
- package/typechain-types/factories/ILongYieldDecisionHelper__factory.ts +690 -0
- package/typechain-types/factories/ILongYieldTradingBot__factory.ts +996 -0
- package/typechain-types/factories/IPExternalRewardDistributor__factory.ts +128 -0
- package/typechain-types/factories/IPMarketFactoryV2__factory.ts +181 -0
- package/typechain-types/factories/IShortYieldDecisionHelper__factory.ts +671 -0
- package/typechain-types/factories/IShortYieldTradingBot__factory.ts +977 -0
- package/typechain-types/factories/ITradingBotBase__factory.ts +530 -0
- package/typechain-types/factories/LongYieldActionHelper__factory.ts +834 -0
- package/typechain-types/factories/LongYieldDecisionHelper__factory.ts +1272 -0
- package/typechain-types/factories/LongYieldTradingBot__factory.ts +1637 -0
- package/typechain-types/factories/MarketExtLib__factory.ts +74 -0
- package/typechain-types/factories/PendleBinanceEth__factory.ts +1052 -0
- package/typechain-types/factories/PendleCamelotV1SY__factory.ts +1595 -0
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +409 -0
- package/typechain-types/factories/PendleGaugeV2__factory.ts +140 -0
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +770 -0
- package/typechain-types/factories/PendleMarketV2__factory.ts +1290 -0
- package/typechain-types/factories/PendleSwETH__factory.ts +1022 -0
- package/typechain-types/factories/PendleSwapArbitrum__factory.ts +129 -0
- package/typechain-types/factories/PendleSwapEthereum__factory.ts +129 -0
- package/typechain-types/factories/ShortYieldActionHelper__factory.ts +784 -0
- package/typechain-types/factories/ShortYieldDecisionHelper__factory.ts +1272 -0
- package/typechain-types/factories/ShortYieldTradingBot__factory.ts +1445 -0
- package/typechain-types/factories/TradingBotBase__factory.ts +780 -0
- package/typechain-types/factories/TradingBotOffchain__factory.ts +1133 -0
- package/typechain-types/hardhat.d.ts +72 -0
- package/typechain-types/index.ts +16 -0
- /package/contracts/router/swap-aggregator/{1inch → oneinch}/I1inchAggregationRouterV5.sol +0 -0
- /package/contracts/router/swap-aggregator/{1inch → oneinch}/OneInchAggregationRouterHelper.sol +0 -0
|
@@ -16,6 +16,8 @@ library LayerZeroHelper {
|
|
|
16
16
|
else if (chainId == 56) return 102;
|
|
17
17
|
// binance smart chain
|
|
18
18
|
else if (chainId == 1) return 101;
|
|
19
|
+
// mantle
|
|
20
|
+
else if (chainId == 5000) return 181;
|
|
19
21
|
assert(false);
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -31,6 +33,8 @@ library LayerZeroHelper {
|
|
|
31
33
|
else if (chainId == 102) return 56;
|
|
32
34
|
// binance smart chain
|
|
33
35
|
else if (chainId == 101) return 1;
|
|
36
|
+
// mantle
|
|
37
|
+
else if (chainId == 181) return 5000;
|
|
34
38
|
assert(false);
|
|
35
39
|
}
|
|
36
40
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
|
4
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
5
|
+
import "../libraries/math/Math.sol";
|
|
6
|
+
import "../libraries/BoringOwnableUpgradeable.sol";
|
|
7
|
+
import "../libraries/TokenHelper.sol";
|
|
8
|
+
import "../libraries/ArrayLib.sol";
|
|
9
|
+
import "../../interfaces/IPExternalRewardDistributor.sol";
|
|
10
|
+
import "../../interfaces/IPMarketFactory.sol";
|
|
11
|
+
|
|
12
|
+
contract PendleExternalRewardDistributor is
|
|
13
|
+
IPExternalRewardDistributor,
|
|
14
|
+
BoringOwnableUpgradeable,
|
|
15
|
+
UUPSUpgradeable,
|
|
16
|
+
TokenHelper
|
|
17
|
+
{
|
|
18
|
+
using Math for uint256;
|
|
19
|
+
using ArrayLib for address[];
|
|
20
|
+
using ArrayLib for uint256[];
|
|
21
|
+
|
|
22
|
+
uint128 internal constant WEEK = 7 days;
|
|
23
|
+
address public immutable marketFactory;
|
|
24
|
+
|
|
25
|
+
modifier onlyValidMarket(address market) {
|
|
26
|
+
require(IPMarketFactory(marketFactory).isValidMarket(market), "invalid market");
|
|
27
|
+
_;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
constructor(address _marketFactory) initializer {
|
|
31
|
+
marketFactory = _marketFactory;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
mapping(address => address[]) internal rewardTokens;
|
|
35
|
+
mapping(address => mapping(address => MarketRewardData)) internal rewardData;
|
|
36
|
+
|
|
37
|
+
function initialize() external initializer {
|
|
38
|
+
__BoringOwnable_init();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function getRewardTokens(address market)
|
|
42
|
+
external
|
|
43
|
+
view
|
|
44
|
+
onlyValidMarket(market)
|
|
45
|
+
returns (address[] memory)
|
|
46
|
+
{
|
|
47
|
+
return rewardTokens[market];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function _getUpdatedMarketReward(address token, address market)
|
|
51
|
+
internal
|
|
52
|
+
view
|
|
53
|
+
returns (MarketRewardData memory)
|
|
54
|
+
{
|
|
55
|
+
MarketRewardData memory rwd = rewardData[market][token];
|
|
56
|
+
uint128 newLastUpdated = uint128(Math.min(uint128(block.timestamp), rwd.incentiveEndsAt));
|
|
57
|
+
rwd.accumulatedReward += rwd.rewardPerSec * (newLastUpdated - rwd.lastUpdated);
|
|
58
|
+
rwd.lastUpdated = newLastUpdated;
|
|
59
|
+
return rwd;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function redeemRewards() external onlyValidMarket(msg.sender) {
|
|
63
|
+
address market = msg.sender;
|
|
64
|
+
address[] memory tokens = rewardTokens[market];
|
|
65
|
+
for (uint256 i = 0; i < tokens.length; ++i) {
|
|
66
|
+
address token = tokens[i];
|
|
67
|
+
|
|
68
|
+
rewardData[market][token] = _getUpdatedMarketReward(market, token);
|
|
69
|
+
uint256 amountToDistribute = rewardData[market][token].accumulatedReward;
|
|
70
|
+
|
|
71
|
+
if (amountToDistribute > 0) {
|
|
72
|
+
rewardData[market][token].accumulatedReward = 0;
|
|
73
|
+
_transferOut(token, market, amountToDistribute);
|
|
74
|
+
emit DistributeReward(market, token, amountToDistribute);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function addRewardToMarket(
|
|
80
|
+
address market,
|
|
81
|
+
address token,
|
|
82
|
+
uint128 rewardAmount,
|
|
83
|
+
uint128 duration
|
|
84
|
+
) external onlyOwner {
|
|
85
|
+
_addRewardToMarket(market, token, rewardAmount, duration);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function addWeeklyRewardBatch(
|
|
89
|
+
address token,
|
|
90
|
+
address[] memory markets,
|
|
91
|
+
uint256[] memory weights,
|
|
92
|
+
uint256 totalRewardToDistribute
|
|
93
|
+
) external onlyOwner {
|
|
94
|
+
require(markets.length == weights.length, "array lengths mismatched");
|
|
95
|
+
|
|
96
|
+
uint256 totalWeight = weights.sum();
|
|
97
|
+
for (uint256 i = 0; i < markets.length; ++i) {
|
|
98
|
+
uint256 rewardToDistribute = (totalRewardToDistribute * weights[i]) / totalWeight;
|
|
99
|
+
_addRewardToMarket(markets[i], token, rewardToDistribute.Uint128(), WEEK);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function _addRewardToMarket(
|
|
104
|
+
address market,
|
|
105
|
+
address token,
|
|
106
|
+
uint128 rewardAmount,
|
|
107
|
+
uint128 duration
|
|
108
|
+
) internal onlyValidMarket(market) {
|
|
109
|
+
MarketRewardData memory rwd = _getUpdatedMarketReward(market, token);
|
|
110
|
+
require(block.timestamp + duration > rwd.incentiveEndsAt, "Invalid incentive duration");
|
|
111
|
+
|
|
112
|
+
uint128 leftover = (rwd.incentiveEndsAt - rwd.lastUpdated) * rwd.rewardPerSec;
|
|
113
|
+
uint128 newSpeed = (leftover + rewardAmount) / duration;
|
|
114
|
+
|
|
115
|
+
rewardData[market][token] = MarketRewardData({
|
|
116
|
+
rewardPerSec: newSpeed,
|
|
117
|
+
accumulatedReward: rwd.accumulatedReward,
|
|
118
|
+
lastUpdated: uint128(block.timestamp),
|
|
119
|
+
incentiveEndsAt: uint128(block.timestamp) + duration
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
emit AddRewardToMarket(market, token, rewardData[market][token]);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function _authorizeUpgrade(address) internal virtual override onlyOwner {}
|
|
126
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../../interfaces/IPGauge.sol";
|
|
5
|
+
import "../../../interfaces/IPVeToken.sol";
|
|
6
|
+
import "../../../interfaces/IPGaugeController.sol";
|
|
7
|
+
import "../../../interfaces/IStandardizedYield.sol";
|
|
8
|
+
import "../../../interfaces/IPMarketFactoryV2.sol";
|
|
9
|
+
import "../../../interfaces/IPExternalRewardDistributor.sol";
|
|
10
|
+
|
|
11
|
+
import "../../RewardManager/RewardManager.sol";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
Invariants to maintain:
|
|
15
|
+
- before any changes to active balance, updateAndDistributeRewards() must be called
|
|
16
|
+
*/
|
|
17
|
+
abstract contract PendleGaugeV2 is RewardManager, IPGauge {
|
|
18
|
+
using Math for uint256;
|
|
19
|
+
using SafeERC20 for IERC20;
|
|
20
|
+
using ArrayLib for address[];
|
|
21
|
+
|
|
22
|
+
address private immutable SY;
|
|
23
|
+
|
|
24
|
+
uint256 internal constant TOKENLESS_PRODUCTION = 40;
|
|
25
|
+
|
|
26
|
+
address internal immutable PENDLE;
|
|
27
|
+
IPVeToken internal immutable vePENDLE;
|
|
28
|
+
address internal immutable gaugeController;
|
|
29
|
+
address internal immutable externalRewardDistributor;
|
|
30
|
+
|
|
31
|
+
uint256 public totalActiveSupply;
|
|
32
|
+
mapping(address => uint256) public activeBalance;
|
|
33
|
+
|
|
34
|
+
constructor(address _SY, address _vePendle, address _gaugeController, address _factory) {
|
|
35
|
+
SY = _SY;
|
|
36
|
+
vePENDLE = IPVeToken(_vePendle);
|
|
37
|
+
gaugeController = _gaugeController;
|
|
38
|
+
PENDLE = IPGaugeController(gaugeController).pendle();
|
|
39
|
+
externalRewardDistributor = IPMarketFactoryV2(_factory).rewardDistributor();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @dev Since rewardShares is based on activeBalance, user's activeBalance must be updated AFTER
|
|
44
|
+
rewards is updated
|
|
45
|
+
* @dev It's intended to have user's activeBalance updated when rewards is redeemed
|
|
46
|
+
*/
|
|
47
|
+
function _redeemRewards(address user) internal virtual returns (uint256[] memory rewardsOut) {
|
|
48
|
+
_updateAndDistributeRewards(user);
|
|
49
|
+
_updateUserActiveBalance(user);
|
|
50
|
+
rewardsOut = _doTransferOutRewards(user, user);
|
|
51
|
+
emit RedeemRewards(user, rewardsOut);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _updateUserActiveBalance(address user) internal virtual {
|
|
55
|
+
_updateUserActiveBalanceForTwo(user, address(0));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function _updateUserActiveBalanceForTwo(address user1, address user2) internal virtual {
|
|
59
|
+
if (user1 != address(0) && user1 != address(this)) _updateUserActiveBalancePrivate(user1);
|
|
60
|
+
if (user2 != address(0) && user2 != address(this)) _updateUserActiveBalancePrivate(user2);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @dev should only be callable from `_updateUserActiveBalanceForTwo` to guarantee user != address(0) && user != address(this)
|
|
65
|
+
*/
|
|
66
|
+
function _updateUserActiveBalancePrivate(address user) private {
|
|
67
|
+
assert(user != address(0) && user != address(this));
|
|
68
|
+
|
|
69
|
+
uint256 lpBalance = _stakedBalance(user);
|
|
70
|
+
uint256 veBoostedLpBalance = _calcVeBoostedLpBalance(user, lpBalance);
|
|
71
|
+
|
|
72
|
+
uint256 newActiveBalance = Math.min(veBoostedLpBalance, lpBalance);
|
|
73
|
+
|
|
74
|
+
totalActiveSupply = totalActiveSupply - activeBalance[user] + newActiveBalance;
|
|
75
|
+
activeBalance[user] = newActiveBalance;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function _calcVeBoostedLpBalance(
|
|
79
|
+
address user,
|
|
80
|
+
uint256 lpBalance
|
|
81
|
+
) internal virtual returns (uint256) {
|
|
82
|
+
(uint256 vePendleSupply, uint256 vePendleBalance) = vePENDLE.totalSupplyAndBalanceCurrent(
|
|
83
|
+
user
|
|
84
|
+
);
|
|
85
|
+
// Inspired by Curve's Gauge
|
|
86
|
+
uint256 veBoostedLpBalance = (lpBalance * TOKENLESS_PRODUCTION) / 100;
|
|
87
|
+
if (vePendleSupply > 0) {
|
|
88
|
+
veBoostedLpBalance +=
|
|
89
|
+
(((_totalStaked() * vePendleBalance) / vePendleSupply) *
|
|
90
|
+
(100 - TOKENLESS_PRODUCTION)) /
|
|
91
|
+
100;
|
|
92
|
+
}
|
|
93
|
+
return veBoostedLpBalance;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function _redeemExternalReward() internal virtual override {
|
|
97
|
+
IStandardizedYield(SY).claimRewards(address(this));
|
|
98
|
+
IPExternalRewardDistributor(externalRewardDistributor).redeemRewards();
|
|
99
|
+
IPGaugeController(gaugeController).redeemMarketReward();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function _stakedBalance(address user) internal view virtual returns (uint256);
|
|
103
|
+
|
|
104
|
+
function _totalStaked() internal view virtual returns (uint256);
|
|
105
|
+
|
|
106
|
+
function _rewardSharesTotal() internal view virtual override returns (uint256) {
|
|
107
|
+
return totalActiveSupply;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function _rewardSharesUser(address user) internal view virtual override returns (uint256) {
|
|
111
|
+
return activeBalance[user];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function _getRewardTokens()
|
|
115
|
+
internal
|
|
116
|
+
view
|
|
117
|
+
virtual
|
|
118
|
+
override
|
|
119
|
+
returns (address[] memory rewardTokens)
|
|
120
|
+
{
|
|
121
|
+
address[] memory SYRewards = IStandardizedYield(SY).getRewardTokens();
|
|
122
|
+
address[] memory externalRewards = IPExternalRewardDistributor(externalRewardDistributor)
|
|
123
|
+
.getRewardTokens(address(this));
|
|
124
|
+
|
|
125
|
+
rewardTokens = SYRewards.concat(externalRewards);
|
|
126
|
+
if (rewardTokens.contains(PENDLE)) return rewardTokens;
|
|
127
|
+
return rewardTokens.append(PENDLE);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function _beforeTokenTransfer(address from, address to, uint256) internal virtual {
|
|
131
|
+
_updateAndDistributeRewardsForTwo(from, to);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function _afterTokenTransfer(address from, address to, uint256) internal virtual {
|
|
135
|
+
_updateUserActiveBalanceForTwo(from, to);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
|
4
|
+
|
|
5
|
+
import "../../../interfaces/IPMarket.sol";
|
|
6
|
+
import "../../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
+
import "../../../interfaces/IPMarketFactory.sol";
|
|
8
|
+
|
|
9
|
+
import "../../libraries/BaseSplitCodeFactory.sol";
|
|
10
|
+
import "../../libraries/Errors.sol";
|
|
11
|
+
import "../../libraries/BoringOwnableUpgradeable.sol";
|
|
12
|
+
|
|
13
|
+
contract PendleMarketFactoryV2 is BoringOwnableUpgradeable, IPMarketFactory {
|
|
14
|
+
using EnumerableSet for EnumerableSet.AddressSet;
|
|
15
|
+
|
|
16
|
+
address public immutable marketCreationCodeContractA;
|
|
17
|
+
uint256 public immutable marketCreationCodeSizeA;
|
|
18
|
+
address public immutable marketCreationCodeContractB;
|
|
19
|
+
uint256 public immutable marketCreationCodeSizeB;
|
|
20
|
+
|
|
21
|
+
address public immutable yieldContractFactory;
|
|
22
|
+
uint256 public immutable maxLnFeeRateRoot;
|
|
23
|
+
uint8 public constant maxReserveFeePercent = 100;
|
|
24
|
+
int256 public constant minInitialAnchor = Math.IONE;
|
|
25
|
+
|
|
26
|
+
address public treasury;
|
|
27
|
+
address public rewardDistributor;
|
|
28
|
+
FeeConfig public defaultFee;
|
|
29
|
+
/// 1 SLOT
|
|
30
|
+
|
|
31
|
+
// router -> overriddenFee
|
|
32
|
+
mapping(address => FeeConfig) public overriddenFee;
|
|
33
|
+
|
|
34
|
+
// PT -> scalarRoot -> initialAnchor
|
|
35
|
+
mapping(address => mapping(int256 => mapping(int256 => address))) internal markets;
|
|
36
|
+
EnumerableSet.AddressSet internal allMarkets;
|
|
37
|
+
address public vePendle;
|
|
38
|
+
address public gaugeController;
|
|
39
|
+
|
|
40
|
+
constructor(
|
|
41
|
+
address _yieldContractFactory,
|
|
42
|
+
address _marketCreationCodeContractA,
|
|
43
|
+
uint256 _marketCreationCodeSizeA,
|
|
44
|
+
address _marketCreationCodeContractB,
|
|
45
|
+
uint256 _marketCreationCodeSizeB
|
|
46
|
+
) {
|
|
47
|
+
yieldContractFactory = _yieldContractFactory;
|
|
48
|
+
maxLnFeeRateRoot = uint256(LogExpMath.ln(int256((105 * Math.IONE) / 100))); // ln(1.05)
|
|
49
|
+
|
|
50
|
+
marketCreationCodeContractA = _marketCreationCodeContractA;
|
|
51
|
+
marketCreationCodeSizeA = _marketCreationCodeSizeA;
|
|
52
|
+
marketCreationCodeContractB = _marketCreationCodeContractB;
|
|
53
|
+
marketCreationCodeSizeB = _marketCreationCodeSizeB;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function initialize(
|
|
57
|
+
address _treasury,
|
|
58
|
+
uint80 _defaultLnFeeRateRoot,
|
|
59
|
+
uint8 _defaultReserveFeePercent,
|
|
60
|
+
address newVePendle,
|
|
61
|
+
address newGaugeController,
|
|
62
|
+
address newRewardDistributor
|
|
63
|
+
) external initializer {
|
|
64
|
+
__BoringOwnable_init();
|
|
65
|
+
setTreasury(_treasury);
|
|
66
|
+
setDefaultFee(_defaultLnFeeRateRoot, _defaultReserveFeePercent);
|
|
67
|
+
|
|
68
|
+
vePendle = newVePendle;
|
|
69
|
+
gaugeController = newGaugeController;
|
|
70
|
+
rewardDistributor = newRewardDistributor;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @notice Create a market between PT and its corresponding SY with scalar & anchor config.
|
|
75
|
+
* Anyone is allowed to create a market on their own.
|
|
76
|
+
*/
|
|
77
|
+
function createNewMarket(
|
|
78
|
+
address PT,
|
|
79
|
+
int256 scalarRoot,
|
|
80
|
+
int256 initialAnchor
|
|
81
|
+
) external returns (address market) {
|
|
82
|
+
if (!IPYieldContractFactory(yieldContractFactory).isPT(PT))
|
|
83
|
+
revert Errors.MarketFactoryInvalidPt();
|
|
84
|
+
if (IPPrincipalToken(PT).isExpired()) revert Errors.MarketFactoryExpiredPt();
|
|
85
|
+
|
|
86
|
+
if (markets[PT][scalarRoot][initialAnchor] != address(0))
|
|
87
|
+
revert Errors.MarketFactoryMarketExists();
|
|
88
|
+
|
|
89
|
+
if (initialAnchor < minInitialAnchor)
|
|
90
|
+
revert Errors.MarketFactoryInitialAnchorTooLow(initialAnchor, minInitialAnchor);
|
|
91
|
+
|
|
92
|
+
market = BaseSplitCodeFactory._create2(
|
|
93
|
+
0,
|
|
94
|
+
bytes32(block.chainid),
|
|
95
|
+
abi.encode(PT, scalarRoot, initialAnchor, vePendle, gaugeController),
|
|
96
|
+
marketCreationCodeContractA,
|
|
97
|
+
marketCreationCodeSizeA,
|
|
98
|
+
marketCreationCodeContractB,
|
|
99
|
+
marketCreationCodeSizeB
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
markets[PT][scalarRoot][initialAnchor] = market;
|
|
103
|
+
|
|
104
|
+
if (!allMarkets.add(market)) assert(false);
|
|
105
|
+
|
|
106
|
+
emit CreateNewMarket(market, PT, scalarRoot, initialAnchor);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function getMarketConfig(
|
|
110
|
+
address router
|
|
111
|
+
) external view returns (address _treasury, uint80 _lnFeeRateRoot, uint8 _reserveFeePercent) {
|
|
112
|
+
(_treasury, _lnFeeRateRoot, _reserveFeePercent) = (
|
|
113
|
+
treasury,
|
|
114
|
+
defaultFee.lnFeeRateRoot,
|
|
115
|
+
defaultFee.reserveFeePercent
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
FeeConfig memory over = overriddenFee[router];
|
|
119
|
+
if (over.active) {
|
|
120
|
+
(_lnFeeRateRoot, _reserveFeePercent) = (over.lnFeeRateRoot, over.reserveFeePercent);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/// @dev for gas-efficient verification of market
|
|
125
|
+
function isValidMarket(address market) external view returns (bool) {
|
|
126
|
+
return allMarkets.contains(market);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function setTreasury(address newTreasury) public onlyOwner {
|
|
130
|
+
if (newTreasury == address(0)) revert Errors.MarketFactoryZeroTreasury();
|
|
131
|
+
|
|
132
|
+
treasury = newTreasury;
|
|
133
|
+
_emitNewMarketConfigEvent();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function setDefaultFee(uint80 newLnFeeRateRoot, uint8 newReserveFeePercent) public onlyOwner {
|
|
137
|
+
_verifyFeeConfig(newLnFeeRateRoot, newReserveFeePercent);
|
|
138
|
+
defaultFee = FeeConfig(newLnFeeRateRoot, newReserveFeePercent, true);
|
|
139
|
+
_emitNewMarketConfigEvent();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function setOverriddenFee(
|
|
143
|
+
address router,
|
|
144
|
+
uint80 newLnFeeRateRoot,
|
|
145
|
+
uint8 newReserveFeePercent
|
|
146
|
+
) public onlyOwner {
|
|
147
|
+
_verifyFeeConfig(newLnFeeRateRoot, newReserveFeePercent);
|
|
148
|
+
overriddenFee[router] = FeeConfig(newLnFeeRateRoot, newReserveFeePercent, true);
|
|
149
|
+
emit SetOverriddenFee(router, newLnFeeRateRoot, newReserveFeePercent);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function unsetOverriddenFee(address router) external onlyOwner {
|
|
153
|
+
delete overriddenFee[router];
|
|
154
|
+
emit UnsetOverriddenFee(router);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function _verifyFeeConfig(uint80 newLnFeeRateRoot, uint8 newReserveFeePercent) internal view {
|
|
158
|
+
if (newLnFeeRateRoot > maxLnFeeRateRoot)
|
|
159
|
+
revert Errors.MarketFactoryLnFeeRateRootTooHigh(newLnFeeRateRoot, maxLnFeeRateRoot);
|
|
160
|
+
if (newReserveFeePercent > maxReserveFeePercent)
|
|
161
|
+
revert Errors.MarketFactoryReserveFeePercentTooHigh(
|
|
162
|
+
newReserveFeePercent,
|
|
163
|
+
maxReserveFeePercent
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function _emitNewMarketConfigEvent() internal {
|
|
168
|
+
emit NewMarketConfig(treasury, defaultFee.lnFeeRateRoot, defaultFee.reserveFeePercent);
|
|
169
|
+
}
|
|
170
|
+
}
|