@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
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
3
|
-
// documentation files (the “Software”), to deal in the Software without restriction, including without limitation
|
|
4
|
-
// the
|
|
3
|
+
// documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
|
|
5
4
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
|
|
6
5
|
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
7
6
|
|
|
8
7
|
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
|
9
8
|
// Software.
|
|
10
9
|
|
|
11
|
-
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
|
12
|
-
// THE
|
|
10
|
+
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
13
11
|
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
14
12
|
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
15
13
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -58,33 +56,32 @@ library LogExpMath {
|
|
|
58
56
|
uint256 constant MILD_EXPONENT_BOUND = 2 ** 254 / uint256(ONE_20);
|
|
59
57
|
|
|
60
58
|
// 18 decimal constants
|
|
61
|
-
int256 constant x0 =
|
|
62
|
-
int256 constant a0 =
|
|
63
|
-
//
|
|
64
|
-
int256 constant
|
|
65
|
-
int256 constant a1 = 6_235_149_080_811_616_882_910_000_000; // eˆ(x1) (no decimals)
|
|
59
|
+
int256 constant x0 = 128000000000000000000; // 2ˆ7
|
|
60
|
+
int256 constant a0 = 38877084059945950922200000000000000000000000000000000000; // eˆ(x0) (no decimals)
|
|
61
|
+
int256 constant x1 = 64000000000000000000; // 2ˆ6
|
|
62
|
+
int256 constant a1 = 6235149080811616882910000000; // eˆ(x1) (no decimals)
|
|
66
63
|
|
|
67
64
|
// 20 decimal constants
|
|
68
|
-
int256 constant x2 =
|
|
69
|
-
int256 constant a2 =
|
|
70
|
-
int256 constant x3 =
|
|
71
|
-
int256 constant a3 =
|
|
72
|
-
int256 constant x4 =
|
|
73
|
-
int256 constant a4 =
|
|
74
|
-
int256 constant x5 =
|
|
75
|
-
int256 constant a5 =
|
|
76
|
-
int256 constant x6 =
|
|
77
|
-
int256 constant a6 =
|
|
78
|
-
int256 constant x7 =
|
|
79
|
-
int256 constant a7 =
|
|
80
|
-
int256 constant x8 =
|
|
81
|
-
int256 constant a8 =
|
|
82
|
-
int256 constant x9 =
|
|
83
|
-
int256 constant a9 =
|
|
84
|
-
int256 constant x10 =
|
|
85
|
-
int256 constant a10 =
|
|
86
|
-
int256 constant x11 =
|
|
87
|
-
int256 constant a11 =
|
|
65
|
+
int256 constant x2 = 3200000000000000000000; // 2ˆ5
|
|
66
|
+
int256 constant a2 = 7896296018268069516100000000000000; // eˆ(x2)
|
|
67
|
+
int256 constant x3 = 1600000000000000000000; // 2ˆ4
|
|
68
|
+
int256 constant a3 = 888611052050787263676000000; // eˆ(x3)
|
|
69
|
+
int256 constant x4 = 800000000000000000000; // 2ˆ3
|
|
70
|
+
int256 constant a4 = 298095798704172827474000; // eˆ(x4)
|
|
71
|
+
int256 constant x5 = 400000000000000000000; // 2ˆ2
|
|
72
|
+
int256 constant a5 = 5459815003314423907810; // eˆ(x5)
|
|
73
|
+
int256 constant x6 = 200000000000000000000; // 2ˆ1
|
|
74
|
+
int256 constant a6 = 738905609893065022723; // eˆ(x6)
|
|
75
|
+
int256 constant x7 = 100000000000000000000; // 2ˆ0
|
|
76
|
+
int256 constant a7 = 271828182845904523536; // eˆ(x7)
|
|
77
|
+
int256 constant x8 = 50000000000000000000; // 2ˆ-1
|
|
78
|
+
int256 constant a8 = 164872127070012814685; // eˆ(x8)
|
|
79
|
+
int256 constant x9 = 25000000000000000000; // 2ˆ-2
|
|
80
|
+
int256 constant a9 = 128402541668774148407; // eˆ(x9)
|
|
81
|
+
int256 constant x10 = 12500000000000000000; // 2ˆ-3
|
|
82
|
+
int256 constant a10 = 113314845306682631683; // eˆ(x10)
|
|
83
|
+
int256 constant x11 = 6250000000000000000; // 2ˆ-4
|
|
84
|
+
int256 constant a11 = 106449445891785942956; // eˆ(x11)
|
|
88
85
|
|
|
89
86
|
/**
|
|
90
87
|
* @dev Natural exponentiation (e^x) with signed 18 decimal fixed point exponent.
|
|
@@ -96,29 +93,28 @@ library LogExpMath {
|
|
|
96
93
|
require(x >= MIN_NATURAL_EXPONENT && x <= MAX_NATURAL_EXPONENT, "Invalid exponent");
|
|
97
94
|
|
|
98
95
|
if (x < 0) {
|
|
99
|
-
// We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since
|
|
100
|
-
//
|
|
96
|
+
// We only handle positive exponents: e^(-x) is computed as 1 / e^x. We can safely make x positive since it
|
|
97
|
+
// fits in the signed 256 bit range (as it is larger than MIN_NATURAL_EXPONENT).
|
|
101
98
|
// Fixed point division requires multiplying by ONE_18.
|
|
102
99
|
return ((ONE_18 * ONE_18) / exp(-x));
|
|
103
100
|
}
|
|
104
101
|
|
|
105
|
-
// First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call
|
|
106
|
-
//
|
|
107
|
-
// 2^7
|
|
102
|
+
// First, we use the fact that e^(x+y) = e^x * e^y to decompose x into a sum of powers of two, which we call x_n,
|
|
103
|
+
// where x_n == 2^(7 - n), and e^x_n = a_n has been precomputed. We choose the first x_n, x0, to equal 2^7
|
|
108
104
|
// because all larger powers are larger than MAX_NATURAL_EXPONENT, and therefore not present in the
|
|
109
105
|
// decomposition.
|
|
110
|
-
// At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of
|
|
111
|
-
//
|
|
106
|
+
// At the end of this process we will have the product of all e^x_n = a_n that apply, and the remainder of this
|
|
107
|
+
// decomposition, which will be lower than the smallest x_n.
|
|
112
108
|
// exp(x) = k_0 * a_0 * k_1 * a_1 * ... + k_n * a_n * exp(remainder), where each k_n equals either 0 or 1.
|
|
113
109
|
// We mutate x by subtracting x_n, making it the remainder of the decomposition.
|
|
114
110
|
|
|
115
111
|
// The first two a_n (e^(2^7) and e^(2^6)) are too large if stored as 18 decimal numbers, and could cause
|
|
116
112
|
// intermediate overflows. Instead we store them as plain integers, with 0 decimals.
|
|
117
|
-
// Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in
|
|
118
|
-
//
|
|
113
|
+
// Additionally, x0 + x1 is larger than MAX_NATURAL_EXPONENT, which means they will not both be present in the
|
|
114
|
+
// decomposition.
|
|
119
115
|
|
|
120
|
-
// For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so
|
|
121
|
-
//
|
|
116
|
+
// For each x_n, we test if that term is present in the decomposition (if x is larger than it), and if so deduct
|
|
117
|
+
// it and compute the accumulated product.
|
|
122
118
|
|
|
123
119
|
int256 firstAN;
|
|
124
120
|
if (x >= x0) {
|
|
@@ -135,8 +131,8 @@ library LogExpMath {
|
|
|
135
131
|
// smaller terms.
|
|
136
132
|
x *= 100;
|
|
137
133
|
|
|
138
|
-
// `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed
|
|
139
|
-
//
|
|
134
|
+
// `product` is the accumulated product of all a_n (except a0 and a1), which starts at 20 decimal fixed point
|
|
135
|
+
// one. Recall that fixed point multiplication requires dividing by ONE_20.
|
|
140
136
|
int256 product = ONE_20;
|
|
141
137
|
|
|
142
138
|
if (x >= x2) {
|
|
@@ -174,8 +170,8 @@ library LogExpMath {
|
|
|
174
170
|
|
|
175
171
|
// x10 and x11 are unnecessary here since we have high enough precision already.
|
|
176
172
|
|
|
177
|
-
// Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor
|
|
178
|
-
//
|
|
173
|
+
// Now we need to compute e^x, where x is small (in particular, it is smaller than x9). We use the Taylor series
|
|
174
|
+
// expansion for e^x: 1 + x + (x^2 / 2!) + (x^3 / 3!) + ... + (x^n / n!).
|
|
179
175
|
|
|
180
176
|
int256 seriesSum = ONE_20; // The initial one in the sum, with 20 decimal places.
|
|
181
177
|
int256 term; // Each term in the sum, where the nth term is (x^n / n!).
|
|
@@ -223,9 +219,8 @@ library LogExpMath {
|
|
|
223
219
|
// 12 Taylor terms are sufficient for 18 decimal precision.
|
|
224
220
|
|
|
225
221
|
// We now have the first a_n (with no decimals), and the product of all other a_n present, and the Taylor
|
|
226
|
-
// approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to
|
|
227
|
-
//
|
|
228
|
-
// multiplication),
|
|
222
|
+
// approximation of the exponentiation of the remainder (both with 20 decimals). All that remains is to multiply
|
|
223
|
+
// all three (one 20 decimal fixed point multiplication, dividing by ONE_20, and one integer multiplication),
|
|
229
224
|
// and then drop two digits to return an 18 decimal value.
|
|
230
225
|
|
|
231
226
|
return (((product * seriesSum) / ONE_20) * firstAN) / 100;
|
|
@@ -271,11 +266,10 @@ library LogExpMath {
|
|
|
271
266
|
require(x < 2 ** 255, "x out of bounds");
|
|
272
267
|
int256 x_int256 = int256(x);
|
|
273
268
|
|
|
274
|
-
// We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36.
|
|
275
|
-
//
|
|
269
|
+
// We will compute y * ln(x) in a single step. Depending on the value of x, we can either use ln or ln_36. In
|
|
270
|
+
// both cases, we leave the division by ONE_18 (due to fixed point multiplication) to the end.
|
|
276
271
|
|
|
277
|
-
// This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit
|
|
278
|
-
// range.
|
|
272
|
+
// This prevents y * ln(x) from overflowing, and at the same time guarantees y fits in the signed 256 bit range.
|
|
279
273
|
require(y < MILD_EXPONENT_BOUND, "y out of bounds");
|
|
280
274
|
int256 y_int256 = int256(y);
|
|
281
275
|
|
|
@@ -283,8 +277,8 @@ library LogExpMath {
|
|
|
283
277
|
if (LN_36_LOWER_BOUND < x_int256 && x_int256 < LN_36_UPPER_BOUND) {
|
|
284
278
|
int256 ln_36_x = _ln_36(x_int256);
|
|
285
279
|
|
|
286
|
-
// ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't
|
|
287
|
-
//
|
|
280
|
+
// ln_36_x has 36 decimal places, so multiplying by y_int256 isn't as straightforward, since we can't just
|
|
281
|
+
// bring y_int256 to 36 decimal places, as it might overflow. Instead, we perform two 18 decimal
|
|
288
282
|
// multiplications and add the results: one with the first 18 decimals of ln_36_x, and one with the
|
|
289
283
|
// (downscaled) last 18 decimals.
|
|
290
284
|
logx_times_y = ((ln_36_x / ONE_18) * y_int256 + ((ln_36_x % ONE_18) * y_int256) / ONE_18);
|
|
@@ -295,7 +289,8 @@ library LogExpMath {
|
|
|
295
289
|
|
|
296
290
|
// Finally, we compute exp(y * ln(x)) to arrive at x^y
|
|
297
291
|
require(
|
|
298
|
-
MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,
|
|
292
|
+
MIN_NATURAL_EXPONENT <= logx_times_y && logx_times_y <= MAX_NATURAL_EXPONENT,
|
|
293
|
+
"product out of bounds"
|
|
299
294
|
);
|
|
300
295
|
|
|
301
296
|
return uint256(exp(logx_times_y));
|
|
@@ -309,27 +304,25 @@ library LogExpMath {
|
|
|
309
304
|
unchecked {
|
|
310
305
|
if (a < ONE_18) {
|
|
311
306
|
// Since ln(a^k) = k * ln(a), we can compute ln(a) as ln(a) = ln((1/a)^(-1)) = - ln((1/a)). If a is less
|
|
312
|
-
// than one, 1/a will be greater than one, and this if statement will not be entered in the recursive
|
|
313
|
-
//
|
|
307
|
+
// than one, 1/a will be greater than one, and this if statement will not be entered in the recursive call.
|
|
308
|
+
// Fixed point division requires multiplying by ONE_18.
|
|
314
309
|
return (-_ln((ONE_18 * ONE_18) / a));
|
|
315
310
|
}
|
|
316
311
|
|
|
317
|
-
// First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two,
|
|
318
|
-
//
|
|
319
|
-
// (
|
|
320
|
-
//
|
|
321
|
-
//
|
|
322
|
-
//
|
|
323
|
-
// this decomposition, which will be lower than the smallest a_n.
|
|
312
|
+
// First, we use the fact that ln^(a * b) = ln(a) + ln(b) to decompose ln(a) into a sum of powers of two, which
|
|
313
|
+
// we call x_n, where x_n == 2^(7 - n), which are the natural logarithm of precomputed quantities a_n (that is,
|
|
314
|
+
// ln(a_n) = x_n). We choose the first x_n, x0, to equal 2^7 because the exponential of all larger powers cannot
|
|
315
|
+
// be represented as 18 fixed point decimal numbers in 256 bits, and are therefore larger than a.
|
|
316
|
+
// At the end of this process we will have the sum of all x_n = ln(a_n) that apply, and the remainder of this
|
|
317
|
+
// decomposition, which will be lower than the smallest a_n.
|
|
324
318
|
// ln(a) = k_0 * x_0 + k_1 * x_1 + ... + k_n * x_n + ln(remainder), where each k_n equals either 0 or 1.
|
|
325
319
|
// We mutate a by subtracting a_n, making it the remainder of the decomposition.
|
|
326
320
|
|
|
327
|
-
// For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed
|
|
328
|
-
//
|
|
329
|
-
// them by
|
|
321
|
+
// For reasons related to how `exp` works, the first two a_n (e^(2^7) and e^(2^6)) are not stored as fixed point
|
|
322
|
+
// numbers with 18 decimals, but instead as plain integers with 0 decimals, so we need to multiply them by
|
|
330
323
|
// ONE_18 to convert them to fixed point.
|
|
331
|
-
// For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so
|
|
332
|
-
//
|
|
324
|
+
// For each a_n, we test if that term is present in the decomposition (if a is larger than it), and if so divide
|
|
325
|
+
// by it and compute the accumulated sum.
|
|
333
326
|
|
|
334
327
|
int256 sum = 0;
|
|
335
328
|
if (a >= a0 * ONE_18) {
|
|
@@ -342,8 +335,7 @@ library LogExpMath {
|
|
|
342
335
|
sum += x1;
|
|
343
336
|
}
|
|
344
337
|
|
|
345
|
-
// All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this
|
|
346
|
-
// format.
|
|
338
|
+
// All other a_n and x_n are stored as 20 digit fixed point numbers, so we convert the sum and a to this format.
|
|
347
339
|
sum *= 100;
|
|
348
340
|
a *= 100;
|
|
349
341
|
|
|
@@ -399,8 +391,8 @@ library LogExpMath {
|
|
|
399
391
|
sum += x11;
|
|
400
392
|
}
|
|
401
393
|
|
|
402
|
-
// a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor
|
|
403
|
-
//
|
|
394
|
+
// a is now a small number (smaller than a_11, which roughly equals 1.06). This means we can use a Taylor series
|
|
395
|
+
// that converges rapidly for values of `a` close to one - the same one used in ln_36.
|
|
404
396
|
// Let z = (a - 1) / (a + 1).
|
|
405
397
|
// ln(a) = 2 * (z + z^3 / 3 + z^5 / 5 + z^7 / 7 + ... + z^(2 * n + 1) / (2 * n + 1))
|
|
406
398
|
|
|
@@ -436,9 +428,8 @@ library LogExpMath {
|
|
|
436
428
|
// Finally, we multiply by 2 (non fixed point) to compute ln(remainder)
|
|
437
429
|
seriesSum *= 2;
|
|
438
430
|
|
|
439
|
-
// We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder
|
|
440
|
-
//
|
|
441
|
-
// decimal
|
|
431
|
+
// We now have the sum of all x_n present, and the Taylor approximation of the logarithm of the remainder (both
|
|
432
|
+
// with 20 decimals). All that remains is to sum these two, and then drop two digits to return a 18 decimal
|
|
442
433
|
// value.
|
|
443
434
|
|
|
444
435
|
return (sum + seriesSum) / 100;
|
|
@@ -446,8 +437,7 @@ library LogExpMath {
|
|
|
446
437
|
}
|
|
447
438
|
|
|
448
439
|
/**
|
|
449
|
-
* @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point
|
|
450
|
-
* argument,
|
|
440
|
+
* @dev Intrnal high precision (36 decimal places) natural logarithm (ln(x)) with signed 18 decimal fixed point argument,
|
|
451
441
|
* for x close to one.
|
|
452
442
|
*
|
|
453
443
|
* Should only be used if x is between LN_36_LOWER_BOUND and LN_36_UPPER_BOUND.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
|
-
import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
|
|
5
4
|
import {IPFixedPricePTAMM, IPFixedPricePTAMMSwapCallback} from "../interfaces/IPFixedPricePTAMM.sol";
|
|
5
|
+
import {IPChainlinkOracleEssential} from "../interfaces/IPChainlinkOracleEssential.sol";
|
|
6
6
|
|
|
7
7
|
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
|
|
8
8
|
|
|
9
|
+
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
9
10
|
import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
10
11
|
import {TokenHelper} from "../core/libraries/TokenHelper.sol";
|
|
11
|
-
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
12
12
|
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
13
13
|
|
|
14
14
|
contract FixedPricePTAMM is
|
|
@@ -55,36 +55,35 @@ contract FixedPricePTAMM is
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
function priceOracle(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
58
|
+
function priceOracle(
|
|
59
|
+
address PT,
|
|
60
|
+
address token
|
|
61
|
+
) public view returns (IPChainlinkOracleEssential oracle, uint256 multiplier) {
|
|
63
62
|
oracle = IPChainlinkOracleEssential($().priceOracle[PT][token].oracle);
|
|
64
63
|
multiplier = $().priceOracle[PT][token].multiplier;
|
|
65
64
|
|
|
66
65
|
if (address(oracle) == address(0)) revert OracleNotSet(PT, token);
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
function previewSwapPtForExactToken(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{
|
|
68
|
+
function previewSwapPtForExactToken(
|
|
69
|
+
address PT,
|
|
70
|
+
address token,
|
|
71
|
+
uint256 exactTokenOut
|
|
72
|
+
) public view returns (uint256 amountPtIn) {
|
|
74
73
|
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
75
|
-
(, int256 rawPrice
|
|
74
|
+
(, int256 rawPrice, , , ) = oracle.latestRoundData();
|
|
76
75
|
|
|
77
76
|
// ceil(exactTokenOut / (rawPrice * multiplier))
|
|
78
77
|
return (exactTokenOut * PMath.ONE * PMath.ONE).rawDivUp(rawPrice.Uint() * multiplier);
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
function previewSwapExactPtForToken(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
80
|
+
function previewSwapExactPtForToken(
|
|
81
|
+
address PT,
|
|
82
|
+
uint256 exactPtIn,
|
|
83
|
+
address token
|
|
84
|
+
) public view returns (uint256 amountTokenOut) {
|
|
86
85
|
(IPChainlinkOracleEssential oracle, uint256 multiplier) = priceOracle(PT, token);
|
|
87
|
-
(, int256 rawPrice
|
|
86
|
+
(, int256 rawPrice, , , ) = oracle.latestRoundData();
|
|
88
87
|
|
|
89
88
|
// exactPtIn * rawPrice * multiplier
|
|
90
89
|
return (exactPtIn * rawPrice.Uint() * multiplier) / (PMath.ONE * PMath.ONE);
|
|
@@ -100,27 +99,31 @@ contract FixedPricePTAMM is
|
|
|
100
99
|
return _swapPtForExactToken(receiver, PT, token, exactTokenOut, data, false);
|
|
101
100
|
}
|
|
102
101
|
|
|
103
|
-
function swapExactPtForToken(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
function swapExactPtForToken(
|
|
103
|
+
address receiver,
|
|
104
|
+
address PT,
|
|
105
|
+
uint256 exactPtIn,
|
|
106
|
+
address token,
|
|
107
|
+
bytes calldata data
|
|
108
|
+
) external nonReentrant returns (uint256 netTokenOut) {
|
|
108
109
|
return _swapExactPtForToken(receiver, PT, exactPtIn, token, data, false);
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
function transferInThenSwapPtForExactToken(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
function transferInThenSwapPtForExactToken(
|
|
113
|
+
address receiver,
|
|
114
|
+
address PT,
|
|
115
|
+
address token,
|
|
116
|
+
uint256 exactTokenOut
|
|
117
|
+
) external nonReentrant returns (uint256 netPtIn) {
|
|
116
118
|
return _swapPtForExactToken(receiver, PT, token, exactTokenOut, "", true);
|
|
117
119
|
}
|
|
118
120
|
|
|
119
|
-
function transferInThenSwapExactPtForToken(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
function transferInThenSwapExactPtForToken(
|
|
122
|
+
address receiver,
|
|
123
|
+
address PT,
|
|
124
|
+
uint256 exactPtIn,
|
|
125
|
+
address token
|
|
126
|
+
) external nonReentrant returns (uint256 netPtIn) {
|
|
124
127
|
return _swapExactPtForToken(receiver, PT, exactPtIn, token, "", true);
|
|
125
128
|
}
|
|
126
129
|
|
|
@@ -158,9 +161,8 @@ contract FixedPricePTAMM is
|
|
|
158
161
|
uint256 exactTokenOut,
|
|
159
162
|
bytes memory data
|
|
160
163
|
) internal {
|
|
161
|
-
if ($().totalToken[token] < exactTokenOut)
|
|
164
|
+
if ($().totalToken[token] < exactTokenOut)
|
|
162
165
|
revert InsufficientTokenForTrade(token, $().totalToken[token], exactTokenOut);
|
|
163
|
-
}
|
|
164
166
|
|
|
165
167
|
_transferOut(token, receiver, exactTokenOut);
|
|
166
168
|
$().totalToken[token] -= exactTokenOut;
|
|
@@ -170,9 +172,8 @@ contract FixedPricePTAMM is
|
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
$().totalToken[PT] += exactPtIn;
|
|
173
|
-
if (_selfBalance(PT) < $().totalToken[PT])
|
|
175
|
+
if (_selfBalance(PT) < $().totalToken[PT])
|
|
174
176
|
revert InsufficientPtReceived(PT, _selfBalance(PT), $().totalToken[PT]);
|
|
175
|
-
}
|
|
176
177
|
|
|
177
178
|
emit Swap(msg.sender, receiver, PT, exactPtIn, token, exactTokenOut);
|
|
178
179
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import {BoringOwnableUpgradeableV2} from "../../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
4
|
import {IPPTOFTAdapterFactory} from "../../../interfaces/IPPTOFTAdapterFactory.sol";
|
|
5
|
+
import {BoringOwnableUpgradeableV2} from "../../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
6
|
import {OFTAdapterImpl} from "../../oftImpl/hub/OFTAdapterImpl.sol";
|
|
7
7
|
|
|
8
8
|
import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.19;
|
|
3
3
|
|
|
4
4
|
import {IPBridgedPrincipalToken} from "../../../interfaces/IPBridgedPrincipalToken.sol";
|
|
5
|
-
import {
|
|
5
|
+
import {OFT, OFTCore, IOFT} from "@layerzerolabs/oft-evm/contracts/OFT.sol";
|
|
6
6
|
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
7
7
|
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
8
8
|
|
|
@@ -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 "
|
|
5
|
-
import "
|
|
6
|
-
import "../../core/libraries/ArrayLib.sol";
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
7
6
|
import "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
8
7
|
import "../../core/libraries/Errors.sol";
|
|
9
8
|
import "../../interfaces/IPFeeDistributor.sol";
|
|
10
|
-
import "../../interfaces/IPVotingController.sol";
|
|
11
9
|
import "../../interfaces/IPVotingEscrowMainchain.sol";
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
10
|
+
import "../../interfaces/IPVotingController.sol";
|
|
11
|
+
import "../../LiquidityMining/libraries/WeekMath.sol";
|
|
12
|
+
import "../../LiquidityMining/libraries/VeHistoryLib.sol";
|
|
13
|
+
import "../../core/libraries/ArrayLib.sol";
|
|
14
14
|
|
|
15
15
|
contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeableV2, IPFeeDistributor {
|
|
16
16
|
using SafeERC20 for IERC20;
|
|
@@ -73,9 +73,7 @@ contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeableV2, IP
|
|
|
73
73
|
totalFunded += amounts[i].sum();
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
if (totalFunded != totalAmountToFund)
|
|
77
|
-
revert Errors.FDTotalAmountFundedNotMatch(totalFunded, totalAmountToFund);
|
|
78
|
-
}
|
|
76
|
+
if (totalFunded != totalAmountToFund) revert Errors.FDTotalAmountFundedNotMatch(totalFunded, totalAmountToFund);
|
|
79
77
|
|
|
80
78
|
IERC20(token).transferFrom(msg.sender, address(this), totalFunded);
|
|
81
79
|
}
|
|
@@ -106,7 +104,7 @@ contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeableV2, IP
|
|
|
106
104
|
|
|
107
105
|
function claimReward(address user, address[] calldata pools) external returns (uint256[] memory amountRewardOut) {
|
|
108
106
|
amountRewardOut = new uint256[](pools.length);
|
|
109
|
-
for (uint256 i = 0; i < pools.length;) {
|
|
107
|
+
for (uint256 i = 0; i < pools.length; ) {
|
|
110
108
|
amountRewardOut[i] = _accumulateUserReward(pools[i], user);
|
|
111
109
|
unchecked {
|
|
112
110
|
i++;
|
|
@@ -119,11 +117,10 @@ contract PendleFeeDistributor is UUPSUpgradeable, BoringOwnableUpgradeableV2, IP
|
|
|
119
117
|
return allPools;
|
|
120
118
|
}
|
|
121
119
|
|
|
122
|
-
function _accumulateUserReward(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{
|
|
120
|
+
function _accumulateUserReward(
|
|
121
|
+
address pool,
|
|
122
|
+
address user
|
|
123
|
+
) internal ensureValidPool(pool) returns (uint256 totalReward) {
|
|
127
124
|
uint256 length = _getUserCheckpointLength(pool, user);
|
|
128
125
|
if (length == 0) return 0;
|
|
129
126
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
|
+
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
|
|
4
7
|
import "../../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
-
import "../../core/libraries/Errors.sol";
|
|
6
8
|
import "../../core/libraries/TokenHelper.sol";
|
|
9
|
+
import "../../core/libraries/Errors.sol";
|
|
7
10
|
import "../../interfaces/IPFeeDistributorV2.sol";
|
|
8
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
9
|
-
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
10
|
-
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
|
|
11
11
|
|
|
12
12
|
contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2, IPFeeDistributorV2, TokenHelper {
|
|
13
13
|
bytes32 public merkleRoot;
|
|
@@ -29,10 +29,11 @@ contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2,
|
|
|
29
29
|
__BoringOwnableV2_init(_owner);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function claimRetail(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
function claimRetail(
|
|
33
|
+
address receiver,
|
|
34
|
+
uint256 totalAccrued,
|
|
35
|
+
bytes32[] calldata proof
|
|
36
|
+
) external returns (uint256 amountOut) {
|
|
36
37
|
address user = msg.sender;
|
|
37
38
|
if (!_verifyMerkleData(user, totalAccrued, proof)) revert Errors.InvalidMerkleProof();
|
|
38
39
|
|
|
@@ -46,10 +47,10 @@ contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2,
|
|
|
46
47
|
emit Claimed(user, amountOut);
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
function claimProtocol(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
{
|
|
50
|
+
function claimProtocol(
|
|
51
|
+
address receiver,
|
|
52
|
+
address[] calldata pools
|
|
53
|
+
) external returns (uint256 totalAmountOut, uint256[] memory amountsOut) {
|
|
53
54
|
unchecked {
|
|
54
55
|
address user = msg.sender;
|
|
55
56
|
|
|
@@ -67,8 +68,7 @@ contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2,
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
claimed[user] += totalAmountOut;
|
|
70
|
-
assert(claimed[user] <= protocol[user].totalAccrued); // important invariant, must always hold regardless of
|
|
71
|
-
// claimable mapping
|
|
71
|
+
assert(claimed[user] <= protocol[user].totalAccrued); // important invariant, must always hold regardless of claimable mapping
|
|
72
72
|
|
|
73
73
|
// transfer ETH last
|
|
74
74
|
_transferOut(NATIVE, receiver, totalAmountOut);
|
|
@@ -76,11 +76,10 @@ contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2,
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
function getProtocolClaimables(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
79
|
+
function getProtocolClaimables(
|
|
80
|
+
address user,
|
|
81
|
+
address[] calldata pools
|
|
82
|
+
) external view returns (uint256[] memory claimables) {
|
|
84
83
|
unchecked {
|
|
85
84
|
uint256 nPools = pools.length;
|
|
86
85
|
claimables = new uint256[](nPools);
|
|
@@ -121,8 +120,12 @@ contract PendleFeeDistributorV2 is UUPSUpgradeable, BoringOwnableUpgradeableV2,
|
|
|
121
120
|
|
|
122
121
|
function updateProtocolClaimable(UpdateProtocolStruct calldata ele) public onlyOwner {
|
|
123
122
|
unchecked {
|
|
124
|
-
(address user, uint256[] calldata topUps, address[] calldata pools, bytes32[] calldata proof) =
|
|
125
|
-
|
|
123
|
+
(address user, uint256[] calldata topUps, address[] calldata pools, bytes32[] calldata proof) = (
|
|
124
|
+
ele.user,
|
|
125
|
+
ele.topUps,
|
|
126
|
+
ele.pools,
|
|
127
|
+
ele.proof
|
|
128
|
+
);
|
|
126
129
|
|
|
127
130
|
uint256 nPools = pools.length;
|
|
128
131
|
if (nPools != topUps.length) revert Errors.ArrayLengthMismatch();
|
|
@@ -7,11 +7,9 @@ interface ILayerZeroEndpoint {
|
|
|
7
7
|
// @param _dstChainId - the destination chain identifier
|
|
8
8
|
// @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
|
|
9
9
|
// @param _payload - a custom bytes payload to send to the destination contract
|
|
10
|
-
// @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the
|
|
11
|
-
//
|
|
12
|
-
// for the
|
|
13
|
-
// @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer
|
|
14
|
-
// on destination
|
|
10
|
+
// @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
|
|
11
|
+
// @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
|
|
12
|
+
// @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
|
|
15
13
|
function send(
|
|
16
14
|
uint16 _dstChainId,
|
|
17
15
|
bytes calldata _destination,
|
|
@@ -29,7 +29,9 @@ interface IPActionInfoStatic {
|
|
|
29
29
|
function getPY(address py) external view returns (address pt, address yt);
|
|
30
30
|
|
|
31
31
|
/// can be SY, PY or Market
|
|
32
|
-
function getTokensInOut(
|
|
32
|
+
function getTokensInOut(
|
|
33
|
+
address token
|
|
34
|
+
) external view returns (address[] memory tokensIn, address[] memory tokensOut);
|
|
33
35
|
|
|
34
36
|
function getUserSYInfo(address sy, address user) external returns (UserSYInfo memory res);
|
|
35
37
|
|