@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 "./base/ActionBase.sol";
|
|
5
4
|
import "../interfaces/IPActionAddRemoveLiqV3.sol";
|
|
5
|
+
import "./base/ActionBase.sol";
|
|
6
6
|
|
|
7
7
|
import {ActionDelegateBase} from "./base/ActionDelegateBase.sol";
|
|
8
8
|
|
|
@@ -25,12 +25,12 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
25
25
|
uint256 netPtDesired,
|
|
26
26
|
uint256 minLpOut
|
|
27
27
|
) external payable returns (uint256 netLpOut, uint256 netPtUsed, uint256 netSyInterm) {
|
|
28
|
-
(IStandardizedYield SY, IPPrincipalToken PT,
|
|
28
|
+
(IStandardizedYield SY, IPPrincipalToken PT,) = IPMarket(market).readTokens();
|
|
29
29
|
|
|
30
30
|
netSyInterm = _mintSyFromToken(market, address(SY), 1, input);
|
|
31
31
|
uint256 netSyUsed;
|
|
32
32
|
|
|
33
|
-
(
|
|
33
|
+
(,, netSyUsed, netPtUsed) = _readMarket(market).addLiquidity(netSyInterm, netPtDesired, block.timestamp);
|
|
34
34
|
|
|
35
35
|
if (netSyInterm != netSyUsed) {
|
|
36
36
|
revert("Slippage: NOT_ALL_SY_USED");
|
|
@@ -38,19 +38,12 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
38
38
|
|
|
39
39
|
// SY has been minted and transferred to the market
|
|
40
40
|
_transferFrom(PT, msg.sender, market, netPtUsed);
|
|
41
|
-
(netLpOut
|
|
41
|
+
(netLpOut,,) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
|
|
42
42
|
|
|
43
43
|
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
44
44
|
|
|
45
45
|
emit AddLiquidityDualTokenAndPt(
|
|
46
|
-
msg.sender,
|
|
47
|
-
market,
|
|
48
|
-
input.tokenIn,
|
|
49
|
-
receiver,
|
|
50
|
-
input.netTokenIn,
|
|
51
|
-
netPtUsed,
|
|
52
|
-
netLpOut,
|
|
53
|
-
netSyInterm
|
|
46
|
+
msg.sender, market, input.tokenIn, receiver, input.netTokenIn, netPtUsed, netLpOut, netSyInterm
|
|
54
47
|
);
|
|
55
48
|
}
|
|
56
49
|
|
|
@@ -61,18 +54,15 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
61
54
|
uint256 netPtDesired,
|
|
62
55
|
uint256 minLpOut
|
|
63
56
|
) external returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
64
|
-
(IStandardizedYield SY, IPPrincipalToken PT,
|
|
57
|
+
(IStandardizedYield SY, IPPrincipalToken PT,) = IPMarket(market).readTokens();
|
|
65
58
|
|
|
66
59
|
// calculate the amount of SY and PT to be used
|
|
67
|
-
(, netLpOut, netSyUsed, netPtUsed) =
|
|
68
|
-
netSyDesired,
|
|
69
|
-
netPtDesired,
|
|
70
|
-
block.timestamp
|
|
71
|
-
);
|
|
60
|
+
(, netLpOut, netSyUsed, netPtUsed) =
|
|
61
|
+
_readMarket(market).addLiquidity(netSyDesired, netPtDesired, block.timestamp);
|
|
72
62
|
|
|
73
63
|
_transferFrom(SY, msg.sender, market, netSyUsed);
|
|
74
64
|
_transferFrom(PT, msg.sender, market, netPtUsed);
|
|
75
|
-
(netLpOut
|
|
65
|
+
(netLpOut,,) = IPMarket(market).mint(receiver, netSyUsed, netPtUsed);
|
|
76
66
|
|
|
77
67
|
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
78
68
|
|
|
@@ -100,31 +90,23 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
100
90
|
uint256 netSyReceived;
|
|
101
91
|
|
|
102
92
|
if (!_isEmptyLimit(limit)) {
|
|
103
|
-
(netPtLeft, netSyReceived, netSyFee,
|
|
93
|
+
(netPtLeft, netSyReceived, netSyFee,) = _fillLimit(market, PT, netPtLeft, limit);
|
|
104
94
|
_transferOut(address(PT), market, netPtLeft);
|
|
105
95
|
}
|
|
106
96
|
|
|
107
|
-
(uint256 netPtSwapMarket
|
|
108
|
-
YT.newIndex(),
|
|
109
|
-
netPtLeft,
|
|
110
|
-
netSyReceived,
|
|
111
|
-
block.timestamp,
|
|
112
|
-
guessPtSwapToSy
|
|
113
|
-
);
|
|
97
|
+
(uint256 netPtSwapMarket,,) = _readMarket(market)
|
|
98
|
+
.approxSwapPtToAddLiquidityV2(YT.newIndex(), netPtLeft, netSyReceived, block.timestamp, guessPtSwapToSy);
|
|
114
99
|
|
|
115
100
|
// execute the swap
|
|
116
|
-
(uint256 netSyOutMarket, uint256 netSyFeeMarket) =
|
|
117
|
-
market,
|
|
118
|
-
netPtSwapMarket,
|
|
119
|
-
EMPTY_BYTES
|
|
120
|
-
);
|
|
101
|
+
(uint256 netSyOutMarket, uint256 netSyFeeMarket) =
|
|
102
|
+
IPMarket(market).swapExactPtForSy(market, netPtSwapMarket, EMPTY_BYTES);
|
|
121
103
|
|
|
122
104
|
netPtLeft -= netPtSwapMarket;
|
|
123
105
|
netSyReceived += netSyOutMarket;
|
|
124
106
|
netSyFee += netSyFeeMarket;
|
|
125
107
|
|
|
126
108
|
// execute the addLiquidity
|
|
127
|
-
(netLpOut
|
|
109
|
+
(netLpOut,,) = IPMarket(market).mint(receiver, netSyReceived, netPtLeft);
|
|
128
110
|
|
|
129
111
|
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
130
112
|
|
|
@@ -146,29 +128,15 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
146
128
|
return delegateToAddLiquiditySingleTokenSimple(receiver, market, minLpOut, input);
|
|
147
129
|
}
|
|
148
130
|
|
|
149
|
-
(IStandardizedYield SY
|
|
131
|
+
(IStandardizedYield SY,, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
150
132
|
|
|
151
133
|
netSyInterm = _mintSyFromToken(_entry_addLiquiditySingleSy(market, limit), address(SY), 1, input);
|
|
152
134
|
|
|
153
|
-
(netLpOut, netSyFee) =
|
|
154
|
-
receiver,
|
|
155
|
-
market,
|
|
156
|
-
SY,
|
|
157
|
-
YT,
|
|
158
|
-
netSyInterm,
|
|
159
|
-
minLpOut,
|
|
160
|
-
guessPtReceivedFromSy,
|
|
161
|
-
limit
|
|
162
|
-
);
|
|
135
|
+
(netLpOut, netSyFee) =
|
|
136
|
+
_addLiquiditySingleSy(receiver, market, SY, YT, netSyInterm, minLpOut, guessPtReceivedFromSy, limit);
|
|
163
137
|
|
|
164
138
|
emit AddLiquiditySingleToken(
|
|
165
|
-
msg.sender,
|
|
166
|
-
market,
|
|
167
|
-
input.tokenIn,
|
|
168
|
-
receiver,
|
|
169
|
-
input.netTokenIn,
|
|
170
|
-
netLpOut,
|
|
171
|
-
netSyInterm
|
|
139
|
+
msg.sender, market, input.tokenIn, receiver, input.netTokenIn, netLpOut, netSyInterm
|
|
172
140
|
);
|
|
173
141
|
}
|
|
174
142
|
|
|
@@ -185,20 +153,12 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
185
153
|
return delegateToAddLiquiditySingleSySimple(receiver, market, netSyIn, minLpOut);
|
|
186
154
|
}
|
|
187
155
|
|
|
188
|
-
(IStandardizedYield SY
|
|
156
|
+
(IStandardizedYield SY,, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
189
157
|
|
|
190
158
|
_transferFrom(SY, msg.sender, _entry_addLiquiditySingleSy(market, limit), netSyIn);
|
|
191
159
|
|
|
192
|
-
(netLpOut, netSyFee) =
|
|
193
|
-
receiver,
|
|
194
|
-
market,
|
|
195
|
-
SY,
|
|
196
|
-
YT,
|
|
197
|
-
netSyIn,
|
|
198
|
-
minLpOut,
|
|
199
|
-
guessPtReceivedFromSy,
|
|
200
|
-
limit
|
|
201
|
-
);
|
|
160
|
+
(netLpOut, netSyFee) =
|
|
161
|
+
_addLiquiditySingleSy(receiver, market, SY, YT, netSyIn, minLpOut, guessPtReceivedFromSy, limit);
|
|
202
162
|
|
|
203
163
|
emit AddLiquiditySingleSy(msg.sender, market, receiver, netSyIn, netLpOut);
|
|
204
164
|
}
|
|
@@ -217,29 +177,23 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
217
177
|
uint256 netPtReceived;
|
|
218
178
|
|
|
219
179
|
if (!_isEmptyLimit(limit)) {
|
|
220
|
-
(netSyLeft, netPtReceived, netSyFee,
|
|
180
|
+
(netSyLeft, netPtReceived, netSyFee,) = _fillLimit(market, SY, netSyLeft, limit);
|
|
221
181
|
_transferOut(address(SY), market, netSyLeft);
|
|
222
182
|
}
|
|
223
183
|
|
|
224
|
-
(uint256 netPtOutMarket
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
block.timestamp,
|
|
229
|
-
guessPtReceivedFromSy
|
|
230
|
-
);
|
|
184
|
+
(uint256 netPtOutMarket,,) = _readMarket(market)
|
|
185
|
+
.approxSwapSyToAddLiquidityV2(
|
|
186
|
+
YT.newIndex(), netSyLeft, netPtReceived, block.timestamp, guessPtReceivedFromSy
|
|
187
|
+
);
|
|
231
188
|
|
|
232
|
-
(uint256 netSySwapMarket, uint256 netSyFeeMarket) =
|
|
233
|
-
market,
|
|
234
|
-
netPtOutMarket,
|
|
235
|
-
EMPTY_BYTES
|
|
236
|
-
);
|
|
189
|
+
(uint256 netSySwapMarket, uint256 netSyFeeMarket) =
|
|
190
|
+
IPMarket(market).swapSyForExactPt(market, netPtOutMarket, EMPTY_BYTES);
|
|
237
191
|
|
|
238
192
|
netSyLeft -= netSySwapMarket;
|
|
239
193
|
netPtReceived += netPtOutMarket;
|
|
240
194
|
netSyFee += netSyFeeMarket;
|
|
241
195
|
|
|
242
|
-
(netLpOut
|
|
196
|
+
(netLpOut,,) = IPMarket(market).mint(receiver, netSyLeft, netPtReceived);
|
|
243
197
|
|
|
244
198
|
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
245
199
|
}
|
|
@@ -254,30 +208,15 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
254
208
|
uint256 minYtOut,
|
|
255
209
|
TokenInput calldata input
|
|
256
210
|
) external payable returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyMintPy, uint256 netSyInterm) {
|
|
257
|
-
(IStandardizedYield SY
|
|
211
|
+
(IStandardizedYield SY,, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
258
212
|
|
|
259
213
|
netSyInterm = _mintSyFromToken(address(this), address(SY), 1, input);
|
|
260
214
|
|
|
261
|
-
(netLpOut, netYtOut, netSyMintPy) =
|
|
262
|
-
receiver,
|
|
263
|
-
market,
|
|
264
|
-
SY,
|
|
265
|
-
YT,
|
|
266
|
-
netSyInterm,
|
|
267
|
-
minLpOut,
|
|
268
|
-
minYtOut
|
|
269
|
-
);
|
|
215
|
+
(netLpOut, netYtOut, netSyMintPy) =
|
|
216
|
+
_addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyInterm, minLpOut, minYtOut);
|
|
270
217
|
|
|
271
218
|
emit AddLiquiditySingleTokenKeepYt(
|
|
272
|
-
msg.sender,
|
|
273
|
-
market,
|
|
274
|
-
input.tokenIn,
|
|
275
|
-
receiver,
|
|
276
|
-
input.netTokenIn,
|
|
277
|
-
netLpOut,
|
|
278
|
-
netYtOut,
|
|
279
|
-
netSyMintPy,
|
|
280
|
-
netSyInterm
|
|
219
|
+
msg.sender, market, input.tokenIn, receiver, input.netTokenIn, netLpOut, netYtOut, netSyMintPy, netSyInterm
|
|
281
220
|
);
|
|
282
221
|
}
|
|
283
222
|
|
|
@@ -288,19 +227,12 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
288
227
|
uint256 minLpOut,
|
|
289
228
|
uint256 minYtOut
|
|
290
229
|
) external returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyMintPy) {
|
|
291
|
-
(IStandardizedYield SY
|
|
230
|
+
(IStandardizedYield SY,, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
292
231
|
|
|
293
232
|
_transferIn(address(SY), msg.sender, netSyIn);
|
|
294
233
|
|
|
295
|
-
(netLpOut, netYtOut, netSyMintPy) =
|
|
296
|
-
receiver,
|
|
297
|
-
market,
|
|
298
|
-
SY,
|
|
299
|
-
YT,
|
|
300
|
-
netSyIn,
|
|
301
|
-
minLpOut,
|
|
302
|
-
minYtOut
|
|
303
|
-
);
|
|
234
|
+
(netLpOut, netYtOut, netSyMintPy) =
|
|
235
|
+
_addLiquiditySingleSyKeepYt(receiver, market, SY, YT, netSyIn, minLpOut, minYtOut);
|
|
304
236
|
|
|
305
237
|
emit AddLiquiditySingleSyKeepYt(msg.sender, market, receiver, netSyIn, netSyMintPy, netLpOut, netYtOut);
|
|
306
238
|
}
|
|
@@ -319,8 +251,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
319
251
|
PYIndex pyIndex = YT.newIndex();
|
|
320
252
|
|
|
321
253
|
netSyMintPy =
|
|
322
|
-
(netSyIn * state.totalPt.Uint()) /
|
|
323
|
-
(state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
|
|
254
|
+
(netSyIn * state.totalPt.Uint()) / (state.totalPt.Uint() + pyIndex.syToAsset(state.totalSy.Uint()));
|
|
324
255
|
|
|
325
256
|
uint256 netSyAddLiquidity = netSyIn - netSyMintPy;
|
|
326
257
|
|
|
@@ -333,7 +264,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
333
264
|
// PT goes to market, YT goes to receiver
|
|
334
265
|
netYtOut = YT.mintPY(market, receiver);
|
|
335
266
|
|
|
336
|
-
(netLpOut
|
|
267
|
+
(netLpOut,,) = IPMarket(market).mint(receiver, netSyAddLiquidity, netYtOut);
|
|
337
268
|
|
|
338
269
|
if (netLpOut < minLpOut) revert("Slippage: INSUFFICIENT_LP_OUT");
|
|
339
270
|
if (netYtOut < minYtOut) revert("Slippage: INSUFFICIENT_YT_OUT");
|
|
@@ -349,7 +280,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
349
280
|
TokenOutput calldata output,
|
|
350
281
|
uint256 minPtOut
|
|
351
282
|
) external returns (uint256 netTokenOut, uint256 netPtOut, uint256 netSyInterm) {
|
|
352
|
-
(IStandardizedYield SY
|
|
283
|
+
(IStandardizedYield SY,,) = IPMarket(market).readTokens();
|
|
353
284
|
|
|
354
285
|
// burn LP, SY sent to SY, PT sent to receiver
|
|
355
286
|
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
@@ -360,14 +291,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
360
291
|
// redeem SY to token
|
|
361
292
|
netTokenOut = _redeemSyToToken(receiver, address(SY), netSyInterm, output, false);
|
|
362
293
|
emit RemoveLiquidityDualTokenAndPt(
|
|
363
|
-
msg.sender,
|
|
364
|
-
market,
|
|
365
|
-
output.tokenOut,
|
|
366
|
-
receiver,
|
|
367
|
-
netLpToRemove,
|
|
368
|
-
netPtOut,
|
|
369
|
-
netTokenOut,
|
|
370
|
-
netSyInterm
|
|
294
|
+
msg.sender, market, output.tokenOut, receiver, netLpToRemove, netPtOut, netTokenOut, netSyInterm
|
|
371
295
|
);
|
|
372
296
|
}
|
|
373
297
|
|
|
@@ -407,22 +331,13 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
407
331
|
|
|
408
332
|
// execute the burn
|
|
409
333
|
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
410
|
-
(uint256 netSyOutBurn, uint256 netPtOutBurn) =
|
|
411
|
-
_entry_swapExactSyForPt(market, limit),
|
|
412
|
-
receiver,
|
|
413
|
-
netLpToRemove
|
|
414
|
-
);
|
|
334
|
+
(uint256 netSyOutBurn, uint256 netPtOutBurn) =
|
|
335
|
+
IPMarket(market).burn(_entry_swapExactSyForPt(market, limit), receiver, netLpToRemove);
|
|
415
336
|
netSyLeft += netSyOutBurn;
|
|
416
337
|
netPtOut += netPtOutBurn;
|
|
417
338
|
|
|
418
|
-
(uint256 netPtOutSwap, uint256 netSyFeeSwap) =
|
|
419
|
-
receiver,
|
|
420
|
-
market,
|
|
421
|
-
netSyLeft,
|
|
422
|
-
0,
|
|
423
|
-
guessPtReceivedFromSy,
|
|
424
|
-
limit
|
|
425
|
-
);
|
|
339
|
+
(uint256 netPtOutSwap, uint256 netSyFeeSwap) =
|
|
340
|
+
_swapExactSyForPt(receiver, market, netSyLeft, 0, guessPtReceivedFromSy, limit);
|
|
426
341
|
netPtOut += netPtOutSwap;
|
|
427
342
|
netSyFee += netSyFeeSwap;
|
|
428
343
|
|
|
@@ -441,7 +356,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
441
356
|
TokenOutput calldata output,
|
|
442
357
|
LimitOrderData calldata limit
|
|
443
358
|
) external returns (uint256 netTokenOut, uint256 netSyFee, uint256 netSyInterm) {
|
|
444
|
-
(IStandardizedYield SY
|
|
359
|
+
(IStandardizedYield SY,,) = IPMarket(market).readTokens();
|
|
445
360
|
|
|
446
361
|
_transferFrom(IERC20(market), msg.sender, market, netLpToRemove);
|
|
447
362
|
|
|
@@ -450,13 +365,7 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
450
365
|
netTokenOut = _redeemSyToToken(receiver, address(SY), netSyInterm, output, false);
|
|
451
366
|
|
|
452
367
|
emit RemoveLiquiditySingleToken(
|
|
453
|
-
msg.sender,
|
|
454
|
-
market,
|
|
455
|
-
output.tokenOut,
|
|
456
|
-
receiver,
|
|
457
|
-
netLpToRemove,
|
|
458
|
-
netTokenOut,
|
|
459
|
-
netSyInterm
|
|
368
|
+
msg.sender, market, output.tokenOut, receiver, netLpToRemove, netTokenOut, netSyInterm
|
|
460
369
|
);
|
|
461
370
|
}
|
|
462
371
|
|
|
@@ -491,13 +400,12 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
491
400
|
if (netSyOut < minSyOut) revert("Slippage: INSUFFICIENT_SY_OUT");
|
|
492
401
|
}
|
|
493
402
|
|
|
494
|
-
function __removeLpToSyAfterExpiry(
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
(
|
|
500
|
-
(uint256 syFromBurn, ) = IPMarket(market).burn(receiver, address(YT), netLpToRemove);
|
|
403
|
+
function __removeLpToSyAfterExpiry(address receiver, address market, uint256 netLpToRemove)
|
|
404
|
+
internal
|
|
405
|
+
returns (uint256 netSyOut)
|
|
406
|
+
{
|
|
407
|
+
(,, IPYieldToken YT) = IPMarket(market).readTokens();
|
|
408
|
+
(uint256 syFromBurn,) = IPMarket(market).burn(receiver, address(YT), netLpToRemove);
|
|
501
409
|
netSyOut = syFromBurn + YT.redeemPY(receiver);
|
|
502
410
|
}
|
|
503
411
|
|
|
@@ -509,11 +417,8 @@ contract ActionAddRemoveLiqV3 is IPActionAddRemoveLiqV3, ActionBase, ActionDeleg
|
|
|
509
417
|
) internal returns (uint256 netSyOut, uint256 netSyFee) {
|
|
510
418
|
uint256 netPtLeft;
|
|
511
419
|
|
|
512
|
-
(uint256 netSyOutBurn, uint256 netPtOutBurn) =
|
|
513
|
-
receiver,
|
|
514
|
-
_entry_swapExactPtForSy(market, limit),
|
|
515
|
-
netLpToRemove
|
|
516
|
-
);
|
|
420
|
+
(uint256 netSyOutBurn, uint256 netPtOutBurn) =
|
|
421
|
+
IPMarket(market).burn(receiver, _entry_swapExactPtForSy(market, limit), netLpToRemove);
|
|
517
422
|
netSyOut += netSyOutBurn;
|
|
518
423
|
netPtLeft += netPtOutBurn;
|
|
519
424
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
|
-
import "../interfaces/IPActionCallbackV3.sol";
|
|
5
4
|
import "../core/libraries/Errors.sol";
|
|
5
|
+
import "../interfaces/IPActionCallbackV3.sol";
|
|
6
6
|
import "./base/CallbackHelper.sol";
|
|
7
7
|
|
|
8
8
|
import "../core/libraries/TokenHelper.sol";
|
|
@@ -28,12 +28,7 @@ contract ActionCallbackV3 is IPLimitOrderType, IPActionCallbackV3, CallbackHelpe
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function limitRouterCallback(
|
|
32
|
-
uint256 actualMaking,
|
|
33
|
-
uint256 actualTaking,
|
|
34
|
-
uint256 totalFee,
|
|
35
|
-
bytes memory data
|
|
36
|
-
)
|
|
31
|
+
function limitRouterCallback(uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory data)
|
|
37
32
|
external
|
|
38
33
|
returns (
|
|
39
34
|
bytes memory // encode as netTransferToLimit, netOutputFromLimit
|
|
@@ -44,10 +39,8 @@ contract ActionCallbackV3 is IPLimitOrderType, IPActionCallbackV3, CallbackHelpe
|
|
|
44
39
|
return abi.encode(0, 0);
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
(OrderType orderType, IPYieldToken YT, uint256 netRemaining, address receiver) =
|
|
48
|
-
data,
|
|
49
|
-
(OrderType, IPYieldToken, uint256, address)
|
|
50
|
-
);
|
|
42
|
+
(OrderType orderType, IPYieldToken YT, uint256 netRemaining, address receiver) =
|
|
43
|
+
abi.decode(data, (OrderType, IPYieldToken, uint256, address));
|
|
51
44
|
|
|
52
45
|
if (orderType == OrderType.SY_FOR_PT || orderType == OrderType.SY_FOR_YT) {
|
|
53
46
|
PYIndex index = YT.newIndex();
|
|
@@ -92,7 +85,14 @@ contract ActionCallbackV3 is IPLimitOrderType, IPActionCallbackV3, CallbackHelpe
|
|
|
92
85
|
}
|
|
93
86
|
}
|
|
94
87
|
|
|
95
|
-
function _callbackSwapExactSyForYt(
|
|
88
|
+
function _callbackSwapExactSyForYt(
|
|
89
|
+
int256 ptToAccount,
|
|
90
|
+
int256,
|
|
91
|
+
/*syToAccount*/
|
|
92
|
+
bytes calldata data
|
|
93
|
+
)
|
|
94
|
+
internal
|
|
95
|
+
{
|
|
96
96
|
(address receiver, IPYieldToken YT) = _decodeSwapExactSyForYt(data);
|
|
97
97
|
|
|
98
98
|
uint256 ptOwed = ptToAccount.abs();
|
|
@@ -116,7 +116,14 @@ contract ActionCallbackV3 is IPLimitOrderType, IPActionCallbackV3, CallbackHelpe
|
|
|
116
116
|
YT.redeemPYMulti(receivers, amountPYToRedeems);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
function _callbackSwapExactPtForYt(
|
|
119
|
+
function _callbackSwapExactPtForYt(
|
|
120
|
+
int256 ptToAccount,
|
|
121
|
+
int256,
|
|
122
|
+
/*syToAccount*/
|
|
123
|
+
bytes calldata data
|
|
124
|
+
)
|
|
125
|
+
internal
|
|
126
|
+
{
|
|
120
127
|
(address receiver, uint256 exactPtIn, uint256 minYtOut, IPYieldToken YT) = _decodeSwapExactPtForYt(data);
|
|
121
128
|
uint256 netPtOwed = ptToAccount.abs();
|
|
122
129
|
|
|
@@ -1,41 +1,37 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
pragma solidity ^0.8.17;
|
|
3
3
|
|
|
4
|
-
import "./base/ActionBase.sol";
|
|
5
4
|
import "../interfaces/IPActionMiscV3.sol";
|
|
6
5
|
import "../interfaces/IPReflector.sol";
|
|
6
|
+
import "./base/ActionBase.sol";
|
|
7
7
|
|
|
8
8
|
contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
9
9
|
uint256 private constant NOT_FOUND = type(uint256).max;
|
|
10
10
|
|
|
11
|
-
function mintSyFromToken(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
uint256
|
|
15
|
-
|
|
16
|
-
) external payable returns (uint256 netSyOut) {
|
|
11
|
+
function mintSyFromToken(address receiver, address SY, uint256 minSyOut, TokenInput calldata input)
|
|
12
|
+
external
|
|
13
|
+
payable
|
|
14
|
+
returns (uint256 netSyOut)
|
|
15
|
+
{
|
|
17
16
|
netSyOut = _mintSyFromToken(receiver, SY, minSyOut, input);
|
|
18
17
|
emit MintSyFromToken(msg.sender, input.tokenIn, SY, receiver, input.netTokenIn, netSyOut);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|
|
22
|
-
function redeemSyToToken(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
TokenOutput calldata output
|
|
27
|
-
) external returns (uint256 netTokenOut) {
|
|
21
|
+
function redeemSyToToken(address receiver, address SY, uint256 netSyIn, TokenOutput calldata output)
|
|
22
|
+
external
|
|
23
|
+
returns (uint256 netTokenOut)
|
|
24
|
+
{
|
|
28
25
|
netTokenOut = _redeemSyToToken(receiver, SY, netSyIn, output, true);
|
|
29
26
|
emit RedeemSyToToken(msg.sender, output.tokenOut, SY, receiver, netSyIn, netTokenOut);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|
|
33
|
-
function mintPyFromToken(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
uint256
|
|
37
|
-
|
|
38
|
-
) external payable returns (uint256 netPyOut, uint256 netSyInterm) {
|
|
30
|
+
function mintPyFromToken(address receiver, address YT, uint256 minPyOut, TokenInput calldata input)
|
|
31
|
+
external
|
|
32
|
+
payable
|
|
33
|
+
returns (uint256 netPyOut, uint256 netSyInterm)
|
|
34
|
+
{
|
|
39
35
|
address SY = IPYieldToken(YT).SY();
|
|
40
36
|
|
|
41
37
|
netSyInterm = _mintSyFromToken(YT, SY, 0, input);
|
|
@@ -45,12 +41,10 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
45
41
|
}
|
|
46
42
|
|
|
47
43
|
/// @notice For details on the parameters (input, guessPtSwapToSy, limit, etc.), please refer to IPAllActionTypeV3.
|
|
48
|
-
function redeemPyToToken(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
TokenOutput calldata output
|
|
53
|
-
) external returns (uint256 netTokenOut, uint256 netSyInterm) {
|
|
44
|
+
function redeemPyToToken(address receiver, address YT, uint256 netPyIn, TokenOutput calldata output)
|
|
45
|
+
external
|
|
46
|
+
returns (uint256 netTokenOut, uint256 netSyInterm)
|
|
47
|
+
{
|
|
54
48
|
address SY = IPYieldToken(YT).SY();
|
|
55
49
|
|
|
56
50
|
netSyInterm = _redeemPyToSy(SY, YT, netPyIn, 1);
|
|
@@ -59,22 +53,18 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
59
53
|
emit RedeemPyToToken(msg.sender, output.tokenOut, YT, receiver, netPyIn, netTokenOut, netSyInterm);
|
|
60
54
|
}
|
|
61
55
|
|
|
62
|
-
function mintPyFromSy(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
uint256 minPyOut
|
|
67
|
-
) external returns (uint256 netPyOut) {
|
|
56
|
+
function mintPyFromSy(address receiver, address YT, uint256 netSyIn, uint256 minPyOut)
|
|
57
|
+
external
|
|
58
|
+
returns (uint256 netPyOut)
|
|
59
|
+
{
|
|
68
60
|
netPyOut = _mintPyFromSy(receiver, IPYieldToken(YT).SY(), YT, netSyIn, minPyOut, true);
|
|
69
61
|
emit MintPyFromSy(msg.sender, receiver, YT, netSyIn, netPyOut);
|
|
70
62
|
}
|
|
71
63
|
|
|
72
|
-
function redeemPyToSy(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
uint256 minSyOut
|
|
77
|
-
) external returns (uint256 netSyOut) {
|
|
64
|
+
function redeemPyToSy(address receiver, address YT, uint256 netPyIn, uint256 minSyOut)
|
|
65
|
+
external
|
|
66
|
+
returns (uint256 netSyOut)
|
|
67
|
+
{
|
|
78
68
|
netSyOut = _redeemPyToSy(receiver, YT, netPyIn, minSyOut);
|
|
79
69
|
emit RedeemPyToSy(msg.sender, receiver, YT, netPyIn, netSyOut);
|
|
80
70
|
}
|
|
@@ -119,14 +109,13 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
119
109
|
IPMarket[] calldata markets
|
|
120
110
|
) private returns (uint256[] memory netInterests) {
|
|
121
111
|
netInterests = new uint256[](YTs.length);
|
|
122
|
-
for (uint256 i = 0; i < SYs.length; ++i)
|
|
112
|
+
for (uint256 i = 0; i < SYs.length; ++i) {
|
|
113
|
+
SYs[i].claimRewards(msg.sender);
|
|
114
|
+
}
|
|
123
115
|
|
|
124
116
|
for (uint256 i = 0; i < YTs.length; ++i) {
|
|
125
|
-
(uint256 netSyInt,
|
|
126
|
-
msg.sender,
|
|
127
|
-
YTs[i].doRedeemInterest,
|
|
128
|
-
YTs[i].doRedeemRewards
|
|
129
|
-
);
|
|
117
|
+
(uint256 netSyInt,) =
|
|
118
|
+
YTs[i].yt.redeemDueInterestAndRewards(msg.sender, YTs[i].doRedeemInterest, YTs[i].doRedeemRewards);
|
|
130
119
|
|
|
131
120
|
if (netSyInt == 0) continue;
|
|
132
121
|
|
|
@@ -135,7 +124,9 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
135
124
|
netInterests[i] = SY.redeem(msg.sender, netSyInt, YTs[i].tokenRedeemSy, YTs[i].minTokenRedeemOut, true);
|
|
136
125
|
}
|
|
137
126
|
|
|
138
|
-
for (uint256 i = 0; i < markets.length; ++i)
|
|
127
|
+
for (uint256 i = 0; i < markets.length; ++i) {
|
|
128
|
+
markets[i].redeemRewards(msg.sender);
|
|
129
|
+
}
|
|
139
130
|
}
|
|
140
131
|
|
|
141
132
|
function __redeemDueInterestAndRewardsV2AndSwap(
|
|
@@ -155,11 +146,8 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
155
146
|
netInterests = new uint256[](YTs.length);
|
|
156
147
|
for (uint256 i = 0; i < YTs.length; ++i) {
|
|
157
148
|
uint256[] memory netRewards;
|
|
158
|
-
(netInterests[i], netRewards) =
|
|
159
|
-
msg.sender,
|
|
160
|
-
YTs[i].doRedeemInterest,
|
|
161
|
-
YTs[i].doRedeemRewards
|
|
162
|
-
);
|
|
149
|
+
(netInterests[i], netRewards) =
|
|
150
|
+
YTs[i].yt.redeemDueInterestAndRewards(msg.sender, YTs[i].doRedeemInterest, YTs[i].doRedeemRewards);
|
|
163
151
|
|
|
164
152
|
if (YTs[i].doRedeemRewards) _add(swaps, netSwaps, YTs[i].yt.getRewardTokens(), netRewards);
|
|
165
153
|
}
|
|
@@ -175,17 +163,13 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
175
163
|
for (uint256 i = 0; i < YTs.length; ++i) {
|
|
176
164
|
if (netInterests[i] == 0) continue;
|
|
177
165
|
IStandardizedYield SY = IStandardizedYield(YTs[i].yt.SY());
|
|
178
|
-
netInterests[i] =
|
|
179
|
-
swaps,
|
|
180
|
-
netSwaps,
|
|
181
|
-
SY,
|
|
182
|
-
netInterests[i],
|
|
183
|
-
YTs[i].tokenRedeemSy,
|
|
184
|
-
YTs[i].minTokenRedeemOut
|
|
185
|
-
);
|
|
166
|
+
netInterests[i] =
|
|
167
|
+
_redeemSyAndAdd(swaps, netSwaps, SY, netInterests[i], YTs[i].tokenRedeemSy, YTs[i].minTokenRedeemOut);
|
|
186
168
|
}
|
|
187
169
|
|
|
188
|
-
for (uint256 i = 0; i < swaps.length; ++i)
|
|
170
|
+
for (uint256 i = 0; i < swaps.length; ++i) {
|
|
171
|
+
netOutFromSwaps[i] = _swap(swaps[i], netSwaps[i], pendleSwap, true);
|
|
172
|
+
}
|
|
189
173
|
}
|
|
190
174
|
|
|
191
175
|
/// @dev The interface might change in the future, check with Pendle team before use
|
|
@@ -315,13 +299,10 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
315
299
|
}
|
|
316
300
|
|
|
317
301
|
/// @dev The interface might change in the future, check with Pendle team before use
|
|
318
|
-
function exitPostExpToSy(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
uint256 netLpIn,
|
|
323
|
-
uint256 minSyOut
|
|
324
|
-
) external returns (ExitPostExpReturnParams memory params) {
|
|
302
|
+
function exitPostExpToSy(address receiver, address market, uint256 netPtIn, uint256 netLpIn, uint256 minSyOut)
|
|
303
|
+
external
|
|
304
|
+
returns (ExitPostExpReturnParams memory params)
|
|
305
|
+
{
|
|
325
306
|
(, params) = _exitPostExpToSy(false, receiver, market, netPtIn, netLpIn);
|
|
326
307
|
require(params.totalSyOut >= minSyOut, "Slippage: INSUFFICIENT_SY_OUT");
|
|
327
308
|
|
|
@@ -361,12 +342,10 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
361
342
|
}
|
|
362
343
|
}
|
|
363
344
|
|
|
364
|
-
function _swap(
|
|
365
|
-
|
|
366
|
-
uint256
|
|
367
|
-
|
|
368
|
-
bool needScale
|
|
369
|
-
) internal returns (uint256 netTokenOut) {
|
|
345
|
+
function _swap(SwapDataExtra calldata $, uint256 netSwap, IPSwapAggregator pendleSwap, bool needScale)
|
|
346
|
+
internal
|
|
347
|
+
returns (uint256 netTokenOut)
|
|
348
|
+
{
|
|
370
349
|
SwapType swapType = $.swapData.swapType;
|
|
371
350
|
assert(swapType != SwapType.NONE);
|
|
372
351
|
|
|
@@ -395,13 +374,10 @@ contract ActionMiscV3 is IPActionMiscV3, ActionBase {
|
|
|
395
374
|
return NOT_FOUND;
|
|
396
375
|
}
|
|
397
376
|
|
|
398
|
-
function _exitPostExpToSy(
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
uint256 netPtIn,
|
|
403
|
-
uint256 netLpIn
|
|
404
|
-
) internal returns (IStandardizedYield SY, ExitPostExpReturnParams memory p) {
|
|
377
|
+
function _exitPostExpToSy(bool setReceiverToSy, address receiver, address market, uint256 netPtIn, uint256 netLpIn)
|
|
378
|
+
internal
|
|
379
|
+
returns (IStandardizedYield SY, ExitPostExpReturnParams memory p)
|
|
380
|
+
{
|
|
405
381
|
IPPrincipalToken PT;
|
|
406
382
|
IPYieldToken YT;
|
|
407
383
|
(SY, PT, YT) = IPMarket(market).readTokens();
|