@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
|
@@ -52,7 +52,9 @@ interface IPYieldContractFactory {
|
|
|
52
52
|
|
|
53
53
|
function isYT(address) external view returns (bool);
|
|
54
54
|
|
|
55
|
-
function createYieldContract(
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
function createYieldContract(
|
|
56
|
+
address SY,
|
|
57
|
+
uint32 expiry,
|
|
58
|
+
bool doCacheIndexSameBlock
|
|
59
|
+
) external returns (address PT, address YT);
|
|
58
60
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
|
-
import "./IPInterestManagerYT.sol";
|
|
4
|
-
import "./IRewardManager.sol";
|
|
5
3
|
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
4
|
+
import "./IRewardManager.sol";
|
|
5
|
+
import "./IPInterestManagerYT.sol";
|
|
6
6
|
|
|
7
7
|
interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
8
8
|
event NewInterestIndex(uint256 indexed newIndex);
|
|
@@ -27,13 +27,16 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
27
27
|
|
|
28
28
|
function redeemPY(address receiver) external returns (uint256 amountSyOut);
|
|
29
29
|
|
|
30
|
-
function redeemPYMulti(
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
function redeemPYMulti(
|
|
31
|
+
address[] calldata receivers,
|
|
32
|
+
uint256[] calldata amountPYToRedeems
|
|
33
|
+
) external returns (uint256[] memory amountSyOuts);
|
|
33
34
|
|
|
34
|
-
function redeemDueInterestAndRewards(
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
function redeemDueInterestAndRewards(
|
|
36
|
+
address user,
|
|
37
|
+
bool redeemInterest,
|
|
38
|
+
bool redeemRewards
|
|
39
|
+
) external returns (uint256 interestOut, uint256[] memory rewardsOut);
|
|
37
40
|
|
|
38
41
|
function rewardIndexesCurrent() external returns (uint256[] memory);
|
|
39
42
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
|
-
import "./IPInterestManagerYTV2.sol";
|
|
4
|
-
import "./IRewardManager.sol";
|
|
5
3
|
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
4
|
+
import "./IRewardManager.sol";
|
|
5
|
+
import "./IPInterestManagerYTV2.sol";
|
|
6
6
|
|
|
7
7
|
interface IPYieldTokenV2 is IERC20Metadata, IRewardManager, IPInterestManagerYTV2 {
|
|
8
8
|
event Mint(
|
|
@@ -29,13 +29,16 @@ interface IPYieldTokenV2 is IERC20Metadata, IRewardManager, IPInterestManagerYTV
|
|
|
29
29
|
|
|
30
30
|
function redeemPY(address receiver) external returns (uint256 amountSyOut);
|
|
31
31
|
|
|
32
|
-
function redeemPYMulti(
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
function redeemPYMulti(
|
|
33
|
+
address[] calldata receivers,
|
|
34
|
+
uint256[] calldata amountPYToRedeems
|
|
35
|
+
) external returns (uint256[] memory amountSyOuts);
|
|
35
36
|
|
|
36
|
-
function redeemDueInterestAndRewards(
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
function redeemDueInterestAndRewards(
|
|
38
|
+
address user,
|
|
39
|
+
bool redeemInterest,
|
|
40
|
+
bool redeemRewards
|
|
41
|
+
) external returns (uint256 interestOut, uint256[] memory rewardsOut);
|
|
39
42
|
|
|
40
43
|
function rewardIndexesCurrent() external returns (uint256[] memory);
|
|
41
44
|
|
|
@@ -64,10 +64,12 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
64
64
|
* Requirements:
|
|
65
65
|
* - (`tokenIn`) must be a valid base token.
|
|
66
66
|
*/
|
|
67
|
-
function deposit(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
function deposit(
|
|
68
|
+
address receiver,
|
|
69
|
+
address tokenIn,
|
|
70
|
+
uint256 amountTokenToDeposit,
|
|
71
|
+
uint256 minSharesOut
|
|
72
|
+
) external payable returns (uint256 amountSharesOut);
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* @notice redeems an amount of base tokens by burning some shares
|
|
@@ -93,9 +95,9 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
93
95
|
/**
|
|
94
96
|
* @notice exchangeRate * syBalance / 1e18 must return the asset balance of the account
|
|
95
97
|
* @notice vice-versa, if a user uses some amount of tokens equivalent to X asset, the amount of sy
|
|
96
|
-
* exchangeRate / 1e18
|
|
98
|
+
he can mint must be X * exchangeRate / 1e18
|
|
97
99
|
* @dev SYUtils's assetToSy & syToAsset should be used instead of raw multiplication
|
|
98
|
-
|
|
100
|
+
& division
|
|
99
101
|
*/
|
|
100
102
|
function exchangeRate() external view returns (uint256 res);
|
|
101
103
|
|
|
@@ -144,21 +146,20 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
144
146
|
|
|
145
147
|
function isValidTokenOut(address token) external view returns (bool);
|
|
146
148
|
|
|
147
|
-
function previewDeposit(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
function previewDeposit(
|
|
150
|
+
address tokenIn,
|
|
151
|
+
uint256 amountTokenToDeposit
|
|
152
|
+
) external view returns (uint256 amountSharesOut);
|
|
151
153
|
|
|
152
|
-
function previewRedeem(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
function previewRedeem(
|
|
155
|
+
address tokenOut,
|
|
156
|
+
uint256 amountSharesToRedeem
|
|
157
|
+
) external view returns (uint256 amountTokenOut);
|
|
156
158
|
|
|
157
159
|
/**
|
|
158
160
|
* @notice This function contains information to interpret what the asset is
|
|
159
161
|
* @return assetType the type of the asset (0 for ERC20 tokens, 1 for AMM liquidity tokens,
|
|
160
|
-
|
|
161
|
-
* chain)
|
|
162
|
+
2 for bridged yield bearing tokens like wstETH, rETH on Arbi whose the underlying asset doesn't exist on the chain)
|
|
162
163
|
* @return assetAddress the address of the asset
|
|
163
164
|
* @return assetDecimals the decimals of the asset
|
|
164
165
|
*/
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.0;
|
|
4
4
|
|
|
5
|
-
import "../core/Market/MarketMathCore.sol";
|
|
6
5
|
import "../interfaces/IPLimitRouter.sol";
|
|
6
|
+
import "../core/Market/MarketMathCore.sol";
|
|
7
7
|
import "../interfaces/IPMarketFactory.sol";
|
|
8
8
|
|
|
9
9
|
library LimitMathCore {
|
|
@@ -12,29 +12,37 @@ library LimitMathCore {
|
|
|
12
12
|
using PMath for uint256;
|
|
13
13
|
using PMath for int256;
|
|
14
14
|
|
|
15
|
-
function calcBatch(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
function calcBatch(
|
|
16
|
+
FillOrderParams[] memory params,
|
|
17
|
+
address YT,
|
|
18
|
+
uint256 lnFeeRateRoot
|
|
19
|
+
) internal returns (IPLimitOrderType.FillResults memory out) {
|
|
20
|
+
return
|
|
21
|
+
calcBatch(
|
|
22
|
+
params,
|
|
23
|
+
IPYieldToken(YT).expiry() - block.timestamp,
|
|
24
|
+
IPYieldToken(YT).pyIndexCurrent(),
|
|
25
|
+
lnFeeRateRoot
|
|
26
|
+
);
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
// --- PURE FUNCTIONS ---
|
|
25
|
-
function calcBatch(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
function calcBatch(
|
|
31
|
+
FillOrderParams[] memory params,
|
|
32
|
+
uint256 timeToExpiry,
|
|
33
|
+
uint256 pyIndex,
|
|
34
|
+
uint256 lnFeeRateRoot
|
|
35
|
+
) internal pure returns (IPLimitOrderType.FillResults memory out) {
|
|
30
36
|
uint256 len = params.length;
|
|
31
37
|
out.netMakings = new uint256[](len);
|
|
32
38
|
out.netTakings = new uint256[](len);
|
|
33
39
|
out.netFees = new uint256[](len);
|
|
34
40
|
out.notionalVolumes = new uint256[](len);
|
|
35
41
|
|
|
36
|
-
function(uint256, uint256, PYIndex, uint256)
|
|
37
|
-
|
|
42
|
+
function(uint256, uint256, PYIndex, uint256)
|
|
43
|
+
internal
|
|
44
|
+
pure
|
|
45
|
+
returns (uint256, uint256, uint256) calc = getCalcFunctions(params[0].order.orderType);
|
|
38
46
|
|
|
39
47
|
uint256 feeRate = impliedRateToExchangeRate(lnFeeRateRoot, timeToExpiry);
|
|
40
48
|
|
|
@@ -45,8 +53,12 @@ library LimitMathCore {
|
|
|
45
53
|
uint256 exchangeRate = impliedRateToExchangeRate(param.order.lnImpliedRate, timeToExpiry);
|
|
46
54
|
|
|
47
55
|
out.netMakings[i] = param.makingAmount;
|
|
48
|
-
(out.netTakings[i], out.netFees[i], out.notionalVolumes[i]) =
|
|
49
|
-
|
|
56
|
+
(out.netTakings[i], out.netFees[i], out.notionalVolumes[i]) = calc(
|
|
57
|
+
out.netMakings[i],
|
|
58
|
+
exchangeRate,
|
|
59
|
+
PYIndex.wrap(pyIndex),
|
|
60
|
+
feeRate
|
|
61
|
+
);
|
|
50
62
|
|
|
51
63
|
require(out.netTakings[i] > 0, "LOP: can't swap 0 amount");
|
|
52
64
|
|
|
@@ -57,11 +69,12 @@ library LimitMathCore {
|
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
71
|
|
|
60
|
-
function calcSyForPt(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
72
|
+
function calcSyForPt(
|
|
73
|
+
uint256 makeSy,
|
|
74
|
+
uint256 r,
|
|
75
|
+
PYIndex index,
|
|
76
|
+
uint256 f
|
|
77
|
+
) internal pure returns (uint256 takePt, uint256 fee, uint256 notionalVolume) {
|
|
65
78
|
// takePt = makeSy * index * r
|
|
66
79
|
// fee = makeSy * (f - 1) / f
|
|
67
80
|
// notionalVolume = makeSy
|
|
@@ -71,11 +84,12 @@ library LimitMathCore {
|
|
|
71
84
|
notionalVolume = makeSy;
|
|
72
85
|
}
|
|
73
86
|
|
|
74
|
-
function calcPtForSy(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
87
|
+
function calcPtForSy(
|
|
88
|
+
uint256 makePt,
|
|
89
|
+
uint256 r,
|
|
90
|
+
PYIndex index,
|
|
91
|
+
uint256 f
|
|
92
|
+
) internal pure returns (uint256 takeSy, uint256 fee, uint256 notionalVolume) {
|
|
79
93
|
// takeAsset = make / r
|
|
80
94
|
// takeSy = takeAsset / index
|
|
81
95
|
// fee = takeSy * (f-1)
|
|
@@ -86,11 +100,12 @@ library LimitMathCore {
|
|
|
86
100
|
notionalVolume = takeSy;
|
|
87
101
|
}
|
|
88
102
|
|
|
89
|
-
function calcSyForYt(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
103
|
+
function calcSyForYt(
|
|
104
|
+
uint256 makeSy,
|
|
105
|
+
uint256 r,
|
|
106
|
+
PYIndex index,
|
|
107
|
+
uint256 f
|
|
108
|
+
) internal pure returns (uint256 takeYt, uint256 fee, uint256 notionalVolume) {
|
|
94
109
|
// pt = makeSy * index * r
|
|
95
110
|
// yt = pt / (r-1)
|
|
96
111
|
// fee = makeSy * (f-1) / (r-1)
|
|
@@ -102,11 +117,12 @@ library LimitMathCore {
|
|
|
102
117
|
notionalVolume = makeSy.divDown(pt_yt_ratio);
|
|
103
118
|
}
|
|
104
119
|
|
|
105
|
-
function calcYtForSy(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
function calcYtForSy(
|
|
121
|
+
uint256 makeYt,
|
|
122
|
+
uint256 r,
|
|
123
|
+
PYIndex index,
|
|
124
|
+
uint256 f
|
|
125
|
+
) internal pure returns (uint256 takeSy, uint256 fee, uint256 notionalVolume) {
|
|
110
126
|
// pt = yt * (r-1)
|
|
111
127
|
// takeSy = pt / r / index
|
|
112
128
|
// feeSy = takeSy * (f-1) / f / (r-1)
|
|
@@ -122,7 +138,9 @@ library LimitMathCore {
|
|
|
122
138
|
return MarketMathCore._getExchangeRateFromImpliedRate(lnRate, timeToExpiry).Uint();
|
|
123
139
|
}
|
|
124
140
|
|
|
125
|
-
function getCalcFunctions(
|
|
141
|
+
function getCalcFunctions(
|
|
142
|
+
IPLimitOrderType.OrderType t
|
|
143
|
+
)
|
|
126
144
|
internal
|
|
127
145
|
pure
|
|
128
146
|
returns (function(uint256, uint256, PYIndex, uint256) internal pure returns (uint256, uint256, uint256) calc)
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.17;
|
|
4
4
|
|
|
5
|
+
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
6
|
+
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
7
|
+
import "../interfaces/IPLimitRouter.sol";
|
|
5
8
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
9
|
import "../core/libraries/TokenHelper.sol";
|
|
7
|
-
import "../interfaces/IPLimitRouter.sol";
|
|
8
10
|
import "../interfaces/IStandardizedYield.sol";
|
|
11
|
+
import "./helpers/NonceManager.sol";
|
|
9
12
|
import "../interfaces/IWETH.sol";
|
|
10
13
|
import {LimitMathCore as LimitMath} from "./LimitMathCore.sol";
|
|
11
|
-
import "./helpers/NonceManager.sol";
|
|
12
|
-
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
|
|
13
|
-
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
|
|
14
14
|
|
|
15
15
|
abstract contract LimitRouterBase is
|
|
16
16
|
EIP712Upgradeable,
|
|
@@ -22,14 +22,15 @@ abstract contract LimitRouterBase is
|
|
|
22
22
|
using SafeERC20 for IERC20;
|
|
23
23
|
using PMath for uint256;
|
|
24
24
|
|
|
25
|
-
bytes32 internal constant LIMIT_ORDER_TYPEHASH =
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
bytes32 internal constant LIMIT_ORDER_TYPEHASH =
|
|
26
|
+
keccak256(
|
|
27
|
+
"Order(uint256 salt,uint256 expiry,uint256 nonce,uint8 orderType,address token,address YT,address maker,address receiver,uint256 makingAmount,uint256 lnImpliedRate,uint256 failSafeRate,bytes permit)"
|
|
28
|
+
);
|
|
28
29
|
|
|
29
30
|
uint128 internal constant _ORDER_DOES_NOT_EXIST = 0;
|
|
30
31
|
uint128 internal constant _ORDER_FILLED = 1;
|
|
31
|
-
uint256 internal constant NEW_PRIME =
|
|
32
|
-
uint256 internal constant MAX_LN_FEE_RATE_ROOT =
|
|
32
|
+
uint256 internal constant NEW_PRIME = 12421;
|
|
33
|
+
uint256 internal constant MAX_LN_FEE_RATE_ROOT = 48790164169432003; // ln(1.05)
|
|
33
34
|
|
|
34
35
|
bytes private constant EMPTY_BYTES = abi.encode();
|
|
35
36
|
|
|
@@ -69,8 +70,7 @@ abstract contract LimitRouterBase is
|
|
|
69
70
|
FillOrderParams[] memory params,
|
|
70
71
|
address receiver,
|
|
71
72
|
uint256 maxTaking,
|
|
72
|
-
bytes calldata
|
|
73
|
-
/*optData*/
|
|
73
|
+
bytes calldata /*optData*/,
|
|
74
74
|
bytes memory callback
|
|
75
75
|
) external returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn) {
|
|
76
76
|
params = _validateSkipSigAndFilterOrders(params);
|
|
@@ -94,18 +94,16 @@ abstract contract LimitRouterBase is
|
|
|
94
94
|
bytes callback;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
function fillNoOrders(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{
|
|
97
|
+
function fillNoOrders(
|
|
98
|
+
bytes memory callback
|
|
99
|
+
) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn) {
|
|
101
100
|
callbackReturn = callbackIfNeeded(0, 0, 0, callback);
|
|
102
101
|
return (0, 0, 0, callbackReturn);
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
function fillTokenForPY(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{
|
|
104
|
+
function fillTokenForPY(
|
|
105
|
+
Args memory a
|
|
106
|
+
) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn) {
|
|
109
107
|
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
110
108
|
|
|
111
109
|
// Token => This
|
|
@@ -133,10 +131,9 @@ abstract contract LimitRouterBase is
|
|
|
133
131
|
_emitEvents(a.params, orderHashes, fromMakers, out.netTakings, out.netFees, out.notionalVolumes);
|
|
134
132
|
}
|
|
135
133
|
|
|
136
|
-
function fillPYForToken(
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{
|
|
134
|
+
function fillPYForToken(
|
|
135
|
+
Args memory a
|
|
136
|
+
) internal returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn) {
|
|
140
137
|
(address SY, address PT, address YT, bytes32[] memory orderHashes) = _checkSig_updMakingAndStatus(a.params);
|
|
141
138
|
|
|
142
139
|
FillResults memory out = LimitMath.calcBatch(a.params, YT, getLnFeeRateRoot(YT));
|
|
@@ -165,11 +162,9 @@ abstract contract LimitRouterBase is
|
|
|
165
162
|
}
|
|
166
163
|
|
|
167
164
|
// ----------------- verify & convert functions -----------------
|
|
168
|
-
function _validateSkipSigAndFilterOrders(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
returns (FillOrderParams[] memory res)
|
|
172
|
-
{
|
|
165
|
+
function _validateSkipSigAndFilterOrders(
|
|
166
|
+
FillOrderParams[] memory params
|
|
167
|
+
) internal view returns (FillOrderParams[] memory res) {
|
|
173
168
|
uint256 len = params.length;
|
|
174
169
|
require(len != 0, "LOP: empty batch");
|
|
175
170
|
|
|
@@ -197,18 +192,19 @@ abstract contract LimitRouterBase is
|
|
|
197
192
|
}
|
|
198
193
|
}
|
|
199
194
|
|
|
200
|
-
function _checkSig_updMakingAndStatus(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
{
|
|
195
|
+
function _checkSig_updMakingAndStatus(
|
|
196
|
+
FillOrderParams[] memory params
|
|
197
|
+
) internal returns (address SY, address PT, address YT, bytes32[] memory orderHashes) {
|
|
204
198
|
uint256 len = params.length;
|
|
205
199
|
orderHashes = new bytes32[](len);
|
|
206
200
|
|
|
207
201
|
for (uint256 i = 0; i < len; i++) {
|
|
208
202
|
FillOrderParams memory param = params[i];
|
|
209
203
|
|
|
210
|
-
(bytes32 orderHash, uint256 remainingMakerAmount, uint256 filledMakerAmount) =
|
|
211
|
-
|
|
204
|
+
(bytes32 orderHash, uint256 remainingMakerAmount, uint256 filledMakerAmount) = _checkSig(
|
|
205
|
+
param.order,
|
|
206
|
+
param.signature
|
|
207
|
+
);
|
|
212
208
|
uint256 netMaking = PMath.min(param.makingAmount, remainingMakerAmount);
|
|
213
209
|
|
|
214
210
|
unchecked {
|
|
@@ -256,17 +252,26 @@ abstract contract LimitRouterBase is
|
|
|
256
252
|
}
|
|
257
253
|
}
|
|
258
254
|
|
|
259
|
-
function callbackIfNeeded(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
255
|
+
function callbackIfNeeded(
|
|
256
|
+
uint256 actualMaking,
|
|
257
|
+
uint256 actualTaking,
|
|
258
|
+
uint256 totalFee,
|
|
259
|
+
bytes memory callback
|
|
260
|
+
) internal returns (bytes memory callbackReturn) {
|
|
263
261
|
if (callback.length > 0) {
|
|
264
|
-
callbackReturn =
|
|
265
|
-
|
|
262
|
+
callbackReturn = IPLimitRouterCallback(msg.sender).limitRouterCallback(
|
|
263
|
+
actualMaking,
|
|
264
|
+
actualTaking,
|
|
265
|
+
totalFee,
|
|
266
|
+
callback
|
|
267
|
+
);
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
|
|
269
|
-
function _checkSig(
|
|
271
|
+
function _checkSig(
|
|
272
|
+
Order memory order,
|
|
273
|
+
bytes memory signature
|
|
274
|
+
)
|
|
270
275
|
public
|
|
271
276
|
view
|
|
272
277
|
returns (
|
|
@@ -296,10 +301,10 @@ abstract contract LimitRouterBase is
|
|
|
296
301
|
|
|
297
302
|
// ----------------- simple helper functions functions -----------------
|
|
298
303
|
|
|
299
|
-
function _transferFromMakers_mintSy_updMakings(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
{
|
|
304
|
+
function _transferFromMakers_mintSy_updMakings(
|
|
305
|
+
address SY,
|
|
306
|
+
FillOrderParams[] memory params
|
|
307
|
+
) internal returns (uint256[] memory fromMakers) {
|
|
303
308
|
uint256 len = params.length;
|
|
304
309
|
fromMakers = new uint256[](len);
|
|
305
310
|
|
|
@@ -335,13 +340,19 @@ abstract contract LimitRouterBase is
|
|
|
335
340
|
}
|
|
336
341
|
_safeApproveInf(token, SY);
|
|
337
342
|
return
|
|
338
|
-
IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(
|
|
343
|
+
IStandardizedYield(SY).deposit{value: token == NATIVE ? netTokenIn : 0}(
|
|
344
|
+
address(this),
|
|
345
|
+
token,
|
|
346
|
+
netTokenIn,
|
|
347
|
+
0
|
|
348
|
+
);
|
|
339
349
|
}
|
|
340
350
|
|
|
341
|
-
function _redeemSy_transferToMakers(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
351
|
+
function _redeemSy_transferToMakers(
|
|
352
|
+
address SY,
|
|
353
|
+
FillOrderParams[] memory params,
|
|
354
|
+
uint256[] memory netSyOuts
|
|
355
|
+
) internal returns (uint256[] memory toMakers) {
|
|
345
356
|
uint256 len = params.length;
|
|
346
357
|
toMakers = new uint256[](len);
|
|
347
358
|
|
|
@@ -390,14 +401,18 @@ abstract contract LimitRouterBase is
|
|
|
390
401
|
}
|
|
391
402
|
|
|
392
403
|
function __stillShared(address currentShared, address nextToken) private view returns (bool) {
|
|
393
|
-
return
|
|
394
|
-
|
|
404
|
+
return
|
|
405
|
+
(currentShared == nextToken) ||
|
|
406
|
+
(currentShared == NATIVE && nextToken == WNATIVE) ||
|
|
407
|
+
(currentShared == WNATIVE && nextToken == NATIVE);
|
|
395
408
|
}
|
|
396
409
|
|
|
397
|
-
function __redeemSy_Single(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
410
|
+
function __redeemSy_Single(
|
|
411
|
+
address receiver,
|
|
412
|
+
address SY,
|
|
413
|
+
address tokenOut,
|
|
414
|
+
uint256 netSyIn
|
|
415
|
+
) private returns (uint256 netTokenOut) {
|
|
401
416
|
if (tokenOut == NATIVE || tokenOut == WNATIVE) {
|
|
402
417
|
address otherToken = tokenOut == NATIVE ? WNATIVE : NATIVE;
|
|
403
418
|
address tokenRedeemSy = IStandardizedYield(SY).isValidTokenOut(tokenOut) ? tokenOut : otherToken;
|
|
@@ -417,9 +432,12 @@ abstract contract LimitRouterBase is
|
|
|
417
432
|
}
|
|
418
433
|
|
|
419
434
|
// ! Allow self-fill of orders
|
|
420
|
-
function _transferFromMakers(
|
|
421
|
-
|
|
422
|
-
|
|
435
|
+
function _transferFromMakers(
|
|
436
|
+
IERC20 token,
|
|
437
|
+
FillOrderParams[] memory params,
|
|
438
|
+
address to,
|
|
439
|
+
uint256[] memory netIn
|
|
440
|
+
) internal {
|
|
423
441
|
uint256 len = params.length;
|
|
424
442
|
for (uint256 i = 0; i < len; i++) {
|
|
425
443
|
if (params[i].order.maker == to) continue;
|
|
@@ -427,9 +445,12 @@ abstract contract LimitRouterBase is
|
|
|
427
445
|
}
|
|
428
446
|
}
|
|
429
447
|
|
|
430
|
-
function _transferToMakers(
|
|
431
|
-
|
|
432
|
-
|
|
448
|
+
function _transferToMakers(
|
|
449
|
+
IERC20 token,
|
|
450
|
+
address payer,
|
|
451
|
+
FillOrderParams[] memory params,
|
|
452
|
+
uint256[] memory netOut
|
|
453
|
+
) internal {
|
|
433
454
|
uint256 len = params.length;
|
|
434
455
|
for (uint256 i = 0; i < len; i++) {
|
|
435
456
|
if (payer == params[i].order.receiver) continue;
|
|
@@ -465,10 +486,11 @@ abstract contract LimitRouterBase is
|
|
|
465
486
|
}
|
|
466
487
|
|
|
467
488
|
/// @dev if zero fees are intended, it must be explicitly allowed again
|
|
468
|
-
function setLnFeeRateRoots(
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
489
|
+
function setLnFeeRateRoots(
|
|
490
|
+
address[] memory YTs,
|
|
491
|
+
uint256[] memory lnFeeRateRoots,
|
|
492
|
+
bool allowZeroFees
|
|
493
|
+
) public onlyHelperAndOwner {
|
|
472
494
|
uint256 len = YTs.length;
|
|
473
495
|
require(len == lnFeeRateRoots.length, "LOP: length mismatch");
|
|
474
496
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../core/libraries/Errors.sol";
|
|
5
4
|
import "./LimitRouterBase.sol";
|
|
5
|
+
import "../core/libraries/Errors.sol";
|
|
6
6
|
|
|
7
7
|
contract PendleLimitRouter is LimitRouterBase {
|
|
8
8
|
using Address for address;
|
|
@@ -39,11 +39,9 @@ contract PendleLimitRouter is LimitRouterBase {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function orderStatusesRaw(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts)
|
|
46
|
-
{
|
|
42
|
+
function orderStatusesRaw(
|
|
43
|
+
bytes32[] memory orderHashes
|
|
44
|
+
) public view returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts) {
|
|
47
45
|
uint256 len = orderHashes.length;
|
|
48
46
|
remainingsRaw = new uint256[](len);
|
|
49
47
|
filledAmounts = new uint256[](len);
|
|
@@ -54,11 +52,9 @@ contract PendleLimitRouter is LimitRouterBase {
|
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
function orderStatuses(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
returns (uint256[] memory remainings, uint256[] memory filledAmounts)
|
|
61
|
-
{
|
|
55
|
+
function orderStatuses(
|
|
56
|
+
bytes32[] memory orderHashes
|
|
57
|
+
) external view returns (uint256[] memory remainings, uint256[] memory filledAmounts) {
|
|
62
58
|
(remainings, filledAmounts) = orderStatusesRaw(orderHashes);
|
|
63
59
|
for (uint256 i = 0; i < remainings.length; i++) {
|
|
64
60
|
require(remainings[i] != _ORDER_DOES_NOT_EXIST, "LOP: Unknown order");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pragma solidity ^0.8.17;
|
|
2
2
|
|
|
3
|
-
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
4
3
|
import "../interfaces/IAddressProvider.sol";
|
|
4
|
+
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
5
|
|
|
6
6
|
contract AddressProvider is IAddressProvider, BoringOwnableUpgradeableV2 {
|
|
7
7
|
mapping(uint256 => address) public get;
|
|
@@ -72,7 +72,7 @@ abstract contract AutomateReady {
|
|
|
72
72
|
constructor(address _automate, address _taskCreator) {
|
|
73
73
|
automate = IAutomate(_automate);
|
|
74
74
|
_gelato = IAutomate(_automate).gelato();
|
|
75
|
-
(dedicatedMsgSender,) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(_taskCreator);
|
|
75
|
+
(dedicatedMsgSender, ) = IOpsProxyFactory(OPS_PROXY_FACTORY).getProxyOf(_taskCreator);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -83,7 +83,7 @@ abstract contract AutomateReady {
|
|
|
83
83
|
*/
|
|
84
84
|
function _transfer(uint256 _fee, address _feeToken) internal {
|
|
85
85
|
if (_feeToken == ETH) {
|
|
86
|
-
(bool success,) = _gelato.call{value: _fee}("");
|
|
86
|
+
(bool success, ) = _gelato.call{value: _fee}("");
|
|
87
87
|
require(success, "_transfer: ETH transfer failed");
|
|
88
88
|
} else {
|
|
89
89
|
SafeERC20.safeTransfer(IERC20(_feeToken), _gelato, _fee);
|