@pendle/core-v2 6.3.0-beta → 6.3.0-sweedtest
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/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- 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/StandardizedYield/SYUtils.sol/SYUtils.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol/PendleYieldContractFactoryUpg.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldToken.sol/PendleYieldToken.json +2 -2
- package/build/artifacts/contracts/core/erc20/PendleERC20.sol/PendleERC20.dbg.json +1 -1
- package/build/artifacts/contracts/core/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 +18 -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/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/StringLib.sol/StringLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/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/core/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- 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/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/spoke/PendleBridgedPrincipalToken.sol/PendleBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/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/IAddressProvider.sol/IAddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILPWrapper.sol/ILPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroEndpoint.sol/ILayerZeroEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ILayerZeroReceiver.sol/ILayerZeroReceiver.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IMarketSweed.sol/IMarketSweed.json +141 -0
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionInfoStatic.sol/IPActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionVePendleStatic.sol/IPActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgedPrincipalToken.sol/IPBridgedPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleEssential.sol/IPChainlinkOracleEssential.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracleApp.sol/IPExchangeRateOracleApp.json +135 -0
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMM.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMM.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGauge.sol/IPGauge.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeController.sol/IPGaugeController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGaugeControllerMainchain.sol/IPGaugeControllerMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPGovernanceProxy.sol/IPGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYT.sol/IPInterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPInterestManagerYTV2.sol/IPInterestManagerYTV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLPWrapperFactory.sol/IPLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.json +42 -0
- 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 +13 -0
- package/build/artifacts/contracts/interfaces/IPMarketFactory.sol/IPMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketSwapCallback.sol/IPMarketSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMerkleDistributor.sol/IPMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMiniDiamond.sol/IPMiniDiamond.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgReceiverApp.sol/IPMsgReceiverApp.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMsgSendEndpoint.sol/IPMsgSendEndpoint.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOffchainStorage.sol/IPOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPOracleForSy.sol/IPOracleForSy.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTOFTAdapterFactory.sol/IPPTOFTAdapterFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPYLpOracle.sol/IPPYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPausingInterface.sol/IPPausingInterface.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPoolDeployHelperV2.sol/IPPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPriceFeed.sol/IPPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPrincipalToken.sol/IPPrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPReflector.sol/IPReflector.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPTokenWithSupplyCap.sol/IPTokenWithSupplyCap.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVeToken.sol/IPVeToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldContractFactory.sol/IPYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldToken.sol/IPYieldToken.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPYieldTokenV2.sol/IPYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRedstonePriceFeed.sol/IRedstonePriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IRewardManager.sol/IRewardManager.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStandardizedYield.sol/IStandardizedYield.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWETH.sol/IWETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWstETH.sol/IWstETH.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/limit/helpers/NonceManager.sol/NonceManager.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/AddressProvider.sol/AddressProvider.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/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/MarketSweed.sol/MarketSweed.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +314 -0
- 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/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +326 -0
- 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/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/SupplyCapReader.sol/IPossibleSupplyCapInterface.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SupplyCapReader.sol/SupplyCapReader.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol/PendleCommonPoolDeployHelperV2.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol/PendleCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/deploy/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/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.json +13 -13
- 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 +150 -12
- 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/PendleLinearDiscountOracleWrapper.sol/PendleLinearDiscountOracleWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol/PendleSparkLinearDiscountOracleFactoryWrapper.json +2 -2
- package/build/artifacts/contracts/oracles/internal/PendleBoringOneracle.sol/PendleBoringOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleBoringSolvBTCOneracle.sol/PendleBoringSolvBTCOneracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/LPExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracle.sol/PendleLpLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleLpLinearDiscountOracleFactory.sol/PendleLpLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PTExpiry.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracle.sol/PendleSparkLinearDiscountOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol/PendleSparkLinearDiscountOracleFactory.json +2 -2
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSimple.sol/ActionSimple.json +2 -2
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/RouterStorage.sol/RouterStorage.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.json +2 -2
- package/build/artifacts/contracts/router/base/CallbackHelper.sol/CallbackHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxEstimateLib.sol/MarketApproxEstimateLib.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.json +2 -2
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/OKXScaleHelper.sol/IOKXDexRouter.json +171 -0
- 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 +15 -17
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +14 -16
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +2 -3
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +9 -12
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +12 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +8 -10
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -12
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +4 -11
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +11 -13
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +17 -22
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +21 -28
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +31 -27
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +19 -23
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +7 -8
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +6 -5
- package/contracts/core/Market/MarketMathCore.sol +78 -112
- package/contracts/core/Market/OracleLib.sol +34 -41
- package/contracts/core/Market/PendleGauge.sol +8 -8
- package/contracts/core/Market/PendleMarketFactoryV6Upg.sol +19 -16
- package/contracts/core/Market/PendleMarketV6.sol +63 -65
- package/contracts/core/RewardManager/RewardManager.sol +8 -8
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +6 -5
- package/contracts/core/StandardizedYield/PYIndex.sol +2 -2
- package/contracts/core/YieldContracts/InterestManagerYT.sol +8 -9
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +4 -8
- package/contracts/core/YieldContracts/PendleYieldContractFactoryUpg.sol +15 -12
- package/contracts/core/YieldContracts/PendleYieldToken.sol +54 -41
- package/contracts/core/erc20/PendleERC20.sol +9 -6
- package/contracts/core/libraries/ArrayLib.sol +11 -13
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +22 -29
- package/contracts/core/libraries/BoringOwnableUpgradeableV2.sol +2 -1
- package/contracts/core/libraries/Errors.sol +2 -4
- 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 +77 -67
- package/contracts/cross-chain/FixedPricePTAMM.sol +38 -39
- 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 +15 -12
- package/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol +21 -24
- package/contracts/interfaces/ILayerZeroEndpoint.sol +5 -3
- package/contracts/interfaces/IMarketSweed.sol +23 -0
- package/contracts/interfaces/IPActionCallbackV3.sol +1 -1
- package/contracts/interfaces/IPActionInfoStatic.sol +1 -3
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +11 -15
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +58 -109
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +21 -26
- package/contracts/interfaces/IPActionMiscV3.sol +24 -44
- package/contracts/interfaces/IPActionSimple.sol +24 -43
- package/contracts/interfaces/IPActionVePendleStatic.sol +4 -5
- package/contracts/interfaces/IPAllActionTypeV3.sol +14 -16
- package/contracts/interfaces/IPAllActionV3.sol +4 -4
- package/contracts/interfaces/IPAllEventsV3.sol +5 -21
- package/contracts/interfaces/IPBridgedPrincipalToken.sol +2 -2
- package/contracts/interfaces/IPCommonSYFactory.sol +3 -6
- package/contracts/interfaces/IPExchangeRateOracleApp.sol +44 -17
- package/contracts/interfaces/IPFeeDistributorV2.sol +13 -16
- package/contracts/interfaces/IPFixedPricePTAMM.sol +22 -34
- package/contracts/interfaces/IPGovernanceProxy.sol +2 -6
- package/contracts/interfaces/IPInterestManagerYTV2.sol +4 -3
- package/contracts/interfaces/IPLimitRouter.sol +16 -16
- package/contracts/interfaces/IPMarket.sol +25 -35
- package/contracts/interfaces/IPMarketFactory.sol +9 -16
- package/contracts/interfaces/IPMerkleDistributor.sol +6 -10
- package/contracts/interfaces/IPMsgSendEndpoint.sol +7 -12
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +6 -12
- package/contracts/interfaces/IPPYLpOracle.sol +1 -4
- 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 +3 -5
- package/contracts/interfaces/IPYieldToken.sol +8 -11
- package/contracts/interfaces/IPYieldTokenV2.sol +8 -11
- package/contracts/interfaces/IStandardizedYield.sol +16 -17
- package/contracts/limit/LimitMathCore.sol +38 -56
- package/contracts/limit/LimitRouterBase.sol +66 -88
- package/contracts/limit/PendleLimitRouter.sol +11 -7
- package/contracts/offchain-helpers/AddressProvider.sol +1 -1
- package/contracts/offchain-helpers/AutomateReady.sol +2 -2
- package/contracts/offchain-helpers/BalanceReader.sol +21 -9
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +5 -7
- package/contracts/offchain-helpers/Broadcaster.sol +3 -3
- package/contracts/offchain-helpers/BytesLib.sol +3 -5
- package/contracts/offchain-helpers/EmptyUUPS.sol +2 -2
- package/contracts/offchain-helpers/ExpiredLpPtRedeemer.sol +5 -8
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +1 -5
- package/contracts/offchain-helpers/LimitBackendHelperV2.sol +12 -12
- package/contracts/offchain-helpers/MarketSweed.sol +246 -0
- package/contracts/offchain-helpers/Multicall2.sol +9 -7
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +4 -8
- package/contracts/offchain-helpers/PendleFeeSetter.sol +149 -0
- package/contracts/offchain-helpers/PendleGovernanceProxy.sol +7 -10
- package/contracts/offchain-helpers/PendleLPWrapper.sol +12 -3
- package/contracts/offchain-helpers/PendleLPWrapperFactory.sol +2 -2
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +13 -12
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +1 -1
- package/contracts/offchain-helpers/PendleWstETHPriceFeed.sol +4 -2
- package/contracts/offchain-helpers/SimulateHelper.sol +7 -6
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +13 -32
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +7 -11
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelper.sol +16 -35
- package/contracts/offchain-helpers/deploy/PendlePoolDeployHelperV2.sol +15 -35
- package/contracts/offchain-helpers/deploy/lib/MarketDeployLib.sol +12 -13
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +1 -4
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +1 -1
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +12 -9
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +60 -91
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +103 -190
- 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 +8 -10
- package/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol +100 -40
- package/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol +18 -9
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol +118 -52
- package/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol +2 -3
- package/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol +12 -12
- package/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol +17 -20
- package/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol +15 -19
- package/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol +7 -6
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol +13 -9
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol +20 -21
- package/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol +4 -7
- package/contracts/oracles/PtYtLpOracle/samples/BoringLpSeller.sol +2 -2
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkAssetOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPYUsdChainlinkSYOracle.sol +13 -10
- package/contracts/oracles/PtYtLpOracle/samples/BoringPtSeller.sol +6 -5
- package/contracts/oracles/StatelessWrapper/PendleSparkLinearDiscountOracleFactoryWrapper.sol +1 -1
- package/contracts/oracles/internal/PendleSparkLinearDiscountOracleFactory.sol +3 -3
- package/contracts/router/ActionAddRemoveLiqV3.sol +55 -150
- package/contracts/router/ActionCallbackV3.sol +20 -13
- package/contracts/router/ActionMiscV3.sol +54 -78
- package/contracts/router/ActionSimple.sol +76 -128
- package/contracts/router/ActionSwapPTV3.sol +7 -19
- package/contracts/router/ActionSwapYTV3.sol +8 -20
- package/contracts/router/PendleRouterV4.sol +1 -1
- package/contracts/router/Reflector.sol +15 -21
- package/contracts/router/base/ActionBase.sol +61 -105
- package/contracts/router/base/ActionDelegateBase.sol +39 -38
- package/contracts/router/base/CallbackHelper.sol +21 -19
- package/contracts/router/math/ApproxStateLib.sol +28 -28
- package/contracts/router/math/MarketApproxEstimateLib.sol +11 -13
- package/contracts/router/math/MarketApproxLibOnchain.sol +47 -24
- package/contracts/router/math/MarketApproxLibV2.sol +63 -44
- package/contracts/router/swap-aggregator/OKXScaleHelper.sol +191 -55
- package/contracts/router/swap-aggregator/ParaswapScaleHelper.sol +34 -48
- package/contracts/router/swap-aggregator/PendleSwap.sol +26 -28
- package/deployments/1-core.json +5 -2
- package/deployments/1-offchain-helper.json +2 -1
- package/deployments/10-core.json +5 -2
- package/deployments/10-offchain-helper.json +2 -1
- package/deployments/146-core.json +5 -2
- package/deployments/146-offchain-helper.json +2 -1
- package/deployments/42161-core.json +7 -3
- package/deployments/42161-offchain-helper.json +2 -1
- package/deployments/5000-core.json +5 -2
- package/deployments/5000-offchain-helper.json +2 -1
- package/deployments/56-core.json +5 -2
- package/deployments/56-offchain-helper.json +2 -1
- package/deployments/80094-core.json +5 -2
- package/deployments/80094-offchain-helper.json +2 -1
- package/deployments/8453-core.json +5 -2
- package/deployments/8453-offchain-helper.json +2 -1
- package/deployments/9745-core.json +5 -2
- package/deployments/9745-offchain-helper.json +2 -1
- package/deployments/999-core.json +5 -2
- package/deployments/999-offchain-helper.json +2 -1
- package/package.json +4 -6
- package/typechain-types/IMarketSweed.ts +203 -0
- package/typechain-types/IOKXDexRouter.ts +99 -0
- package/typechain-types/IPExchangeRateOracleApp.ts +83 -0
- package/typechain-types/IPLimitRouter.ts +69 -0
- package/typechain-types/IPMarket.ts +13 -0
- package/typechain-types/LimitMathCore.ts +102 -0
- package/typechain-types/MarketSweed.ts +242 -0
- package/typechain-types/OverfillMathLib.ts +81 -0
- package/typechain-types/PendleCrossChainOracleBaseApp_Init.ts +13 -19
- package/typechain-types/PendleExchangeRateOracleApp.ts +73 -9
- package/typechain-types/PendleFeeSetter.ts +188 -3
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionDelegateBase__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 +17 -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/{IPActionCrossChain__factory.ts → IMarketSweed__factory.ts} +61 -22
- package/typechain-types/factories/IOKXDexRouter__factory.ts +171 -0
- package/typechain-types/factories/IPExchangeRateOracleApp__factory.ts +135 -0
- package/typechain-types/factories/IPLimitRouter__factory.ts +42 -0
- package/typechain-types/factories/IPMarket__factory.ts +13 -0
- package/typechain-types/factories/LegacyNFTHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/LimitMathCore__factory.ts +87 -0
- package/typechain-types/factories/MarketSweed__factory.ts +364 -0
- package/typechain-types/factories/Multicall2__factory.ts +1 -1
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/OverfillMathLib__factory.ts +77 -0
- 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/PendleCrossChainOracleBaseApp_Init__factory.ts +13 -13
- package/typechain-types/factories/PendleERC20__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracleApp__factory.ts +150 -19
- 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/PendleFeeSetter__factory.ts +140 -2
- 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/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 +27 -0
- package/typechain-types/index.ts +6 -0
- package/typechain-types/ActionCrossChain.ts +0 -161
- package/typechain-types/BasePendleBridgedPrincipalToken.ts +0 -1689
- package/typechain-types/IPActionCrossChain.ts +0 -161
- package/typechain-types/LimitBackendHelper.ts +0 -287
- package/typechain-types/PendleBridgedPrincipalToken_18Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_6Decimals.ts +0 -1689
- package/typechain-types/PendleBridgedPrincipalToken_8Decimals.ts +0 -1689
- package/typechain-types/factories/ActionCrossChain__factory.ts +0 -152
- package/typechain-types/factories/BasePendleBridgedPrincipalToken__factory.ts +0 -1548
- package/typechain-types/factories/LimitBackendHelper__factory.ts +0 -232
- package/typechain-types/factories/PendleBridgedPrincipalToken_18Decimals__factory.ts +0 -1652
- package/typechain-types/factories/PendleBridgedPrincipalToken_6Decimals__factory.ts +0 -1650
- package/typechain-types/factories/PendleBridgedPrincipalToken_8Decimals__factory.ts +0 -1650
|
@@ -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/BoringOwnableUpgradeableV2.sol";
|
|
5
4
|
import "../core/libraries/BaseSplitCodeFactory.sol";
|
|
5
|
+
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
6
|
|
|
7
7
|
contract BaseSplitCodeFactoryContract is BoringOwnableUpgradeableV2 {
|
|
8
8
|
event Deployed(
|
|
@@ -17,10 +17,7 @@ contract BaseSplitCodeFactoryContract is BoringOwnableUpgradeableV2 {
|
|
|
17
17
|
__BoringOwnableV2_init(msg.sender);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function deploy(
|
|
21
|
-
string memory name,
|
|
22
|
-
bytes calldata creationCode
|
|
23
|
-
)
|
|
20
|
+
function deploy(string memory name, bytes calldata creationCode)
|
|
24
21
|
external
|
|
25
22
|
onlyOwner
|
|
26
23
|
returns (
|
|
@@ -30,8 +27,9 @@ contract BaseSplitCodeFactoryContract is BoringOwnableUpgradeableV2 {
|
|
|
30
27
|
uint256 creationCodeSizeB
|
|
31
28
|
)
|
|
32
29
|
{
|
|
33
|
-
(
|
|
34
|
-
|
|
30
|
+
(
|
|
31
|
+
creationCodeContractA, creationCodeSizeA, creationCodeContractB, creationCodeSizeB
|
|
32
|
+
) = BaseSplitCodeFactory.setCreationCode(creationCode);
|
|
35
33
|
emit Deployed(name, creationCodeContractA, creationCodeSizeA, creationCodeContractB, creationCodeSizeB);
|
|
36
34
|
}
|
|
37
35
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "../interfaces/IPVotingController.sol";
|
|
5
4
|
import "../LiquidityMining/libraries/WeekMath.sol";
|
|
6
5
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
7
6
|
import "../core/libraries/TokenHelper.sol";
|
|
7
|
+
import "../interfaces/IPVotingController.sol";
|
|
8
8
|
|
|
9
9
|
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
10
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
11
10
|
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
11
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
12
12
|
|
|
13
13
|
contract Broadcaster is Initializable, BoringOwnableUpgradeableV2, UUPSUpgradeable, TokenHelper {
|
|
14
14
|
IPVotingController public immutable votingController;
|
|
@@ -28,7 +28,7 @@ contract Broadcaster is Initializable, BoringOwnableUpgradeableV2, UUPSUpgradeab
|
|
|
28
28
|
lastBroadcastedWeek = currentWeek;
|
|
29
29
|
|
|
30
30
|
votingController.finalizeEpoch();
|
|
31
|
-
for (uint256 i = 0; i < chainIds.length;
|
|
31
|
+
for (uint256 i = 0; i < chainIds.length;) {
|
|
32
32
|
uint64 chainId = chainIds[i];
|
|
33
33
|
uint256 fee = votingController.getBroadcastResultFee(chainId);
|
|
34
34
|
votingController.broadcastResults{value: fee}(chainId);
|
|
@@ -439,8 +439,8 @@ library BytesLib {
|
|
|
439
439
|
let cc := add(_postBytes, 0x20)
|
|
440
440
|
|
|
441
441
|
for {
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
// the next line is the loop condition:
|
|
443
|
+
// while(uint256(mc < endWord) + cb == 2)
|
|
444
444
|
} eq(add(lt(mc, endMinusWord), cb), 2) {
|
|
445
445
|
mc := add(mc, 0x20)
|
|
446
446
|
cc := add(cc, 0x20)
|
|
@@ -527,9 +527,7 @@ library BytesLib {
|
|
|
527
527
|
|
|
528
528
|
// the next line is the loop condition:
|
|
529
529
|
// while(uint256(mc < end) + cb == 2)
|
|
530
|
-
for {
|
|
531
|
-
|
|
532
|
-
} eq(add(lt(mc, end), cb), 2) {
|
|
530
|
+
for {} eq(add(lt(mc, end), cb), 2) {
|
|
533
531
|
sc := add(sc, 1)
|
|
534
532
|
mc := add(mc, 0x20)
|
|
535
533
|
} {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.17;
|
|
4
|
-
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
5
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
4
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
|
+
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
7
7
|
|
|
8
8
|
contract EmptyUUPS is Initializable, UUPSUpgradeable, BoringOwnableUpgradeableV2 {
|
|
9
9
|
constructor() initializer {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import "../
|
|
4
|
+
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
5
5
|
import "../interfaces/IPActionMiscV3.sol";
|
|
6
6
|
import "../interfaces/IPReflector.sol";
|
|
7
|
-
import "../
|
|
8
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
7
|
+
import "../router/base/ActionBase.sol";
|
|
9
8
|
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
|
|
9
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
10
10
|
|
|
11
11
|
contract ExpiredLpPtRedeemer is TokenHelper, ReentrancyGuardUpgradeable, BoringOwnableUpgradeableV2, UUPSUpgradeable {
|
|
12
12
|
mapping(address => bool) public whitelistedMarkets;
|
|
@@ -46,11 +46,8 @@ contract ExpiredLpPtRedeemer is TokenHelper, ReentrancyGuardUpgradeable, BoringO
|
|
|
46
46
|
|
|
47
47
|
if (netLpIn > 0) {
|
|
48
48
|
_transferFrom(IERC20(market), msg.sender, market, netLpIn);
|
|
49
|
-
(uint256 netSyFromRemove, uint256 netPtFromRemove) =
|
|
50
|
-
address(this),
|
|
51
|
-
address(this),
|
|
52
|
-
netLpIn
|
|
53
|
-
);
|
|
49
|
+
(uint256 netSyFromRemove, uint256 netPtFromRemove) =
|
|
50
|
+
IPMarket(market).burn(address(this), address(this), netLpIn);
|
|
54
51
|
|
|
55
52
|
totalSyRedeem += netSyFromRemove;
|
|
56
53
|
totalPtRedeem += netPtFromRemove;
|
|
@@ -20,11 +20,7 @@ interface StarNFTV1 {
|
|
|
20
20
|
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
|
|
21
21
|
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
|
|
22
22
|
event TransferBatch(
|
|
23
|
-
address indexed operator,
|
|
24
|
-
address indexed from,
|
|
25
|
-
address indexed to,
|
|
26
|
-
uint256[] ids,
|
|
27
|
-
uint256[] values
|
|
23
|
+
address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values
|
|
28
24
|
);
|
|
29
25
|
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
|
|
30
26
|
event URI(string value, uint256 indexed id);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
pragma solidity ^0.8.17;
|
|
4
4
|
|
|
5
|
-
import "../
|
|
5
|
+
import "../core/libraries/Errors.sol";
|
|
6
6
|
import "../core/libraries/TokenHelper.sol";
|
|
7
|
+
import "../interfaces/IPLimitRouter.sol";
|
|
7
8
|
import "../interfaces/IStandardizedYield.sol";
|
|
8
9
|
import "../interfaces/IWETH.sol";
|
|
9
|
-
import "../core/libraries/Errors.sol";
|
|
10
10
|
import "./BytesLib.sol";
|
|
11
11
|
|
|
12
12
|
contract LimitBackendHelperV2 is TokenHelper {
|
|
@@ -19,11 +19,11 @@ contract LimitBackendHelperV2 is TokenHelper {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/// @notice vanilla read
|
|
22
|
-
function readSingleToken(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
function readSingleToken(address token, address[] calldata owners, address spender)
|
|
23
|
+
public
|
|
24
|
+
view
|
|
25
|
+
returns (uint256[] memory balances, uint256[] memory allowances)
|
|
26
|
+
{
|
|
27
27
|
balances = new uint256[](owners.length);
|
|
28
28
|
allowances = new uint256[](owners.length);
|
|
29
29
|
for (uint256 i = 0; i < owners.length; i++) {
|
|
@@ -33,11 +33,11 @@ contract LimitBackendHelperV2 is TokenHelper {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/// @notice auto return balances and allowances the input tokens of the orders, based on type
|
|
36
|
-
function readMultiTokens(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
function readMultiTokens(address[] calldata tokens, address[] calldata owners, address spender)
|
|
37
|
+
public
|
|
38
|
+
view
|
|
39
|
+
returns (uint256[] memory balances, uint256[] memory allowances)
|
|
40
|
+
{
|
|
41
41
|
require(tokens.length == owners.length, "Length mismatch");
|
|
42
42
|
balances = new uint256[](owners.length);
|
|
43
43
|
allowances = new uint256[](owners.length);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.17;
|
|
4
|
+
|
|
5
|
+
import "../interfaces/IPMarket.sol";
|
|
6
|
+
import "../router/math/MarketApproxLibOnchain.sol";
|
|
7
|
+
import "../router/base/ActionBase.sol";
|
|
8
|
+
import "../interfaces/IMarketSweed.sol";
|
|
9
|
+
|
|
10
|
+
contract MarketSweed is ActionBase, IMarketSweed {
|
|
11
|
+
using PMath for uint256;
|
|
12
|
+
using PMath for int256;
|
|
13
|
+
using PYIndexLib for PYIndex;
|
|
14
|
+
using MarketMathCore for MarketState;
|
|
15
|
+
using PYIndexLib for IPYieldToken;
|
|
16
|
+
|
|
17
|
+
struct MarketTokens {
|
|
18
|
+
IStandardizedYield SY;
|
|
19
|
+
IPPrincipalToken PT;
|
|
20
|
+
IPYieldToken YT;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// solhint-disable no-empty-blocks
|
|
24
|
+
constructor() {}
|
|
25
|
+
|
|
26
|
+
function seedAtImpliedRate(
|
|
27
|
+
address receiver,
|
|
28
|
+
address market,
|
|
29
|
+
uint256 minLpOut,
|
|
30
|
+
uint256 minYtOut,
|
|
31
|
+
TokenInput calldata input,
|
|
32
|
+
ApproxSweedParams calldata sweedParams
|
|
33
|
+
) external payable returns (uint256 netLpOut, uint256 netYtOut, int256 guessedAmountPtToSwap) {
|
|
34
|
+
MarketTokens memory tokens;
|
|
35
|
+
(tokens.SY, tokens.PT, tokens.YT) = IPMarket(market).readTokens();
|
|
36
|
+
|
|
37
|
+
_mintSyFromToken(address(this), address(tokens.SY), 1, input);
|
|
38
|
+
|
|
39
|
+
uint256 netPtOut;
|
|
40
|
+
(netPtOut, netYtOut, guessedAmountPtToSwap) = _swap(receiver, market, tokens, sweedParams);
|
|
41
|
+
|
|
42
|
+
uint256 netYtFromSeed;
|
|
43
|
+
(netLpOut, netYtFromSeed, ) = _seed(receiver, market, tokens, _selfBalance(tokens.SY), netPtOut);
|
|
44
|
+
netYtOut += netYtFromSeed;
|
|
45
|
+
|
|
46
|
+
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
47
|
+
if (netYtOut < minYtOut) revert("Slippage: INSUFFICIENT_YT_OUT");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function mintPYFromToken__noCall(
|
|
51
|
+
address YT,
|
|
52
|
+
TokenInput calldata input
|
|
53
|
+
) external payable returns (uint256 netPYOut) {
|
|
54
|
+
address SY = IPYieldToken(YT).SY();
|
|
55
|
+
_mintSyFromToken(YT, SY, 1, input);
|
|
56
|
+
netPYOut = IPYieldToken(YT).mintPY(msg.sender, msg.sender);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function _seed(
|
|
60
|
+
address receiver,
|
|
61
|
+
address market,
|
|
62
|
+
MarketTokens memory tokens,
|
|
63
|
+
uint256 netSyIn,
|
|
64
|
+
uint256 netPtIn
|
|
65
|
+
) internal returns (uint256 /*netLpOut*/, uint256 /*netYtOut*/, uint256 /*netSyMintPy*/) {
|
|
66
|
+
uint256 netSyMintPy = _calcSyToMintPYSeed(market, tokens, netSyIn, netPtIn);
|
|
67
|
+
|
|
68
|
+
// transfer SY to mint PY
|
|
69
|
+
_transferOut(address(tokens.SY), address(tokens.YT), netSyMintPy);
|
|
70
|
+
uint256 netPYMinted = tokens.YT.mintPY(market, receiver);
|
|
71
|
+
|
|
72
|
+
// the rest of SY goes to market
|
|
73
|
+
uint256 netSyAddLiquidity = netSyIn - netSyMintPy;
|
|
74
|
+
_transferOut(address(tokens.SY), market, netSyAddLiquidity);
|
|
75
|
+
_transferOut(address(tokens.PT), market, netPtIn);
|
|
76
|
+
|
|
77
|
+
(uint256 netLpOut, , ) = IPMarket(market).mint(receiver, netSyAddLiquidity, netPYMinted + netPtIn);
|
|
78
|
+
return (netLpOut, netPYMinted, netSyMintPy);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function _swap(
|
|
82
|
+
address receiver,
|
|
83
|
+
address market,
|
|
84
|
+
MarketTokens memory tokens,
|
|
85
|
+
ApproxSweedParams memory sweedParams
|
|
86
|
+
) internal returns (uint256 amountPtToAccount, uint256 amountYTToAccount, int256 guessedSwap) {
|
|
87
|
+
PYIndex index = _getPYIndex(market);
|
|
88
|
+
MarketState memory state = _readMarket(market);
|
|
89
|
+
MarketPreCompute memory comp = state.getMarketPreCompute(index, block.timestamp);
|
|
90
|
+
|
|
91
|
+
if (state.lastLnImpliedRate > sweedParams.targetLnImpliedRate) {
|
|
92
|
+
// Normalize maxPtToSwap
|
|
93
|
+
sweedParams.maxPtToSwap = PMath.min(
|
|
94
|
+
sweedParams.maxPtToSwap,
|
|
95
|
+
MarketApproxPtOutLibOnchain.calcMaxPtOut(comp, state.totalPt)
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
int256 amountSyToAccount;
|
|
99
|
+
|
|
100
|
+
(guessedSwap, amountSyToAccount) = _calcAmountPtToBuy(state, index, sweedParams);
|
|
101
|
+
amountPtToAccount = guessedSwap.Uint();
|
|
102
|
+
|
|
103
|
+
_transferOut(address(tokens.SY), market, amountSyToAccount.abs());
|
|
104
|
+
IPMarket(market).swapSyForExactPt(address(this), guessedSwap.abs(), EMPTY_BYTES);
|
|
105
|
+
} else {
|
|
106
|
+
// Normalize maxPtToSwap
|
|
107
|
+
sweedParams.maxPtToSwap = PMath.min(
|
|
108
|
+
sweedParams.maxPtToSwap,
|
|
109
|
+
MarketApproxPtInLibOnchain.calcSoftMaxPtIn(state, comp)
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
guessedSwap = _calcAmountPtToSell(state, index, sweedParams);
|
|
113
|
+
|
|
114
|
+
uint256 amountPtToSell = guessedSwap.neg().Uint();
|
|
115
|
+
amountYTToAccount = amountPtToSell;
|
|
116
|
+
|
|
117
|
+
_transferOut(address(tokens.SY), address(tokens.YT), index.assetToSyUp(amountPtToSell));
|
|
118
|
+
uint256 amountPYOut = tokens.YT.mintPY(market, receiver);
|
|
119
|
+
|
|
120
|
+
assert(amountPYOut >= amountPtToSell);
|
|
121
|
+
|
|
122
|
+
// this amount of SY will be used to add liquidity in later step
|
|
123
|
+
IPMarket(market).swapExactPtForSy(address(this), amountPtToSell, EMPTY_BYTES);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function _calcAmountPtToBuy(
|
|
128
|
+
MarketState memory state,
|
|
129
|
+
PYIndex index,
|
|
130
|
+
ApproxSweedParams memory sweedParams
|
|
131
|
+
) internal view returns (int256 amountPtToSwapToAccount, int256 amountSyToAccount) {
|
|
132
|
+
int256 refAmt = sweedParams.maxPtToSwap.Int();
|
|
133
|
+
int256 accPtToAccount = 0;
|
|
134
|
+
MarketState memory localState;
|
|
135
|
+
|
|
136
|
+
for (uint256 iter = 0; iter < sweedParams.maxIteration; ++iter) {
|
|
137
|
+
int256 guess;
|
|
138
|
+
if (iter == 0 && _isValidGuessOffchain(sweedParams, true)) {
|
|
139
|
+
guess = sweedParams.guessOffchain;
|
|
140
|
+
} else {
|
|
141
|
+
refAmt /= 2;
|
|
142
|
+
guess = accPtToAccount + refAmt;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
_makeACopyTo(state, localState);
|
|
146
|
+
// Will not revert. maxPtToBuy should already be normalized
|
|
147
|
+
(int256 localAmountSyToAccount, , ) = localState.executeTradeCore(index, guess, block.timestamp);
|
|
148
|
+
|
|
149
|
+
if (PMath.isAApproxB(localState.lastLnImpliedRate, sweedParams.targetLnImpliedRate, sweedParams.eps)) {
|
|
150
|
+
return (guess, localAmountSyToAccount);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (localState.lastLnImpliedRate > sweedParams.targetLnImpliedRate) {
|
|
154
|
+
accPtToAccount = guess;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
revert("_calcAmountPtToBuy: failed");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function _calcAmountPtToSell(
|
|
161
|
+
MarketState memory state,
|
|
162
|
+
PYIndex index,
|
|
163
|
+
ApproxSweedParams memory sweedParams
|
|
164
|
+
) internal view returns (int256 amountPtToSwapToAccount) {
|
|
165
|
+
int256 refAmt = sweedParams.maxPtToSwap.Int();
|
|
166
|
+
int256 accPtToAccount = 0;
|
|
167
|
+
MarketState memory localState;
|
|
168
|
+
|
|
169
|
+
for (uint256 iter = 0; iter < sweedParams.maxIteration; ++iter) {
|
|
170
|
+
int256 guess;
|
|
171
|
+
if (iter == 0 && _isValidGuessOffchain(sweedParams, false)) {
|
|
172
|
+
guess = sweedParams.guessOffchain;
|
|
173
|
+
} else {
|
|
174
|
+
refAmt /= 2;
|
|
175
|
+
guess = accPtToAccount - refAmt;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
_makeACopyTo(state, localState);
|
|
179
|
+
|
|
180
|
+
// Will not revert. maxPtToSell should already be normalized
|
|
181
|
+
localState.executeTradeCore(index, guess, block.timestamp);
|
|
182
|
+
|
|
183
|
+
if (PMath.isAApproxB(localState.lastLnImpliedRate, sweedParams.targetLnImpliedRate, sweedParams.eps)) {
|
|
184
|
+
return guess;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (localState.lastLnImpliedRate < sweedParams.targetLnImpliedRate) {
|
|
188
|
+
accPtToAccount = guess;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
revert("_calcAmountPtToSell: failed");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function _calcSyToMintPYSeed(
|
|
195
|
+
address market,
|
|
196
|
+
MarketTokens memory tokens,
|
|
197
|
+
uint256 netSyIn,
|
|
198
|
+
uint256 netPtIn
|
|
199
|
+
) internal returns (uint256 /* netSyMintPy */) {
|
|
200
|
+
uint256 netSyMintPy = netSyIn;
|
|
201
|
+
if (netPtIn > 0) {
|
|
202
|
+
(, , uint256 netSyDual, uint256 netPtDual) = _readMarket(market).addLiquidity(
|
|
203
|
+
netSyIn,
|
|
204
|
+
netPtIn,
|
|
205
|
+
block.timestamp
|
|
206
|
+
);
|
|
207
|
+
if (netPtDual < netPtIn) {
|
|
208
|
+
revert("MS: Bought too much PT");
|
|
209
|
+
}
|
|
210
|
+
netSyMintPy -= netSyDual;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
MarketState memory state = _readMarket(market);
|
|
214
|
+
PYIndex pyIndex = tokens.YT.newIndex();
|
|
215
|
+
netSyMintPy =
|
|
216
|
+
(netSyMintPy * state.totalPt.Uint()) /
|
|
217
|
+
(state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
|
|
218
|
+
|
|
219
|
+
return netSyMintPy;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function _getPYIndex(address market) internal returns (PYIndex) {
|
|
223
|
+
(, , IPYieldToken YT) = IPMarket(market).readTokens();
|
|
224
|
+
return PYIndex.wrap(YT.pyIndexCurrent());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function _makeACopyTo(MarketState memory state, MarketState memory copiedState) internal pure {
|
|
228
|
+
copiedState.totalPt = state.totalPt;
|
|
229
|
+
copiedState.totalSy = state.totalSy;
|
|
230
|
+
copiedState.totalLp = state.totalLp;
|
|
231
|
+
copiedState.treasury = state.treasury;
|
|
232
|
+
|
|
233
|
+
copiedState.scalarRoot = state.scalarRoot;
|
|
234
|
+
copiedState.expiry = state.expiry;
|
|
235
|
+
|
|
236
|
+
copiedState.lnFeeRateRoot = state.lnFeeRateRoot;
|
|
237
|
+
copiedState.reserveFeePercent = state.reserveFeePercent;
|
|
238
|
+
copiedState.lastLnImpliedRate = state.lastLnImpliedRate;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function _isValidGuessOffchain(ApproxSweedParams memory sweedParams, bool isBuyingPt) internal pure returns (bool) {
|
|
242
|
+
if (sweedParams.guessOffchain == 0) return false;
|
|
243
|
+
if (isBuyingPt != (sweedParams.guessOffchain > 0)) return false;
|
|
244
|
+
return sweedParams.guessOffchain.abs() <= sweedParams.maxPtToSwap;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
@@ -11,6 +11,7 @@ contract Multicall2 {
|
|
|
11
11
|
address target;
|
|
12
12
|
bytes callData;
|
|
13
13
|
}
|
|
14
|
+
|
|
14
15
|
struct Result {
|
|
15
16
|
bool success;
|
|
16
17
|
bytes returnData;
|
|
@@ -26,9 +27,10 @@ contract Multicall2 {
|
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
function blockAndAggregate(
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
function blockAndAggregate(Call[] memory calls)
|
|
31
|
+
public
|
|
32
|
+
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData)
|
|
33
|
+
{
|
|
32
34
|
(blockNumber, blockHash, returnData) = tryBlockAndAggregate(true, calls);
|
|
33
35
|
}
|
|
34
36
|
|
|
@@ -77,10 +79,10 @@ contract Multicall2 {
|
|
|
77
79
|
}
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
function tryBlockAndAggregate(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls)
|
|
83
|
+
public
|
|
84
|
+
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData)
|
|
85
|
+
{
|
|
84
86
|
blockNumber = block.number;
|
|
85
87
|
blockHash = blockhash(block.number);
|
|
86
88
|
returnData = tryAggregate(requireSuccess, calls);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
|
5
4
|
import "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
6
5
|
import "../core/libraries/math/PMath.sol";
|
|
7
6
|
import "../interfaces/IPExchangeRateOracle.sol";
|
|
7
|
+
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
|
8
8
|
|
|
9
9
|
contract PendleExchangeRateOracle is BoringOwnableUpgradeableV2, IPExchangeRateOracle {
|
|
10
10
|
using PMath for uint256;
|
|
@@ -45,10 +45,7 @@ contract PendleExchangeRateOracle is BoringOwnableUpgradeableV2, IPExchangeRateO
|
|
|
45
45
|
|
|
46
46
|
function setExchangeRate(uint128 rate, uint64 dataBlock, uint32 dataTimestamp) external onlyOwner {
|
|
47
47
|
ExchangeRateData memory newData = ExchangeRateData({
|
|
48
|
-
rate: rate,
|
|
49
|
-
dataBlock: dataBlock,
|
|
50
|
-
dataTimestamp: dataTimestamp,
|
|
51
|
-
updatedAt: uint32(block.timestamp)
|
|
48
|
+
rate: rate, dataBlock: dataBlock, dataTimestamp: dataTimestamp, updatedAt: uint32(block.timestamp)
|
|
52
49
|
});
|
|
53
50
|
_setExchangeRate(newData);
|
|
54
51
|
}
|
|
@@ -75,9 +72,8 @@ contract PendleExchangeRateOracle is BoringOwnableUpgradeableV2, IPExchangeRateO
|
|
|
75
72
|
|
|
76
73
|
function _validateMetadata(ExchangeRateData memory oldData, ExchangeRateData memory newData) internal pure {
|
|
77
74
|
if (
|
|
78
|
-
oldData.dataBlock >= newData.dataBlock ||
|
|
79
|
-
|
|
80
|
-
oldData.updatedAt + MIN_UPDATE_TIME_GAP >= newData.updatedAt
|
|
75
|
+
oldData.dataBlock >= newData.dataBlock || oldData.dataTimestamp >= newData.dataTimestamp
|
|
76
|
+
|| oldData.updatedAt + MIN_UPDATE_TIME_GAP >= newData.updatedAt
|
|
81
77
|
) {
|
|
82
78
|
revert InvalidMetadata(newData);
|
|
83
79
|
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
import {IPGovernanceProxy} from "../interfaces/IPGovernanceProxy.sol";
|
|
5
|
+
import {IPLimitRouter} from "../interfaces/IPLimitRouter.sol";
|
|
6
|
+
import {IPMarket, MarketState} from "../interfaces/IPMarket.sol";
|
|
7
|
+
import {IPMarketFactory} from "../interfaces/IPMarketFactory.sol";
|
|
8
|
+
import {IPYieldToken} from "../interfaces/IPYieldToken.sol";
|
|
9
|
+
|
|
10
|
+
import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
11
|
+
import {Errors} from "../core/libraries/Errors.sol";
|
|
12
|
+
import {LogExpMath} from "../core/libraries/math/LogExpMath.sol";
|
|
13
|
+
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
14
|
+
|
|
15
|
+
contract PendleFeeSetter is BoringOwnableUpgradeableV2 {
|
|
16
|
+
using PMath for uint256;
|
|
17
|
+
using PMath for int256;
|
|
18
|
+
using LogExpMath for int256;
|
|
19
|
+
|
|
20
|
+
event FeeFactorSet(uint128 impliedRateToFeeFactor, uint128 routerLnFeeToLimitLnFeeFactor);
|
|
21
|
+
event SetterSet(address indexed setter);
|
|
22
|
+
|
|
23
|
+
uint256 internal constant LIMIT_MAX_LN_FEE_RATE_ROOT = 48_790_164_169_432_003; // ln(1.05)
|
|
24
|
+
|
|
25
|
+
address public immutable router;
|
|
26
|
+
IPLimitRouter public immutable limitRouter;
|
|
27
|
+
IPGovernanceProxy public immutable govProxy;
|
|
28
|
+
|
|
29
|
+
uint128 public impliedRateToFeeFactor;
|
|
30
|
+
uint128 public routerLnFeeToLimitLnFeeFactor;
|
|
31
|
+
address public setter;
|
|
32
|
+
|
|
33
|
+
modifier onlyOwnerOrSetter() {
|
|
34
|
+
require(msg.sender == setter || msg.sender == owner, "not setter or owner");
|
|
35
|
+
_;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
constructor(address _router, address _limitRouter, address _govProxy) {
|
|
39
|
+
_disableInitializers();
|
|
40
|
+
router = _router;
|
|
41
|
+
limitRouter = IPLimitRouter(_limitRouter);
|
|
42
|
+
govProxy = IPGovernanceProxy(_govProxy);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function initialize(address _owner, uint128 _impliedRateToFeeFactor, uint128 _routerLnFeeToLimitLnFeeFactor)
|
|
46
|
+
external
|
|
47
|
+
initializer
|
|
48
|
+
{
|
|
49
|
+
__BoringOwnableV2_init(_owner);
|
|
50
|
+
_setFeeFactors(_impliedRateToFeeFactor, _routerLnFeeToLimitLnFeeFactor);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function setFees(address[] memory markets) external onlyOwnerOrSetter {
|
|
54
|
+
uint256 n = markets.length;
|
|
55
|
+
|
|
56
|
+
IPGovernanceProxy.Call[] memory calls = new IPGovernanceProxy.Call[](n + 1);
|
|
57
|
+
|
|
58
|
+
address[] memory YTs = new address[](n);
|
|
59
|
+
uint256[] memory limitLnFeeRateRoots = new uint256[](n);
|
|
60
|
+
|
|
61
|
+
uint256 _impliedRateToFeeFactor = impliedRateToFeeFactor;
|
|
62
|
+
uint256 _routerLnFeeToLimitLnFeeFactor = routerLnFeeToLimitLnFeeFactor;
|
|
63
|
+
for (uint256 i = 0; i < n; ++i) {
|
|
64
|
+
(,, IPYieldToken yt) = IPMarket(markets[i]).readTokens();
|
|
65
|
+
(uint256 routerLnFeeRateRoot, uint256 limitLnFeeRateRoot) =
|
|
66
|
+
_calcFee(_impliedRateToFeeFactor, _routerLnFeeToLimitLnFeeFactor, markets[i]);
|
|
67
|
+
|
|
68
|
+
YTs[i] = address(yt);
|
|
69
|
+
limitLnFeeRateRoots[i] = limitLnFeeRateRoot;
|
|
70
|
+
|
|
71
|
+
calls[i].target = IPMarket(markets[i]).factory();
|
|
72
|
+
calls[i].callData =
|
|
73
|
+
abi.encodeCall(IPMarketFactory.setOverriddenFee, (router, markets[i], routerLnFeeRateRoot.Uint80()));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
calls[n].target = address(limitRouter);
|
|
77
|
+
calls[n].callData = abi.encodeCall(
|
|
78
|
+
IPLimitRouter.setLnFeeRateRoots, (YTs, limitLnFeeRateRoots, /* allowZeroFees */ false)
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
govProxy.aggregateWithScopedAccess(calls);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _calcFee(uint256 _impliedRateToFeeFactor, uint256 _routerLnFeeToLimitLnFeeFactor, address market)
|
|
85
|
+
internal
|
|
86
|
+
view
|
|
87
|
+
returns (uint256 routerLnFeeRateRoot, uint256 limitLnFeeRateRoot)
|
|
88
|
+
{
|
|
89
|
+
uint256 marketLnFee = IPMarket(market).getNonOverrideLnFeeRateRoot();
|
|
90
|
+
MarketState memory state = IPMarket(market).readState(router);
|
|
91
|
+
uint256 impliedRate = state.lastLnImpliedRate.Int().exp().Uint();
|
|
92
|
+
|
|
93
|
+
uint256 newFee = (impliedRate - PMath.ONE).mulDown(_impliedRateToFeeFactor) + PMath.ONE;
|
|
94
|
+
uint256 newLnFeeRateRoot = newFee.Int().ln().Uint();
|
|
95
|
+
|
|
96
|
+
routerLnFeeRateRoot = marketLnFee.min(newLnFeeRateRoot);
|
|
97
|
+
limitLnFeeRateRoot = LIMIT_MAX_LN_FEE_RATE_ROOT.min(routerLnFeeRateRoot.mulDown(_routerLnFeeToLimitLnFeeFactor));
|
|
98
|
+
|
|
99
|
+
// Fix up `routerLnFeeRateRoot` for this case:
|
|
100
|
+
// https://github.com/pendle-finance/pendle-core-v2/blob/6169376d0a8c12030307e3d64d02e84b07ffe4f9/contracts/core/Market/v3/PendleMarketFactoryV3.sol#L131-L135
|
|
101
|
+
if (routerLnFeeRateRoot == marketLnFee) routerLnFeeRateRoot = 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function readFeesAndImpliedRate(address[] memory markets)
|
|
105
|
+
external
|
|
106
|
+
view
|
|
107
|
+
returns (
|
|
108
|
+
uint256[] memory routerLnFeeRateRoots,
|
|
109
|
+
uint256[] memory limitLnFeeRateRoots,
|
|
110
|
+
uint256[] memory lnImpliedRates
|
|
111
|
+
)
|
|
112
|
+
{
|
|
113
|
+
uint256 n = markets.length;
|
|
114
|
+
routerLnFeeRateRoots = new uint256[](n);
|
|
115
|
+
limitLnFeeRateRoots = new uint256[](n);
|
|
116
|
+
lnImpliedRates = new uint256[](n);
|
|
117
|
+
|
|
118
|
+
for (uint256 i = 0; i < n; ++i) {
|
|
119
|
+
MarketState memory state = IPMarket(markets[i]).readState(router);
|
|
120
|
+
routerLnFeeRateRoots[i] = state.lnFeeRateRoot;
|
|
121
|
+
lnImpliedRates[i] = state.lastLnImpliedRate;
|
|
122
|
+
|
|
123
|
+
(,, IPYieldToken yt) = IPMarket(markets[i]).readTokens();
|
|
124
|
+
try limitRouter.getLnFeeRateRoot(address(yt)) returns (uint256 _fee) {
|
|
125
|
+
limitLnFeeRateRoots[i] = _fee;
|
|
126
|
+
} catch {
|
|
127
|
+
limitLnFeeRateRoots[i] = 0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// ============================== Admin functions ==============================
|
|
133
|
+
|
|
134
|
+
function setFeeFactors(uint128 _impliedRateToFeeFactor, uint128 _routerLnFeeToLimitLnFeeFactor) external onlyOwner {
|
|
135
|
+
_setFeeFactors(_impliedRateToFeeFactor, _routerLnFeeToLimitLnFeeFactor);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function _setFeeFactors(uint128 _impliedRateToFeeFactor, uint128 _routerLnFeeToLimitLnFeeFactor) internal {
|
|
139
|
+
impliedRateToFeeFactor = _impliedRateToFeeFactor;
|
|
140
|
+
routerLnFeeToLimitLnFeeFactor = _routerLnFeeToLimitLnFeeFactor;
|
|
141
|
+
|
|
142
|
+
emit FeeFactorSet(_impliedRateToFeeFactor, _routerLnFeeToLimitLnFeeFactor);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function setSetter(address _setter) external onlyOwner {
|
|
146
|
+
setter = _setter;
|
|
147
|
+
emit SetterSet(setter);
|
|
148
|
+
}
|
|
149
|
+
}
|