@pendle/core-v2 3.0.0-beta-11 → 3.0.0-beta-12
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/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiveEndpointUpg.sol +5 -23
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgReceiverAppUpg.sol +2 -5
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSendEndpointUpg.sol +6 -20
- package/contracts/LiquidityMining/CrossChainMsg/PendleMsgSenderAppUpg.sol +6 -27
- package/contracts/LiquidityMining/CrossChainMsg/libraries/ExcessivelySafeCall.sol +1 -2
- package/contracts/LiquidityMining/CrossChainMsg/libraries/LayerZeroHelper.sol +1 -1
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +16 -17
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +6 -7
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +7 -8
- package/contracts/LiquidityMining/PendleMerkleDistributor.sol +2 -11
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol +14 -37
- package/contracts/LiquidityMining/VeDistributor/PendleFeeDistributorV2.sol +19 -34
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +4 -14
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +4 -16
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol +11 -39
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol +3 -10
- package/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol +1 -1
- package/contracts/LiquidityMining/libraries/VeBalanceLib.sol +5 -20
- package/contracts/LiquidityMining/libraries/VeHistoryLib.sol +1 -3
- package/contracts/core/Market/MarketMathCore.sol +12 -37
- package/contracts/core/Market/OracleLib.sol +6 -24
- package/contracts/core/Market/PendleExternalRewardDistributor.sol +4 -10
- package/contracts/core/Market/PendleGauge.sol +3 -9
- package/contracts/core/Market/PendleMarket.sol +14 -39
- package/contracts/core/Market/PendleMarketFactory.sol +14 -21
- package/contracts/core/Market/v2/PendleGaugeV2.sol +8 -24
- package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +7 -27
- package/contracts/core/Market/v2/PendleMarketV2.sol +13 -36
- package/contracts/core/Market/v3/PendleMarketFactoryV3.sol +137 -0
- package/contracts/core/Market/v3/PendleMarketV3.sol +360 -0
- package/contracts/core/RewardManager/PendleLinearDistributor.sol +143 -0
- package/contracts/core/RewardManager/RewardManager.sol +14 -7
- package/contracts/core/RewardManager/RewardManagerAbstract.sol +5 -17
- package/contracts/core/StandardizedYield/SYBase.sol +10 -40
- package/contracts/core/StandardizedYield/SYBaseUpg.sol +197 -0
- package/contracts/core/StandardizedYield/SYBaseWithRewards.sol +9 -41
- package/contracts/core/StandardizedYield/SYBaseWithRewardsUpg.sol +88 -0
- package/contracts/core/StandardizedYield/SYUtils.sol +1 -4
- package/contracts/core/StandardizedYield/StEthHelper.sol +3 -9
- package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +94 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/AaveAdapterLib.sol +19 -0
- package/contracts/core/StandardizedYield/implementations/AaveV3/libraries/WadRayMath.sol +126 -0
- package/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol +5 -19
- package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol +4 -14
- package/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol +4 -14
- package/contracts/core/StandardizedYield/implementations/BalancerStable/{PendleAuraWethVethSY.sol → AuraWethVethSYUpg.sol} +13 -20
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol +3 -7
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol +12 -29
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol +14 -39
- package/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol +7 -28
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStableMath.sol +13 -30
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewProxy.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV4.sol +50 -153
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/ComposableStable/ComposableStablePreviewV5.sol +50 -157
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/BbAPoolHelper.sol +4 -16
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearMath.sol +6 -25
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/Linear/LinearPreview.sol +36 -34
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStableMath.sol +4 -13
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/MetaStable/MetaStablePreview.sol +20 -58
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol +28 -79
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol +310 -0
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePoolUserData.sol +1 -3
- package/contracts/core/StandardizedYield/implementations/BalancerStable/base/StablePreviewBase.sol +2 -6
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenHelper.sol +5 -13
- package/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol +9 -29
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotRewardHelper.sol +2 -8
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol +1 -5
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol +8 -19
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol +7 -25
- package/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol +8 -27
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkReceiver.sol +2 -2
- package/contracts/core/StandardizedYield/implementations/ChainlinkRelayer/PendleChainlinkRelayer.sol +4 -9
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol +3 -15
- package/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol +5 -23
- package/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol +10 -40
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol +2 -8
- package/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol +2 -7
- package/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol +5 -20
- package/contracts/core/StandardizedYield/implementations/Flux/FluxTokenLib.sol +6 -4
- package/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/GLP/GLPPreviewHelper.sol +3 -9
- package/contracts/core/StandardizedYield/implementations/GLP/GMTokenPricingHelper.sol +115 -0
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol +134 -0
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +5 -19
- package/contracts/core/StandardizedYield/implementations/HMX/HLPPricingHelper.sol +3 -4
- package/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol +18 -25
- package/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol +425 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol +438 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol +155 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/FullMath.sol +123 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiqDeltaMath.sol +17 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/LiquidityMath.sol +74 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/MathConstants.sol +19 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QtyDeltaMath.sol +103 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/QuadMath.sol +31 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/ReinvestmentMath.sol +26 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SafeCast.sol +73 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/SwapMath.sol +272 -0
- package/contracts/core/StandardizedYield/implementations/Kyber/libraries/TickMath.sol +223 -0
- package/contracts/core/StandardizedYield/implementations/MUX/MlpPricingHelper.sol +26 -0
- package/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol +195 -0
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol +12 -41
- package/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol +13 -42
- package/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol +4 -11
- package/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol +4 -16
- package/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol +3 -11
- package/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol +5 -18
- package/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol +3 -7
- package/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol +5 -18
- package/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol +3 -10
- package/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol +157 -0
- package/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol +4 -12
- package/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol +9 -29
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaLpHelper.sol +3 -10
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol +9 -30
- package/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol +10 -40
- package/contracts/core/YieldContracts/InterestManagerYT.sol +6 -8
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +1 -1
- package/contracts/core/YieldContracts/PendleYieldContractFactory.sol +2 -3
- package/contracts/core/YieldContracts/PendleYieldToken.sol +17 -44
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +5 -14
- package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +1 -1
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +2 -3
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +13 -48
- package/contracts/core/erc20/PendleERC20.sol +2 -8
- package/contracts/core/erc20/PendleERC20Permit.sol +2 -6
- package/contracts/core/erc20/PendleERC20PermitUpg.sol +82 -0
- package/contracts/core/erc20/PendleERC20Upg.sol +334 -0
- package/contracts/core/libraries/ArrayLib.sol +7 -8
- package/contracts/core/libraries/BaseSplitCodeFactory.sol +1 -6
- package/contracts/core/libraries/Errors.sol +19 -1
- package/contracts/core/libraries/ExpiryUtilsLib.sol +3 -26
- package/contracts/core/libraries/StringLib.sol +5 -21
- package/contracts/core/libraries/TokenHelper.sol +3 -3
- package/contracts/core/libraries/math/LogExpMath.sol +1 -4
- package/contracts/core/libraries/math/PMath.sol +13 -15
- package/contracts/interfaces/AaveV3/IAaveV3AToken.sol +15 -0
- package/contracts/interfaces/AaveV3/IAaveV3Pool.sol +11 -0
- package/contracts/interfaces/Balancer/IComposableStable.sol +3 -4
- package/contracts/interfaces/Balancer/IERC4626LinearPool.sol +2 -10
- package/contracts/interfaces/Balancer/IMetaStablePool.sol +3 -11
- package/contracts/interfaces/Balancer/IVault.sol +3 -8
- package/contracts/interfaces/BinanceEth/IWBETH.sol +1 -1
- package/contracts/interfaces/Camelot/ICamelotNFTFactory.sol +1 -3
- package/contracts/interfaces/Camelot/ICamelotNFTHandler.sol +2 -10
- package/contracts/interfaces/Camelot/ICamelotNitroPool.sol +0 -1
- package/contracts/interfaces/Camelot/ICamelotNitroPoolFactory.sol +3 -12
- package/contracts/interfaces/Camelot/ICamelotPair.sol +5 -25
- package/contracts/interfaces/Camelot/ICamelotRouter.sol +1 -5
- package/contracts/interfaces/Camelot/IXGrail.sol +3 -11
- package/contracts/interfaces/ConvexCurve/IBooster.sol +1 -3
- package/contracts/interfaces/Curve/ICrvPool.sol +3 -12
- package/contracts/interfaces/Curve/ITriCrvPool.sol +2 -9
- package/contracts/interfaces/Flux/IFluxErc20.sol +1 -1
- package/contracts/interfaces/Flux/IFluxInterestRateModel.sol +1 -5
- package/contracts/interfaces/GMX/IGMXPriceHelper.sol +6 -0
- package/contracts/interfaces/GMX/IGMXVault.sol +2 -9
- package/contracts/interfaces/GMX/IRewardRouterV2.sol +1 -4
- package/contracts/interfaces/HMX/IHLPStaking.sol +1 -1
- package/contracts/interfaces/HMX/IHMXCalculator.sol +1 -1
- package/contracts/interfaces/HMX/IHMXCompounder.sol +1 -1
- package/contracts/interfaces/HMX/IHMXStaking.sol +1 -1
- package/contracts/interfaces/HMX/IHMXVester.sol +1 -1
- package/contracts/interfaces/IApeStaking.sol +3 -9
- package/contracts/interfaces/IBenQiInterestRateModel.sol +1 -5
- package/contracts/interfaces/IDiamondCut.sol +1 -5
- package/contracts/interfaces/IDiamondLoupe.sol +1 -3
- package/contracts/interfaces/ILayerZeroReceiver.sol +1 -6
- package/contracts/interfaces/IPActionAddRemoveLiqV3.sol +10 -2
- package/contracts/interfaces/IPActionInfoStatic.sol +4 -7
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +5 -9
- package/contracts/interfaces/IPActionMarketCoreStatic.sol +118 -58
- package/contracts/interfaces/IPActionMintRedeemStatic.sol +38 -21
- package/contracts/interfaces/IPActionMiscV3.sol +51 -26
- package/contracts/interfaces/IPActionStorageStatic.sol +5 -1
- package/contracts/interfaces/IPAllActionTypeV3.sol +1 -0
- package/contracts/interfaces/IPBulkSeller.sol +49 -0
- package/contracts/interfaces/IPBulkSellerFactory.sol +12 -0
- package/contracts/interfaces/IPBulkSellerSYCallback.sol +6 -0
- package/contracts/interfaces/IPFeeDistributor.sol +1 -3
- package/contracts/interfaces/IPFeeDistributorV2.sol +8 -7
- package/contracts/interfaces/IPGaugeController.sol +2 -8
- package/contracts/interfaces/IPGaugeControllerMainchain.sol +1 -5
- package/contracts/interfaces/IPInterestManagerYT.sol +3 -3
- package/contracts/interfaces/IPInterestManagerYTV2.sol +1 -4
- package/contracts/interfaces/IPLimitRouter.sol +24 -19
- package/contracts/interfaces/IPLinearDistributor.sol +21 -0
- package/contracts/interfaces/IPMarket.sol +4 -17
- package/contracts/interfaces/IPMarketFactory.sol +2 -13
- package/contracts/interfaces/IPMarketFactoryV3.sol +24 -0
- package/contracts/interfaces/IPMarketV3.sol +8 -0
- package/contracts/interfaces/IPOffchainStorage.sol +11 -0
- package/contracts/interfaces/IPPriceFeed.sol +6 -0
- package/contracts/interfaces/IPPtOracle.sol +2 -9
- package/contracts/interfaces/IPRouterHelper.sol +11 -7
- package/contracts/interfaces/IPRouterStatic.sol +1 -3
- package/contracts/interfaces/IPVotingController.sol +7 -19
- package/contracts/interfaces/IPVotingEscrowMainchain.sol +2 -8
- package/contracts/interfaces/IPYieldToken.sol +2 -8
- package/contracts/interfaces/IPYieldTokenV2.sol +1 -6
- package/contracts/interfaces/IPendlePreviewHelper.sol +2 -8
- package/contracts/interfaces/IRewardManager.sol +1 -4
- package/contracts/interfaces/IStETH.sol +1 -4
- package/contracts/interfaces/IStandardizedYield.sol +9 -16
- package/contracts/interfaces/IStargateLP.sol +0 -3
- package/contracts/interfaces/IStargateRouter.sol +1 -5
- package/contracts/interfaces/Kyber/IKyberElasticFactory.sol +157 -0
- package/contracts/interfaces/Kyber/IKyberElasticPool.sol +101 -0
- package/contracts/interfaces/Kyber/IKyberElasticRouter.sol +98 -0
- package/contracts/interfaces/Kyber/IKyberLiquidityMining.sol +209 -0
- package/contracts/interfaces/Kyber/IKyberMathHelper.sol +28 -0
- package/contracts/interfaces/Kyber/IKyberPositionManager.sol +179 -0
- package/contracts/interfaces/Lybra/IEUSD.sol +1 -1
- package/contracts/interfaces/MUX/IMUXRewardRouter.sol +139 -0
- package/contracts/interfaces/Silo/ISilo.sol +298 -0
- package/contracts/interfaces/Silo/ISiloIncentiveController.sol +16 -0
- package/contracts/interfaces/Silo/ISiloLens.sol +6 -0
- package/contracts/interfaces/Stader/IStaderStakeManager.sol +2 -2
- package/contracts/interfaces/Thena/IThenaFactory.sol +1 -5
- package/contracts/interfaces/Thena/IThenaGaugeV2.sol +1 -2
- package/contracts/interfaces/Thena/IThenaPair.sol +3 -5
- package/contracts/limit/LimitMathCore.sol +69 -60
- package/contracts/limit/{PendleOrderMixin.sol → LimitRouterBase.sol} +96 -79
- package/contracts/limit/PendleLimitRouter.sol +9 -13
- package/contracts/offchain-helpers/AutomateReady.sol +17 -32
- package/contracts/offchain-helpers/BaseSplitCodeFactoryContract.sol +6 -3
- package/contracts/offchain-helpers/BoringLpSeller.sol +4 -17
- package/contracts/offchain-helpers/BoringPtSeller.sol +2 -7
- package/contracts/offchain-helpers/Broadcaster.sol +1 -1
- package/contracts/offchain-helpers/BytesLib.sol +26 -14
- package/contracts/offchain-helpers/EmptyUUPS.sol +0 -1
- package/contracts/offchain-helpers/LegacyNFTHelper.sol +4 -23
- package/contracts/offchain-helpers/LimitBackendHelper.sol +25 -16
- package/contracts/offchain-helpers/MarketExchangeRateLib.sol +2 -13
- package/contracts/offchain-helpers/Multicall2.sol +2 -7
- package/contracts/offchain-helpers/PendleMulticallV1.sol +7 -7
- package/contracts/offchain-helpers/PendleMulticallV2.sol +12 -13
- package/contracts/offchain-helpers/PendleOffchainStorage.sol +59 -0
- package/contracts/offchain-helpers/SimulateHelper.sol +6 -7
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +15 -1
- package/contracts/oracles/PendleLpOracleLib.sol +9 -10
- package/contracts/oracles/PendlePtOracle.sol +8 -19
- package/contracts/oracles/PendlePtOracleLib.sol +8 -13
- package/contracts/oracles/samples/PendleLpGlpOracle.sol +6 -10
- package/contracts/oracles/samples/PendlePtGlpOracle.sol +6 -10
- package/contracts/oracles/samples/PendlePtUsdChainlinkOracle.sol +8 -15
- package/contracts/router/ActionAddRemoveLiqV3.sol +147 -52
- package/contracts/router/ActionCallbackV3.sol +11 -4
- package/contracts/router/ActionMiscV3.sol +43 -33
- package/contracts/router/ActionSwapPTV3.sol +18 -6
- package/contracts/router/ActionSwapYTV3.sol +42 -14
- package/contracts/router/PendleRouterHelper.sol +72 -40
- package/contracts/router/PendleRouterV3.sol +50 -50
- package/contracts/router/base/ActionBase.sol +86 -43
- package/contracts/router/base/CallbackHelper.sol +18 -20
- package/contracts/router/base/MarketApproxLib.sol +36 -32
- package/contracts/router/swap-aggregator/PendleSwap.sol +31 -7
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IAggregationExecutorOptimistic.sol +63 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol +314 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol +560 -0
- package/contracts/router/swap-aggregator/kyberswap/{IMetaAggregationRouterV2.sol → interfaces/IMetaAggregationRouterV2.sol} +11 -6
- package/contracts/router/swap-aggregator/kyberswap/{KyberInputScalingHelper.sol → l1-contracts/InputScalingHelper.sol} +70 -19
- package/contracts/router/swap-aggregator/kyberswap/{ScalingDataLib.sol → l1-contracts/ScalingDataLib.sol} +111 -53
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/BytesHelper.sol +29 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol +149 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol +118 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol +42 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol +382 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol +61 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol +329 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol +173 -0
- package/contracts/router/swap-aggregator/oneinch/I1inchAggregationRouterV5.sol +4 -10
- package/contracts/router/swap-aggregator/oneinch/OneInchAggregationRouterHelper.sol +20 -14
- package/deployments/1-core.json +5 -2
- package/deployments/1-markets/EPENDLE-SEP2024.json +12 -0
- package/deployments/1-markets/SFRAX-MARCH2024.json +10 -0
- package/deployments/1-markets/SILO-CRVUSD-MARCH2024.json +10 -0
- package/deployments/10-core.json +6 -3
- package/deployments/42161-core.json +5 -2
- package/deployments/42161-markets/AAVE-USDC-JUNE2024.json +11 -0
- package/deployments/42161-markets/ARBSILO-USDC-FEB2024.json +10 -0
- package/deployments/42161-markets/GM-ARB-USDC-MARCH2024.json +10 -0
- package/deployments/42161-markets/KYBER-AXLWSTETH-WSTETH-MARCH2024.json +10 -0
- package/deployments/42161-markets/MLP-MARCH2024.json +10 -0
- package/deployments/42161-markets/WSTETH-ARBITRUM-MARCH2024.json +11 -0
- package/deployments/42161-markets/WSTETHSILO-ETH-MARCH2024.json +11 -0
- package/deployments/56-core.json +5 -2
- package/deployments/merkle-distribution/2023-10-26.json +7300 -0
- package/deployments/merkle-distribution/2023-11-30.json +7730 -0
- package/package.json +8 -8
- package/contracts/limit/helpers/ArgumentsDecoder.sol +0 -47
- package/contracts/limit/helpers/Permitable.sol +0 -48
- package/contracts/limit/helpers/RevertReasonParser.sol +0 -75
- package/contracts/offchain-helpers/ChainlinkRelayerGelato.sol +0 -37
- package/contracts/offchain-helpers/PtAndLpToAsset.sol +0 -62
- package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +0 -19
- package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +0 -112
- package/contracts/offchain-helpers/router-static/base/ActionLimitOrdersStatic.sol +0 -145
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +0 -171
- package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +0 -582
- package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +0 -116
- package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +0 -64
- package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +0 -53
- package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +0 -18
- package/contracts/router/swap-aggregator/kyberswap/IExecutorHelper.sol +0 -231
- package/deployments/1-markets/BALANCER-LP-AURA-VETH-WETH-SEP2024.json +0 -8
- /package/contracts/router/swap-aggregator/kyberswap/{IAggregationExecutor.sol → interfaces/IAggregationExecutor.sol} +0 -0
- /package/deployments/1-markets/{BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-BBAWETHSWETH-SEP-26-2024.json} +0 -0
- /package/deployments/1-markets/{BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json → deprecated/BALANCER-LP-AURA-ETHX-BBAWETH-SEP-26-2024.json} +0 -0
|
@@ -3,7 +3,7 @@ pragma solidity ^0.8.0;
|
|
|
3
3
|
|
|
4
4
|
import "../core/StandardizedYield/PYIndex.sol";
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface IPLimitOrderType {
|
|
7
7
|
enum OrderType {
|
|
8
8
|
SY_FOR_PT,
|
|
9
9
|
PT_FOR_SY,
|
|
@@ -26,7 +26,7 @@ interface IPOrderMixinType {
|
|
|
26
26
|
uint256 failSafeRate;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
struct
|
|
29
|
+
struct FillResults {
|
|
30
30
|
uint256 totalMaking;
|
|
31
31
|
uint256 totalTaking;
|
|
32
32
|
uint256 totalFee;
|
|
@@ -42,7 +42,7 @@ struct Order {
|
|
|
42
42
|
uint256 salt;
|
|
43
43
|
uint256 expiry;
|
|
44
44
|
uint256 nonce;
|
|
45
|
-
|
|
45
|
+
IPLimitOrderType.OrderType orderType;
|
|
46
46
|
address token;
|
|
47
47
|
address YT;
|
|
48
48
|
address maker;
|
|
@@ -59,13 +59,16 @@ struct FillOrderParams {
|
|
|
59
59
|
uint256 makingAmount;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
interface IPLimitRouterCallback is
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
interface IPLimitRouterCallback is IPLimitOrderType {
|
|
63
|
+
function limitRouterCallback(
|
|
64
|
+
uint256 actualMaking,
|
|
65
|
+
uint256 actualTaking,
|
|
66
|
+
uint256 totalFee,
|
|
67
|
+
bytes memory data
|
|
68
|
+
) external returns (bytes memory);
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
interface IPLimitRouter is
|
|
71
|
+
interface IPLimitRouter is IPLimitOrderType {
|
|
69
72
|
struct OrderStatus {
|
|
70
73
|
uint128 filledAmount;
|
|
71
74
|
uint128 remaining;
|
|
@@ -85,9 +88,13 @@ interface IPLimitRouter is IPOrderMixinType {
|
|
|
85
88
|
);
|
|
86
89
|
|
|
87
90
|
// @dev actualMaking, actualTaking are in the SY form
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
function fill(
|
|
92
|
+
FillOrderParams[] memory params,
|
|
93
|
+
address receiver,
|
|
94
|
+
uint256 maxTaking,
|
|
95
|
+
bytes calldata optData,
|
|
96
|
+
bytes calldata callback
|
|
97
|
+
) external returns (uint256 actualMaking, uint256 actualTaking, uint256 totalFee, bytes memory callbackReturn);
|
|
91
98
|
|
|
92
99
|
function feeRecipient() external view returns (address);
|
|
93
100
|
|
|
@@ -97,15 +104,13 @@ interface IPLimitRouter is IPOrderMixinType {
|
|
|
97
104
|
|
|
98
105
|
function cancelBatch(Order[] calldata orders) external;
|
|
99
106
|
|
|
100
|
-
function orderStatusesRaw(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts);
|
|
107
|
+
function orderStatusesRaw(
|
|
108
|
+
bytes32[] memory orderHashes
|
|
109
|
+
) external view returns (uint256[] memory remainingsRaw, uint256[] memory filledAmounts);
|
|
104
110
|
|
|
105
|
-
function orderStatuses(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
returns (uint256[] memory remainings, uint256[] memory filledAmounts);
|
|
111
|
+
function orderStatuses(
|
|
112
|
+
bytes32[] memory orderHashes
|
|
113
|
+
) external view returns (uint256[] memory remainings, uint256[] memory filledAmounts);
|
|
109
114
|
|
|
110
115
|
function DOMAIN_SEPARATOR() external view returns (bytes32);
|
|
111
116
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
interface IPLinearDistributor {
|
|
5
|
+
event VestQueued(address indexed token, address indexed addr, uint256 amount);
|
|
6
|
+
event Vested(address indexed token, address indexed addr, uint256 amount, uint256 duration);
|
|
7
|
+
event Claim(address indexed token, address indexed addr, uint256 amount);
|
|
8
|
+
|
|
9
|
+
struct DistributionData {
|
|
10
|
+
uint128 accruedReward;
|
|
11
|
+
uint128 unvestedReward;
|
|
12
|
+
// [irregular uint192] reward tokens might be up to 1e18 decimals, at 1e18 based, the reward per sec might be very close to 1e38 limit of uint128
|
|
13
|
+
uint192 rewardPerSec;
|
|
14
|
+
uint32 lastDistributedTime;
|
|
15
|
+
uint32 endTime;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function queueVestAndClaim(address token, uint256 amountToVest) external returns (uint256 amountOut);
|
|
19
|
+
|
|
20
|
+
function claim(address token) external returns (uint256 amountOut);
|
|
21
|
+
}
|
|
@@ -9,12 +9,7 @@ import "./IPGauge.sol";
|
|
|
9
9
|
import "../core/Market/MarketMathCore.sol";
|
|
10
10
|
|
|
11
11
|
interface IPMarket is IERC20Metadata, IPGauge {
|
|
12
|
-
event Mint(
|
|
13
|
-
address indexed receiver,
|
|
14
|
-
uint256 netLpMinted,
|
|
15
|
-
uint256 netSyUsed,
|
|
16
|
-
uint256 netPtUsed
|
|
17
|
-
);
|
|
12
|
+
event Mint(address indexed receiver, uint256 netLpMinted, uint256 netSyUsed, uint256 netPtUsed);
|
|
18
13
|
|
|
19
14
|
event Burn(
|
|
20
15
|
address indexed receiverSy,
|
|
@@ -68,16 +63,11 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
68
63
|
|
|
69
64
|
function readState(address router) external view returns (MarketState memory market);
|
|
70
65
|
|
|
71
|
-
function observe(
|
|
72
|
-
uint32[] memory secondsAgos
|
|
73
|
-
) external view returns (uint216[] memory lnImpliedRateCumulative);
|
|
66
|
+
function observe(uint32[] memory secondsAgos) external view returns (uint216[] memory lnImpliedRateCumulative);
|
|
74
67
|
|
|
75
68
|
function increaseObservationsCardinalityNext(uint16 cardinalityNext) external;
|
|
76
69
|
|
|
77
|
-
function readTokens()
|
|
78
|
-
external
|
|
79
|
-
view
|
|
80
|
-
returns (IStandardizedYield _SY, IPPrincipalToken _PT, IPYieldToken _YT);
|
|
70
|
+
function readTokens() external view returns (IStandardizedYield _SY, IPPrincipalToken _PT, IPYieldToken _YT);
|
|
81
71
|
|
|
82
72
|
function getRewardTokens() external view returns (address[] memory);
|
|
83
73
|
|
|
@@ -87,10 +77,7 @@ interface IPMarket is IERC20Metadata, IPGauge {
|
|
|
87
77
|
|
|
88
78
|
function observations(
|
|
89
79
|
uint256 index
|
|
90
|
-
)
|
|
91
|
-
external
|
|
92
|
-
view
|
|
93
|
-
returns (uint32 blockTimestamp, uint216 lnImpliedRateCumulative, bool initialized);
|
|
80
|
+
) external view returns (uint32 blockTimestamp, uint216 lnImpliedRateCumulative, bool initialized);
|
|
94
81
|
|
|
95
82
|
function _storage()
|
|
96
83
|
external
|
|
@@ -8,20 +8,11 @@ interface IPMarketFactory {
|
|
|
8
8
|
bool active;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
event NewMarketConfig(
|
|
12
|
-
address indexed treasury,
|
|
13
|
-
uint80 defaultLnFeeRateRoot,
|
|
14
|
-
uint8 reserveFeePercent
|
|
15
|
-
);
|
|
11
|
+
event NewMarketConfig(address indexed treasury, uint80 defaultLnFeeRateRoot, uint8 reserveFeePercent);
|
|
16
12
|
event SetOverriddenFee(address indexed router, uint80 lnFeeRateRoot, uint8 reserveFeePercent);
|
|
17
13
|
event UnsetOverriddenFee(address indexed router);
|
|
18
14
|
|
|
19
|
-
event CreateNewMarket(
|
|
20
|
-
address indexed market,
|
|
21
|
-
address indexed PT,
|
|
22
|
-
int256 scalarRoot,
|
|
23
|
-
int256 initialAnchor
|
|
24
|
-
);
|
|
15
|
+
event CreateNewMarket(address indexed market, address indexed PT, int256 scalarRoot, int256 initialAnchor);
|
|
25
16
|
|
|
26
17
|
function isValidMarket(address market) external view returns (bool);
|
|
27
18
|
|
|
@@ -29,6 +20,4 @@ interface IPMarketFactory {
|
|
|
29
20
|
function getMarketConfig(
|
|
30
21
|
address router
|
|
31
22
|
) external view returns (address treasury, uint80 lnFeeRateRoot, uint8 reserveFeePercent);
|
|
32
|
-
|
|
33
|
-
|
|
34
23
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPMarketFactoryV3 {
|
|
5
|
+
event SetOverriddenFee(address indexed router, address indexed market, uint80 lnFeeRateRoot);
|
|
6
|
+
|
|
7
|
+
event CreateNewMarket(
|
|
8
|
+
address indexed market,
|
|
9
|
+
address indexed PT,
|
|
10
|
+
int256 scalarRoot,
|
|
11
|
+
int256 initialAnchor,
|
|
12
|
+
uint256 lnFeeRateRoot
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
event NewTreasuryAndFeeReserve(address indexed treasury, uint8 reserveFeePercent);
|
|
16
|
+
|
|
17
|
+
function isValidMarket(address market) external view returns (bool);
|
|
18
|
+
|
|
19
|
+
// If this is changed, change the readState function in market as well
|
|
20
|
+
function getMarketConfig(
|
|
21
|
+
address market,
|
|
22
|
+
address router
|
|
23
|
+
) external view returns (address treasury, uint80 overriddenFee, uint8 reserveFeePercent);
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.0;
|
|
4
|
+
|
|
5
|
+
interface IPOffchainStorage {
|
|
6
|
+
event SetStorage(bytes32 indexed key, bytes value);
|
|
7
|
+
|
|
8
|
+
function setStorageUint256(bytes32 key, uint256 value) external;
|
|
9
|
+
|
|
10
|
+
function getUint256(bytes32 key) external view returns (uint256);
|
|
11
|
+
}
|
|
@@ -4,10 +4,7 @@ pragma solidity ^0.8.0;
|
|
|
4
4
|
interface IPPtOracle {
|
|
5
5
|
event SetBlockCycleNumerator(uint16 newBlockCycleNumerator);
|
|
6
6
|
|
|
7
|
-
function getPtToAssetRate(
|
|
8
|
-
address market,
|
|
9
|
-
uint32 duration
|
|
10
|
-
) external view returns (uint256 ptToAssetRate);
|
|
7
|
+
function getPtToAssetRate(address market, uint32 duration) external view returns (uint256 ptToAssetRate);
|
|
11
8
|
|
|
12
9
|
function getOracleState(
|
|
13
10
|
address market,
|
|
@@ -15,9 +12,5 @@ interface IPPtOracle {
|
|
|
15
12
|
)
|
|
16
13
|
external
|
|
17
14
|
view
|
|
18
|
-
returns (
|
|
19
|
-
bool increaseCardinalityRequired,
|
|
20
|
-
uint16 cardinalityRequired,
|
|
21
|
-
bool oldestObservationSatisfied
|
|
22
|
-
);
|
|
15
|
+
returns (bool increaseCardinalityRequired, uint16 cardinalityRequired, bool oldestObservationSatisfied);
|
|
23
16
|
}
|
|
@@ -90,7 +90,11 @@ interface IPRouterHelper {
|
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
event AddLiquiditySingleSy(
|
|
93
|
-
address indexed caller,
|
|
93
|
+
address indexed caller,
|
|
94
|
+
address indexed market,
|
|
95
|
+
address indexed receiver,
|
|
96
|
+
uint256 netSyIn,
|
|
97
|
+
uint256 netLpOut
|
|
94
98
|
);
|
|
95
99
|
|
|
96
100
|
event AddLiquiditySingleTokenKeepYt(
|
|
@@ -132,11 +136,11 @@ interface IPRouterHelper {
|
|
|
132
136
|
AddLiquiditySingleSyKeepYtStruct calldata toMarket
|
|
133
137
|
) external returns (uint256 netLpOut, uint256 netYtOut, uint256 netSyZapIn, uint256 netSyFeeOfRemove);
|
|
134
138
|
|
|
135
|
-
function removeLiquiditySingleToken(
|
|
136
|
-
|
|
137
|
-
|
|
139
|
+
function removeLiquiditySingleToken(
|
|
140
|
+
RemoveLiquiditySingleTokenStruct calldata fromMarket
|
|
141
|
+
) external returns (uint256 netTokenOut, uint256 netSyFee);
|
|
138
142
|
|
|
139
|
-
function removeLiquiditySingleSy(
|
|
140
|
-
|
|
141
|
-
|
|
143
|
+
function removeLiquiditySingleSy(
|
|
144
|
+
RemoveLiquiditySingleSyStruct calldata fromMarket
|
|
145
|
+
) external returns (uint256 netSyOut, uint256 netSyFee);
|
|
142
146
|
}
|
|
@@ -14,11 +14,7 @@ interface IPVotingController {
|
|
|
14
14
|
|
|
15
15
|
event SetPendlePerSec(uint256 newPendlePerSec);
|
|
16
16
|
|
|
17
|
-
event BroadcastResults(
|
|
18
|
-
uint64 indexed chainId,
|
|
19
|
-
uint128 indexed wTime,
|
|
20
|
-
uint128 totalPendlePerSec
|
|
21
|
-
);
|
|
17
|
+
event BroadcastResults(uint64 indexed chainId, uint128 indexed wTime, uint128 totalPendlePerSec);
|
|
22
18
|
|
|
23
19
|
function applyPoolSlopeChanges(address pool) external;
|
|
24
20
|
|
|
@@ -26,20 +22,12 @@ interface IPVotingController {
|
|
|
26
22
|
function getUserPoolHistoryLength(address user, address pool) external view returns (uint256);
|
|
27
23
|
|
|
28
24
|
/// @notice deprecated, only kept for compatibility reasons
|
|
29
|
-
function getUserPoolHistoryAt(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function getWeekData(uint128 wTime, address[] calldata pools)
|
|
36
|
-
external
|
|
37
|
-
view
|
|
38
|
-
returns (
|
|
39
|
-
bool isEpochFinalized,
|
|
40
|
-
uint128 totalVotes,
|
|
41
|
-
uint128[] memory poolVotes
|
|
42
|
-
);
|
|
25
|
+
function getUserPoolHistoryAt(address user, address pool, uint256 index) external view returns (Checkpoint memory);
|
|
26
|
+
|
|
27
|
+
function getWeekData(
|
|
28
|
+
uint128 wTime,
|
|
29
|
+
address[] calldata pools
|
|
30
|
+
) external view returns (bool isEpochFinalized, uint128 totalVotes, uint128[] memory poolVotes);
|
|
43
31
|
|
|
44
32
|
function getPoolTotalVoteAt(address pool, uint128 wTime) external view returns (uint128);
|
|
45
33
|
|
|
@@ -17,10 +17,7 @@ interface IPVotingEscrowMainchain is IPVeToken {
|
|
|
17
17
|
|
|
18
18
|
// ============= ACTIONS =============
|
|
19
19
|
|
|
20
|
-
function increaseLockPosition(
|
|
21
|
-
uint128 additionalAmountToLock,
|
|
22
|
-
uint128 expiry
|
|
23
|
-
) external returns (uint128);
|
|
20
|
+
function increaseLockPosition(uint128 additionalAmountToLock, uint128 expiry) external returns (uint128);
|
|
24
21
|
|
|
25
22
|
function withdraw() external returns (uint128);
|
|
26
23
|
|
|
@@ -28,8 +25,5 @@ interface IPVotingEscrowMainchain is IPVeToken {
|
|
|
28
25
|
|
|
29
26
|
function getUserHistoryLength(address user) external view returns (uint256);
|
|
30
27
|
|
|
31
|
-
function getUserHistoryAt(
|
|
32
|
-
address user,
|
|
33
|
-
uint256 index
|
|
34
|
-
) external view returns (Checkpoint memory);
|
|
28
|
+
function getUserHistoryAt(address user, uint256 index) external view returns (Checkpoint memory);
|
|
35
29
|
}
|
|
@@ -15,18 +15,13 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
15
15
|
uint256 amountPYOut
|
|
16
16
|
);
|
|
17
17
|
|
|
18
|
-
event Burn(
|
|
19
|
-
address indexed caller,
|
|
20
|
-
address indexed receiver,
|
|
21
|
-
uint256 amountPYToRedeem,
|
|
22
|
-
uint256 amountSyOut
|
|
23
|
-
);
|
|
18
|
+
event Burn(address indexed caller, address indexed receiver, uint256 amountPYToRedeem, uint256 amountSyOut);
|
|
24
19
|
|
|
25
20
|
event RedeemRewards(address indexed user, uint256[] amountRewardsOut);
|
|
26
21
|
|
|
27
22
|
event RedeemInterest(address indexed user, uint256 interestOut);
|
|
28
23
|
|
|
29
|
-
event
|
|
24
|
+
event CollectRewardFee(address indexed rewardToken, uint256 amountRewardFee);
|
|
30
25
|
|
|
31
26
|
function mintPY(address receiverPT, address receiverYT) external returns (uint256 amountPYOut);
|
|
32
27
|
|
|
@@ -64,5 +59,4 @@ interface IPYieldToken is IERC20Metadata, IRewardManager, IPInterestManagerYT {
|
|
|
64
59
|
function doCacheIndexSameBlock() external view returns (bool);
|
|
65
60
|
|
|
66
61
|
function pyIndexLastUpdatedBlock() external view returns (uint128);
|
|
67
|
-
|
|
68
62
|
}
|
|
@@ -13,12 +13,7 @@ interface IPYieldTokenV2 is IERC20Metadata, IRewardManager, IPInterestManagerYTV
|
|
|
13
13
|
uint256 amountPYOut
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
event Burn(
|
|
17
|
-
address indexed caller,
|
|
18
|
-
address indexed receiver,
|
|
19
|
-
uint256 amountPYToRedeem,
|
|
20
|
-
uint256 amountSyOut
|
|
21
|
-
);
|
|
16
|
+
event Burn(address indexed caller, address indexed receiver, uint256 amountPYToRedeem, uint256 amountSyOut);
|
|
22
17
|
|
|
23
18
|
event RedeemRewards(address indexed user, uint256[] amountRewardsOut);
|
|
24
19
|
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
interface IPendlePreviewHelper {
|
|
5
|
-
function previewDeposit(
|
|
6
|
-
address tokenIn,
|
|
7
|
-
uint256 amountTokenIn
|
|
8
|
-
) external view returns (uint256 amountSharesOut);
|
|
5
|
+
function previewDeposit(address tokenIn, uint256 amountTokenIn) external view returns (uint256 amountSharesOut);
|
|
9
6
|
|
|
10
|
-
function previewRedeem(
|
|
11
|
-
address tokenOut,
|
|
12
|
-
uint256 amountSharesToBurn
|
|
13
|
-
) external view returns (uint256 amountTokenOut);
|
|
7
|
+
function previewRedeem(address tokenOut, uint256 amountSharesToBurn) external view returns (uint256 amountTokenOut);
|
|
14
8
|
}
|
|
@@ -2,8 +2,5 @@
|
|
|
2
2
|
pragma solidity ^0.8.0;
|
|
3
3
|
|
|
4
4
|
interface IRewardManager {
|
|
5
|
-
function userReward(
|
|
6
|
-
address token,
|
|
7
|
-
address user
|
|
8
|
-
) external view returns (uint128 index, uint128 accrued);
|
|
5
|
+
function userReward(address token, address user) external view returns (uint128 index, uint128 accrued);
|
|
9
6
|
}
|
|
@@ -8,10 +8,7 @@ interface IStETH {
|
|
|
8
8
|
|
|
9
9
|
function submit(address referral) external payable returns (uint256 amount);
|
|
10
10
|
|
|
11
|
-
function burnShares(
|
|
12
|
-
address _account,
|
|
13
|
-
uint256 _sharesAmount
|
|
14
|
-
) external returns (uint256 newTotalShares);
|
|
11
|
+
function burnShares(address _account, uint256 _sharesAmount) external returns (uint256 newTotalShares);
|
|
15
12
|
|
|
16
13
|
function sharesOf(address account) external view returns (uint256);
|
|
17
14
|
|
|
@@ -146,15 +146,15 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
146
146
|
|
|
147
147
|
function isValidTokenOut(address token) external view returns (bool);
|
|
148
148
|
|
|
149
|
-
function previewDeposit(
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
function previewDeposit(
|
|
150
|
+
address tokenIn,
|
|
151
|
+
uint256 amountTokenToDeposit
|
|
152
|
+
) external view returns (uint256 amountSharesOut);
|
|
153
153
|
|
|
154
|
-
function previewRedeem(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
function previewRedeem(
|
|
155
|
+
address tokenOut,
|
|
156
|
+
uint256 amountSharesToRedeem
|
|
157
|
+
) external view returns (uint256 amountTokenOut);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* @notice This function contains information to interpret what the asset is
|
|
@@ -163,12 +163,5 @@ interface IStandardizedYield is IERC20Metadata {
|
|
|
163
163
|
* @return assetAddress the address of the asset
|
|
164
164
|
* @return assetDecimals the decimals of the asset
|
|
165
165
|
*/
|
|
166
|
-
function assetInfo()
|
|
167
|
-
external
|
|
168
|
-
view
|
|
169
|
-
returns (
|
|
170
|
-
AssetType assetType,
|
|
171
|
-
address assetAddress,
|
|
172
|
-
uint8 assetDecimals
|
|
173
|
-
);
|
|
166
|
+
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals);
|
|
174
167
|
}
|
|
@@ -23,8 +23,6 @@
|
|
|
23
23
|
pragma solidity ^0.8.0;
|
|
24
24
|
|
|
25
25
|
interface IStargateLP {
|
|
26
|
-
|
|
27
|
-
|
|
28
26
|
struct SwapObj {
|
|
29
27
|
uint256 amount;
|
|
30
28
|
uint256 eqFee;
|
|
@@ -58,5 +56,4 @@ interface IStargateLP {
|
|
|
58
56
|
function convertRate() external view returns (uint256);
|
|
59
57
|
|
|
60
58
|
function deltaCredit() external view returns (uint256);
|
|
61
|
-
|
|
62
59
|
}
|
|
@@ -25,9 +25,5 @@ pragma solidity ^0.8.0;
|
|
|
25
25
|
interface IStargateRouter {
|
|
26
26
|
function addLiquidity(uint256 _poolId, uint256 _amountLD, address _to) external;
|
|
27
27
|
|
|
28
|
-
function instantRedeemLocal(
|
|
29
|
-
uint16 _srcPoolId,
|
|
30
|
-
uint256 _amountLP,
|
|
31
|
-
address _to
|
|
32
|
-
) external returns (uint256 amountSD);
|
|
28
|
+
function instantRedeemLocal(uint16 _srcPoolId, uint256 _amountLP, address _to) external returns (uint256 amountSD);
|
|
33
29
|
}
|