@pendle/core-v2 0.21.0-testnet → 1.0.0-mainnet
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/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/FeeDistributor/EpochResultManager.sol/EpochResultManager.dbg.json +4 -0
- package/build/artifacts/contracts/{interfaces/IApeStaking.sol/IApeStaking.json → LiquidityMining/FeeDistributor/EpochResultManager.sol/EpochResultManager.json} +52 -70
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +310 -0
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol/PendleFeeDistributorFactory.json +389 -0
- 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/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSeller.sol/BulkSeller.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerFactory.sol/BulkSellerFactory.json +2 -2
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/BulkSeller/BulkSellerMathCore.sol/BulkSellerMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/OracleLib.sol/OracleLib.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarket.sol/PendleMarket.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleMarketFactory.sol/PendleMarketFactory.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/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithRewards.sol/SYBaseWithRewards.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol/PendleQiTokenHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendleYieldContractFactory.sol/PendleYieldContractFactory.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/PendleERC20Permit.sol/PendleERC20Permit.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/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeable.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/BoringOwnableUpgradeable.sol/BoringOwnableUpgradeableData.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 +5 -134
- package/build/artifacts/contracts/core/libraries/MiniHelpers.sol/MiniHelpers.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/TokenHelper.sol/TokenHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/ConvexCurve/IRewards.sol/IRewards.json +0 -18
- package/build/artifacts/contracts/interfaces/Curve/ICrvPool.sol/ICrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Curve/ITriCrvPool.sol/ITriCrvPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IBoringOwnableUpgradeable.sol/IBoringOwnableUpgradeable.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/IPActionAddRemoveLiq.sol/IPActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMintRedeem.sol/IPActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPT.sol/IPActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTYT.sol/IPActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYT.sol/IPActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllAction.sol/IPAllAction.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSeller.sol/IPBulkSeller.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPBulkSellerFactory.sol/IPBulkSellerFactory.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPFeeDistributor.sol/IPFeeDistributor.json +32 -43
- package/build/artifacts/contracts/interfaces/IPFeeDistributorFactory.sol/IPFeeDistributorFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/{Balancer/IGauge.sol/IGauge.json → IPFeeDistributorFactory.sol/IPFeeDistributorFactory.json} +33 -18
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.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/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/IREDACTEDStaking.sol/IREDACTEDStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStETH.sol/IStETH.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateLPStaking.sol/IStargateLPStaking.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargatePool.sol/IStargatePool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IStargateRouter.sol/IStargateRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IWXBTRFLY.sol/IWXBTRFLY.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol/BaseSplitCodeFactoryContract.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BulkSellerOffchain.sol/BulkSellerOffchain.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketMathStatic.sol/MarketMathStatic.json +2 -42
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/RouterStatic.sol/RouterStatic.json +98 -171
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiq.sol/ActionAddRemoveLiq.json +2 -2
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallback.sol/ActionCallback.json +2 -2
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMintRedeem.sol/ActionMintRedeem.json +2 -2
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMisc.sol/ActionMisc.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPT.sol/ActionSwapPT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTYT.sol/ActionSwapPTYT.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYT.sol/ActionSwapYT.json +2 -2
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouter.sol/PendleRouter.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBaseMintRedeem.sol/ActionBaseMintRedeem.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/AggregationRouterHelper.sol/AggregationRouterHelper.json +2 -2
- package/build/artifacts/contracts/router/kyberswap/IAggregatorRouterHelper.sol/IAggregationRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouter.sol/IMultihopRouter.dbg.json +4 -0
- package/build/artifacts/contracts/router/kyberswap/IMultihopRouter.sol/IMultihopRouter.json +136 -0
- package/build/artifacts/contracts/router/kyberswap/KyberSwapHelper.sol/KyberSwapHelper.dbg.json +1 -1
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +9 -7
- package/contracts/LiquidityMining/FeeDistributor/EpochResultManager.sol +159 -0
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributor.sol +99 -0
- package/contracts/LiquidityMining/FeeDistributor/PendleFeeDistributorFactory.sol +70 -0
- package/contracts/core/BulkSeller/BulkSeller.sol +1 -1
- package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +3 -1
- package/contracts/core/libraries/ArrayLib.sol +0 -12
- package/contracts/core/libraries/Errors.sol +2 -15
- package/contracts/interfaces/ConvexCurve/IRewards.sol +0 -5
- package/contracts/interfaces/IPFeeDistributor.sol +10 -12
- package/contracts/interfaces/IPFeeDistributorFactory.sol +14 -0
- package/contracts/offchain-helpers/MarketMathStatic.sol +88 -181
- package/contracts/offchain-helpers/RouterStatic.sol +72 -72
- package/contracts/router/kyberswap/AggregationRouterHelper.sol +192 -194
- package/contracts/router/kyberswap/IMultihopRouter.sol +139 -0
- package/deployments/1-core.json +29 -0
- package/deployments/1-markets/FRAXUSDC-CURVELP-MARCH30.json +11 -0
- package/deployments/1-markets/LOOKS-STAKING-MARCH30.json +10 -0
- package/deployments/1-markets/STETH-JUNE29.json +10 -0
- package/deployments/1-markets/STETH-MARCH30.json +10 -0
- package/package.json +6 -6
- package/typechain-types/IPFeeDistributor.ts +78 -61
- package/typechain-types/IPFeeDistributorFactory.ts +139 -53
- package/typechain-types/IRewards.ts +5 -35
- package/typechain-types/MarketMathStatic.ts +0 -49
- package/typechain-types/PendleFeeDistributor.ts +117 -409
- package/typechain-types/RouterStatic.ts +69 -40
- package/typechain-types/factories/ActionAddRemoveLiq__factory.ts +1 -1
- package/typechain-types/factories/ActionCallback__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeem__factory.ts +1 -1
- package/typechain-types/factories/ActionMisc__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTYT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPT__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYT__factory.ts +1 -1
- package/typechain-types/factories/AggregationRouterHelper__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerFactory__factory.ts +1 -1
- package/typechain-types/factories/BulkSellerOffchain__factory.ts +1 -1
- package/typechain-types/factories/BulkSeller__factory.ts +1 -1
- package/typechain-types/factories/Errors__factory.ts +4 -133
- package/typechain-types/factories/IPFeeDistributorFactory__factory.ts +34 -25
- package/typechain-types/factories/IPFeeDistributor__factory.ts +31 -42
- package/typechain-types/factories/IRewards__factory.ts +0 -18
- package/typechain-types/factories/MarketMathStatic__factory.ts +1 -41
- package/typechain-types/factories/OracleLib__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveFraxUsdcSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCurveUsdd3CrvSY__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributorFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +66 -341
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__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/PendlePrincipalToken__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/RouterStatic__factory.ts +41 -118
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +40 -301
- package/typechain-types/index.ts +10 -68
- package/README.md +0 -28
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +0 -592
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/StEthHelper.sol/StEthHelper.json +0 -10
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +0 -1075
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol/PendleAura3EthSY.json +0 -1257
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol/PendleAuraCbethWstethSY.json +0 -1244
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol/PendleAuraWethRethSY.json +0 -1218
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol/PendleAuraWethWstethSY.json +0 -1192
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol/ComposableStableMath.json +0 -10
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol/ComposableStablePreview.json +0 -133
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol/FixedPoint.json +0 -10
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol/MetaStableMath.json +0 -40
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol/MetaStablePreview.json +0 -322
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol/PendleAuraBalancerStableLPSY.json +0 -1171
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol/StablePoolUserData.json +0 -10
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol/StablePreviewBase.json +0 -133
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IAsset.sol/IAsset.json +0 -10
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerFees.sol/IBalancerFees.json +0 -24
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IBalancerStablePreview.sol/IBalancerStablePreview.json +0 -133
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IBasePool.sol/IBasePool.json +0 -328
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IComposableStable.sol/IComposableStable.json +0 -467
- package/build/artifacts/contracts/interfaces/Balancer/IGauge.sol/IGauge.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol/ILiquidityGaugeFactory.json +0 -30
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IMetaStablePool.sol/IMetaStablePool.json +0 -398
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IRateProvider.sol/IRateProvider.json +0 -24
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Balancer/IVault.sol/IVault.json +0 -278
- package/build/artifacts/contracts/interfaces/IApeStaking.sol/IApeStaking.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/Multicall2.sol/Multicall2.json +0 -322
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.dbg.json +0 -4
- package/build/artifacts/contracts/offchain-helpers/PendleMulticall.sol/PendleMulticall.json +0 -47
- package/build/artifacts/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol/ScaleDataHelperEthereum1.json +0 -10
- package/build/artifacts/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol/IAggregationExecutor.json +0 -65
- package/build/artifacts/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol/IExecutorHelperEthereum1.json +0 -388
- package/build/artifacts/contracts/router/kyberswap/interfaces/IHashflow.sol/IHashflow.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/interfaces/IHashflow.sol/IHashflow.json +0 -101
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol/IMetaAggregationRouter.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol/IMetaAggregationRouter.json +0 -183
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.dbg.json +0 -4
- package/build/artifacts/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol/IMetaAggregationRouterV2.json +0 -215
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +0 -224
- package/contracts/core/StandardizedYield/StEthHelper.sol +0 -71
- package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +0 -197
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAura3EthSY.sol +0 -170
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraCbethWstethSY.sol +0 -162
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRethSY.sol +0 -134
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSY.sol +0 -154
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +0 -289
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreview.sol +0 -618
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/FixedPoint.sol +0 -68
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +0 -322
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +0 -390
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSY.sol +0 -329
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +0 -30
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +0 -189
- package/contracts/interfaces/Balancer/IAsset.sol +0 -4
- package/contracts/interfaces/Balancer/IBalancerFees.sol +0 -6
- package/contracts/interfaces/Balancer/IBalancerStablePreview.sol +0 -22
- package/contracts/interfaces/Balancer/IBasePool.sol +0 -30
- package/contracts/interfaces/Balancer/IComposableStable.sol +0 -39
- package/contracts/interfaces/Balancer/IGauge.sol +0 -10
- package/contracts/interfaces/Balancer/ILiquidityGaugeFactory.sol +0 -6
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +0 -31
- package/contracts/interfaces/Balancer/IRateProvider.sol +0 -6
- package/contracts/interfaces/Balancer/IVault.sol +0 -78
- package/contracts/interfaces/IApeStaking.sol +0 -30
- package/contracts/offchain-helpers/Multicall2.sol +0 -103
- package/contracts/offchain-helpers/PendleMulticall.sol +0 -26
- package/contracts/router/kyberswap/ScaleDataHelperEthereum1.sol +0 -147
- package/contracts/router/kyberswap/interfaces/IAggregationExecutor.sol +0 -17
- package/contracts/router/kyberswap/interfaces/IExecutorHelperEthereum1.sol +0 -191
- package/contracts/router/kyberswap/interfaces/IHashflow.sol +0 -30
- package/contracts/router/kyberswap/interfaces/IMetaAggregationRouter.sol +0 -33
- package/contracts/router/kyberswap/interfaces/IMetaAggregationRouterV2.sol +0 -42
- package/deployments/43113-core.json +0 -29
- package/deployments/43113-helper.json +0 -4
- package/deployments/43113-markets/APE-30-MARCH.json +0 -10
- package/deployments/43113-markets/USDC-FEB-2ND.json +0 -10
- package/deployments/43113-markets/USDC-FEB-4TH.json +0 -10
- package/deployments/43113-markets/WETH-FEB-2ND.json +0 -11
- package/deployments/43113-markets/WETH-FEB-4TH.json +0 -11
- package/deployments/43113-testenv.json +0 -22
- package/deployments/80001-core.json +0 -28
- package/deployments/80001-helper.json +0 -4
- package/deployments/80001-markets/USDC-DEC-8TH.json +0 -10
- package/deployments/80001-markets/USDC-FEB-4TH.json +0 -10
- package/deployments/80001-markets/WETH-FEB-4TH.json +0 -11
- package/deployments/80001-testenv.json +0 -22
- package/typechain-types/BribeDistributor.ts +0 -363
- package/typechain-types/ComposableStablePreview.ts +0 -217
- package/typechain-types/DistributorBase.ts +0 -363
- package/typechain-types/FeeDistributor.ts +0 -416
- package/typechain-types/GMXPreviewHelper.ts +0 -134
- package/typechain-types/I1inchAggregationRouterV5.ts +0 -257
- package/typechain-types/IAggregationExecutor.ts +0 -182
- package/typechain-types/IApeStaking.ts +0 -305
- package/typechain-types/IBalancerFees.ts +0 -89
- package/typechain-types/IBalancerStablePreview.ts +0 -217
- package/typechain-types/IBasePool.ts +0 -482
- package/typechain-types/IComposableStable.ts +0 -730
- package/typechain-types/IExecutorHelperEthereum1.ts +0 -643
- package/typechain-types/IGMXVault.ts +0 -494
- package/typechain-types/IGauge.ts +0 -160
- package/typechain-types/IGlpManager.ts +0 -115
- package/typechain-types/IHashflow.ts +0 -159
- package/typechain-types/IKyberSwapAggregationRouterHelper.ts +0 -109
- package/typechain-types/ILiquidityGaugeFactory.ts +0 -99
- package/typechain-types/IMetaAggregationRouter.ts +0 -213
- package/typechain-types/IMetaAggregationRouterV2.ts +0 -221
- package/typechain-types/IMetaStablePool.ts +0 -619
- package/typechain-types/IMultihopRouterEthereum.ts +0 -209
- package/typechain-types/IPYieldTokenV2.ts +0 -915
- package/typechain-types/IRateProvider.ts +0 -81
- package/typechain-types/IRewardRouterV2.ts +0 -303
- package/typechain-types/ISwapAggregator.ts +0 -124
- package/typechain-types/IVault.ts +0 -410
- package/typechain-types/IVaultPriceFeed.ts +0 -114
- package/typechain-types/InterestManagerYTV2.ts +0 -124
- package/typechain-types/MetaStableMath.ts +0 -113
- package/typechain-types/MetaStablePreview.ts +0 -501
- package/typechain-types/Multicall2.ts +0 -437
- package/typechain-types/PendleApeStakingSY.ts +0 -1135
- package/typechain-types/PendleAura3EthSY.ts +0 -1600
- package/typechain-types/PendleAuraBalancerStableLPSY.ts +0 -1523
- package/typechain-types/PendleAuraCbethWstethSY.ts +0 -1587
- package/typechain-types/PendleAuraWethRethSY.ts +0 -1549
- package/typechain-types/PendleAuraWethWstethSY.ts +0 -1523
- package/typechain-types/PendleGlpSY.ts +0 -1449
- package/typechain-types/PendleMulticall.ts +0 -110
- package/typechain-types/PendlePrincipalTokenV2.ts +0 -614
- package/typechain-types/PendleYieldContractFactoryV2.ts +0 -801
- package/typechain-types/PendleYieldTokenV2.ts +0 -1304
- package/typechain-types/SAPE.ts +0 -1395
- package/typechain-types/SYBaseAutoCompound.ts +0 -1203
- package/typechain-types/StEthHelper.ts +0 -107
- package/typechain-types/StablePreviewBase.ts +0 -217
- package/typechain-types/SwapAggregator.ts +0 -406
- package/typechain-types/factories/BribeDistributor__factory.ts +0 -303
- package/typechain-types/factories/ComposableStablePreview__factory.ts +0 -190
- package/typechain-types/factories/DistributorBase__factory.ts +0 -249
- package/typechain-types/factories/FeeDistributor__factory.ts +0 -339
- package/typechain-types/factories/GMXPreviewHelper__factory.ts +0 -78
- package/typechain-types/factories/I1inchAggregationRouterV5__factory.ts +0 -179
- package/typechain-types/factories/IAggregationExecutor__factory.ts +0 -84
- package/typechain-types/factories/IApeStaking__factory.ts +0 -161
- package/typechain-types/factories/IBalancerFees__factory.ts +0 -36
- package/typechain-types/factories/IBalancerStablePreview__factory.ts +0 -152
- package/typechain-types/factories/IBasePool__factory.ts +0 -340
- package/typechain-types/factories/IComposableStable__factory.ts +0 -482
- package/typechain-types/factories/IExecutorHelperEthereum1__factory.ts +0 -407
- package/typechain-types/factories/IGMXVault__factory.ts +0 -320
- package/typechain-types/factories/IGauge__factory.ts +0 -70
- package/typechain-types/factories/IGlpManager__factory.ts +0 -55
- package/typechain-types/factories/IHashflow__factory.ts +0 -113
- package/typechain-types/factories/IKyberSwapAggregationRouterHelper__factory.ts +0 -56
- package/typechain-types/factories/ILiquidityGaugeFactory__factory.ts +0 -49
- package/typechain-types/factories/IMetaAggregationRouterV2__factory.ts +0 -234
- package/typechain-types/factories/IMetaAggregationRouter__factory.ts +0 -202
- package/typechain-types/factories/IMetaStablePool__factory.ts +0 -413
- package/typechain-types/factories/IMultihopRouterEthereum__factory.ts +0 -155
- package/typechain-types/factories/IPYieldTokenV2__factory.ts +0 -702
- package/typechain-types/factories/IRateProvider__factory.ts +0 -36
- package/typechain-types/factories/IRewardRouterV2__factory.ts +0 -180
- package/typechain-types/factories/ISwapAggregator__factory.ts +0 -66
- package/typechain-types/factories/IVaultPriceFeed__factory.ts +0 -60
- package/typechain-types/factories/IVault__factory.ts +0 -287
- package/typechain-types/factories/InterestManagerYTV2__factory.ts +0 -63
- package/typechain-types/factories/MetaStableMath__factory.ts +0 -93
- package/typechain-types/factories/MetaStablePreview__factory.ts +0 -375
- package/typechain-types/factories/Multicall2__factory.ts +0 -372
- package/typechain-types/factories/PendleApeStakingSY__factory.ts +0 -981
- package/typechain-types/factories/PendleAura3EthSY__factory.ts +0 -1326
- package/typechain-types/factories/PendleAuraBalancerStableLPSY__factory.ts +0 -1190
- package/typechain-types/factories/PendleAuraCbethWstethSY__factory.ts +0 -1317
- package/typechain-types/factories/PendleAuraWethRethSY__factory.ts +0 -1291
- package/typechain-types/factories/PendleAuraWethWstethSY__factory.ts +0 -1265
- package/typechain-types/factories/PendleGlpSY__factory.ts +0 -1255
- package/typechain-types/factories/PendleMulticall__factory.ts +0 -100
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +0 -564
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +0 -674
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +0 -1122
- package/typechain-types/factories/SAPE__factory.ts +0 -1142
- package/typechain-types/factories/SYBaseAutoCompound__factory.ts +0 -942
- package/typechain-types/factories/StEthHelper__factory.ts +0 -62
- package/typechain-types/factories/StablePreviewBase__factory.ts +0 -148
- package/typechain-types/factories/SwapAggregator__factory.ts +0 -309
|
@@ -14,10 +14,9 @@ import "../LiquidityMining/libraries/VeBalanceLib.sol";
|
|
|
14
14
|
|
|
15
15
|
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
16
16
|
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
17
|
-
import "@openzeppelin/contracts/proxy/Proxy.sol";
|
|
18
17
|
|
|
19
18
|
/// EXCLUDED FROM ALL AUDITS, TO BE CALLED ONLY BY PENDLE's SDK
|
|
20
|
-
contract RouterStatic is Initializable,
|
|
19
|
+
contract RouterStatic is Initializable, BoringOwnableUpgradeable, UUPSUpgradeable {
|
|
21
20
|
using Math for uint256;
|
|
22
21
|
using VeBalanceLib for VeBalance;
|
|
23
22
|
using VeBalanceLib for LockedPosition;
|
|
@@ -63,31 +62,34 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
63
62
|
IPMarketFactory internal immutable marketFactory;
|
|
64
63
|
IPVotingEscrowMainchain internal immutable vePENDLE;
|
|
65
64
|
IPBulkSellerFactory internal immutable bulkFactory;
|
|
66
|
-
address internal immutable marketMathStaticLib;
|
|
67
65
|
|
|
68
66
|
constructor(
|
|
69
67
|
IPYieldContractFactory _yieldContractFactory,
|
|
70
68
|
IPMarketFactory _marketFactory,
|
|
71
69
|
IPVotingEscrowMainchain _vePENDLE,
|
|
72
|
-
IPBulkSellerFactory _bulkFactory
|
|
73
|
-
address _marketMathStaticLib
|
|
70
|
+
IPBulkSellerFactory _bulkFactory
|
|
74
71
|
) initializer {
|
|
75
72
|
yieldContractFactory = _yieldContractFactory;
|
|
76
73
|
marketFactory = _marketFactory;
|
|
77
74
|
vePENDLE = _vePENDLE;
|
|
78
75
|
bulkFactory = _bulkFactory;
|
|
79
|
-
marketMathStaticLib = _marketMathStaticLib;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// all Market-related functions will go to MarketMathStaticLib
|
|
83
|
-
function _implementation() internal view override returns (address) {
|
|
84
|
-
return marketMathStaticLib;
|
|
85
76
|
}
|
|
86
77
|
|
|
87
78
|
function initialize() external initializer {
|
|
88
79
|
__BoringOwnable_init();
|
|
89
80
|
}
|
|
90
81
|
|
|
82
|
+
function getDefaultApproxParams() public pure returns (ApproxParams memory) {
|
|
83
|
+
return
|
|
84
|
+
ApproxParams({
|
|
85
|
+
guessMin: 0,
|
|
86
|
+
guessMax: type(uint256).max,
|
|
87
|
+
guessOffchain: 0,
|
|
88
|
+
maxIteration: 256,
|
|
89
|
+
eps: 1e14
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
91
93
|
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
|
|
92
94
|
|
|
93
95
|
// ============= SYSTEM INFO =============
|
|
@@ -156,7 +158,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
156
158
|
sy = address(SY);
|
|
157
159
|
state = _market.readState(address(this));
|
|
158
160
|
impliedYield = getPtImpliedYield(market);
|
|
159
|
-
exchangeRate = MarketMathStatic.
|
|
161
|
+
exchangeRate = MarketMathStatic.getExchangeRate(market);
|
|
160
162
|
}
|
|
161
163
|
|
|
162
164
|
// ============= USER INFO =============
|
|
@@ -323,11 +325,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
323
325
|
uint256 netLpOut,
|
|
324
326
|
uint256 netPtToSwap,
|
|
325
327
|
uint256 netSyFee,
|
|
326
|
-
uint256 priceImpact
|
|
327
|
-
uint256 exchangeRateAfter
|
|
328
|
+
uint256 priceImpact
|
|
328
329
|
)
|
|
329
330
|
{
|
|
330
|
-
return
|
|
331
|
+
return
|
|
332
|
+
MarketMathStatic.addLiquiditySinglePtStatic(market, netPtIn, getDefaultApproxParams());
|
|
331
333
|
}
|
|
332
334
|
|
|
333
335
|
function addLiquiditySingleSyStatic(address market, uint256 netSyIn)
|
|
@@ -336,11 +338,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
336
338
|
uint256 netLpOut,
|
|
337
339
|
uint256 netPtFromSwap,
|
|
338
340
|
uint256 netSyFee,
|
|
339
|
-
uint256 priceImpact
|
|
340
|
-
uint256 exchangeRateAfter
|
|
341
|
+
uint256 priceImpact
|
|
341
342
|
)
|
|
342
343
|
{
|
|
343
|
-
return
|
|
344
|
+
return
|
|
345
|
+
MarketMathStatic.addLiquiditySingleSyStatic(market, netSyIn, getDefaultApproxParams());
|
|
344
346
|
}
|
|
345
347
|
|
|
346
348
|
function addLiquiditySingleBaseTokenStatic(
|
|
@@ -354,8 +356,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
354
356
|
uint256 netLpOut,
|
|
355
357
|
uint256 netPtFromSwap,
|
|
356
358
|
uint256 netSyFee,
|
|
357
|
-
uint256 priceImpact
|
|
358
|
-
uint256 exchangeRateAfter
|
|
359
|
+
uint256 priceImpact
|
|
359
360
|
)
|
|
360
361
|
{
|
|
361
362
|
uint256 netSyIn = previewDepositStatic(
|
|
@@ -365,7 +366,8 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
365
366
|
bulk
|
|
366
367
|
);
|
|
367
368
|
|
|
368
|
-
return
|
|
369
|
+
return
|
|
370
|
+
MarketMathStatic.addLiquiditySingleSyStatic(market, netSyIn, getDefaultApproxParams());
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
function removeLiquidityDualSyAndPtStatic(address market, uint256 netLpToRemove)
|
|
@@ -398,11 +400,15 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
398
400
|
uint256 netPtOut,
|
|
399
401
|
uint256 netPtFromSwap,
|
|
400
402
|
uint256 netSyFee,
|
|
401
|
-
uint256 priceImpact
|
|
402
|
-
uint256 exchangeRateAfter
|
|
403
|
+
uint256 priceImpact
|
|
403
404
|
)
|
|
404
405
|
{
|
|
405
|
-
return
|
|
406
|
+
return
|
|
407
|
+
MarketMathStatic.removeLiquiditySinglePtStatic(
|
|
408
|
+
market,
|
|
409
|
+
netLpToRemove,
|
|
410
|
+
getDefaultApproxParams()
|
|
411
|
+
);
|
|
406
412
|
}
|
|
407
413
|
|
|
408
414
|
function removeLiquiditySingleSyStatic(address market, uint256 netLpToRemove)
|
|
@@ -410,8 +416,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
410
416
|
returns (
|
|
411
417
|
uint256 netSyOut,
|
|
412
418
|
uint256 netSyFee,
|
|
413
|
-
uint256 priceImpact
|
|
414
|
-
uint256 exchangeRateAfter
|
|
419
|
+
uint256 priceImpact
|
|
415
420
|
)
|
|
416
421
|
{
|
|
417
422
|
return MarketMathStatic.removeLiquiditySingleSyStatic(market, netLpToRemove);
|
|
@@ -427,14 +432,15 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
427
432
|
returns (
|
|
428
433
|
uint256 netBaseTokenOut,
|
|
429
434
|
uint256 netSyFee,
|
|
430
|
-
uint256 priceImpact
|
|
431
|
-
uint256 exchangeRateAfter
|
|
435
|
+
uint256 priceImpact
|
|
432
436
|
)
|
|
433
437
|
{
|
|
434
438
|
uint256 netSyOut;
|
|
435
439
|
|
|
436
|
-
(netSyOut, netSyFee, priceImpact
|
|
437
|
-
|
|
440
|
+
(netSyOut, netSyFee, priceImpact) = MarketMathStatic.removeLiquiditySingleSyStatic(
|
|
441
|
+
market,
|
|
442
|
+
netLpToRemove
|
|
443
|
+
);
|
|
438
444
|
|
|
439
445
|
netBaseTokenOut = previewRedeemStatic(getSyMarket(market), baseToken, netSyOut, bulk);
|
|
440
446
|
}
|
|
@@ -444,8 +450,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
444
450
|
returns (
|
|
445
451
|
uint256 netSyOut,
|
|
446
452
|
uint256 netSyFee,
|
|
447
|
-
uint256 priceImpact
|
|
448
|
-
uint256 exchangeRateAfter
|
|
453
|
+
uint256 priceImpact
|
|
449
454
|
)
|
|
450
455
|
{
|
|
451
456
|
return MarketMathStatic.swapExactPtForSyStatic(market, exactPtIn);
|
|
@@ -456,8 +461,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
456
461
|
returns (
|
|
457
462
|
uint256 netSyIn,
|
|
458
463
|
uint256 netSyFee,
|
|
459
|
-
uint256 priceImpact
|
|
460
|
-
uint256 exchangeRateAfter
|
|
464
|
+
uint256 priceImpact
|
|
461
465
|
)
|
|
462
466
|
{
|
|
463
467
|
return MarketMathStatic.swapSyForExactPtStatic(market, exactPtOut);
|
|
@@ -468,11 +472,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
468
472
|
returns (
|
|
469
473
|
uint256 netPtOut,
|
|
470
474
|
uint256 netSyFee,
|
|
471
|
-
uint256 priceImpact
|
|
472
|
-
uint256 exchangeRateAfter
|
|
475
|
+
uint256 priceImpact
|
|
473
476
|
)
|
|
474
477
|
{
|
|
475
|
-
return
|
|
478
|
+
return
|
|
479
|
+
MarketMathStatic.swapExactSyForPtStatic(market, exactSyIn, getDefaultApproxParams());
|
|
476
480
|
}
|
|
477
481
|
|
|
478
482
|
function swapPtForExactSyStatic(address market, uint256 exactSyOut)
|
|
@@ -480,11 +484,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
480
484
|
returns (
|
|
481
485
|
uint256 netPtIn,
|
|
482
486
|
uint256 netSyFee,
|
|
483
|
-
uint256 priceImpact
|
|
484
|
-
uint256 exchangeRateAfter
|
|
487
|
+
uint256 priceImpact
|
|
485
488
|
)
|
|
486
489
|
{
|
|
487
|
-
return
|
|
490
|
+
return
|
|
491
|
+
MarketMathStatic.swapPtForExactSyStatic(market, exactSyOut, getDefaultApproxParams());
|
|
488
492
|
}
|
|
489
493
|
|
|
490
494
|
function swapExactBaseTokenForPtStatic(
|
|
@@ -497,8 +501,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
497
501
|
returns (
|
|
498
502
|
uint256 netPtOut,
|
|
499
503
|
uint256 netSyFee,
|
|
500
|
-
uint256 priceImpact
|
|
501
|
-
uint256 exchangeRateAfter
|
|
504
|
+
uint256 priceImpact
|
|
502
505
|
)
|
|
503
506
|
{
|
|
504
507
|
uint256 netSyIn = previewDepositStatic(
|
|
@@ -507,7 +510,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
507
510
|
amountBaseToken,
|
|
508
511
|
bulk
|
|
509
512
|
);
|
|
510
|
-
return MarketMathStatic.swapExactSyForPtStatic(market, netSyIn);
|
|
513
|
+
return MarketMathStatic.swapExactSyForPtStatic(market, netSyIn, getDefaultApproxParams());
|
|
511
514
|
}
|
|
512
515
|
|
|
513
516
|
function swapExactPtForBaseTokenStatic(
|
|
@@ -520,13 +523,14 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
520
523
|
returns (
|
|
521
524
|
uint256 netBaseTokenOut,
|
|
522
525
|
uint256 netSyFee,
|
|
523
|
-
uint256 priceImpact
|
|
524
|
-
uint256 exchangeRateAfter
|
|
526
|
+
uint256 priceImpact
|
|
525
527
|
)
|
|
526
528
|
{
|
|
527
529
|
uint256 netSyOut;
|
|
528
|
-
(netSyOut, netSyFee, priceImpact
|
|
529
|
-
|
|
530
|
+
(netSyOut, netSyFee, priceImpact) = MarketMathStatic.swapExactPtForSyStatic(
|
|
531
|
+
market,
|
|
532
|
+
exactPtIn
|
|
533
|
+
);
|
|
530
534
|
|
|
531
535
|
netBaseTokenOut = previewRedeemStatic(getSyMarket(market), baseToken, netSyOut, bulk);
|
|
532
536
|
}
|
|
@@ -536,8 +540,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
536
540
|
returns (
|
|
537
541
|
uint256 netSyIn,
|
|
538
542
|
uint256 netSyFee,
|
|
539
|
-
uint256 priceImpact
|
|
540
|
-
uint256 exchangeRateAfter
|
|
543
|
+
uint256 priceImpact
|
|
541
544
|
)
|
|
542
545
|
{
|
|
543
546
|
return MarketMathStatic.swapSyForExactYtStatic(market, exactYtOut);
|
|
@@ -548,11 +551,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
548
551
|
returns (
|
|
549
552
|
uint256 netYtOut,
|
|
550
553
|
uint256 netSyFee,
|
|
551
|
-
uint256 priceImpact
|
|
552
|
-
uint256 exchangeRateAfter
|
|
554
|
+
uint256 priceImpact
|
|
553
555
|
)
|
|
554
556
|
{
|
|
555
|
-
return
|
|
557
|
+
return
|
|
558
|
+
MarketMathStatic.swapExactSyForYtStatic(market, exactSyIn, getDefaultApproxParams());
|
|
556
559
|
}
|
|
557
560
|
|
|
558
561
|
function swapExactYtForSyStatic(address market, uint256 exactYtIn)
|
|
@@ -560,8 +563,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
560
563
|
returns (
|
|
561
564
|
uint256 netSyOut,
|
|
562
565
|
uint256 netSyFee,
|
|
563
|
-
uint256 priceImpact
|
|
564
|
-
uint256 exchangeRateAfter
|
|
566
|
+
uint256 priceImpact
|
|
565
567
|
)
|
|
566
568
|
{
|
|
567
569
|
return MarketMathStatic.swapExactYtForSyStatic(market, exactYtIn);
|
|
@@ -572,11 +574,11 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
572
574
|
returns (
|
|
573
575
|
uint256 netYtIn,
|
|
574
576
|
uint256 netSyFee,
|
|
575
|
-
uint256 priceImpact
|
|
576
|
-
uint256 exchangeRateAfter
|
|
577
|
+
uint256 priceImpact
|
|
577
578
|
)
|
|
578
579
|
{
|
|
579
|
-
return
|
|
580
|
+
return
|
|
581
|
+
MarketMathStatic.swapYtForExactSyStatic(market, exactSyOut, getDefaultApproxParams());
|
|
580
582
|
}
|
|
581
583
|
|
|
582
584
|
function swapExactYtForBaseTokenStatic(
|
|
@@ -589,13 +591,14 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
589
591
|
returns (
|
|
590
592
|
uint256 netBaseTokenOut,
|
|
591
593
|
uint256 netSyFee,
|
|
592
|
-
uint256 priceImpact
|
|
593
|
-
uint256 exchangeRateAfter
|
|
594
|
+
uint256 priceImpact
|
|
594
595
|
)
|
|
595
596
|
{
|
|
596
597
|
uint256 netSyOut;
|
|
597
|
-
(netSyOut, netSyFee, priceImpact
|
|
598
|
-
|
|
598
|
+
(netSyOut, netSyFee, priceImpact) = MarketMathStatic.swapExactYtForSyStatic(
|
|
599
|
+
market,
|
|
600
|
+
exactYtIn
|
|
601
|
+
);
|
|
599
602
|
|
|
600
603
|
netBaseTokenOut = previewRedeemStatic(getSyMarket(market), baseToken, netSyOut, bulk);
|
|
601
604
|
}
|
|
@@ -610,8 +613,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
610
613
|
returns (
|
|
611
614
|
uint256 netYtOut,
|
|
612
615
|
uint256 netSyFee,
|
|
613
|
-
uint256 priceImpact
|
|
614
|
-
uint256 exchangeRateAfter
|
|
616
|
+
uint256 priceImpact
|
|
615
617
|
)
|
|
616
618
|
{
|
|
617
619
|
uint256 netSyIn = previewDepositStatic(
|
|
@@ -621,7 +623,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
621
623
|
bulk
|
|
622
624
|
);
|
|
623
625
|
|
|
624
|
-
return MarketMathStatic.swapExactSyForYtStatic(market, netSyIn);
|
|
626
|
+
return MarketMathStatic.swapExactSyForYtStatic(market, netSyIn, getDefaultApproxParams());
|
|
625
627
|
}
|
|
626
628
|
|
|
627
629
|
function swapExactPtForYtStatic(address market, uint256 exactPtIn)
|
|
@@ -630,11 +632,10 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
630
632
|
uint256 netYtOut,
|
|
631
633
|
uint256 totalPtToSwap,
|
|
632
634
|
uint256 netSyFee,
|
|
633
|
-
uint256 priceImpact
|
|
634
|
-
uint256 exchangeRateAfter
|
|
635
|
+
uint256 priceImpact
|
|
635
636
|
)
|
|
636
637
|
{
|
|
637
|
-
return MarketMathStatic.swapExactPtForYt(market, exactPtIn);
|
|
638
|
+
return MarketMathStatic.swapExactPtForYt(market, exactPtIn, getDefaultApproxParams());
|
|
638
639
|
}
|
|
639
640
|
|
|
640
641
|
function swapExactYtForPtStatic(address market, uint256 exactYtIn)
|
|
@@ -643,11 +644,10 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
643
644
|
uint256 netPtOut,
|
|
644
645
|
uint256 totalPtSwapped,
|
|
645
646
|
uint256 netSyFee,
|
|
646
|
-
uint256 priceImpact
|
|
647
|
-
uint256 exchangeRateAfter
|
|
647
|
+
uint256 priceImpact
|
|
648
648
|
)
|
|
649
649
|
{
|
|
650
|
-
return MarketMathStatic.swapExactYtForPt(market, exactYtIn);
|
|
650
|
+
return MarketMathStatic.swapExactYtForPt(market, exactYtIn, getDefaultApproxParams());
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
// ============= vePENDLE =============
|
|
@@ -778,7 +778,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
778
778
|
public
|
|
779
779
|
returns (uint256 priceImpact)
|
|
780
780
|
{
|
|
781
|
-
return MarketMathStatic.
|
|
781
|
+
return MarketMathStatic.calcPriceImpact(market, netPtOut);
|
|
782
782
|
}
|
|
783
783
|
|
|
784
784
|
// either but not both pyToken or market must be != 0
|
|
@@ -803,7 +803,7 @@ contract RouterStatic is Initializable, Proxy, BoringOwnableUpgradeable, UUPSUpg
|
|
|
803
803
|
address bulk,
|
|
804
804
|
uint256 netSyOut
|
|
805
805
|
) public view returns (uint256 netTokenIn) {
|
|
806
|
-
uint256 pivotAmount =
|
|
806
|
+
uint256 pivotAmount = netSyOut;
|
|
807
807
|
|
|
808
808
|
uint256 low = pivotAmount;
|
|
809
809
|
{
|