@pendle/core-v2 6.4.4-swaphubtest → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol/PendleMsgReceiveEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol/PendleMsgReceiverAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol/PendleMsgSendEndpointUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol/PendleMsgSenderAppUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol/ExcessivelySafeCall.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.json +401 -0
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.json +733 -0
- package/build/artifacts/contracts/StPendle.sol/RoundDataLib.dbg.json +4 -0
- package/build/artifacts/contracts/StPendle.sol/RoundDataLib.json +10 -0
- package/build/artifacts/contracts/StPendle.sol/StPendle.dbg.json +4 -0
- package/build/artifacts/contracts/StPendle.sol/StPendle.json +228 -0
- 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/PendleGauge.sol/PendleGauge.json +0 -51
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.json +618 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.dbg.json +4 -0
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.json +1157 -0
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/SYUtils.sol/SYUtils.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/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.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/erc20/PendleERC20.sol/PendleERC20.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/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/Errors.sol/Errors.json +3 -3
- 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/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.json +2 -2
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMM.sol/FixedPricePTAMM.json +2 -2
- package/build/artifacts/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.json +2 -2
- package/build/artifacts/contracts/interfaces/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.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/IMarketSweed.sol/IMarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCrossChain.sol/IPActionCrossChain.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/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.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/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.json +0 -51
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.json +47 -12
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.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/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.json +0 -19
- 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/IPMerkleDistributor.sol/IPMerkleDistributor.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/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPStakedPendle.sol/IPStakedPendle.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPStakedPendle.sol/IPStakedPendle.json +351 -0
- package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.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/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.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/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/AutomateReady.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IAutomate.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/IOpsProxyFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AutomateReady.sol/ITaskTreasuryUpgradable.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/BalanceReader.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/ILegacyMarket.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/BalanceReader.sol/ILegacyMarket.json +30 -0
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol/ExpiredLpPtRedeemer.json +2 -2
- 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/LimitBackendHelperV2.sol/LimitBackendHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelperV2.sol/LimitBackendHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol/PendlePoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol/MarketDeployLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.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/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/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.json +2 -2
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCrossChain.sol/ActionCrossChain.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/OKXScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/IAugustusV6.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/ParaswapScaleHelper.sol/ParaswapScaleHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol +112 -0
- package/contracts/LiquidityMining/sPendle/StakedPendle.sol +129 -0
- package/contracts/StPendle.sol +121 -0
- package/contracts/core/Market/PendleGauge.sol +1 -76
- package/contracts/core/Market/{PendleMarketFactoryV6Upg.sol → PendleMarketFactoryV7Upg.sol} +3 -6
- package/contracts/core/Market/{PendleMarketV6.sol → PendleMarketV7.sol} +16 -16
- package/contracts/core/libraries/Errors.sol +1 -1
- package/contracts/core/libraries/math/PMath.sol +5 -0
- package/contracts/interfaces/IPGauge.sol +0 -6
- package/contracts/interfaces/IPGaugeController.sol +16 -3
- package/contracts/interfaces/IPMarket.sol +12 -0
- package/contracts/interfaces/IPStakedPendle.sol +69 -0
- package/contracts/offchain-helpers/BalanceReader.sol +11 -1
- package/contracts/offchain-helpers/MarketSweed.sol +46 -54
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +5 -6
- package/contracts/router/ActionCrossChain.sol +14 -18
- package/contracts/router/Reflector.sol +19 -2
- package/deployments/1-core.json +3 -2
- package/deployments/10-core.json +1 -1
- package/deployments/130-core.json +2 -1
- package/deployments/146-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/deployments/5000-core.json +1 -1
- package/deployments/56-core.json +1 -1
- package/deployments/80094-core.json +1 -1
- package/deployments/8453-core.json +1 -1
- package/deployments/9745-core.json +4 -3
- package/deployments/999-core.json +6 -6
- package/package.json +2 -2
- package/typechain-types/ERC20Upgradeable.ts +426 -0
- package/typechain-types/IERC20MetadataUpgradeable.ts +339 -0
- package/typechain-types/IERC20Upgradeable.ts +300 -0
- package/typechain-types/ILegacyMarket.ts +93 -0
- package/typechain-types/IPGauge.ts +7 -81
- package/typechain-types/IPGaugeController.ts +91 -47
- package/typechain-types/IPMarket.ts +0 -19
- package/typechain-types/IPStakedPendle.ts +558 -0
- package/typechain-types/PendleGauge.ts +0 -63
- package/typechain-types/{PendleGaugeControllerBaseUpg.ts → PendleGaugeControllerUpg.ts} +82 -171
- package/typechain-types/{PendleMarketFactoryV6Upg.ts → PendleMarketFactoryV7Upg.ts} +5 -18
- package/typechain-types/{PendleMarketV6.ts → PendleMarketV7.ts} +10 -29
- package/typechain-types/StPendle.ts +362 -0
- package/typechain-types/StakedPendle.ts +1058 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCrossChain__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/ActionMiscV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSimple__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/ERC20Upgradeable__factory.ts +347 -0
- package/typechain-types/factories/Errors__factory.ts +2 -2
- package/typechain-types/factories/ExchangeRateMsgCodec__factory.ts +1 -1
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/FixedPricePTAMM__factory.ts +1 -1
- package/typechain-types/factories/IERC20MetadataUpgradeable__factory.ts +252 -0
- package/typechain-types/factories/{IPGaugeControllerMainchain__factory.ts → IERC20Upgradeable__factory.ts} +90 -83
- package/typechain-types/factories/ILegacyMarket__factory.ts +42 -0
- package/typechain-types/factories/IPGaugeController__factory.ts +47 -12
- package/typechain-types/factories/IPGauge__factory.ts +0 -51
- package/typechain-types/factories/IPMarket__factory.ts +0 -19
- package/typechain-types/factories/IPStakedPendle__factory.ts +366 -0
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/MarketSweed__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringOneracle__factory.ts +1 -1
- package/typechain-types/factories/PendleBoringSolvBTCOneracle__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +1 -1
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorV2__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeSetter__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerUpg__factory.ts +463 -0
- package/typechain-types/factories/PendleGauge__factory.ts +0 -51
- package/typechain-types/factories/PendleLPWrapperFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleLPWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV7Upg__factory.ts +710 -0
- package/typechain-types/factories/PendleMarketV7__factory.ts +1233 -0
- package/typechain-types/factories/PendleMerkleDepositor__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/PendleMultiTokenMerkleDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendlePYLpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleRedStoneRateOracleAdapter__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV4__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactoryWrapper__factory.ts +1 -1
- package/typechain-types/factories/PendleSparkLinearDiscountOracleFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/StPendle__factory.ts +260 -0
- package/typechain-types/factories/StakedPendle__factory.ts +785 -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 +69 -132
- package/typechain-types/index.ts +20 -32
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +0 -451
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +0 -557
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +0 -547
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +0 -1311
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +0 -764
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +0 -636
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +0 -1181
- package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/DepositBox.sol/DepositBox.json +0 -170
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.json +0 -1214
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +0 -4
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.json +0 -1176
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -598
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.json +0 -1026
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.json +0 -124
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.json +0 -183
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.json +0 -380
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +0 -262
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +0 -164
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +0 -42
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +0 -36
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +0 -304
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +0 -301
- package/contracts/cross-chain/swap-hub/DepositBox.sol +0 -66
- package/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol +0 -178
- package/contracts/cross-chain/swap-hub/SwapHubBase.sol +0 -274
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +0 -204
- package/contracts/interfaces/IPCrossChainSwapHub.sol +0 -147
- package/contracts/interfaces/IPDepositBox.sol +0 -22
- package/contracts/interfaces/IPGaugeControllerMainchain.sol +0 -8
- package/contracts/interfaces/IPVotingController.sol +0 -43
- package/contracts/offchain-helpers/Broadcaster.sol +0 -48
- package/typechain-types/Broadcaster.ts +0 -455
- package/typechain-types/DepositBox.ts +0 -260
- package/typechain-types/IPCrossChainSwapHub.ts +0 -882
- package/typechain-types/IPDepositBox.ts +0 -213
- package/typechain-types/IPGaugeControllerMainchain.ts +0 -319
- package/typechain-types/IPVotingController.ts +0 -534
- package/typechain-types/PendleCrossChainSwapHub.ts +0 -1119
- package/typechain-types/PendleFeeDistributor.ts +0 -746
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +0 -778
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +0 -770
- package/typechain-types/PendleVotingControllerUpg.ts +0 -1731
- package/typechain-types/SwapHubBase.ts +0 -1094
- package/typechain-types/VotingControllerStorageUpg.ts +0 -984
- package/typechain-types/factories/Broadcaster__factory.ts +0 -317
- package/typechain-types/factories/DepositBox__factory.ts +0 -222
- package/typechain-types/factories/IPCrossChainSwapHub__factory.ts +0 -1041
- package/typechain-types/factories/IPDepositBox__factory.ts +0 -136
- package/typechain-types/factories/IPVotingController__factory.ts +0 -395
- package/typechain-types/factories/PendleCrossChainSwapHub__factory.ts +0 -1287
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +0 -671
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +0 -470
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +0 -648
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +0 -638
- package/typechain-types/factories/PendleMarketFactoryV6Upg__factory.ts +0 -732
- package/typechain-types/factories/PendleMarketV6__factory.ts +0 -1261
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +0 -1391
- package/typechain-types/factories/SwapHubBase__factory.ts +0 -1188
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +0 -783
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxEstimateLib",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxEstimateLib.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206f6b296b2ec52c885a85373f664e24fc2f7163b4df9b51687d9a3547f0e669e664736f6c634300081e0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212206f6b296b2ec52c885a85373f664e24fc2f7163b4df9b51687d9a3547f0e669e664736f6c634300081e0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtInLibOnchain",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibOnchain.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122065566e753bf2621ae36351eb627eef6cc5c1325ee984d29afcf56a3531fe5f3164736f6c634300081e0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea264697066735822122065566e753bf2621ae36351eb627eef6cc5c1325ee984d29afcf56a3531fe5f3164736f6c634300081e0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtOutLibOnchain",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibOnchain.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d3aff15e8a7c8701f6e441d9ee6d989f801872b2fb7994af274051575fcd2d9164736f6c634300081e0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220d3aff15e8a7c8701f6e441d9ee6d989f801872b2fb7994af274051575fcd2d9164736f6c634300081e0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtInLibV2",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibV2.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b3a4eb8f5b8e299591ca85bc3ab2d9bf010152f1b737b1fa9b3e4ae83d6318ec64736f6c634300081e0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220b3a4eb8f5b8e299591ca85bc3ab2d9bf010152f1b737b1fa9b3e4ae83d6318ec64736f6c634300081e0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"contractName": "MarketApproxPtOutLibV2",
|
|
4
4
|
"sourceName": "contracts/router/math/MarketApproxLibV2.sol",
|
|
5
5
|
"abi": [],
|
|
6
|
-
"bytecode": "
|
|
7
|
-
"deployedBytecode": "
|
|
6
|
+
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203cff258371db5552f845750d882726bad17fbe18954df8ef221f739e12f3aa5664736f6c634300081e0033",
|
|
7
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212203cff258371db5552f845750d882726bad17fbe18954df8ef221f739e12f3aa5664736f6c634300081e0033",
|
|
8
8
|
"linkReferences": {},
|
|
9
9
|
"deployedLinkReferences": {}
|
|
10
10
|
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
+
import "../../core/libraries/Errors.sol";
|
|
6
|
+
import "../../core/libraries/math/PMath.sol";
|
|
7
|
+
|
|
8
|
+
import "../../interfaces/IPGaugeController.sol";
|
|
9
|
+
import "../../interfaces/IPMarket.sol";
|
|
10
|
+
|
|
11
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
12
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
13
|
+
|
|
14
|
+
contract PendleGaugeControllerUpg is IPGaugeController, BoringOwnableUpgradeableV2, UUPSUpgradeable {
|
|
15
|
+
using SafeERC20 for IERC20;
|
|
16
|
+
using PMath for uint256;
|
|
17
|
+
|
|
18
|
+
struct MarketRewardData {
|
|
19
|
+
uint128 pendlePerSec;
|
|
20
|
+
uint128 accumulatedPendle;
|
|
21
|
+
uint128 lastUpdated;
|
|
22
|
+
uint128 incentiveEndsAt;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
uint256 internal constant MAX_PENDLE_PER_SEC_PER_POOL = 1e17; // i.e: 60k PENDLE per week
|
|
26
|
+
|
|
27
|
+
// solhint-disable immutable-vars-naming
|
|
28
|
+
address public immutable pendle;
|
|
29
|
+
|
|
30
|
+
mapping(address => MarketRewardData) public rewardData;
|
|
31
|
+
|
|
32
|
+
mapping(uint128 => bool) private __deprecated__epochRewardReceived;
|
|
33
|
+
mapping(address => bool) private __deprecated__isValidMarket;
|
|
34
|
+
|
|
35
|
+
uint256[99] private __gap;
|
|
36
|
+
|
|
37
|
+
constructor(address _pendle) {
|
|
38
|
+
pendle = _pendle;
|
|
39
|
+
_disableInitializers();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function initialize(address _owner) external initializer {
|
|
43
|
+
__BoringOwnableV2_init(_owner);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @dev non-market caller can also call, but just receive no rewards
|
|
48
|
+
* @dev no concern on reentracy since pendle is standard ERC20
|
|
49
|
+
*/
|
|
50
|
+
function redeemMarketReward() external {
|
|
51
|
+
address market = msg.sender;
|
|
52
|
+
MarketRewardData memory rwd = _getUpdatedMarketReward(market);
|
|
53
|
+
|
|
54
|
+
uint256 amount = rwd.accumulatedPendle;
|
|
55
|
+
|
|
56
|
+
if (amount != 0) {
|
|
57
|
+
IERC20(pendle).safeTransfer(market, amount);
|
|
58
|
+
emit MarketClaimReward(market, amount);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
rwd.accumulatedPendle = 0;
|
|
62
|
+
rewardData[market] = rwd;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function setRewardDatas(
|
|
66
|
+
address[] calldata markets,
|
|
67
|
+
uint128[] calldata pendlePerSecs,
|
|
68
|
+
uint128[] calldata incentiveEndsAts
|
|
69
|
+
) external onlyOwner {
|
|
70
|
+
if (markets.length != pendlePerSecs.length || markets.length != incentiveEndsAts.length) {
|
|
71
|
+
revert Errors.ArrayLengthMismatch();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (uint256 i = 0; i < markets.length; ++i) {
|
|
75
|
+
_setRewardData(markets[i], pendlePerSecs[i], incentiveEndsAts[i]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function withdrawPendle(uint256 amount) external onlyOwner {
|
|
80
|
+
IERC20(pendle).safeTransfer(msg.sender, amount);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function _setRewardData(address market, uint128 newPendlePerSec, uint128 newIncentiveEndsAt) internal {
|
|
84
|
+
uint256 expiry = IPMarket(market).expiry();
|
|
85
|
+
require(block.timestamp < newIncentiveEndsAt && newIncentiveEndsAt <= expiry, "invalid incentivesEnds");
|
|
86
|
+
|
|
87
|
+
assert(newPendlePerSec <= MAX_PENDLE_PER_SEC_PER_POOL);
|
|
88
|
+
|
|
89
|
+
MarketRewardData memory rwd = _getUpdatedMarketReward(market);
|
|
90
|
+
|
|
91
|
+
rewardData[market] = MarketRewardData({
|
|
92
|
+
pendlePerSec: newPendlePerSec,
|
|
93
|
+
accumulatedPendle: rwd.accumulatedPendle,
|
|
94
|
+
lastUpdated: uint128(block.timestamp),
|
|
95
|
+
incentiveEndsAt: newIncentiveEndsAt
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
emit UpdateMarketRewardV2(market, newPendlePerSec, newIncentiveEndsAt);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function _getUpdatedMarketReward(address market) internal view returns (MarketRewardData memory) {
|
|
102
|
+
MarketRewardData memory rwd = rewardData[market];
|
|
103
|
+
uint128 newLastUpdated = uint128(PMath.min(block.timestamp, rwd.incentiveEndsAt));
|
|
104
|
+
rwd.accumulatedPendle += rwd.pendlePerSec * (newLastUpdated - rwd.lastUpdated);
|
|
105
|
+
rwd.lastUpdated = newLastUpdated;
|
|
106
|
+
return rwd;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/// ----------------- owner logic -----------------
|
|
110
|
+
|
|
111
|
+
function _authorizeUpgrade(address) internal virtual override onlyOwner {}
|
|
112
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import {BoringOwnableUpgradeableV2} from "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
+
import {TokenHelper} from "../../core/libraries/TokenHelper.sol";
|
|
6
|
+
import {PMath} from "../../core/libraries/math/PMath.sol";
|
|
7
|
+
import {IPStakedPendle} from "../../interfaces/IPStakedPendle.sol";
|
|
8
|
+
import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
|
|
9
|
+
|
|
10
|
+
contract StakedPendle is IPStakedPendle, ERC20Upgradeable, BoringOwnableUpgradeableV2, TokenHelper {
|
|
11
|
+
using PMath for uint256;
|
|
12
|
+
|
|
13
|
+
address public feeReceiver;
|
|
14
|
+
address public immutable PENDLE;
|
|
15
|
+
|
|
16
|
+
mapping(address user => UserCooldown) public userCooldown;
|
|
17
|
+
|
|
18
|
+
uint24 public cooldownDuration;
|
|
19
|
+
uint64 public instantUnstakeFeeRate; // base 1e18. 5e16 means instant unstake will have to pay 5% of the amount.
|
|
20
|
+
|
|
21
|
+
constructor(address pendle) {
|
|
22
|
+
PENDLE = pendle;
|
|
23
|
+
_disableInitializers();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// @dev reminder to also call setFeeReceiver & setCooldownDurationAndFee
|
|
27
|
+
function initialize(address _owner) external initializer {
|
|
28
|
+
__ERC20_init("StakedPendle", "sPENDLE");
|
|
29
|
+
__BoringOwnableV2_init(_owner);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function stake(uint256 amount) external {
|
|
33
|
+
require(amount > 0, "sPendle: invalid amount");
|
|
34
|
+
|
|
35
|
+
_transferIn(PENDLE, msg.sender, amount);
|
|
36
|
+
_mint(msg.sender, amount);
|
|
37
|
+
|
|
38
|
+
emit Staked(msg.sender, amount);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function cooldown(uint256 amount) external {
|
|
42
|
+
require(amount > 0, "sPendle: invalid amount");
|
|
43
|
+
require(userCooldown[msg.sender].amount == 0, "sPendle: already in cooldown");
|
|
44
|
+
|
|
45
|
+
userCooldown[msg.sender] = UserCooldown({cooldownStart: uint104(block.timestamp), amount: amount.Uint152()});
|
|
46
|
+
_burn(msg.sender, amount);
|
|
47
|
+
|
|
48
|
+
emit CooldownInitiated(msg.sender, amount, block.timestamp);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function cancelCooldown() external {
|
|
52
|
+
UserCooldown memory data = userCooldown[msg.sender];
|
|
53
|
+
require(data.amount > 0, "sPendle: no cooldown");
|
|
54
|
+
|
|
55
|
+
delete userCooldown[msg.sender];
|
|
56
|
+
_mint(msg.sender, data.amount);
|
|
57
|
+
|
|
58
|
+
emit CooldownCanceled(msg.sender, data.amount);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function finalizeCooldown() external returns (uint256 /*amount*/) {
|
|
62
|
+
UserCooldown memory data = userCooldown[msg.sender];
|
|
63
|
+
require(data.amount > 0, "sPendle: no cooldown");
|
|
64
|
+
|
|
65
|
+
uint256 cooldownEnd = data.cooldownStart + cooldownDuration;
|
|
66
|
+
require(block.timestamp >= cooldownEnd, "sPendle: redeem not ready");
|
|
67
|
+
|
|
68
|
+
delete userCooldown[msg.sender];
|
|
69
|
+
_transferOut(PENDLE, msg.sender, data.amount);
|
|
70
|
+
|
|
71
|
+
emit Unstaked(msg.sender, data.amount, 0);
|
|
72
|
+
|
|
73
|
+
return data.amount;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function instantUnstake(uint256 amount) external returns (uint256 amountAfterFee, uint256 fee) {
|
|
77
|
+
require(amount > 0, "sPendle: invalid amount");
|
|
78
|
+
|
|
79
|
+
fee = PMath.rawDivUp(amount * instantUnstakeFeeRate, PMath.ONE);
|
|
80
|
+
amountAfterFee = amount - fee;
|
|
81
|
+
|
|
82
|
+
_burn(msg.sender, amount);
|
|
83
|
+
_transferOut(PENDLE, msg.sender, amountAfterFee);
|
|
84
|
+
_transferOut(PENDLE, feeReceiver, fee);
|
|
85
|
+
|
|
86
|
+
emit Unstaked(msg.sender, amountAfterFee, fee);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ======== Misc helper functions =======
|
|
90
|
+
|
|
91
|
+
function multicall(Call3[] calldata calls) external returns (Result[] memory res) {
|
|
92
|
+
uint256 length = calls.length;
|
|
93
|
+
res = new Result[](length);
|
|
94
|
+
for (uint256 i = 0; i < length; i++) {
|
|
95
|
+
(bool success, bytes memory result) = _delegateToSelf(calls[i].callData, calls[i].allowFailure);
|
|
96
|
+
res[i] = Result(success, result);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _delegateToSelf(
|
|
101
|
+
bytes memory data,
|
|
102
|
+
bool allowFailure
|
|
103
|
+
) internal returns (bool success, bytes memory result) {
|
|
104
|
+
(success, result) = address(this).delegatecall(data);
|
|
105
|
+
|
|
106
|
+
if (!success && !allowFailure) {
|
|
107
|
+
assembly {
|
|
108
|
+
// We use Yul's revert() to bubble up errors from the target contract.
|
|
109
|
+
revert(add(32, result), mload(result))
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ======== Admin functions ========
|
|
115
|
+
|
|
116
|
+
function setFeeReceiver(address newFeeReceiver) external onlyOwner {
|
|
117
|
+
require(newFeeReceiver != address(0), "sPendle: invalid fee receiver");
|
|
118
|
+
|
|
119
|
+
feeReceiver = newFeeReceiver;
|
|
120
|
+
emit FeeReceiverUpdated(newFeeReceiver);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function setCooldownDurationAndFee(uint24 newDuration, uint64 newInstantUnstakeFeeRate) external onlyOwner {
|
|
124
|
+
require(newInstantUnstakeFeeRate <= PMath.ONE, "sPendle: invalid fee factor");
|
|
125
|
+
cooldownDuration = newDuration;
|
|
126
|
+
instantUnstakeFeeRate = newInstantUnstakeFeeRate;
|
|
127
|
+
emit CooldownDurationAndFeeUpdated(newDuration, newInstantUnstakeFeeRate);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.28;
|
|
4
|
+
|
|
5
|
+
import {PMath} from "./core/libraries/math/PMath.sol";
|
|
6
|
+
|
|
7
|
+
enum State {
|
|
8
|
+
B, // Benefitting
|
|
9
|
+
F // Forfeited
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
struct RoundData {
|
|
13
|
+
uint256 roundId;
|
|
14
|
+
uint256 totalPooled;
|
|
15
|
+
uint256 totalShares;
|
|
16
|
+
|
|
17
|
+
uint256 _pooledForfeited;
|
|
18
|
+
uint256 _sharesForfeited;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
library RoundDataLib {
|
|
22
|
+
using PMath for uint256;
|
|
23
|
+
|
|
24
|
+
function sharesForfeited(RoundData storage self) public view returns (uint256) {
|
|
25
|
+
return self._sharesForfeited;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function sharesBenefitting(RoundData storage self) public view returns (uint256) {
|
|
29
|
+
return self.totalShares - self._sharesForfeited;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function pooledForfeited(RoundData storage self) public view returns (uint256) {
|
|
33
|
+
return self._pooledForfeited;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function pooledBenefitting(RoundData storage self) public view returns (uint256) {
|
|
37
|
+
return self.totalPooled.mulDown(self.totalShares) - self._pooledForfeited;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
using RoundDataLib for RoundData;
|
|
42
|
+
|
|
43
|
+
struct UserData {
|
|
44
|
+
State state;
|
|
45
|
+
uint256 metaShares;
|
|
46
|
+
uint256 lastVotedRound;
|
|
47
|
+
uint256 forfeitedUntilRound;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
contract StPendle {
|
|
51
|
+
using PMath for uint256;
|
|
52
|
+
|
|
53
|
+
mapping(address user => UserData) users;
|
|
54
|
+
mapping(uint256 roundId => RoundData) rounds;
|
|
55
|
+
|
|
56
|
+
uint256 curRound;
|
|
57
|
+
uint256 processedRound;
|
|
58
|
+
|
|
59
|
+
modifier onlyAdmin() {
|
|
60
|
+
// placeholder
|
|
61
|
+
_;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function hasInteractedBefore(address user) public view returns (bool) {
|
|
65
|
+
return users[user].metaShares > 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function curRoundData() internal view returns (RoundData storage stf) {
|
|
69
|
+
return rounds[curRound];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function getSideData(State state) public view returns (uint256 sidedPooled, uint256 sidedShares) {
|
|
73
|
+
RoundData storage rd = curRoundData();
|
|
74
|
+
return state == State.B //
|
|
75
|
+
? (rd.pooledBenefitting(), rd.sharesBenefitting())
|
|
76
|
+
: (rd.pooledForfeited(), rd.sharesForfeited());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// helper to get user data with adjusted state and meta shares
|
|
80
|
+
function getUserData(address user) external view returns (UserData memory) {
|
|
81
|
+
// need to adjust user data based on curRound and processedRound
|
|
82
|
+
return users[user];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function sharesValue(uint256 numShares) public view returns (uint256) {
|
|
86
|
+
RoundData storage rd = curRoundData();
|
|
87
|
+
if (rd.totalShares == 0) {
|
|
88
|
+
return 0;
|
|
89
|
+
}
|
|
90
|
+
return (numShares * rd.totalPooled) / rd.totalShares;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function sharesOf(address user) public view returns (uint256) {
|
|
94
|
+
UserData memory data = users[user];
|
|
95
|
+
(, uint256 sidedShares) = getSideData(data.state);
|
|
96
|
+
return data.metaShares.mulDown(sidedShares);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function balanceOf(address user) external view returns (uint256) {
|
|
100
|
+
return sharesValue(sharesOf(user)); // demonstration only, need to be more precise
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function distribute(uint256 amount) external onlyAdmin {
|
|
104
|
+
RoundData storage rd = curRoundData();
|
|
105
|
+
rd.totalPooled += amount;
|
|
106
|
+
rd._sharesForfeited = rd._pooledForfeited / rd.totalPooled;
|
|
107
|
+
|
|
108
|
+
++processedRound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function votingBegin() public onlyAdmin {
|
|
112
|
+
++curRound;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function votingFinalize() public onlyAdmin {
|
|
116
|
+
// todo moving group logic
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// just record a vote, no actual voting logic
|
|
120
|
+
function doVote() external {}
|
|
121
|
+
}
|
|
@@ -3,105 +3,34 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
import "../../interfaces/IPGauge.sol";
|
|
5
5
|
import "../../interfaces/IPGaugeController.sol";
|
|
6
|
-
import "../../interfaces/IPVeToken.sol";
|
|
7
6
|
import "../../interfaces/IStandardizedYield.sol";
|
|
8
7
|
|
|
9
8
|
import "../RewardManager/RewardManager.sol";
|
|
10
9
|
|
|
11
|
-
/**
|
|
12
|
-
* Invariants to maintain:
|
|
13
|
-
* - before any changes to active balance, updateAndDistributeRewards() must be called
|
|
14
|
-
*/
|
|
15
10
|
abstract contract PendleGauge is RewardManager, IPGauge {
|
|
16
|
-
using PMath for uint256;
|
|
17
|
-
using SafeERC20 for IERC20;
|
|
18
11
|
using ArrayLib for address[];
|
|
19
12
|
|
|
20
13
|
address private immutable SY;
|
|
21
|
-
|
|
22
|
-
uint256 internal constant TOKENLESS_PRODUCTION = 40;
|
|
23
|
-
|
|
24
14
|
address internal immutable PENDLE;
|
|
25
|
-
IPVeToken internal immutable vePENDLE;
|
|
26
15
|
address internal immutable gaugeController;
|
|
27
16
|
|
|
28
|
-
|
|
29
|
-
mapping(address => uint256) public activeBalance;
|
|
30
|
-
|
|
31
|
-
constructor(address _SY, address _vePendle, address _gaugeController) {
|
|
17
|
+
constructor(address _SY, address _gaugeController) {
|
|
32
18
|
SY = _SY;
|
|
33
|
-
vePENDLE = IPVeToken(_vePendle);
|
|
34
19
|
gaugeController = _gaugeController;
|
|
35
20
|
PENDLE = IPGaugeController(gaugeController).pendle();
|
|
36
21
|
}
|
|
37
22
|
|
|
38
|
-
/**
|
|
39
|
-
* @dev Since rewardShares is based on activeBalance, user's activeBalance must be updated AFTER
|
|
40
|
-
* rewards is updated
|
|
41
|
-
* @dev It's intended to have user's activeBalance updated when rewards is redeemed
|
|
42
|
-
*/
|
|
43
23
|
function _redeemRewards(address user) internal virtual returns (uint256[] memory rewardsOut) {
|
|
44
24
|
_updateAndDistributeRewards(user);
|
|
45
|
-
_updateUserActiveBalance(user);
|
|
46
25
|
rewardsOut = _doTransferOutRewards(user, user);
|
|
47
26
|
emit RedeemRewards(user, rewardsOut);
|
|
48
27
|
}
|
|
49
28
|
|
|
50
|
-
function _updateUserActiveBalance(address user) internal virtual {
|
|
51
|
-
_updateUserActiveBalanceForTwo(user, address(0));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _updateUserActiveBalanceForTwo(address user1, address user2) internal virtual {
|
|
55
|
-
if (user1 != address(0) && user1 != address(this)) _updateUserActiveBalancePrivate(user1);
|
|
56
|
-
if (user2 != address(0) && user2 != address(this)) _updateUserActiveBalancePrivate(user2);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @dev should only be callable from `_updateUserActiveBalanceForTwo` to guarantee user != address(0) && user !=
|
|
61
|
-
* address(this)
|
|
62
|
-
*/
|
|
63
|
-
function _updateUserActiveBalancePrivate(address user) private {
|
|
64
|
-
assert(user != address(0) && user != address(this));
|
|
65
|
-
|
|
66
|
-
uint256 lpBalance = _stakedBalance(user);
|
|
67
|
-
uint256 veBoostedLpBalance = _calcVeBoostedLpBalance(user, lpBalance);
|
|
68
|
-
|
|
69
|
-
uint256 newActiveBalance = PMath.min(veBoostedLpBalance, lpBalance);
|
|
70
|
-
|
|
71
|
-
totalActiveSupply = totalActiveSupply - activeBalance[user] + newActiveBalance;
|
|
72
|
-
activeBalance[user] = newActiveBalance;
|
|
73
|
-
|
|
74
|
-
emit UpdateActiveBalance(user, newActiveBalance);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function _calcVeBoostedLpBalance(address user, uint256 lpBalance) internal virtual returns (uint256) {
|
|
78
|
-
(uint256 vePendleSupply, uint256 vePendleBalance) = vePENDLE.totalSupplyAndBalanceCurrent(user);
|
|
79
|
-
// Inspired by Curve's Gauge
|
|
80
|
-
uint256 veBoostedLpBalance = (lpBalance * TOKENLESS_PRODUCTION) / 100;
|
|
81
|
-
if (vePendleSupply > 0) {
|
|
82
|
-
veBoostedLpBalance += (((_totalStaked() * vePendleBalance) / vePendleSupply) * (100 - TOKENLESS_PRODUCTION))
|
|
83
|
-
/ 100;
|
|
84
|
-
}
|
|
85
|
-
return veBoostedLpBalance;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
29
|
function _redeemExternalReward() internal virtual override {
|
|
89
30
|
IStandardizedYield(SY).claimRewards(address(this));
|
|
90
31
|
IPGaugeController(gaugeController).redeemMarketReward();
|
|
91
32
|
}
|
|
92
33
|
|
|
93
|
-
function _stakedBalance(address user) internal view virtual returns (uint256);
|
|
94
|
-
|
|
95
|
-
function _totalStaked() internal view virtual returns (uint256);
|
|
96
|
-
|
|
97
|
-
function _rewardSharesTotal() internal view virtual override returns (uint256) {
|
|
98
|
-
return totalActiveSupply;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function _rewardSharesUser(address user) internal view virtual override returns (uint256) {
|
|
102
|
-
return activeBalance[user];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
34
|
function _getRewardTokens() internal view virtual override returns (address[] memory) {
|
|
106
35
|
address[] memory SYRewards = IStandardizedYield(SY).getRewardTokens();
|
|
107
36
|
if (SYRewards.contains(PENDLE)) return SYRewards;
|
|
@@ -111,8 +40,4 @@ abstract contract PendleGauge is RewardManager, IPGauge {
|
|
|
111
40
|
function _beforeTokenTransfer(address from, address to, uint256) internal virtual {
|
|
112
41
|
_updateAndDistributeRewardsForTwo(from, to);
|
|
113
42
|
}
|
|
114
|
-
|
|
115
|
-
function _afterTokenTransfer(address from, address to, uint256) internal virtual {
|
|
116
|
-
_updateUserActiveBalanceForTwo(from, to);
|
|
117
|
-
}
|
|
118
43
|
}
|