@pendle/core-v2 6.3.1 → 6.3.2-pendle-merkle-transfer
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/ExcessivelySafeCall.sol/ExcessivelySafeCall.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol/LayerZeroHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.json +2 -2
- 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/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/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/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV6Upg.sol/PendleMarketFactoryV6Upg.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketV6.sol/PendleMarketV6.json +2 -2
- package/build/artifacts/contracts/core/RewardManager/RewardManager.sol/RewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/core/RewardManager/RewardManagerAbstract.sol/RewardManagerAbstract.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- package/build/artifacts/contracts/core/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/erc20/PendleERC20.sol/PendleERC20.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/BaseSplitCodeFactory.json +2 -2
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BaseSplitCodeFactory.sol/CodeDeployer.json +2 -2
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.json +2 -2
- 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 +2 -2
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ExpiryUtilsLib.sol/ExpiryUtils.json +2 -2
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.json +2 -2
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/LogExpMath.sol/LogExpMath.json +2 -2
- package/build/artifacts/contracts/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/factory/hub/PendlePTOFTAdapterFactory.sol/PendlePTOFTAdapterFactory.json +2 -2
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.json +2 -2
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- 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/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.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/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/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.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/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.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/IPLimitRouter.json +0 -42
- 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 -13
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.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/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/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/IStandardizedYield.sol/IStandardizedYield.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/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/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/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.json +2 -2
- 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/LegacyNFTHelper.json +2 -2
- 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/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/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/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.json +2 -2
- 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 +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.json +102 -0
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.json +2 -2
- 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/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/PendleCommonSYFactory.sol/PendleCommonSYFactory.json +2 -2
- 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/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -2
- 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/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.json +2 -2
- 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/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/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/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/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/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.json +0 -171
- 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/ParaswapScaleHelper.sol/ParaswapScaleHelper.json +2 -2
- 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/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.json +2 -2
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +17 -15
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +16 -14
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +3 -2
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +12 -9
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +10 -8
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +12 -6
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +11 -4
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +13 -11
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +22 -17
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +28 -21
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +27 -31
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +23 -19
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +8 -7
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +5 -6
- package/contracts/core/Market/MarketMathCore.sol +112 -78
- package/contracts/core/Market/OracleLib.sol +41 -34
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +16 -19
- package/contracts/core/Market/PendleMarketV6.sol +65 -63
- package/contracts/core/RewardManager/RewardManager.sol +8 -8
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +5 -6
- package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
- package/contracts/core/YieldContracts/InterestManagerYT.sol +9 -8
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +8 -4
- package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +12 -15
- package/contracts/core/YieldContracts/PendleYieldToken.sol +41 -54
- package/contracts/core/erc20/PendleERC20.sol +6 -9
- package/contracts/core/libraries/ArrayLib.sol +13 -11
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +29 -22
- package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +1 -2
- package/contracts/core/libraries/Errors.sol +4 -1
- package/contracts/core/libraries/ExpiryUtilsLib.sol +10 -10
- package/contracts/core/libraries/StringLib.sol +13 -13
- package/contracts/core/libraries/TokenHelper.sol +3 -3
- package/contracts/core/libraries/math/LogExpMath.sol +67 -77
- package/contracts/cross-chain/FixedPricePTAMM.sol +39 -38
- package/contracts/cross-chain/factory/hub/PendlePTOFTAdapterFactory.sol +1 -1
- package/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol +1 -1
- package/contracts/deprecated/VeDistributor/PendleFeeDistributor.sol +12 -15
- package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +24 -21
- package/contracts/interfaces/ILayerZeroEndpoint.sol +3 -5
- package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +3 -1
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +15 -11
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +109 -58
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +26 -21
- package/contracts/interfaces/IPActionMiscV3.sol +44 -24
- package/contracts/interfaces/IPActionSimple.sol +43 -24
- package/contracts/interfaces/IPActionVePendleStatic.sol +5 -4
- package/contracts/interfaces/IPAllActionTypeV3.sol +16 -14
- package/contracts/interfaces/IPAllActionV3.sol +4 -4
- package/contracts/interfaces/IPAllEventsV3.sol +21 -5
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
- package/contracts/interfaces/IPCommonSYFactory.sol +6 -3
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +26 -25
- package/contracts/interfaces/IPFeeDistributorV2.sol +16 -13
- package/contracts/interfaces/IPFixedPricePTAMM.sol +34 -22
- package/contracts/interfaces/IPGovernanceProxy.sol +6 -2
- package/contracts/interfaces/IPInterestManagerYTV2.sol +3 -4
- package/contracts/interfaces/IPLimitRouter.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +35 -25
- package/contracts/interfaces/IPMarketFactory.sol +16 -9
- package/contracts/interfaces/IPMerkleDistributor.sol +10 -6
- package/contracts/interfaces/IPMsgSendEndpoint.sol +12 -7
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +12 -6
- package/contracts/interfaces/IPPYLpOracle.sol +4 -1
- package/contracts/interfaces/IPRouterStatic.sol +3 -3
- package/contracts/interfaces/IPVotingController.sol +4 -4
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +1 -1
- package/contracts/interfaces/IPYieldContractFactory.sol +5 -3
- package/contracts/interfaces/IPYieldToken.sol +11 -8
- package/contracts/interfaces/IPYieldTokenV2.sol +11 -8
- package/contracts/interfaces/IStandardizedYield.sol +17 -16
- package/contracts/limit/LimitMathCore.sol +56 -38
- package/contracts/limit/LimitRouterBase.sol +88 -66
- package/contracts/limit/PendleLimitRouter.sol +7 -11
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/AutomateReady.sol +2 -2
- package/contracts/offchain-helpers/BalanceReader.sol +9 -21
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +7 -5
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/BytesLib.sol +5 -3
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +8 -5
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +5 -1
- package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
- package/contracts/offchain-helpers/Multicall2.sol +7 -9
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +8 -4
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +10 -7
- package/contracts/offchain-helpers/PendleLPWrapper.sol +3 -12
- package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
- package/contracts/offchain-helpers/PendleMerkleDepositor.sol +64 -0
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +12 -13
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
- package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +2 -4
- package/contracts/offchain-helpers/SimulateHelper.sol +6 -7
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +32 -13
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +11 -7
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +35 -16
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +35 -15
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +13 -12
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +4 -1
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +9 -12
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +91 -60
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +190 -103
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +26 -26
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +3 -3
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +10 -8
- package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +40 -100
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +6 -14
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +47 -55
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +3 -2
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +20 -17
- package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +19 -15
- package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +6 -7
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +9 -13
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +21 -20
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +7 -4
- package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +10 -13
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +10 -13
- package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +5 -6
- package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
- package/contracts/router/ActionAddRemoveLiqV3.sol +150 -55
- package/contracts/router/ActionCallbackV3.sol +13 -20
- package/contracts/router/ActionMiscV3.sol +78 -54
- package/contracts/router/ActionSimple.sol +128 -76
- package/contracts/router/ActionSwapPTV3.sol +19 -7
- package/contracts/router/ActionSwapYTV3.sol +20 -8
- package/contracts/router/PendleRouterV4.sol +1 -1
- package/contracts/router/Reflector.sol +21 -15
- package/contracts/router/base/ActionBase.sol +105 -61
- package/contracts/router/base/ActionDelegateBase.sol +38 -39
- package/contracts/router/base/CallbackHelper.sol +19 -21
- package/contracts/router/math/ApproxStateLib.sol +28 -28
- package/contracts/router/math/MarketApproxEstimateLib.sol +13 -11
- package/contracts/router/math/MarketApproxLibOnchain.sol +24 -47
- package/contracts/router/math/MarketApproxLibV2.sol +44 -63
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +55 -191
- package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +48 -34
- package/contracts/router/swap-aggregator/PendleSwap.sol +28 -26
- package/deployments/1-core.json +2 -1
- package/deployments/1-offchain-helper.json +1 -2
- package/deployments/10-core.json +2 -1
- package/deployments/10-offchain-helper.json +1 -2
- package/deployments/146-core.json +2 -1
- package/deployments/146-offchain-helper.json +1 -2
- package/deployments/42161-core.json +2 -1
- package/deployments/42161-offchain-helper.json +1 -2
- package/deployments/5000-core.json +2 -1
- package/deployments/5000-offchain-helper.json +1 -2
- package/deployments/56-core.json +2 -1
- package/deployments/56-offchain-helper.json +1 -2
- package/deployments/80094-core.json +2 -1
- package/deployments/80094-offchain-helper.json +1 -2
- package/deployments/8453-core.json +2 -1
- package/deployments/8453-offchain-helper.json +1 -2
- package/deployments/9745-core.json +2 -1
- package/deployments/9745-offchain-helper.json +1 -2
- package/deployments/999-core.json +2 -1
- package/deployments/999-offchain-helper.json +1 -2
- package/package.json +4 -2
- package/typechain-types/IOKXDexRouter.ts +0 -99
- package/typechain-types/IPLimitRouter.ts +0 -69
- package/typechain-types/IPMarket.ts +0 -13
- package/typechain-types/PendleMerkleDepositor.ts +171 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__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/AddressProvider__factory.ts +1 -1
- package/typechain-types/factories/BalanceReader__factory.ts +1 -1
- package/typechain-types/factories/BaseSplitCodeFactoryContract__factory.ts +1 -1
- package/typechain-types/factories/BoringOwnableUpgradeableData__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/EmptyUUPS__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +1 -1
- 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/IOKXDexRouter__factory.ts +0 -171
- package/typechain-types/factories/IPLimitRouter__factory.ts +0 -42
- package/typechain-types/factories/IPMarket__factory.ts +0 -13
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedPrincipalToken__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/PendleCommonSYFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleV2__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/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGovernanceProxy__factory.ts +1 -1
- 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/PendleMarketFactoryV6Upg__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV6__factory.ts +1 -1
- package/typechain-types/factories/PendleMerkleDepositor__factory.ts +164 -0
- package/typechain-types/factories/PendleMerkleDistributor__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/PendleMulticallOwnerV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV1__factory.ts +1 -1
- package/typechain-types/factories/PendleMulticallV2__factory.ts +1 -1
- package/typechain-types/factories/PendleOffchainStorage__factory.ts +1 -1
- package/typechain-types/factories/PendlePTOFTAdapterFactory__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/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/PendleSwap__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstETHPriceFeed__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/SDKErrorsDirectory__factory.ts +1 -1
- package/typechain-types/factories/SimulateHelper__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +9 -18
- package/typechain-types/index.ts +2 -4
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +0 -326
- package/contracts/offchain-helpers/PendleFeeSetter.sol +0 -149
|
@@ -13,29 +13,31 @@ library OracleLib {
|
|
|
13
13
|
// 1 SLOT = 256 bits
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
function transform(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
function transform(
|
|
17
|
+
Observation memory last,
|
|
18
|
+
uint32 blockTimestamp,
|
|
19
|
+
uint96 lnImpliedRate
|
|
20
|
+
) public pure returns (Observation memory) {
|
|
21
|
+
return
|
|
22
|
+
Observation({
|
|
23
|
+
blockTimestamp: blockTimestamp,
|
|
24
|
+
lnImpliedRateCumulative: last.lnImpliedRateCumulative +
|
|
25
|
+
uint216(lnImpliedRate) *
|
|
26
|
+
(blockTimestamp - last.blockTimestamp),
|
|
27
|
+
initialized: true
|
|
28
|
+
});
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
function initialize(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
31
|
+
function initialize(
|
|
32
|
+
Observation[65535] storage self,
|
|
33
|
+
uint32 time
|
|
34
|
+
) public returns (uint16 cardinality, uint16 cardinalityNext) {
|
|
33
35
|
self[0] = Observation({blockTimestamp: time, lnImpliedRateCumulative: 0, initialized: true});
|
|
34
36
|
return (1, 1);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
function write(
|
|
38
|
-
Observation[
|
|
40
|
+
Observation[65535] storage self,
|
|
39
41
|
uint16 index,
|
|
40
42
|
uint32 blockTimestamp,
|
|
41
43
|
uint96 lnImpliedRate,
|
|
@@ -58,13 +60,13 @@ library OracleLib {
|
|
|
58
60
|
self[indexUpdated] = transform(last, blockTimestamp, lnImpliedRate);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
function grow(Observation[
|
|
63
|
+
function grow(Observation[65535] storage self, uint16 current, uint16 next) public returns (uint16) {
|
|
62
64
|
if (current == 0) revert Errors.OracleUninitialized();
|
|
63
65
|
// no-op if the passed next value isn't greater than the current next value
|
|
64
66
|
if (next <= current) return current;
|
|
65
67
|
// store in each slot to prevent fresh SSTOREs in swaps
|
|
66
68
|
// this data will not be used because the initialized boolean is still false
|
|
67
|
-
for (uint16 i = current; i != next;) {
|
|
69
|
+
for (uint16 i = current; i != next; ) {
|
|
68
70
|
self[i].blockTimestamp = 1;
|
|
69
71
|
unchecked {
|
|
70
72
|
++i;
|
|
@@ -73,11 +75,12 @@ library OracleLib {
|
|
|
73
75
|
return next;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
function binarySearch(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
function binarySearch(
|
|
79
|
+
Observation[65535] storage self,
|
|
80
|
+
uint32 target,
|
|
81
|
+
uint16 index,
|
|
82
|
+
uint16 cardinality
|
|
83
|
+
) public view returns (Observation memory beforeOrAt, Observation memory atOrAfter) {
|
|
81
84
|
uint256 l = (index + 1) % cardinality; // oldest observation
|
|
82
85
|
uint256 r = l + cardinality - 1; // newest observation
|
|
83
86
|
uint256 i;
|
|
@@ -105,7 +108,7 @@ library OracleLib {
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
function getSurroundingObservations(
|
|
108
|
-
Observation[
|
|
111
|
+
Observation[65535] storage self,
|
|
109
112
|
uint32 target,
|
|
110
113
|
uint96 lnImpliedRate,
|
|
111
114
|
uint16 index,
|
|
@@ -137,7 +140,7 @@ library OracleLib {
|
|
|
137
140
|
}
|
|
138
141
|
|
|
139
142
|
function observeSingle(
|
|
140
|
-
Observation[
|
|
143
|
+
Observation[65535] storage self,
|
|
141
144
|
uint32 time,
|
|
142
145
|
uint32 secondsAgo,
|
|
143
146
|
uint96 lnImpliedRate,
|
|
@@ -154,8 +157,13 @@ library OracleLib {
|
|
|
154
157
|
|
|
155
158
|
uint32 target = time - secondsAgo;
|
|
156
159
|
|
|
157
|
-
(Observation memory beforeOrAt, Observation memory atOrAfter) =
|
|
158
|
-
|
|
160
|
+
(Observation memory beforeOrAt, Observation memory atOrAfter) = getSurroundingObservations(
|
|
161
|
+
self,
|
|
162
|
+
target,
|
|
163
|
+
lnImpliedRate,
|
|
164
|
+
index,
|
|
165
|
+
cardinality
|
|
166
|
+
);
|
|
159
167
|
|
|
160
168
|
if (target == beforeOrAt.blockTimestamp) {
|
|
161
169
|
// we're at the left boundary
|
|
@@ -165,17 +173,16 @@ library OracleLib {
|
|
|
165
173
|
return atOrAfter.lnImpliedRateCumulative;
|
|
166
174
|
} else {
|
|
167
175
|
// we're in the middle
|
|
168
|
-
return (beforeOrAt.lnImpliedRateCumulative
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
));
|
|
176
|
+
return (beforeOrAt.lnImpliedRateCumulative +
|
|
177
|
+
uint216(
|
|
178
|
+
(uint256(atOrAfter.lnImpliedRateCumulative - beforeOrAt.lnImpliedRateCumulative) *
|
|
179
|
+
(target - beforeOrAt.blockTimestamp)) / (atOrAfter.blockTimestamp - beforeOrAt.blockTimestamp)
|
|
180
|
+
));
|
|
174
181
|
}
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
function observe(
|
|
178
|
-
Observation[
|
|
185
|
+
Observation[65535] storage self,
|
|
179
186
|
uint32 time,
|
|
180
187
|
uint32[] memory secondsAgos,
|
|
181
188
|
uint96 lnImpliedRate,
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
import "../../interfaces/IPGauge.sol";
|
|
5
|
-
import "../../interfaces/IPGaugeController.sol";
|
|
6
5
|
import "../../interfaces/IPVeToken.sol";
|
|
6
|
+
import "../../interfaces/IPGaugeController.sol";
|
|
7
7
|
import "../../interfaces/IStandardizedYield.sol";
|
|
8
8
|
|
|
9
9
|
import "../RewardManager/RewardManager.sol";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Invariants to maintain:
|
|
13
|
+
- before any changes to active balance, updateAndDistributeRewards() must be called
|
|
14
14
|
*/
|
|
15
15
|
abstract contract PendleGauge is RewardManager, IPGauge {
|
|
16
16
|
using PMath for uint256;
|
|
@@ -37,7 +37,7 @@ abstract contract PendleGauge is RewardManager, IPGauge {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @dev Since rewardShares is based on activeBalance, user's activeBalance must be updated AFTER
|
|
40
|
-
|
|
40
|
+
rewards is updated
|
|
41
41
|
* @dev It's intended to have user's activeBalance updated when rewards is redeemed
|
|
42
42
|
*/
|
|
43
43
|
function _redeemRewards(address user) internal virtual returns (uint256[] memory rewardsOut) {
|
|
@@ -57,8 +57,7 @@ abstract contract PendleGauge is RewardManager, IPGauge {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* @dev should only be callable from `_updateUserActiveBalanceForTwo` to guarantee user != address(0) && user !=
|
|
61
|
-
* address(this)
|
|
60
|
+
* @dev should only be callable from `_updateUserActiveBalanceForTwo` to guarantee user != address(0) && user != address(this)
|
|
62
61
|
*/
|
|
63
62
|
function _updateUserActiveBalancePrivate(address user) private {
|
|
64
63
|
assert(user != address(0) && user != address(this));
|
|
@@ -79,8 +78,9 @@ abstract contract PendleGauge is RewardManager, IPGauge {
|
|
|
79
78
|
// Inspired by Curve's Gauge
|
|
80
79
|
uint256 veBoostedLpBalance = (lpBalance * TOKENLESS_PRODUCTION) / 100;
|
|
81
80
|
if (vePendleSupply > 0) {
|
|
82
|
-
veBoostedLpBalance +=
|
|
83
|
-
/ 100
|
|
81
|
+
veBoostedLpBalance +=
|
|
82
|
+
(((_totalStaked() * vePendleBalance) / vePendleSupply) * (100 - TOKENLESS_PRODUCTION)) /
|
|
83
|
+
100;
|
|
84
84
|
}
|
|
85
85
|
return veBoostedLpBalance;
|
|
86
86
|
}
|
|
@@ -3,12 +3,12 @@ pragma solidity ^0.8.17;
|
|
|
3
3
|
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
|
4
4
|
|
|
5
5
|
import "../../interfaces/IPMarket.sol";
|
|
6
|
-
import "../../interfaces/IPMarketFactory.sol";
|
|
7
6
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
+
import "../../interfaces/IPMarketFactory.sol";
|
|
8
8
|
|
|
9
9
|
import "../libraries/BaseSplitCodeFactory.sol";
|
|
10
|
-
import "../libraries/BoringOwnableUpgradeableV2.sol";
|
|
11
10
|
import "../libraries/Errors.sol";
|
|
11
|
+
import "../libraries/BoringOwnableUpgradeableV2.sol";
|
|
12
12
|
|
|
13
13
|
contract PendleMarketFactoryV6Upg is BoringOwnableUpgradeableV2, IPMarketFactory {
|
|
14
14
|
using EnumerableSet for EnumerableSet.AddressSet;
|
|
@@ -70,23 +70,22 @@ contract PendleMarketFactoryV6Upg is BoringOwnableUpgradeableV2, IPMarketFactory
|
|
|
70
70
|
* @notice Create a market between PT and its corresponding SY with scalar & anchor config.
|
|
71
71
|
* Anyone is allowed to create a market on their own.
|
|
72
72
|
*/
|
|
73
|
-
function createNewMarket(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
function createNewMarket(
|
|
74
|
+
address PT,
|
|
75
|
+
int256 scalarRoot,
|
|
76
|
+
int256 initialAnchor,
|
|
77
|
+
uint80 lnFeeRateRoot
|
|
78
|
+
) external returns (address market) {
|
|
77
79
|
if (!IPYieldContractFactory(yieldContractFactory).isPT(PT)) revert Errors.MarketFactoryInvalidPt();
|
|
78
80
|
if (IPPrincipalToken(PT).isExpired()) revert Errors.MarketFactoryExpiredPt();
|
|
79
|
-
if (lnFeeRateRoot > maxLnFeeRateRoot)
|
|
81
|
+
if (lnFeeRateRoot > maxLnFeeRateRoot)
|
|
80
82
|
revert Errors.MarketFactoryLnFeeRateRootTooHigh(lnFeeRateRoot, maxLnFeeRateRoot);
|
|
81
|
-
}
|
|
82
83
|
|
|
83
|
-
if (markets[PT][scalarRoot][initialAnchor][lnFeeRateRoot] != address(0))
|
|
84
|
+
if (markets[PT][scalarRoot][initialAnchor][lnFeeRateRoot] != address(0))
|
|
84
85
|
revert Errors.MarketFactoryMarketExists();
|
|
85
|
-
}
|
|
86
86
|
|
|
87
|
-
if (initialAnchor < minInitialAnchor)
|
|
87
|
+
if (initialAnchor < minInitialAnchor)
|
|
88
88
|
revert Errors.MarketFactoryInitialAnchorTooLow(initialAnchor, minInitialAnchor);
|
|
89
|
-
}
|
|
90
89
|
|
|
91
90
|
market = BaseSplitCodeFactory._create2(
|
|
92
91
|
0,
|
|
@@ -105,11 +104,10 @@ contract PendleMarketFactoryV6Upg is BoringOwnableUpgradeableV2, IPMarketFactory
|
|
|
105
104
|
emit CreateNewMarket(market, PT, scalarRoot, initialAnchor, lnFeeRateRoot);
|
|
106
105
|
}
|
|
107
106
|
|
|
108
|
-
function getMarketConfig(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{
|
|
107
|
+
function getMarketConfig(
|
|
108
|
+
address market,
|
|
109
|
+
address router
|
|
110
|
+
) external view returns (address _treasury, uint80 _overriddenFee, uint8 _reserveFeePercent) {
|
|
113
111
|
(_treasury, _reserveFeePercent) = (treasury, reserveFeePercent);
|
|
114
112
|
_overriddenFee = overriddenFee[router][market];
|
|
115
113
|
}
|
|
@@ -121,9 +119,8 @@ contract PendleMarketFactoryV6Upg is BoringOwnableUpgradeableV2, IPMarketFactory
|
|
|
121
119
|
|
|
122
120
|
function setTreasuryAndFeeReserve(address newTreasury, uint8 newReserveFeePercent) public onlyOwner {
|
|
123
121
|
if (newTreasury == address(0)) revert Errors.MarketFactoryZeroTreasury();
|
|
124
|
-
if (newReserveFeePercent > maxReserveFeePercent)
|
|
122
|
+
if (newReserveFeePercent > maxReserveFeePercent)
|
|
125
123
|
revert Errors.MarketFactoryReserveFeePercentTooHigh(newReserveFeePercent, maxReserveFeePercent);
|
|
126
|
-
}
|
|
127
124
|
|
|
128
125
|
treasury = newTreasury;
|
|
129
126
|
reserveFeePercent = newReserveFeePercent;
|
|
@@ -6,16 +6,16 @@ import "../../interfaces/IPMarketFactory.sol";
|
|
|
6
6
|
import "../../interfaces/IPMarketSwapCallback.sol";
|
|
7
7
|
|
|
8
8
|
import "../erc20/PendleERC20.sol";
|
|
9
|
-
import "../libraries/StringLib.sol";
|
|
10
|
-
import "./OracleLib.sol";
|
|
11
9
|
import "./PendleGauge.sol";
|
|
10
|
+
import "./OracleLib.sol";
|
|
11
|
+
import "../libraries/StringLib.sol";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
Invariance to maintain:
|
|
15
|
+
- Internal balances totalPt & totalSy not interfered by people transferring tokens in directly
|
|
16
|
+
- address(0) & address(this) should never have any rewards & activeBalance accounting done. This is
|
|
17
|
+
guaranteed by address(0) & address(this) check in each updateForTwo function
|
|
18
|
+
*/
|
|
19
19
|
contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
20
20
|
using PMath for uint256;
|
|
21
21
|
using PMath for int256;
|
|
@@ -23,7 +23,7 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
23
23
|
using SafeERC20 for IERC20;
|
|
24
24
|
using PYIndexLib for IPYieldToken;
|
|
25
25
|
using PYIndexLib for PYIndex;
|
|
26
|
-
using OracleLib for OracleLib.Observation[
|
|
26
|
+
using OracleLib for OracleLib.Observation[65535];
|
|
27
27
|
using StringLib for string;
|
|
28
28
|
using StringLib for StringLib.slice;
|
|
29
29
|
|
|
@@ -59,7 +59,7 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
59
59
|
|
|
60
60
|
MarketStorage public _storage;
|
|
61
61
|
|
|
62
|
-
OracleLib.Observation[
|
|
62
|
+
OracleLib.Observation[65535] public observations;
|
|
63
63
|
|
|
64
64
|
modifier notExpired() {
|
|
65
65
|
if (isExpired()) revert Errors.MarketExpired();
|
|
@@ -81,8 +81,9 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
81
81
|
SY = IStandardizedYield(PT.SY());
|
|
82
82
|
YT = IPYieldToken(PT.YT());
|
|
83
83
|
|
|
84
|
-
(_storage.observationCardinality, _storage.observationCardinalityNext) =
|
|
85
|
-
|
|
84
|
+
(_storage.observationCardinality, _storage.observationCardinalityNext) = observations.initialize(
|
|
85
|
+
uint32(block.timestamp)
|
|
86
|
+
);
|
|
86
87
|
|
|
87
88
|
if (_scalarRoot <= 0) revert Errors.MarketScalarRootBelowZero(_scalarRoot);
|
|
88
89
|
|
|
@@ -109,18 +110,21 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
109
110
|
* @dev PT and SY should be transferred to this contract prior to calling
|
|
110
111
|
* @dev will revert if PT is expired
|
|
111
112
|
*/
|
|
112
|
-
function mint(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
{
|
|
113
|
+
function mint(
|
|
114
|
+
address receiver,
|
|
115
|
+
uint256 netSyDesired,
|
|
116
|
+
uint256 netPtDesired
|
|
117
|
+
) external nonReentrant notExpired returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
118
118
|
MarketState memory market = readState(msg.sender);
|
|
119
119
|
PYIndex index = YT.newIndex();
|
|
120
120
|
|
|
121
121
|
uint256 lpToReserve;
|
|
122
122
|
|
|
123
|
-
(lpToReserve, netLpOut, netSyUsed, netPtUsed) = market.addLiquidity(
|
|
123
|
+
(lpToReserve, netLpOut, netSyUsed, netPtUsed) = market.addLiquidity(
|
|
124
|
+
netSyDesired,
|
|
125
|
+
netPtDesired,
|
|
126
|
+
block.timestamp
|
|
127
|
+
);
|
|
124
128
|
|
|
125
129
|
// initializing the market
|
|
126
130
|
if (lpToReserve != 0) {
|
|
@@ -132,12 +136,10 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
132
136
|
|
|
133
137
|
_writeState(market);
|
|
134
138
|
|
|
135
|
-
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
139
|
+
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
136
140
|
revert Errors.MarketInsufficientSyReceived(_selfBalance(SY), market.totalSy.Uint());
|
|
137
|
-
|
|
138
|
-
if (_selfBalance(PT) < market.totalPt.Uint()) {
|
|
141
|
+
if (_selfBalance(PT) < market.totalPt.Uint())
|
|
139
142
|
revert Errors.MarketInsufficientPtReceived(_selfBalance(PT), market.totalPt.Uint());
|
|
140
|
-
}
|
|
141
143
|
|
|
142
144
|
emit Mint(receiver, netLpOut, netSyUsed, netPtUsed);
|
|
143
145
|
}
|
|
@@ -146,11 +148,11 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
146
148
|
* @notice LP Holders can burn their LP to receive back SY & PT proportionally
|
|
147
149
|
* to their share of the market
|
|
148
150
|
*/
|
|
149
|
-
function burn(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
{
|
|
151
|
+
function burn(
|
|
152
|
+
address receiverSy,
|
|
153
|
+
address receiverPt,
|
|
154
|
+
uint256 netLpToBurn
|
|
155
|
+
) external nonReentrant returns (uint256 netSyOut, uint256 netPtOut) {
|
|
154
156
|
MarketState memory market = readState(msg.sender);
|
|
155
157
|
|
|
156
158
|
_burn(address(this), netLpToBurn);
|
|
@@ -169,19 +171,18 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
169
171
|
* @notice Pendle Market allows swaps between PT & SY it is holding. This function
|
|
170
172
|
* aims to swap an exact amount of PT to SY.
|
|
171
173
|
* @dev steps working of this contract
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
- The outcome amount of SY will be precomputed by MarketMathLib
|
|
175
|
+
- Release the calculated amount of SY to receiver
|
|
176
|
+
- Callback to msg.sender if data.length > 0
|
|
177
|
+
- Ensure exactPtIn amount of PT has been transferred to this address
|
|
176
178
|
* @dev will revert if PT is expired
|
|
177
179
|
* @param data bytes data to be sent in the callback (if any)
|
|
178
180
|
*/
|
|
179
|
-
function swapExactPtForSy(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{
|
|
181
|
+
function swapExactPtForSy(
|
|
182
|
+
address receiver,
|
|
183
|
+
uint256 exactPtIn,
|
|
184
|
+
bytes calldata data
|
|
185
|
+
) external nonReentrant notExpired returns (uint256 netSyOut, uint256 netSyFee) {
|
|
185
186
|
MarketState memory market = readState(msg.sender);
|
|
186
187
|
PYIndex index = YT.newIndex();
|
|
187
188
|
|
|
@@ -197,9 +198,8 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
197
198
|
IPMarketSwapCallback(msg.sender).swapCallback(exactPtIn.neg(), netSyOut.Int(), data);
|
|
198
199
|
}
|
|
199
200
|
|
|
200
|
-
if (_selfBalance(PT) < market.totalPt.Uint())
|
|
201
|
+
if (_selfBalance(PT) < market.totalPt.Uint())
|
|
201
202
|
revert Errors.MarketInsufficientPtReceived(_selfBalance(PT), market.totalPt.Uint());
|
|
202
|
-
}
|
|
203
203
|
|
|
204
204
|
if (index.syToAsset(netSyFee - netSyToReserve) == 0) {
|
|
205
205
|
revert Errors.MarketZeroNetLPFee();
|
|
@@ -212,18 +212,17 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
212
212
|
* @notice Pendle Market allows swaps between PT & SY it is holding. This function
|
|
213
213
|
* aims to swap SY for an exact amount of PT.
|
|
214
214
|
* @dev steps working of this function
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
- The exact outcome amount of PT will be transferred to receiver
|
|
216
|
+
- Callback to msg.sender if data.length > 0
|
|
217
|
+
- Ensure the calculated required amount of SY is transferred to this address
|
|
218
218
|
* @dev will revert if PT is expired
|
|
219
219
|
* @param data bytes data to be sent in the callback (if any)
|
|
220
220
|
*/
|
|
221
|
-
function swapSyForExactPt(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
{
|
|
221
|
+
function swapSyForExactPt(
|
|
222
|
+
address receiver,
|
|
223
|
+
uint256 exactPtOut,
|
|
224
|
+
bytes calldata data
|
|
225
|
+
) external nonReentrant notExpired returns (uint256 netSyIn, uint256 netSyFee) {
|
|
227
226
|
MarketState memory market = readState(msg.sender);
|
|
228
227
|
|
|
229
228
|
PYIndex index = YT.newIndex();
|
|
@@ -241,9 +240,8 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
241
240
|
}
|
|
242
241
|
|
|
243
242
|
// have received enough SY
|
|
244
|
-
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
243
|
+
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
245
244
|
revert Errors.MarketInsufficientSyReceived(_selfBalance(SY), market.totalSy.Uint());
|
|
246
|
-
}
|
|
247
245
|
|
|
248
246
|
if (index.syToAsset(netSyFee - netSyToReserve) == 0) {
|
|
249
247
|
revert Errors.MarketZeroNetLPFee();
|
|
@@ -279,13 +277,14 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
279
277
|
//////////////////////////////////////////////////////////////*/
|
|
280
278
|
|
|
281
279
|
function observe(uint32[] memory secondsAgos) external view returns (uint216[] memory lnImpliedRateCumulative) {
|
|
282
|
-
return
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
280
|
+
return
|
|
281
|
+
observations.observe(
|
|
282
|
+
uint32(block.timestamp),
|
|
283
|
+
secondsAgos,
|
|
284
|
+
_storage.lastLnImpliedRate,
|
|
285
|
+
_storage.observationIndex,
|
|
286
|
+
_storage.observationCardinality
|
|
287
|
+
);
|
|
289
288
|
}
|
|
290
289
|
|
|
291
290
|
function increaseObservationsCardinalityNext(uint16 cardinalityNext) external nonReentrant {
|
|
@@ -311,8 +310,10 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
311
310
|
|
|
312
311
|
uint80 overriddenFee;
|
|
313
312
|
|
|
314
|
-
(market.treasury, overriddenFee, market.reserveFeePercent) =
|
|
315
|
-
|
|
313
|
+
(market.treasury, overriddenFee, market.reserveFeePercent) = IPMarketFactory(factory).getMarketConfig(
|
|
314
|
+
address(this),
|
|
315
|
+
router
|
|
316
|
+
);
|
|
316
317
|
|
|
317
318
|
market.lnFeeRateRoot = overriddenFee == 0 ? lnFeeRateRoot : overriddenFee;
|
|
318
319
|
market.scalarRoot = scalarRoot;
|
|
@@ -379,10 +380,11 @@ contract PendleMarketV6 is PendleERC20, PendleGauge, IPMarket {
|
|
|
379
380
|
}
|
|
380
381
|
|
|
381
382
|
// solhint-disable-next-line ordering
|
|
382
|
-
function _beforeTokenTransfer(
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
383
|
+
function _beforeTokenTransfer(
|
|
384
|
+
address from,
|
|
385
|
+
address to,
|
|
386
|
+
uint256 amount
|
|
387
|
+
) internal override(PendleERC20, PendleGauge) {
|
|
386
388
|
PendleGauge._beforeTokenTransfer(from, to, amount);
|
|
387
389
|
}
|
|
388
390
|
|
|
@@ -45,8 +45,10 @@ abstract contract RewardManager is RewardManagerAbstract {
|
|
|
45
45
|
if (index == 0) index = INITIAL_REWARD_INDEX;
|
|
46
46
|
if (totalShares != 0) index += accrued.divDown(totalShares);
|
|
47
47
|
|
|
48
|
-
rewardState[token] =
|
|
49
|
-
|
|
48
|
+
rewardState[token] = RewardState({
|
|
49
|
+
index: index.Uint128(),
|
|
50
|
+
lastBalance: (lastBalance + accrued).Uint128()
|
|
51
|
+
});
|
|
50
52
|
indexes[i] = index;
|
|
51
53
|
}
|
|
52
54
|
} else {
|
|
@@ -58,12 +60,10 @@ abstract contract RewardManager is RewardManagerAbstract {
|
|
|
58
60
|
|
|
59
61
|
/// @dev this function doesn't need redeemExternal since redeemExternal is bundled in updateRewardIndex
|
|
60
62
|
/// @dev this function also has to update rewardState.lastBalance
|
|
61
|
-
function _doTransferOutRewards(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
returns (uint256[] memory rewardAmounts)
|
|
66
|
-
{
|
|
63
|
+
function _doTransferOutRewards(
|
|
64
|
+
address user,
|
|
65
|
+
address receiver
|
|
66
|
+
) internal virtual override returns (uint256[] memory rewardAmounts) {
|
|
67
67
|
address[] memory tokens = _getRewardTokens();
|
|
68
68
|
rewardAmounts = new uint256[](tokens.length);
|
|
69
69
|
for (uint256 i = 0; i < tokens.length; i++) {
|
|
@@ -40,8 +40,7 @@ abstract contract RewardManagerAbstract is IRewardManager, TokenHelper {
|
|
|
40
40
|
if (user2 != address(0) && user2 != address(this)) _distributeRewardsPrivate(user2, tokens, indexes);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// should only be callable from `_updateAndDistributeRewardsForTwo` to guarantee user != address(0) && user !=
|
|
44
|
-
// address(this)
|
|
43
|
+
// should only be callable from `_updateAndDistributeRewardsForTwo` to guarantee user != address(0) && user != address(this)
|
|
45
44
|
function _distributeRewardsPrivate(address user, address[] memory tokens, uint256[] memory indexes) private {
|
|
46
45
|
assert(user != address(0) && user != address(this));
|
|
47
46
|
|
|
@@ -70,10 +69,10 @@ abstract contract RewardManagerAbstract is IRewardManager, TokenHelper {
|
|
|
70
69
|
|
|
71
70
|
function _redeemExternalReward() internal virtual;
|
|
72
71
|
|
|
73
|
-
function _doTransferOutRewards(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
function _doTransferOutRewards(
|
|
73
|
+
address user,
|
|
74
|
+
address receiver
|
|
75
|
+
) internal virtual returns (uint256[] memory rewardAmounts);
|
|
77
76
|
|
|
78
77
|
function _rewardSharesUser(address user) internal view virtual returns (uint256);
|
|
79
78
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
|
-
import "../../interfaces/IPPrincipalToken.sol";
|
|
4
3
|
import "../../interfaces/IPYieldToken.sol";
|
|
4
|
+
import "../../interfaces/IPPrincipalToken.sol";
|
|
5
5
|
|
|
6
|
-
import "../libraries/math/PMath.sol";
|
|
7
6
|
import "./SYUtils.sol";
|
|
7
|
+
import "../libraries/math/PMath.sol";
|
|
8
8
|
|
|
9
9
|
type PYIndex is uint256;
|
|
10
10
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../../interfaces/
|
|
4
|
+
import "../../interfaces/IPYieldToken.sol";
|
|
5
5
|
import "../../interfaces/IPPrincipalToken.sol";
|
|
6
|
+
import "../../interfaces/IPInterestManagerYT.sol";
|
|
6
7
|
import "../../interfaces/IPYieldContractFactory.sol";
|
|
7
|
-
import "../../interfaces/IPYieldToken.sol";
|
|
8
8
|
|
|
9
9
|
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
10
10
|
|
|
11
|
-
import "../StandardizedYield/SYUtils.sol";
|
|
12
|
-
import "../libraries/TokenHelper.sol";
|
|
13
11
|
import "../libraries/math/PMath.sol";
|
|
12
|
+
import "../libraries/TokenHelper.sol";
|
|
13
|
+
import "../StandardizedYield/SYUtils.sol";
|
|
14
14
|
|
|
15
15
|
/*
|
|
16
16
|
With YT yielding more SYs overtime, which is allowed to be redeemed by users, the reward distribution should
|
|
@@ -40,10 +40,11 @@ abstract contract InterestManagerYT is TokenHelper, IPInterestManagerYT {
|
|
|
40
40
|
if (user2 != address(0) && user2 != address(this)) _distributeInterestPrivate(user2, index);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function _doTransferOutInterest(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
function _doTransferOutInterest(
|
|
44
|
+
address user,
|
|
45
|
+
address SY,
|
|
46
|
+
address factory
|
|
47
|
+
) internal returns (uint256 interestAmount) {
|
|
47
48
|
address treasury = IPYieldContractFactory(factory).treasury();
|
|
48
49
|
uint256 feeRate = IPYieldContractFactory(factory).interestFeeRate();
|
|
49
50
|
|
|
@@ -4,8 +4,8 @@ pragma solidity ^0.8.17;
|
|
|
4
4
|
import "../../interfaces/IPPrincipalToken.sol";
|
|
5
5
|
import "../../interfaces/IPYieldToken.sol";
|
|
6
6
|
|
|
7
|
-
import "../libraries/Errors.sol";
|
|
8
7
|
import "../libraries/MiniHelpers.sol";
|
|
8
|
+
import "../libraries/Errors.sol";
|
|
9
9
|
|
|
10
10
|
import "../erc20/PendleERC20.sol";
|
|
11
11
|
|
|
@@ -29,9 +29,13 @@ contract PendlePrincipalToken is PendleERC20, Initializable, IPPrincipalToken {
|
|
|
29
29
|
_;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
constructor(
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
constructor(
|
|
33
|
+
address _SY,
|
|
34
|
+
string memory _name,
|
|
35
|
+
string memory _symbol,
|
|
36
|
+
uint8 __decimals,
|
|
37
|
+
uint256 _expiry
|
|
38
|
+
) PendleERC20(_name, _symbol, __decimals) {
|
|
35
39
|
SY = _SY;
|
|
36
40
|
expiry = _expiry;
|
|
37
41
|
factory = msg.sender;
|