@pendle/core-v2 6.11.0 → 6.12.0
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/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/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/LayerZeroHelper.sol/LayerZeroHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerUpg.sol/PendleGaugeControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMerkleDistributor.sol/PendleMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- 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/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/WeekMath.sol/WeekMath.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/sPendle/StakedPendle.sol/StakedPendle.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactoryV7Upg.sol/PendleMarketFactoryV7Upg.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketV7.sol/PendleMarketV7.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/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/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/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/CodeDeployer.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeableV2.sol/BoringOwnableUpgradeableData.dbg.json +1 -1
- 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/ExpiryUtilsLib.sol/ExpiryUtils.dbg.json +1 -1
- 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/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/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/FixedPricePTAMMV2.sol/FixedPricePTAMMV2.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/OFTPTSwapper.sol/OFTPTSwapper.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/OFTPTSwapper.sol/OFTPTSwapper.json +2 -2
- package/build/artifacts/contracts/cross-chain/deposit-box/DepositBox.sol/DepositBox.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/deposit-box/DepositBoxFactory.sol/DepositBoxFactory.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/funder/BridgeFunder.sol/BridgeFunder.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterAltImpl.sol/OFTAdapterAltImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/hub/OFTAdapterImpl.sol/OFTAdapterImpl.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFT.sol/PendleOFT.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/oftImpl/pendleOft/PendleOFTAlt.sol/PendleOFTAlt.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/PendleBridgedPrincipalTokenAlt.sol/PendleBridgedPrincipalTokenAlt.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/swap-hub/PendleCrossChainSwapHub.sol/PendleCrossChainSwapHub.dbg.json +1 -1
- package/build/artifacts/contracts/cross-chain/swap-hub/SwapHubBase.sol/SwapHubBase.dbg.json +1 -1
- package/build/artifacts/contracts/deprecated/VeDistributor/PendleFeeDistributorV2.sol/PendleFeeDistributorV2.dbg.json +1 -1
- 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 +1 -1
- package/build/artifacts/contracts/interfaces/IMoneyMarket.sol/IMoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IMoneyMarket.sol/IMoneyMarketEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IMoneyMarketView.sol/IMoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IOwnable.sol/IOwnable.json +13 -0
- 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/IPBridgeDataVerifier.sol/IPBridgeDataVerifier.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgeFunder.sol/IPBridgeFunder.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBridgePTFactory.sol/IPBridgePTFactory.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/IPCommonPoolDeployHelperV2.sol/IPCommonPoolDeployHelperV2.json +6 -172
- package/build/artifacts/contracts/interfaces/IPCommonSYFactory.sol/IPCommonSYFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPCrossChainSwapHub.sol/IPCrossChainSwapHub.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPDepositBox.sol/IPDepositBox.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPDepositBoxFactory.sol/IPDepositBoxFactory.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/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributorV2.sol/IPFeeDistributorV2.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMMV2.sol/IPFixedPricePTAMMSwapCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFixedPricePTAMMV2.sol/IPFixedPricePTAMMV2.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/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/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLoopPositionBox.sol/IPLoopPositionBox.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLoopPositionBox.sol/IPLoopPositionBox.json +13 -8
- package/build/artifacts/contracts/interfaces/IPLoopPositionBoxFactory.sol/IPLoopPositionBoxFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- 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/IPOFTPTSwapper.sol/IPOFTPTSwapper.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/IPPTLooper.sol/IPPTLooper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTLooper.sol/IPPTLooper.json +215 -102
- package/build/artifacts/contracts/interfaces/IPPTLooper.sol/IPPTLooperEIP712Types.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPPTLooperView.sol/IPPTLooperView.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/IPPostPtLoopStateChecker.sol/IPPostPtLoopStateChecker.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/IPStakedPendle.sol/IPStakedPendle.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPStaticQuoter.sol/IPStaticQuoter.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/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/MintSyHelper.sol/MintSyHelper.dbg.json +1 -1
- 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/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/ILegacyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/EmptyUUPS.sol/EmptyUUPS.dbg.json +1 -1
- 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/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 +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketSweed.sol/MarketSweed.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleAPIFeeDepositor.sol/PendleAPIFeeDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleFeeSetter.sol/PendleFeeSetter.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleGovernanceProxy.sol/PendleGovernanceProxy.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapper.sol/PendleLPWrapper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleLPWrapperFactory.sol/PendleLPWrapperFactory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMerkleDepositor.sol/PendleMerkleDepositor.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallOwnerV1.sol/PendleMulticallOwnerV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV1.sol/PendleMulticallV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleMulticallV2.sol/PendleMulticallV2.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleOffchainStorage.sol/PendleOffchainStorage.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleProxyAdmin.sol/PendleProxyAdmin.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleWstETHPriceFeed.sol/PendleWstETHPriceFeed.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/SimulateHelper.sol/SimulateHelper.dbg.json +1 -1
- 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 +6 -547
- 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/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/base/PendleCrossChainOracleBaseApp_Init.sol/PendleCrossChainOracleBaseApp_Init.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleApp.sol/PendleExchangeRateOracleApp.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/exchangeRate/PendleExchangeRateOracleV2.sol/PendleExchangeRateOracleV2.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/CrossChainOracle/libraries/ExchangeRateMsgCodec.sol/ExchangeRateMsgCodec.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PtYtLpOracle/chainlink/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +1 -1
- 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/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- 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/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/pt-looping/BridgeDataVerifier.sol/BridgeDataVerifier.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PTLooperBase.sol/PTLooperBase.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PTLooperBase.sol/PTLooperBase.json +213 -100
- package/build/artifacts/contracts/pt-looping/PTLooperEIP712TypesEncodeDataLib.sol/PTLooperEIP712TypesEncodeDataLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PTLooperEIP712TypesEncodeDataLib.sol/PTLooperEIP712TypesEncodeDataLib.json +2 -2
- package/build/artifacts/contracts/pt-looping/PendlePTLooper.sol/PendlePTLooper.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PendlePTLooper.sol/PendlePTLooper.json +215 -102
- package/build/artifacts/contracts/pt-looping/PendlePTLooperView.sol/PendlePTLooperView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PendlePTLooperView.sol/PendlePTLooperView.json +2 -2
- package/build/artifacts/contracts/pt-looping/PostPtLoopStateChecker.sol/PostPtLoopStateChecker.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/PostPtLoopStateChecker.sol/PostPtLoopStateChecker.json +2 -2
- package/build/artifacts/contracts/pt-looping/StaticStableQuoter.sol/StaticStableQuoter.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/loop-position-box/LoopPositionBox.sol/LoopPositionBox.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/loop-position-box/LoopPositionBox.sol/LoopPositionBox.json +15 -10
- package/build/artifacts/contracts/pt-looping/loop-position-box/LoopPositionBoxFactory.sol/LoopPositionBoxFactory.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/loop-position-box/LoopPositionBoxFactory.sol/LoopPositionBoxFactory.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/BaseMoneyMarket.sol/BaseMoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/BaseMoneyMarketView.sol/BaseMoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMMPayloadLib.sol/AaveMMPayloadLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMMPayloadLib.sol/AaveMMPayloadLib.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarket.sol/AaveMoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarket.sol/AaveMoneyMarket.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarketView.sol/AaveMoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarketView.sol/AaveMoneyMarketView.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/AaveDataTypes.sol/AaveDataTypes.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IAToken.sol/IAToken.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IAaveOracle.sol/IAaveOracle.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IAaveRewardsController.sol/IAaveRewardsController.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IPool.sol/IPool.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IPool.sol/IPool.json +38 -0
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IPoolAddressesProvider.sol/IPoolAddressesProvider.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IPoolDataProviderV3.sol/IPoolDataProviderV3.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave/dependencies/IPriceOracleGetter.sol/IPriceOracleGetter.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/AaveV4MMPayloadLib.sol/AaveV4MMPayloadLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/AaveV4MoneyMarket.sol/AaveV4MoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/AaveV4MoneyMarket.sol/AaveV4MoneyMarket.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/AaveV4MoneyMarketView.sol/AaveV4MoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/AaveV4MoneyMarketView.sol/AaveV4MoneyMarketView.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/dependencies/IAaveOracle.sol/IAaveOracle.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/dependencies/IHubBase.sol/IHubBase.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/aave-v4/dependencies/ISpoke.sol/ISpoke.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/EulerMMPayloadLib.sol/EulerMMPayloadLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/EulerMoneyMarket.sol/EulerMoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/EulerMoneyMarket.sol/EulerMoneyMarket.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/EulerMoneyMarketView.sol/EulerMoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/EulerMoneyMarketView.sol/EulerMoneyMarketView.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/dependencies/IEthereumVaultConnector.sol/IEVC.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/dependencies/IEulerFactory.sol/IEulerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/dependencies/IEulerPriceOracle.sol/IEulerPriceOracle.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/dependencies/IEulerVault.sol/AmountCapLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/euler/dependencies/IEulerVault.sol/IEulerVault.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/MorphoBlueMoneyMarket.sol/MorphoBlueMoneyMarket.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/MorphoBlueMoneyMarket.sol/MorphoBlueMoneyMarket.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/MorphoBlueMoneyMarketView.sol/MorphoBlueMoneyMarketView.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/MorphoBlueMoneyMarketView.sol/MorphoBlueMoneyMarketView.json +2 -2
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/dependencies/IMorpho.sol/IIrm.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/dependencies/IMorpho.sol/IMorpho.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/dependencies/IMorphoOracle.sol/IMorphoOracle.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/dependencies/MathLib.sol/MathLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/money-market/implementations/morpho/dependencies/SharesMathLib.sol/SharesMathLib.dbg.json +1 -1
- package/build/artifacts/contracts/pt-looping/vendor/bungee/IBungeeInbox.sol/IBungeeSORInbox.dbg.json +1 -1
- 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/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/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/PendleSwap.sol/IKyberScalingHelper.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/core/libraries/ArrayLib.sol +6 -0
- package/contracts/interfaces/IOwnable.sol +1 -0
- package/contracts/interfaces/IPCommonPoolDeployHelperV2.sol +3 -17
- package/contracts/interfaces/IPLoopPositionBox.sol +12 -2
- package/contracts/interfaces/IPPTLooper.sol +37 -6
- package/contracts/limit/LimitRouterBase.sol +0 -2
- package/contracts/offchain-helpers/PendleFeeSetter.sol +5 -6
- package/contracts/offchain-helpers/deploy/PendleCommonPoolDeployHelperV2.sol +4 -75
- package/contracts/offchain-helpers/deploy/PendleCommonSYFactory.sol +8 -2
- package/contracts/pt-looping/PTLooperBase.sol +13 -1
- package/contracts/pt-looping/PTLooperEIP712TypesEncodeDataLib.sol +4 -3
- package/contracts/pt-looping/PendlePTLooper.sol +77 -29
- package/contracts/pt-looping/loop-position-box/LoopPositionBox.sol +20 -14
- package/contracts/pt-looping/money-market/implementations/aave/AaveMMPayloadLib.sol +1 -5
- package/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarket.sol +24 -8
- package/contracts/pt-looping/money-market/implementations/aave/AaveMoneyMarketView.sol +1 -1
- package/contracts/pt-looping/money-market/implementations/aave/dependencies/IPool.sol +16 -7
- package/contracts/router/swap-aggregator/IPSwapAggregator.sol +2 -2
- package/contracts/router/swap-aggregator/PendleSwap.sol +27 -47
- package/package.json +1 -1
- package/typechain-types/IOwnable.ts +21 -0
- package/typechain-types/IPCommonPoolDeployHelperV2.ts +21 -145
- package/typechain-types/IPLoopPositionBox.ts +23 -20
- package/typechain-types/IPPTLooper.ts +196 -67
- package/typechain-types/IPool.ts +62 -0
- package/typechain-types/LoopPositionBox.ts +23 -20
- package/typechain-types/PTLooperBase.ts +196 -67
- package/typechain-types/PendleCommonPoolDeployHelperV2.ts +15 -498
- package/typechain-types/PendlePTLooper.ts +196 -67
- package/typechain-types/factories/AaveMoneyMarketView__factory.ts +1 -1
- package/typechain-types/factories/AaveMoneyMarket__factory.ts +1 -1
- package/typechain-types/factories/AaveV4MoneyMarketView__factory.ts +1 -1
- package/typechain-types/factories/AaveV4MoneyMarket__factory.ts +1 -1
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSimple__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageV4__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/EulerMoneyMarketView__factory.ts +1 -1
- package/typechain-types/factories/EulerMoneyMarket__factory.ts +1 -1
- package/typechain-types/factories/ExpiredLpPtRedeemer__factory.ts +1 -1
- package/typechain-types/factories/IOwnable__factory.ts +13 -0
- package/typechain-types/factories/IPCommonPoolDeployHelperV2__factory.ts +6 -172
- package/typechain-types/factories/IPLoopPositionBox__factory.ts +13 -8
- package/typechain-types/factories/IPPTLooper__factory.ts +215 -102
- package/typechain-types/factories/IPool__factory.ts +38 -0
- package/typechain-types/factories/LimitBackendHelperV2__factory.ts +1 -1
- package/typechain-types/factories/LoopPositionBoxFactory__factory.ts +1 -1
- package/typechain-types/factories/LoopPositionBox__factory.ts +14 -9
- package/typechain-types/factories/MarketSweed__factory.ts +1 -1
- package/typechain-types/factories/MorphoBlueMoneyMarketView__factory.ts +1 -1
- package/typechain-types/factories/MorphoBlueMoneyMarket__factory.ts +1 -1
- package/typechain-types/factories/OFTPTSwapper__factory.ts +1 -1
- package/typechain-types/factories/PTLooperBase__factory.ts +213 -100
- package/typechain-types/factories/PendleCommonPoolDeployHelperV2__factory.ts +5 -546
- package/typechain-types/factories/PendleCommonSYFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeSetter__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV7__factory.ts +1 -1
- package/typechain-types/factories/PendlePTLooperView__factory.ts +1 -1
- package/typechain-types/factories/PendlePTLooper__factory.ts +214 -101
- package/typechain-types/factories/PendlePoolDeployHelperV2__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelper__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/PendleSwap__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/PostPtLoopStateChecker__factory.ts +1 -1
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +0 -9
- package/typechain-types/index.ts +0 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +0 -4
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.json +0 -82
- package/typechain-types/IOdosRouterV2.ts +0 -147
- package/typechain-types/factories/IOdosRouterV2__factory.ts +0 -94
|
@@ -77,12 +77,17 @@ interface IPPTLooperEIP712Types {
|
|
|
77
77
|
RequestHeader header;
|
|
78
78
|
uint256 minPtToDebtSwapRate;
|
|
79
79
|
uint256 postWithdrawMaxLTV;
|
|
80
|
+
/// @notice Hub-only. If true, YT held by the box is approved alongside PT so the router can redeem
|
|
81
|
+
/// PT + YT -> SY -> Token instead of swapping PT. YT must be consumed 1:1 with PT.
|
|
82
|
+
/// Amount redeemed is min(PT, YT) held by the box; any PT above the YT balance stays in
|
|
83
|
+
/// the box. The owner transfers YT in beforehand (the looper never acquires YT itself).
|
|
84
|
+
bool redeemWithPY;
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
struct DecreasePositionMessage {
|
|
83
88
|
BoxPermit permit;
|
|
84
89
|
// Hub-only: swap PT→debtToken.
|
|
85
|
-
/// @notice Set extRouter to address(0) to disable swapping.
|
|
90
|
+
/// @notice Set extRouter to address(0) to disable swapping. See `DecreasePositionRequest.redeemWithPY`.
|
|
86
91
|
BoxApprovedCall swap;
|
|
87
92
|
// Cross-chain only: hub bridges debt to spoke; spoke bridges PT back to hub.
|
|
88
93
|
BridgeData bridge;
|
|
@@ -132,11 +137,19 @@ interface IPPTLooper is IPPTLooperEIP712Types {
|
|
|
132
137
|
uint32 sessionNonce;
|
|
133
138
|
}
|
|
134
139
|
|
|
140
|
+
enum RequestStatus {
|
|
141
|
+
DEFAULT,
|
|
142
|
+
PRE_APPROVED
|
|
143
|
+
/* CANCELLED */
|
|
144
|
+
}
|
|
145
|
+
|
|
135
146
|
/// @notice Emitted on the first iteration call of a session, when the implicit init branch
|
|
136
147
|
/// runs (owner signature verified, `userReq.requestHash` set). `sessionNonce` is the
|
|
137
148
|
/// pre-increment value the session was opened with.
|
|
138
149
|
event SessionInitiated(address indexed owner, bytes32 indexed boxId, bytes32 requestHash, uint32 sessionNonce);
|
|
139
150
|
|
|
151
|
+
event RequestPreApproved(address indexed owner, bytes32 requestHash);
|
|
152
|
+
|
|
140
153
|
/// @notice Emitted by `terminateSession`. `sessionNonce` is the post-increment value that
|
|
141
154
|
/// the next user request must match.
|
|
142
155
|
event SessionTerminated(address indexed owner, bytes32 indexed boxId, bytes32 requestHash, uint32 sessionNonce);
|
|
@@ -153,6 +166,14 @@ interface IPPTLooper is IPPTLooperEIP712Types {
|
|
|
153
166
|
uint256 netSwappedOut
|
|
154
167
|
);
|
|
155
168
|
|
|
169
|
+
event PYRedeemed(
|
|
170
|
+
IPLoopPositionBox indexed box,
|
|
171
|
+
address indexed pt,
|
|
172
|
+
uint256 netPyIn,
|
|
173
|
+
address indexed tokenOut,
|
|
174
|
+
uint256 netSwappedOut
|
|
175
|
+
);
|
|
176
|
+
|
|
156
177
|
event TokenBridged(IPLoopPositionBox indexed box, address indexed token, uint256 amount);
|
|
157
178
|
|
|
158
179
|
event MoneyMarketLentThenBorrowed(IPLoopPositionBox indexed box, uint256 ptLent, uint256 debtBorrowed);
|
|
@@ -216,6 +237,8 @@ interface IPPTLooper is IPPTLooperEIP712Types {
|
|
|
216
237
|
|
|
217
238
|
function userRequest(address owner, bytes32 boxId) external view returns (UserRequestInfo memory);
|
|
218
239
|
|
|
240
|
+
function requestStatus(address owner, bytes32 requestHash) external view returns (RequestStatus);
|
|
241
|
+
|
|
219
242
|
// ========== Hash functions (exposed for off-chain typed-data tooling) ==========
|
|
220
243
|
|
|
221
244
|
function hashRaw(BoxPermit memory permit) external pure returns (bytes32);
|
|
@@ -256,28 +279,36 @@ interface IPPTLooper is IPPTLooperEIP712Types {
|
|
|
256
279
|
|
|
257
280
|
/// @notice One increase iteration. The first call for a `(owner, boxId)` slot also opens
|
|
258
281
|
/// the session — pass the owner's typed-data signature over `req` in
|
|
259
|
-
/// `ownerSigIfFirstCall
|
|
260
|
-
///
|
|
282
|
+
/// `ownerSigIfFirstCall` (if not pre-approved).
|
|
283
|
+
/// @notice `ownerSigIfFirstCall` can be passed as empty bytes:
|
|
284
|
+
/// - at subsequent iterations within the same session (it is ignored once the session is open).
|
|
285
|
+
/// - when the request is pre-approved (see `preApproveRequest`).
|
|
261
286
|
function increaseLoopPosition(
|
|
262
287
|
IncreasePositionMessage memory ms,
|
|
263
288
|
bytes memory proposerSig,
|
|
264
289
|
IncreasePositionRequest memory req,
|
|
265
290
|
bytes memory ownerSigIfFirstCall
|
|
266
|
-
) external
|
|
291
|
+
) external;
|
|
267
292
|
|
|
268
293
|
function decreaseLoopPosition(
|
|
269
294
|
DecreasePositionMessage memory ms,
|
|
270
295
|
bytes memory proposerSig,
|
|
271
296
|
DecreasePositionRequest memory req,
|
|
272
297
|
bytes memory ownerSigIfFirstCall
|
|
273
|
-
) external
|
|
298
|
+
) external;
|
|
274
299
|
|
|
275
300
|
function swapBridgeWithdrawAll(
|
|
276
301
|
SwapBridgeWithdrawAllMessage memory ms,
|
|
277
302
|
bytes memory proposerSig,
|
|
278
303
|
SwapBridgeWithdrawAllRequest memory req,
|
|
279
304
|
bytes memory ownerSigIfFirstCall
|
|
280
|
-
) external
|
|
305
|
+
) external;
|
|
306
|
+
|
|
307
|
+
/// @notice `msg.sender` call this function to approve a request instead of
|
|
308
|
+
/// signing it with `ownerSigIfFirstCall`.
|
|
309
|
+
/// The proposer signs the request hash.
|
|
310
|
+
/// `ownerSigIfFirstCall` can then be left empty when a session is created.
|
|
311
|
+
function preApproveRequest(bytes32 requestHash, bytes memory proposerSig) external;
|
|
281
312
|
|
|
282
313
|
/// @notice Closes the open session at `(owner, boxId)`. `requestHash` must equal the
|
|
283
314
|
/// currently-stored `userReq.requestHash` (proves the caller identifies which
|
|
@@ -28,7 +28,6 @@ abstract contract LimitRouterBase is
|
|
|
28
28
|
|
|
29
29
|
uint128 internal constant _ORDER_DOES_NOT_EXIST = 0;
|
|
30
30
|
uint128 internal constant _ORDER_FILLED = 1;
|
|
31
|
-
uint256 internal constant MAX_LN_FEE_RATE_ROOT = 48_790_164_169_432_003; // ln(1.05)
|
|
32
31
|
|
|
33
32
|
address public feeRecipient;
|
|
34
33
|
|
|
@@ -519,7 +518,6 @@ abstract contract LimitRouterBase is
|
|
|
519
518
|
|
|
520
519
|
for (uint256 i = 0; i < len; i++) {
|
|
521
520
|
require(lnFeeRateRoots[i] > 0 || allowZeroFees, "LOP: zero fee must be allowed explicitly");
|
|
522
|
-
require(lnFeeRateRoots[i] <= MAX_LN_FEE_RATE_ROOT, "LOP: fee too high");
|
|
523
521
|
|
|
524
522
|
__lnFeeRateRoot[YTs[i]] = lnFeeRateRoots[i];
|
|
525
523
|
}
|
|
@@ -9,13 +9,11 @@ import {IPYieldToken} from "../interfaces/IPYieldToken.sol";
|
|
|
9
9
|
|
|
10
10
|
import {BoringOwnableUpgradeableV2} from "../core/libraries/BoringOwnableUpgradeableV2.sol";
|
|
11
11
|
import {Errors} from "../core/libraries/Errors.sol";
|
|
12
|
-
import {LogExpMath} from "../core/libraries/math/LogExpMath.sol";
|
|
13
12
|
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
14
13
|
|
|
15
14
|
contract PendleFeeSetter is BoringOwnableUpgradeableV2 {
|
|
16
15
|
using PMath for uint256;
|
|
17
16
|
using PMath for int256;
|
|
18
|
-
using LogExpMath for int256;
|
|
19
17
|
|
|
20
18
|
event FeeFactorSet(uint128 impliedRateToFeeFactor, uint128 routerLnFeeToLimitLnFeeFactor);
|
|
21
19
|
event SetterSet(address indexed setter);
|
|
@@ -106,13 +104,14 @@ contract PendleFeeSetter is BoringOwnableUpgradeableV2 {
|
|
|
106
104
|
{
|
|
107
105
|
uint256 marketLnFee = IPMarket(market).getNonOverrideLnFeeRateRoot();
|
|
108
106
|
MarketState memory state = IPMarket(market).readState(router);
|
|
109
|
-
uint256 impliedRate = state.lastLnImpliedRate.Int().exp().Uint();
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
// Fee root scales the ln implied rate, so fee / yield = (e^{phi*t} - 1) / (e^{r*t} - 1), which is at most
|
|
109
|
+
// `factor` and converges to `factor` as expiry approaches. Scaling the annual APY instead
|
|
110
|
+
// (ln(1 + factor * APY)) overcharges for t < 1 year and blows up at high rates (15000% -> 300% fee root).
|
|
111
|
+
uint256 newLnFeeRateRoot = state.lastLnImpliedRate.mulDown(_impliedRateToFeeFactor);
|
|
113
112
|
|
|
114
113
|
routerLnFeeRateRoot = marketLnFee.min(newLnFeeRateRoot);
|
|
115
|
-
limitLnFeeRateRoot =
|
|
114
|
+
limitLnFeeRateRoot = newLnFeeRateRoot.mulDown(_routerLnFeeToLimitLnFeeFactor);
|
|
116
115
|
|
|
117
116
|
// Fix up `routerLnFeeRateRoot` for this case:
|
|
118
117
|
// https://github.com/pendle-finance/pendle-core-v2/blob/6169376d0a8c12030307e3d64d02e84b07ffe4f9/contracts/core/Market/v3/PendleMarketFactoryV3.sol#L131-L135
|
|
@@ -7,15 +7,6 @@ import "../../interfaces/IPCommonSYFactory.sol";
|
|
|
7
7
|
import "./PendlePoolDeployHelperV2.sol";
|
|
8
8
|
|
|
9
9
|
contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnableUpgradeableV2 {
|
|
10
|
-
bytes32 public constant ERC4626_DEPLOY_ID = keccak256("PendleERC4626SYV2"); // 0x1278efc0e6754cd30fef2df25ff5ced072ebb194d348b0b1b9548166d24352ef
|
|
11
|
-
bytes32 public constant ERC4626_NOT_REDEEMABLE_DEPLOY_ID = keccak256("PendleERC4626NotRedeemableToAssetSYV2"); // 0x6f089cd4afdd945c5c26b3f4542d0c294d19ec0e339c6ce4f8eafa94d700d05d
|
|
12
|
-
bytes32 public constant ERC20_DEPLOY_ID = keccak256("PendleERC20SY"); // 0xfcf22a9a515753d83e4f2a81cf368c7226408c64f52411ae95241ebf5ed53304
|
|
13
|
-
|
|
14
|
-
bytes32 public constant ERC4626_WITH_ADAPTER_ID = keccak256("PendleERC4626WithAdapterSY"); // 0x73f41560741d6765943d3c955034291fe23d9141e3a4719bc97422d5bf019adc
|
|
15
|
-
bytes32 public constant ERC4626_NO_REDEEM_WITH_ADAPTER_ID = keccak256("PendleERC4626NoRedeemWithAdapterSY"); // 0x3b8dd2b992f773444e5422ba1db289c4657c57110d740dca7975dc095632ef23
|
|
16
|
-
bytes32 public constant ERC20_WITH_ADAPTER_ID = keccak256("PendleERC20WithAdapterSY"); // 0xe5cce2b1999bf8c2cc4cf6d96d0569a24d8b782ba1647c09a8e1aa8bbfb98996
|
|
17
|
-
bytes32 public constant ERC4626_NO_DEPOSIT_NO_REDEEM = keccak256("PendleERC4626NoRedeemNoDepositUpgSY"); // 0x5c1cddc0128e0b02bb711f84a022bf1c13177d4ab028830b702f3a77280025ea
|
|
18
|
-
|
|
19
10
|
address public immutable syFactory;
|
|
20
11
|
|
|
21
12
|
constructor(address _syFactory, address _router, address _yieldContractFactory, address _marketFactory)
|
|
@@ -31,79 +22,18 @@ contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnab
|
|
|
31
22
|
|
|
32
23
|
function deployCommonMarketById(
|
|
33
24
|
bytes32 id,
|
|
34
|
-
bytes memory constructorParams,
|
|
35
|
-
bytes memory initData,
|
|
36
|
-
PoolConfig memory config,
|
|
37
|
-
address tokenToSeedLiqudity,
|
|
38
|
-
uint256 amountToSeed,
|
|
39
|
-
address syOwner
|
|
40
|
-
) external returns (PoolDeploymentAddrs memory) {
|
|
41
|
-
address SY = IPCommonSYFactory(syFactory).deployUpgradableSY(id, constructorParams, initData, syOwner);
|
|
42
|
-
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Those 3 are all not payable as they should not accept tokenIn as native
|
|
46
|
-
|
|
47
|
-
function deployERC4626Market(
|
|
48
25
|
bytes memory constructorParams,
|
|
49
26
|
PoolConfig memory config,
|
|
50
27
|
address tokenToSeedLiqudity,
|
|
51
28
|
uint256 amountToSeed,
|
|
52
29
|
address syOwner
|
|
53
30
|
) external returns (PoolDeploymentAddrs memory) {
|
|
54
|
-
address SY = IPCommonSYFactory(syFactory).deploySY(
|
|
31
|
+
address SY = IPCommonSYFactory(syFactory).deploySY(id, constructorParams, syOwner);
|
|
55
32
|
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
56
33
|
}
|
|
57
34
|
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
PoolConfig memory config,
|
|
61
|
-
address tokenToSeedLiqudity,
|
|
62
|
-
uint256 amountToSeed,
|
|
63
|
-
address syOwner
|
|
64
|
-
) external returns (PoolDeploymentAddrs memory) {
|
|
65
|
-
address SY = IPCommonSYFactory(syFactory).deploySY(ERC4626_NOT_REDEEMABLE_DEPLOY_ID, constructorParams, syOwner);
|
|
66
|
-
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function deployERC20Market(
|
|
70
|
-
bytes memory constructorParams,
|
|
71
|
-
PoolConfig memory config,
|
|
72
|
-
address tokenToSeedLiqudity,
|
|
73
|
-
uint256 amountToSeed,
|
|
74
|
-
address syOwner
|
|
75
|
-
) external returns (PoolDeploymentAddrs memory) {
|
|
76
|
-
address SY = IPCommonSYFactory(syFactory).deploySY(ERC20_DEPLOY_ID, constructorParams, syOwner);
|
|
77
|
-
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function deployERC4626WithAdapterMarket(
|
|
81
|
-
bytes memory constructorParams,
|
|
82
|
-
bytes memory initData,
|
|
83
|
-
PoolConfig memory config,
|
|
84
|
-
address tokenToSeedLiqudity,
|
|
85
|
-
uint256 amountToSeed,
|
|
86
|
-
address syOwner
|
|
87
|
-
) external returns (PoolDeploymentAddrs memory) {
|
|
88
|
-
address SY = IPCommonSYFactory(syFactory)
|
|
89
|
-
.deployUpgradableSY(ERC4626_WITH_ADAPTER_ID, constructorParams, initData, syOwner);
|
|
90
|
-
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function deployERC4626NoRedeemWithAdapterMarket(
|
|
94
|
-
bytes memory constructorParams,
|
|
95
|
-
bytes memory initData,
|
|
96
|
-
PoolConfig memory config,
|
|
97
|
-
address tokenToSeedLiqudity,
|
|
98
|
-
uint256 amountToSeed,
|
|
99
|
-
address syOwner
|
|
100
|
-
) external returns (PoolDeploymentAddrs memory) {
|
|
101
|
-
address SY = IPCommonSYFactory(syFactory)
|
|
102
|
-
.deployUpgradableSY(ERC4626_NO_REDEEM_WITH_ADAPTER_ID, constructorParams, initData, syOwner);
|
|
103
|
-
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function deployERC20WithAdapterMarket(
|
|
35
|
+
function deployCommonMarketById(
|
|
36
|
+
bytes32 id,
|
|
107
37
|
bytes memory constructorParams,
|
|
108
38
|
bytes memory initData,
|
|
109
39
|
PoolConfig memory config,
|
|
@@ -111,8 +41,7 @@ contract PendleCommonPoolDeployHelperV2 is PendlePoolDeployHelperV2, BoringOwnab
|
|
|
111
41
|
uint256 amountToSeed,
|
|
112
42
|
address syOwner
|
|
113
43
|
) external returns (PoolDeploymentAddrs memory) {
|
|
114
|
-
address SY = IPCommonSYFactory(syFactory)
|
|
115
|
-
.deployUpgradableSY(ERC20_WITH_ADAPTER_ID, constructorParams, initData, syOwner);
|
|
44
|
+
address SY = IPCommonSYFactory(syFactory).deployUpgradableSY(id, constructorParams, initData, syOwner);
|
|
116
45
|
return deploy5115MarketAndSeedLiquidity(SY, config, tokenToSeedLiqudity, amountToSeed);
|
|
117
46
|
}
|
|
118
47
|
}
|
|
@@ -68,7 +68,10 @@ contract PendleCommonSYFactory is BoringOwnableUpgradeableV2 {
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
emit DeployedSY(id, constructorParams, SY);
|
|
71
|
-
|
|
71
|
+
|
|
72
|
+
if (IOwnable(SY).owner() != syOwner) {
|
|
73
|
+
IOwnable(SY).transferOwnership(syOwner, true, false);
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
function deployUpgradableSY(bytes32 id, bytes memory constructorParams, bytes memory initData, address syOwner)
|
|
@@ -94,7 +97,10 @@ contract PendleCommonSYFactory is BoringOwnableUpgradeableV2 {
|
|
|
94
97
|
|
|
95
98
|
emit DeployedSY(id, constructorParams, proxy);
|
|
96
99
|
|
|
97
|
-
IOwnable(proxy).
|
|
100
|
+
if (IOwnable(proxy).owner() != syOwner) {
|
|
101
|
+
IOwnable(proxy).transferOwnership(syOwner, true, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
98
104
|
return proxy;
|
|
99
105
|
}
|
|
100
106
|
}
|
|
@@ -21,6 +21,7 @@ abstract contract PTLooperBase is IPPTLooper, EIP712Upgradeable, BoringOwnableUp
|
|
|
21
21
|
address public proposer;
|
|
22
22
|
mapping(address owner => mapping(bytes32 requestHash => uint256 nonce)) public proposerNonce;
|
|
23
23
|
mapping(address owner => mapping(bytes32 boxId => UserRequestInfo)) internal _userRequest;
|
|
24
|
+
mapping(address owner => mapping(bytes32 requestHash => RequestStatus)) public requestStatus;
|
|
24
25
|
|
|
25
26
|
constructor(address treasury_, address positionBoxFactory_) {
|
|
26
27
|
TREASURY = treasury_;
|
|
@@ -182,6 +183,16 @@ abstract contract PTLooperBase is IPPTLooper, EIP712Upgradeable, BoringOwnableUp
|
|
|
182
183
|
);
|
|
183
184
|
}
|
|
184
185
|
|
|
186
|
+
function preApproveRequest(bytes32 requestHash, bytes memory proposerSig) external {
|
|
187
|
+
require(
|
|
188
|
+
SignatureChecker.isValidSignatureNow(proposer, requestHash, proposerSig),
|
|
189
|
+
"PTLooper: invalid proposer signature"
|
|
190
|
+
);
|
|
191
|
+
require(requestStatus[msg.sender][requestHash] == RequestStatus.DEFAULT, "PTLooper: invalid request status");
|
|
192
|
+
requestStatus[msg.sender][requestHash] = RequestStatus.PRE_APPROVED;
|
|
193
|
+
emit RequestPreApproved(msg.sender, requestHash);
|
|
194
|
+
}
|
|
195
|
+
|
|
185
196
|
/// @dev Per-iteration auth + implicit session init. First call for a slot
|
|
186
197
|
/// (`userReq.requestHash == 0`) opens the session — checks `boxId`/`sessionNonce` agree and
|
|
187
198
|
/// verifies the owner sig. Subsequent calls just match `userReq.requestHash`;
|
|
@@ -206,7 +217,8 @@ abstract contract PTLooperBase is IPPTLooper, EIP712Upgradeable, BoringOwnableUp
|
|
|
206
217
|
require(header.boxId == permit.boxId, "PTLooper: req/permit boxId mismatch");
|
|
207
218
|
require(header.sessionNonce == userReq.sessionNonce, "PTLooper: invalid session nonce");
|
|
208
219
|
require(
|
|
209
|
-
SignatureChecker.isValidSignatureNow(permit.owner, requestHash, ownerSigIfFirstCall)
|
|
220
|
+
SignatureChecker.isValidSignatureNow(permit.owner, requestHash, ownerSigIfFirstCall)
|
|
221
|
+
|| requestStatus[permit.owner][requestHash] == RequestStatus.PRE_APPROVED,
|
|
210
222
|
"PTLooper: invalid owner signature"
|
|
211
223
|
);
|
|
212
224
|
userReq.requestHash = requestHash;
|
|
@@ -112,15 +112,16 @@ library PTLooperEIP712TypesEncodeDataLib {
|
|
|
112
112
|
// IPPTLooper.sol > IPPTLooperEIP712Types > DecreasePositionRequest
|
|
113
113
|
function encodeData(IPPTLooperEIP712Types.DecreasePositionRequest memory data) internal pure returns (bytes32) {
|
|
114
114
|
/* bytes32 typeHash = keccak256(
|
|
115
|
-
"DecreasePositionRequest(RequestHeader header,uint256 minPtToDebtSwapRate,uint256 postWithdrawMaxLTV)"
|
|
115
|
+
"DecreasePositionRequest(RequestHeader header,uint256 minPtToDebtSwapRate,uint256 postWithdrawMaxLTV,bool redeemWithPY)"
|
|
116
116
|
"RequestHeader(bytes32 boxId,uint256 expiry,uint32 sessionNonce,uint32 permitNonceCap,uint256 swapBridgeSlippage,bytes offchainMetadata)"
|
|
117
117
|
); */
|
|
118
|
-
bytes32 typeHash =
|
|
118
|
+
bytes32 typeHash = 0xcef8ce2150dc900a3944ee876f241e8fdc5f7f7e3c93a83a807ca2f6df6dcef6;
|
|
119
119
|
return keccak256(abi.encode(
|
|
120
120
|
typeHash,
|
|
121
121
|
encodeData(data.header),
|
|
122
122
|
data.minPtToDebtSwapRate,
|
|
123
|
-
data.postWithdrawMaxLTV
|
|
123
|
+
data.postWithdrawMaxLTV,
|
|
124
|
+
data.redeemWithPY
|
|
124
125
|
));
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
pragma solidity ^0.8.30;
|
|
3
3
|
|
|
4
4
|
import {PMath} from "../core/libraries/math/PMath.sol";
|
|
5
|
+
import {ArrayLib} from "../core/libraries/ArrayLib.sol";
|
|
5
6
|
import {MarketCtx, createMarketCtx} from "../interfaces/IMoneyMarket.sol";
|
|
6
|
-
import {
|
|
7
|
+
import {BoxCall, BoxData, IPLoopPositionBox} from "../interfaces/IPLoopPositionBox.sol";
|
|
7
8
|
import {PTLooperBase} from "./PTLooperBase.sol";
|
|
8
9
|
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
|
9
10
|
import {IPPrincipalToken} from "../interfaces/IPPrincipalToken.sol";
|
|
@@ -47,7 +48,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
47
48
|
bytes memory proposerSig,
|
|
48
49
|
IncreasePositionRequest memory req,
|
|
49
50
|
bytes memory ownerSigIfFirstCall
|
|
50
|
-
) external
|
|
51
|
+
) external onlyExecutor {
|
|
51
52
|
(Session memory s, bytes32 requestHash) = _ensureSessionAndAuth(ms, req, proposerSig, ownerSigIfFirstCall);
|
|
52
53
|
|
|
53
54
|
uint256 preInBalance;
|
|
@@ -117,7 +118,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
117
118
|
bytes memory proposerSig,
|
|
118
119
|
DecreasePositionRequest memory req,
|
|
119
120
|
bytes memory ownerSigIfFirstCall
|
|
120
|
-
) external
|
|
121
|
+
) external onlyExecutor {
|
|
121
122
|
(Session memory s, bytes32 requestHash) = _ensureSessionAndAuth(ms, req, proposerSig, ownerSigIfFirstCall);
|
|
122
123
|
|
|
123
124
|
uint256 preDebtBal;
|
|
@@ -160,9 +161,9 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
160
161
|
Session memory s,
|
|
161
162
|
uint256 netPtToSwap
|
|
162
163
|
) internal returns (uint256 postDebtBal) {
|
|
163
|
-
(uint256 preFeeDebtBal,) =
|
|
164
|
-
s.box, s.bd.hubPt, netPtToSwap, s.bd.hubDebtToken, req.minPtToDebtSwapRate, ms.swap
|
|
165
|
-
|
|
164
|
+
(uint256 preFeeDebtBal,) = req.redeemWithPY
|
|
165
|
+
? _boxRedeemPYToToken(s.box, s.bd.hubPt, netPtToSwap, s.bd.hubDebtToken, req.minPtToDebtSwapRate, ms.swap)
|
|
166
|
+
: _boxSwapToken(s.box, s.bd.hubPt, netPtToSwap, s.bd.hubDebtToken, req.minPtToDebtSwapRate, ms.swap);
|
|
166
167
|
|
|
167
168
|
_boxWithdraw(s.box, TREASURY, s.bd.hubDebtToken, ms.fee);
|
|
168
169
|
postDebtBal = preFeeDebtBal - ms.fee;
|
|
@@ -179,7 +180,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
179
180
|
bytes memory proposerSig,
|
|
180
181
|
SwapBridgeWithdrawAllRequest memory req,
|
|
181
182
|
bytes memory ownerSigIfFirstCall
|
|
182
|
-
) external
|
|
183
|
+
) external onlyExecutor {
|
|
183
184
|
(Session memory s, bytes32 requestHash) = _ensureSessionAndAuth(ms, req, proposerSig, ownerSigIfFirstCall);
|
|
184
185
|
|
|
185
186
|
address tokenOutHere = _onHub(s.bd) ? req.hubTokenOut : req.dstTokenOut;
|
|
@@ -214,33 +215,80 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
214
215
|
uint256 minSwapRate,
|
|
215
216
|
BoxApprovedCall memory swap
|
|
216
217
|
) internal returns (uint256 postTokenOutBal, uint256 netSwappedOut) {
|
|
217
|
-
if (tokenIn == tokenOut)
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
if (tokenIn == tokenOut) return (tokenInBal, 0);
|
|
219
|
+
|
|
220
|
+
BoxCall memory call = tokenIn == NATIVE
|
|
221
|
+
? _toBoxCall(swap, new address[](0), new uint256[](0), tokenInBal)
|
|
222
|
+
: _toBoxCall(swap, ArrayLib.create(tokenIn), ArrayLib.create(tokenInBal), 0);
|
|
223
|
+
|
|
224
|
+
(postTokenOutBal, netSwappedOut) = _boxExecSwap(box, tokenInBal, tokenOut, minSwapRate, call);
|
|
220
225
|
|
|
226
|
+
if (netSwappedOut > 0) emit TokenSwapped(box, tokenIn, tokenInBal, tokenOut, netSwappedOut);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/// @dev PT -> `tokenOut`. The box's YT is approved
|
|
230
|
+
/// alongside PT (amount = min of the two) so the router can redeem PT + YT -> SY -> Token;
|
|
231
|
+
/// YT must be consumed 1:1 with PT. PT is never `tokenOut`, so no same-token short-circuit.
|
|
232
|
+
/// @param ptBal the box's `pt` whole balance (`_boxBal(box, pt)`) right **before** this function is
|
|
233
|
+
/// called — it is the minuend of the 1:1 check below, not just the approval size.
|
|
234
|
+
function _boxRedeemPYToToken(
|
|
235
|
+
IPLoopPositionBox box,
|
|
236
|
+
address pt,
|
|
237
|
+
uint256 ptBal,
|
|
238
|
+
address tokenOut,
|
|
239
|
+
uint256 minSwapRate,
|
|
240
|
+
BoxApprovedCall memory swap
|
|
241
|
+
) internal returns (uint256 postTokenOutBal, uint256 netSwappedOut) {
|
|
242
|
+
address yt = IPPrincipalToken(pt).YT();
|
|
243
|
+
uint256 ytBal = _boxBal(box, yt);
|
|
244
|
+
uint256 netPyIn = PMath.min(ytBal, ptBal);
|
|
245
|
+
|
|
246
|
+
BoxCall memory call = _toBoxCall(swap, ArrayLib.create(pt, yt), ArrayLib.create(netPyIn, netPyIn), 0);
|
|
247
|
+
(postTokenOutBal, netSwappedOut) = _boxExecSwap(box, netPyIn, tokenOut, minSwapRate, call);
|
|
248
|
+
|
|
249
|
+
// Underflow (router returned PT/YT to the box) is an intended revert.
|
|
250
|
+
require(ytBal - _boxBal(box, yt) == ptBal - _boxBal(box, pt), "PTLooper: PY redeem mismatch");
|
|
251
|
+
|
|
252
|
+
if (netSwappedOut > 0) emit PYRedeemed(box, pt, netPyIn, tokenOut, netSwappedOut);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/// @dev Shared body of `_boxSwapToken` / `_boxRedeemPYToToken`. No-op (returns the current
|
|
256
|
+
/// `tokenOut` balance) when `call.extRouter == address(0)`; `minSwapRate` is checked against
|
|
257
|
+
/// `netIn` only when a swap occurs. Emitting is left to the callers, which report different events.
|
|
258
|
+
function _boxExecSwap(
|
|
259
|
+
IPLoopPositionBox box,
|
|
260
|
+
uint256 netIn,
|
|
261
|
+
address tokenOut,
|
|
262
|
+
uint256 minSwapRate,
|
|
263
|
+
BoxCall memory call
|
|
264
|
+
) internal returns (uint256 postTokenOutBal, uint256 netSwappedOut) {
|
|
221
265
|
uint256 preTokenOutBal = _boxBal(box, tokenOut);
|
|
222
|
-
if (
|
|
223
|
-
return (preTokenOutBal, 0);
|
|
224
|
-
}
|
|
266
|
+
if (call.extRouter == address(0)) return (preTokenOutBal, 0);
|
|
225
267
|
|
|
226
|
-
box.approveAndCall(
|
|
227
|
-
ApprovedCall({ //
|
|
228
|
-
token: tokenIn,
|
|
229
|
-
amount: tokenInBal,
|
|
230
|
-
approveTo: swap.approve,
|
|
231
|
-
callTo: swap.extRouter,
|
|
232
|
-
data: swap.callData
|
|
233
|
-
}),
|
|
234
|
-
address(box)
|
|
235
|
-
);
|
|
268
|
+
box.approveAndCall(call, address(box));
|
|
236
269
|
postTokenOutBal = _boxBal(box, tokenOut);
|
|
237
270
|
netSwappedOut = postTokenOutBal - preTokenOutBal;
|
|
238
271
|
|
|
239
|
-
require(netSwappedOut * PMath.ONE >=
|
|
240
|
-
|
|
272
|
+
require(netSwappedOut * PMath.ONE >= netIn * minSwapRate, "PTLooper: swap below minSwapRate");
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
function _toBoxCall(
|
|
276
|
+
BoxApprovedCall memory swap,
|
|
277
|
+
address[] memory tokens,
|
|
278
|
+
uint256[] memory amounts,
|
|
279
|
+
uint256 nativeAmount
|
|
280
|
+
) internal pure returns (BoxCall memory) {
|
|
281
|
+
return BoxCall({
|
|
282
|
+
tokens: tokens,
|
|
283
|
+
amounts: amounts,
|
|
284
|
+
nativeAmount: nativeAmount,
|
|
285
|
+
approve: swap.approve,
|
|
286
|
+
extRouter: swap.extRouter,
|
|
287
|
+
callData: swap.callData
|
|
288
|
+
});
|
|
241
289
|
}
|
|
242
290
|
|
|
243
|
-
/// @
|
|
291
|
+
/// @dev Stub until cross-chain lands; callers gate on `_isCrossChain`.
|
|
244
292
|
function _boxBridgeToken(Session memory, BridgeData memory, address, uint256, address, uint256, bool)
|
|
245
293
|
internal
|
|
246
294
|
pure
|
|
@@ -274,7 +322,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
274
322
|
revert("PTLooper: unsupported chainid");
|
|
275
323
|
}
|
|
276
324
|
|
|
277
|
-
function
|
|
325
|
+
function _checkLTV(uint256 mmPtBal, uint256 mmDebtBal, uint256 mmOraclePtDebtRate, uint256 maxLTV) internal pure {
|
|
278
326
|
require(mmDebtBal <= mmPtBal.mulDown(mmOraclePtDebtRate).mulDown(maxLTV), "PTLooper: maxLTV exceeded");
|
|
279
327
|
}
|
|
280
328
|
|
|
@@ -285,7 +333,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
285
333
|
(uint256 netLent, uint256 mmPtBal) = s.spokeMM.lend(ctx, ptIn);
|
|
286
334
|
(uint256 netBorrowed, uint256 mmDebtBal) = s.spokeMM.borrow(ctx, debtOut);
|
|
287
335
|
uint256 rate = s.spokeMM.oraclePtDebtRate(ctx);
|
|
288
|
-
|
|
336
|
+
_checkLTV(mmPtBal, mmDebtBal, rate, req.postBorrowMaxLTV);
|
|
289
337
|
emit MoneyMarketLentThenBorrowed(s.box, netLent, netBorrowed);
|
|
290
338
|
}
|
|
291
339
|
|
|
@@ -296,7 +344,7 @@ contract PendlePTLooper is PTLooperBase {
|
|
|
296
344
|
(uint256 netRepaid, uint256 mmDebtBal) = s.spokeMM.repay(ctx, debtIn);
|
|
297
345
|
(uint256 netWithdrawn, uint256 mmPtBal) = s.spokeMM.withdraw(ctx, ptOut);
|
|
298
346
|
uint256 rate = s.spokeMM.oraclePtDebtRate(ctx);
|
|
299
|
-
|
|
347
|
+
_checkLTV(mmPtBal, mmDebtBal, rate, req.postWithdrawMaxLTV);
|
|
300
348
|
emit MoneyMarketRepaidThenWithdrawn(s.box, netRepaid, netWithdrawn);
|
|
301
349
|
}
|
|
302
350
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.30;
|
|
3
3
|
|
|
4
4
|
import {TokenHelper} from "../../core/libraries/TokenHelper.sol";
|
|
5
|
-
import {
|
|
5
|
+
import {BoxCall, IPLoopPositionBox} from "../../interfaces/IPLoopPositionBox.sol";
|
|
6
6
|
import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";
|
|
7
7
|
import {IERC20Metadata as IERC20} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
|
8
8
|
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
@@ -52,22 +52,33 @@ contract LoopPositionBox is IPLoopPositionBox, TokenHelper, Initializable {
|
|
|
52
52
|
_transferOut(token, to, amount);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function approveAndCall(
|
|
55
|
+
function approveAndCall(BoxCall memory call, address nativeRefund)
|
|
56
56
|
external
|
|
57
57
|
payable
|
|
58
58
|
onlyManager
|
|
59
59
|
returns (bytes memory result)
|
|
60
60
|
{
|
|
61
|
-
|
|
61
|
+
require(call.tokens.length == call.amounts.length, "LoopPositionBox: tokens/amounts length mismatch");
|
|
62
|
+
// `initialize` gave the spoke MM an infinite approval; the reset-to-zero below would wipe it.
|
|
63
|
+
require(
|
|
64
|
+
SPOKE_MONEY_MARKET == address(0) || call.approve != SPOKE_MONEY_MARKET,
|
|
65
|
+
"LoopPositionBox: approve cannot be spokeMM"
|
|
66
|
+
);
|
|
67
|
+
|
|
62
68
|
uint256 nativeFee = msg.value;
|
|
63
69
|
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
|
|
70
|
+
// `initialNativeBalance` is what the box ends with if the router keeps every wei we send it:
|
|
71
|
+
// pre-tx balance (current minus the msg.value fee) minus the box's own `nativeAmount`.
|
|
72
|
+
// Anything above that after the call is router surplus, refunded to `nativeRefund`.
|
|
73
|
+
uint256 initialNativeBalance = _selfBalance(NATIVE) - call.nativeAmount - nativeFee;
|
|
67
74
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
for (uint256 i = 0; i < call.tokens.length; ++i) {
|
|
76
|
+
IERC20(call.tokens[i]).forceApprove(call.approve, call.amounts[i]);
|
|
77
|
+
}
|
|
78
|
+
result = call.extRouter.functionCallWithValue(call.callData, call.nativeAmount + nativeFee);
|
|
79
|
+
for (uint256 i = 0; i < call.tokens.length; ++i) {
|
|
80
|
+
IERC20(call.tokens[i]).forceApprove(call.approve, 0);
|
|
81
|
+
}
|
|
71
82
|
|
|
72
83
|
uint256 finalNativeBalance = _selfBalance(NATIVE);
|
|
73
84
|
|
|
@@ -76,10 +87,5 @@ contract LoopPositionBox is IPLoopPositionBox, TokenHelper, Initializable {
|
|
|
76
87
|
}
|
|
77
88
|
}
|
|
78
89
|
|
|
79
|
-
function _approveForExtRouter(address token, address extRouter, uint256 amount) internal {
|
|
80
|
-
if (token == NATIVE || extRouter == SPOKE_MONEY_MARKET) return;
|
|
81
|
-
IERC20(token).forceApprove(extRouter, amount);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
90
|
receive() external payable {}
|
|
85
91
|
}
|
|
@@ -3,14 +3,10 @@ pragma solidity ^0.8.20;
|
|
|
3
3
|
|
|
4
4
|
/// @dev Encoding:
|
|
5
5
|
/// - first byte: to encode eModeCategoryId
|
|
6
|
-
/// - second byte, bit 0: isolationMode flag
|
|
7
6
|
/// @dev eModeCategoryId == 0 means no eMode
|
|
8
7
|
library AaveMMPayloadLib {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function unwrap(bytes32 payload) internal pure returns (uint8 eModeCategoryId, bool isolationMode) {
|
|
8
|
+
function unwrap(bytes32 payload) internal pure returns (uint8 eModeCategoryId) {
|
|
12
9
|
uint256 rawPayload = uint256(payload);
|
|
13
10
|
eModeCategoryId = uint8(rawPayload);
|
|
14
|
-
isolationMode = (rawPayload & ISOLATION_MODE_MASK) != 0;
|
|
15
11
|
}
|
|
16
12
|
}
|