@pendle/core-v2 4.0.4 → 4.0.6
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/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VeDistributor/PendleFeeDistributor.sol/PendleFeeDistributor.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.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/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +2 -2
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketV3.sol/PendleMarketV3.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/SYBaseWithRewardsUpg.sol/SYBaseWithRewardsUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV2.sol/PendleAuraBalancerStableLPSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/base/PendleAuraBalancerStableLPSYV3Upg.sol/PendleAuraBalancerStableLPSYV3Upg.dbg.json +1 -1
- 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/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.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/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.json +1060 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.json +1141 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberNftManagerBaseUpg.sol/KyberNftManagerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.json +2 -2
- 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/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.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/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.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/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +2 -2
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +2 -2
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/ArrayLib.sol/ArrayLib.json +2 -2
- package/build/artifacts/contracts/interfaces/EtherFi/IEtherFiLiquidityPool.sol/IEtherFiLiquidityPool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/EtherFi/IEtherFiLiquidityPool.sol/IEtherFiLiquidityPool.json +145 -0
- package/build/artifacts/contracts/interfaces/EtherFi/IEtherFiWEEth.sol/IEtherFiWEEth.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/EtherFi/IEtherFiWEEth.sol/IEtherFiWEEth.json +75 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.json +3 -3
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.json +3 -3
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPExchangeRateOracle.sol/IPExchangeRateOracle.json +24 -0
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpDepositPool.sol/IKelpDepositPool.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpDepositPool.sol/IKelpDepositPool.json +76 -0
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpLRTConfig.sol/IKelpLRTConfig.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpLRTConfig.sol/IKelpLRTConfig.json +43 -0
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/BytesLib.sol/BytesLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/LimitBackendHelper.sol/LimitBackendHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +4 -0
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +307 -0
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +5 -5
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV3.sol/PendleRouterV3.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL1.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwapL2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol/IExecutorHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol/IExecutorHelper.json +168 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol/IExecutorHelperL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol/IExecutorHelperL2.json +378 -0
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol/InputScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol/InputScalingHelper.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol/ScalingDataLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol/ScalingDataLib.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol/CalldataReader.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol/CalldataReader.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol/CalldataWriter.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataWriter.sol/CalldataWriter.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol/Common.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/Common.sol/Common.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol/DexScaler.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol/DexScaler.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol/ExecutorReader.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ExecutorReader.sol/ExecutorReader.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol/InputScalingHelperL2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol/InputScalingHelperL2.json +2 -2
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol/ScalingDataL2Lib.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol/ScalingDataL2Lib.json +2 -2
- package/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol +100 -0
- package/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol +149 -0
- package/contracts/core/libraries/ArrayLib.sol +8 -1
- package/contracts/interfaces/EtherFi/IEtherFiLiquidityPool.sol +16 -0
- package/contracts/interfaces/EtherFi/IEtherFiWEEth.sol +12 -0
- package/contracts/interfaces/IPActionAddRemoveLiqV3.sol +2 -1
- package/contracts/interfaces/IPExchangeRateOracle.sol +6 -0
- package/contracts/interfaces/KelpDAO/IKelpDepositPool.sol +15 -0
- package/contracts/interfaces/KelpDAO/IKelpLRTConfig.sol +8 -0
- package/contracts/offchain-helpers/BytesLib.sol +4 -2
- package/contracts/offchain-helpers/PendleExchangeRateOracle.sol +86 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol +58 -1
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol +107 -1
- package/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol +14 -0
- package/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol +32 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/CalldataReader.sol +6 -0
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/DexScaler.sol +59 -2
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/InputScalingHelperL2.sol +22 -1
- package/contracts/router/swap-aggregator/kyberswap/l2-contracts/ScalingDataL2Lib.sol +24 -0
- package/deployments/1-core.json +1 -1
- package/deployments/10-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/deployments/56-core.json +1 -1
- package/package.json +1 -1
- package/typechain-types/ActionAddRemoveLiqV3.ts +3 -3
- package/typechain-types/IEtherFiLiquidityPool.ts +291 -0
- package/typechain-types/IEtherFiWEEth.ts +162 -0
- package/typechain-types/IExecutorHelper.ts +273 -0
- package/typechain-types/IExecutorHelperL2.ts +455 -0
- package/typechain-types/IKelpDepositPool.ts +172 -0
- package/typechain-types/IKelpLRTConfig.ts +120 -0
- package/typechain-types/IPActionAddRemoveLiqV3.ts +3 -3
- package/typechain-types/IPAllActionV3.ts +3 -3
- package/typechain-types/IPExchangeRateOracle.ts +87 -0
- package/typechain-types/PendleExchangeRateOracle.ts +393 -0
- package/typechain-types/PendleRsETHSY.ts +1461 -0
- package/typechain-types/PendleWEEthSY.ts +1302 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +4 -4
- package/typechain-types/factories/AuraEthxBbAWethSY__factory.ts +1 -1
- package/typechain-types/factories/AuraSwEthBbAWethSYV2__factory.ts +1 -1
- package/typechain-types/factories/AuraWethVethSYUpg__factory.ts +1 -1
- package/typechain-types/factories/IEtherFiLiquidityPool__factory.ts +164 -0
- package/typechain-types/factories/IEtherFiWEEth__factory.ts +87 -0
- package/typechain-types/factories/IExecutorHelperL2__factory.ts +378 -0
- package/typechain-types/factories/IExecutorHelper__factory.ts +168 -0
- package/typechain-types/factories/IKelpDepositPool__factory.ts +91 -0
- package/typechain-types/factories/IKelpLRTConfig__factory.ts +58 -0
- package/typechain-types/factories/IPActionAddRemoveLiqV3__factory.ts +3 -3
- package/typechain-types/factories/IPAllActionV3__factory.ts +3 -3
- package/typechain-types/factories/IPExchangeRateOracle__factory.ts +43 -0
- package/typechain-types/factories/LimitBackendHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleAaveV3SY__factory.ts +1 -1
- package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
- package/typechain-types/factories/PendleArbitrumStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraBbAWethSwethSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethAnkrethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethRocketEthSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethStafiEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWethWstethSYV2__factory.ts +1 -1
- package/typechain-types/factories/PendleAuraWstethAnkreth__factory.ts +1 -1
- package/typechain-types/factories/PendleBridgedLSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleCamelotV1VolatileSY__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/PendleERC4626SY__factory.ts +1 -1
- package/typechain-types/factories/PendleETHXSY__factory.ts +1 -1
- package/typechain-types/factories/PendleEUSDSY__factory.ts +1 -1
- package/typechain-types/factories/PendleExchangeRateOracle__factory.ts +379 -0
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFeeDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleFluxLendingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGDaiSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGMV2TokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMarket__factory.ts +1 -1
- package/typechain-types/factories/PendleMlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleOracleForSyProxy__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterV3__factory.ts +1 -1
- package/typechain-types/factories/PendleRsETHSY__factory.ts +1215 -0
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL1__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL2__factory.ts +1 -1
- package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
- package/typechain-types/factories/PendleWEEthSY__factory.ts +1118 -0
- package/typechain-types/factories/PendleWbEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleWstEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldContractFactory__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldTokenV2__factory.ts +1 -1
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -1
- package/typechain-types/factories/SAPE__factory.ts +1 -1
- package/typechain-types/factories/SwETHSY__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +72 -0
- package/typechain-types/index.ts +16 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.23;
|
|
3
|
+
|
|
4
|
+
import "../../SYBase.sol";
|
|
5
|
+
import "../../../../interfaces/EtherFi/IEtherFiLiquidityPool.sol";
|
|
6
|
+
import "../../../../interfaces/EtherFi/IEtherFiWEEth.sol";
|
|
7
|
+
|
|
8
|
+
contract PendleWEEthSY is SYBase {
|
|
9
|
+
using PMath for int256;
|
|
10
|
+
|
|
11
|
+
address public immutable weETH;
|
|
12
|
+
address public immutable liquidityPool;
|
|
13
|
+
address public immutable eETH;
|
|
14
|
+
address public immutable referee;
|
|
15
|
+
|
|
16
|
+
constructor(address _weETH, address _referee) SYBase("SY ether.fi weETH", "SY-weETH", _weETH) {
|
|
17
|
+
weETH = _weETH;
|
|
18
|
+
liquidityPool = IEtherFiWEEth(_weETH).liquidityPool();
|
|
19
|
+
eETH = IEtherFiWEEth(_weETH).eETH();
|
|
20
|
+
referee = _referee;
|
|
21
|
+
|
|
22
|
+
_safeApproveInf(eETH, weETH);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*///////////////////////////////////////////////////////////////
|
|
26
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
27
|
+
//////////////////////////////////////////////////////////////*/
|
|
28
|
+
|
|
29
|
+
function _deposit(address tokenIn, uint256 amountDeposited) internal override returns (uint256 amountSharesOut) {
|
|
30
|
+
if (tokenIn == NATIVE) {
|
|
31
|
+
IEtherFiLiquidityPool(liquidityPool).deposit{value: amountDeposited}(referee);
|
|
32
|
+
}
|
|
33
|
+
if (tokenIn != weETH) {
|
|
34
|
+
amountSharesOut = IEtherFiWEEth(weETH).wrap(_selfBalance(eETH));
|
|
35
|
+
} else {
|
|
36
|
+
amountSharesOut = amountDeposited;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _redeem(
|
|
41
|
+
address receiver,
|
|
42
|
+
address tokenOut,
|
|
43
|
+
uint256 amountSharesToRedeem
|
|
44
|
+
) internal override returns (uint256 amountTokenOut) {
|
|
45
|
+
if (tokenOut == weETH) {
|
|
46
|
+
amountTokenOut = amountSharesToRedeem;
|
|
47
|
+
} else {
|
|
48
|
+
amountTokenOut = IEtherFiWEEth(weETH).unwrap(amountSharesToRedeem);
|
|
49
|
+
}
|
|
50
|
+
_transferOut(tokenOut, receiver, amountTokenOut);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*///////////////////////////////////////////////////////////////
|
|
54
|
+
EXCHANGE-RATE
|
|
55
|
+
//////////////////////////////////////////////////////////////*/
|
|
56
|
+
|
|
57
|
+
function exchangeRate() public view override returns (uint256) {
|
|
58
|
+
return IEtherFiLiquidityPool(liquidityPool).amountForShare(1 ether);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*///////////////////////////////////////////////////////////////
|
|
62
|
+
MISC FUNCTIONS FOR METADATA
|
|
63
|
+
//////////////////////////////////////////////////////////////*/
|
|
64
|
+
|
|
65
|
+
function _previewDeposit(address tokenIn, uint256 amountTokenToDeposit) internal view override returns (uint256) {
|
|
66
|
+
if (tokenIn == weETH) {
|
|
67
|
+
return amountTokenToDeposit;
|
|
68
|
+
} else {
|
|
69
|
+
return IEtherFiLiquidityPool(liquidityPool).sharesForAmount(amountTokenToDeposit);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function _previewRedeem(address tokenOut, uint256 amountSharesToRedeem) internal view override returns (uint256) {
|
|
74
|
+
if (tokenOut == weETH) {
|
|
75
|
+
return amountSharesToRedeem;
|
|
76
|
+
} else {
|
|
77
|
+
return IEtherFiLiquidityPool(liquidityPool).amountForShare(amountSharesToRedeem);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
82
|
+
return ArrayLib.create(weETH, eETH, NATIVE);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
86
|
+
return ArrayLib.create(weETH, eETH);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
90
|
+
return token == NATIVE || token == eETH || token == weETH;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
94
|
+
return token == eETH || token == weETH;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function assetInfo() external view override returns (AssetType, address, uint8) {
|
|
98
|
+
return (AssetType.TOKEN, eETH, 18);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../SYBase.sol";
|
|
5
|
+
import "../../../../interfaces/IPExchangeRateOracle.sol";
|
|
6
|
+
import "../../../../interfaces/KelpDAO/IKelpDepositPool.sol";
|
|
7
|
+
import "../../../../interfaces/KelpDAO/IKelpLRTConfig.sol";
|
|
8
|
+
import "../../../../interfaces/IStETH.sol";
|
|
9
|
+
|
|
10
|
+
contract PendleRsETHSY is SYBase {
|
|
11
|
+
using ArrayLib for address[];
|
|
12
|
+
|
|
13
|
+
address public immutable rsETH;
|
|
14
|
+
address public immutable depositPool;
|
|
15
|
+
address public lrtConfig;
|
|
16
|
+
|
|
17
|
+
address public exchangeRateOracle;
|
|
18
|
+
|
|
19
|
+
address public immutable ETHx; // gas saving purpose only
|
|
20
|
+
address public immutable stETH; // gas saving purpose only
|
|
21
|
+
|
|
22
|
+
event SetNewExchangeRateOracle(address oracle);
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
address _rsETH,
|
|
26
|
+
address _depositPool,
|
|
27
|
+
address _exchangeRateOracle,
|
|
28
|
+
address _ETHx,
|
|
29
|
+
address _stETH
|
|
30
|
+
) SYBase("SY Kelp rsETH", "SY-rsETH", _rsETH) {
|
|
31
|
+
rsETH = _rsETH;
|
|
32
|
+
depositPool = _depositPool;
|
|
33
|
+
exchangeRateOracle = _exchangeRateOracle;
|
|
34
|
+
ETHx = _ETHx;
|
|
35
|
+
stETH = _stETH;
|
|
36
|
+
|
|
37
|
+
updateLrtConfigAddress();
|
|
38
|
+
safeApproveSupportedTokens();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function updateLrtConfigAddress() public {
|
|
42
|
+
lrtConfig = IKelpDepositPool(depositPool).lrtConfig();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function safeApproveSupportedTokens() public {
|
|
46
|
+
address[] memory assets = IKelpLRTConfig(lrtConfig).getSupportedAssetList();
|
|
47
|
+
for (uint256 i = 0; i < assets.length; ) {
|
|
48
|
+
_safeApproveInf(assets[i], depositPool);
|
|
49
|
+
unchecked {
|
|
50
|
+
i++;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*///////////////////////////////////////////////////////////////
|
|
56
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
57
|
+
//////////////////////////////////////////////////////////////*/
|
|
58
|
+
|
|
59
|
+
function _deposit(
|
|
60
|
+
address tokenIn,
|
|
61
|
+
uint256 amountDeposited
|
|
62
|
+
) internal virtual override returns (uint256 amountSharesOut) {
|
|
63
|
+
if (tokenIn == rsETH) {
|
|
64
|
+
amountSharesOut = amountDeposited;
|
|
65
|
+
} else {
|
|
66
|
+
if (tokenIn == NATIVE) {
|
|
67
|
+
(tokenIn, amountDeposited) = (stETH, _depositStETH(amountDeposited));
|
|
68
|
+
}
|
|
69
|
+
uint256 preBalance = _selfBalance(rsETH);
|
|
70
|
+
IKelpDepositPool(depositPool).depositAsset(tokenIn, amountDeposited, 0, "pendle"); // TODO: hardcode referral to save gas
|
|
71
|
+
amountSharesOut = _selfBalance(rsETH) - preBalance;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function _redeem(
|
|
76
|
+
address receiver,
|
|
77
|
+
address /*tokenOut*/,
|
|
78
|
+
uint256 amountSharesToRedeem
|
|
79
|
+
) internal virtual override returns (uint256) {
|
|
80
|
+
_transferOut(rsETH, receiver, amountSharesToRedeem);
|
|
81
|
+
return amountSharesToRedeem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function _depositStETH(uint256 amountETH) internal returns (uint256 amountStETH) {
|
|
85
|
+
uint256 amountStEthSharesOut = IStETH(stETH).submit{value: amountETH}(address(0));
|
|
86
|
+
amountStETH = IStETH(stETH).getPooledEthByShares(amountStEthSharesOut);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*///////////////////////////////////////////////////////////////
|
|
90
|
+
EXCHANGE-RATE
|
|
91
|
+
//////////////////////////////////////////////////////////////*/
|
|
92
|
+
|
|
93
|
+
function exchangeRate() public view virtual override returns (uint256) {
|
|
94
|
+
return IPExchangeRateOracle(exchangeRateOracle).getExchangeRate();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function setExchangeRateOracle(address newOracle) external onlyOwner {
|
|
98
|
+
exchangeRateOracle = newOracle;
|
|
99
|
+
emit SetNewExchangeRateOracle(newOracle);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/*///////////////////////////////////////////////////////////////
|
|
103
|
+
MISC FUNCTIONS FOR METADATA
|
|
104
|
+
//////////////////////////////////////////////////////////////*/
|
|
105
|
+
|
|
106
|
+
function _previewDeposit(
|
|
107
|
+
address tokenIn,
|
|
108
|
+
uint256 amountTokenToDeposit
|
|
109
|
+
) internal view override returns (uint256 amountSharesOut) {
|
|
110
|
+
if (tokenIn == rsETH) {
|
|
111
|
+
return amountTokenToDeposit;
|
|
112
|
+
}
|
|
113
|
+
if (tokenIn == NATIVE) {
|
|
114
|
+
tokenIn = stETH;
|
|
115
|
+
}
|
|
116
|
+
return IKelpDepositPool(depositPool).getRsETHAmountToMint(tokenIn, amountTokenToDeposit);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function _previewRedeem(
|
|
120
|
+
address /*tokenOut*/,
|
|
121
|
+
uint256 amountSharesToRedeem
|
|
122
|
+
) internal pure override returns (uint256 amountTokenOut) {
|
|
123
|
+
return amountSharesToRedeem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function getTokensIn() public view virtual override returns (address[] memory) {
|
|
127
|
+
return ArrayLib.create(rsETH, NATIVE).merge(IKelpLRTConfig(lrtConfig).getSupportedAssetList());
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function getTokensOut() public view virtual override returns (address[] memory) {
|
|
131
|
+
return ArrayLib.create(rsETH);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function isValidTokenIn(address token) public view virtual override returns (bool) {
|
|
135
|
+
return token == rsETH || token == NATIVE || token == ETHx || token == stETH || _isSupportedToken(token);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function isValidTokenOut(address token) public view virtual override returns (bool) {
|
|
139
|
+
return token == rsETH;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function _isSupportedToken(address token) internal view returns (bool) {
|
|
143
|
+
return IKelpLRTConfig(lrtConfig).isSupportedAsset(token);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function assetInfo() external pure returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
147
|
+
return (AssetType.TOKEN, NATIVE, 18);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -37,7 +37,7 @@ library ArrayLib {
|
|
|
37
37
|
out[length] = element;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function appendHead(address[] memory inp, address element) internal pure returns (address[] memory out) {
|
|
40
|
+
function appendHead(address[] memory inp, address element) internal pure returns (address[] memory out) {
|
|
41
41
|
uint256 length = inp.length;
|
|
42
42
|
out = new address[](length + 1);
|
|
43
43
|
out[0] = element;
|
|
@@ -113,6 +113,13 @@ library ArrayLib {
|
|
|
113
113
|
res[1] = b;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
function create(address a, address b, address c) internal pure returns (address[] memory res) {
|
|
117
|
+
res = new address[](3);
|
|
118
|
+
res[0] = a;
|
|
119
|
+
res[1] = b;
|
|
120
|
+
res[2] = c;
|
|
121
|
+
}
|
|
122
|
+
|
|
116
123
|
function create(uint256 a) internal pure returns (uint256[] memory res) {
|
|
117
124
|
res = new uint256[](1);
|
|
118
125
|
res[0] = a;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IEtherFiLiquidityPool {
|
|
5
|
+
function totalValueOutOfLp() external view returns (uint128);
|
|
6
|
+
function totalValueInLp() external view returns (uint128);
|
|
7
|
+
function getTotalEtherClaimOf(address _user) external view returns (uint256);
|
|
8
|
+
function getTotalPooledEther() external view returns (uint256);
|
|
9
|
+
function sharesForAmount(uint256 _amount) external view returns (uint256);
|
|
10
|
+
function sharesForWithdrawalAmount(uint256 _amount) external view returns (uint256);
|
|
11
|
+
function amountForShare(uint256 _share) external view returns (uint256);
|
|
12
|
+
|
|
13
|
+
// function deposit() external payable returns (uint256);
|
|
14
|
+
function deposit(address _referral) external payable returns (uint256);
|
|
15
|
+
// function deposit(address _user, address _referral) external payable returns (uint256);
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IEtherFiWEEth {
|
|
5
|
+
function wrap(uint256 _eETHAmount) external returns (uint256);
|
|
6
|
+
|
|
7
|
+
function unwrap(uint256 _weETHAmount) external returns (uint256);
|
|
8
|
+
|
|
9
|
+
function eETH() external view returns (address);
|
|
10
|
+
|
|
11
|
+
function liquidityPool() external view returns (address);
|
|
12
|
+
}
|
|
@@ -67,9 +67,9 @@ interface IPActionAddRemoveLiqV3 {
|
|
|
67
67
|
address indexed token,
|
|
68
68
|
address receiver,
|
|
69
69
|
uint256 netTokenIn,
|
|
70
|
-
uint256 netSyMintPy,
|
|
71
70
|
uint256 netLpOut,
|
|
72
71
|
uint256 netYtOut,
|
|
72
|
+
uint256 netSyMintPy,
|
|
73
73
|
uint256 netSyInterm
|
|
74
74
|
);
|
|
75
75
|
|
|
@@ -202,6 +202,7 @@ interface IPActionAddRemoveLiqV3 {
|
|
|
202
202
|
ApproxParams calldata guessPtReceivedFromSy,
|
|
203
203
|
LimitOrderData calldata limit
|
|
204
204
|
) external returns (uint256 netPtOut, uint256 netSyFee);
|
|
205
|
+
|
|
205
206
|
function removeLiquiditySingleToken(
|
|
206
207
|
address receiver,
|
|
207
208
|
address market,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IKelpDepositPool {
|
|
5
|
+
function lrtConfig() external view returns (address);
|
|
6
|
+
|
|
7
|
+
function depositAsset(
|
|
8
|
+
address asset,
|
|
9
|
+
uint256 depositAmount,
|
|
10
|
+
uint256 minRSETHAmountToReceive,
|
|
11
|
+
string calldata referralId
|
|
12
|
+
) external;
|
|
13
|
+
|
|
14
|
+
function getRsETHAmountToMint(address asset, uint256 amount) external view returns (uint256 rsethAmountToMint);
|
|
15
|
+
}
|
|
@@ -397,7 +397,8 @@ library BytesLib {
|
|
|
397
397
|
|
|
398
398
|
for {
|
|
399
399
|
let cc := add(_postBytes, 0x20)
|
|
400
|
-
} eq(add(lt(mc, end), cb), 2) {
|
|
400
|
+
} eq(add(lt(mc, end), cb), 2) {
|
|
401
|
+
// while(uint256(mc < end) + cb == 2) // the next line is the loop condition:
|
|
401
402
|
mc := add(mc, 0x20)
|
|
402
403
|
cc := add(cc, 0x20)
|
|
403
404
|
} {
|
|
@@ -462,7 +463,8 @@ library BytesLib {
|
|
|
462
463
|
let ccRem := mload(cc)
|
|
463
464
|
for {
|
|
464
465
|
let i := 0
|
|
465
|
-
} eq(add(lt(i, numTailBytes), cb), 2) {
|
|
466
|
+
} eq(add(lt(i, numTailBytes), cb), 2) {
|
|
467
|
+
// while(uint256(i < numTailBytes) + cb == 2) // the next line is the loop condition:
|
|
466
468
|
i := add(i, 1)
|
|
467
469
|
} {
|
|
468
470
|
if iszero(eq(byte(i, mcRem), byte(i, ccRem))) {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
|
5
|
+
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
6
|
+
import "../core/libraries/math/PMath.sol";
|
|
7
|
+
import "../interfaces/IPExchangeRateOracle.sol";
|
|
8
|
+
|
|
9
|
+
contract PendleExchangeRateOracle is BoringOwnableUpgradeable, IPExchangeRateOracle {
|
|
10
|
+
using PMath for uint256;
|
|
11
|
+
using PMath for uint128;
|
|
12
|
+
|
|
13
|
+
enum RateRejectReason {
|
|
14
|
+
RATE_TOO_SMALL,
|
|
15
|
+
RATE_TOO_LARGE
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
struct ExchangeRateData {
|
|
19
|
+
uint128 rate;
|
|
20
|
+
uint64 dataBlock; // the pin block which the data is sampled at
|
|
21
|
+
uint32 dataTimestamp; // block(dataBlock).timestamp
|
|
22
|
+
uint32 updatedAt;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
error RateRejected(uint256 oldRate, uint256 newRate, RateRejectReason reason);
|
|
26
|
+
error InvalidMetadata(ExchangeRateData data);
|
|
27
|
+
|
|
28
|
+
event RateUpdated(ExchangeRateData data);
|
|
29
|
+
|
|
30
|
+
uint256 public constant MIN_UPDATE_TIME_GAP = 12 hours;
|
|
31
|
+
|
|
32
|
+
string public name;
|
|
33
|
+
ExchangeRateData public data;
|
|
34
|
+
uint256 public immutable maxRateDiff;
|
|
35
|
+
|
|
36
|
+
constructor(string memory _name, uint256 _maxRateDiff) initializer {
|
|
37
|
+
name = _name;
|
|
38
|
+
maxRateDiff = _maxRateDiff;
|
|
39
|
+
|
|
40
|
+
__BoringOwnable_init();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getExchangeRate() external view returns (uint256) {
|
|
44
|
+
return data.rate;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function setExchangeRate(uint128 rate, uint64 dataBlock, uint32 dataTimestamp) external onlyOwner {
|
|
48
|
+
ExchangeRateData memory newData = ExchangeRateData({
|
|
49
|
+
rate: rate,
|
|
50
|
+
dataBlock: dataBlock,
|
|
51
|
+
dataTimestamp: dataTimestamp,
|
|
52
|
+
updatedAt: uint32(block.timestamp)
|
|
53
|
+
});
|
|
54
|
+
_setExchangeRate(newData);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function _setExchangeRate(ExchangeRateData memory newData) internal {
|
|
58
|
+
ExchangeRateData memory oldData = data;
|
|
59
|
+
|
|
60
|
+
_validateNewRate(oldData.rate, newData.rate);
|
|
61
|
+
_validateMetadata(oldData, newData);
|
|
62
|
+
|
|
63
|
+
data = newData;
|
|
64
|
+
emit RateUpdated(newData);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function _validateNewRate(uint256 oldRate, uint256 newRate) internal view {
|
|
68
|
+
if (oldRate > newRate) {
|
|
69
|
+
revert RateRejected(oldRate, newRate, RateRejectReason.RATE_TOO_SMALL);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (oldRate != 0 && oldRate.mulDown(PMath.ONE + maxRateDiff) < newRate) {
|
|
73
|
+
revert RateRejected(oldRate, newRate, RateRejectReason.RATE_TOO_LARGE);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function _validateMetadata(ExchangeRateData memory oldData, ExchangeRateData memory newData) internal pure {
|
|
78
|
+
if (
|
|
79
|
+
oldData.dataBlock >= newData.dataBlock ||
|
|
80
|
+
oldData.dataTimestamp >= newData.dataTimestamp ||
|
|
81
|
+
oldData.updatedAt + MIN_UPDATE_TIME_GAP >= newData.updatedAt
|
|
82
|
+
) {
|
|
83
|
+
revert InvalidMetadata(newData);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -212,9 +212,12 @@ interface IExecutorHelper {
|
|
|
212
212
|
|
|
213
213
|
struct VelocoreV2 {
|
|
214
214
|
address vault;
|
|
215
|
+
uint256 amount;
|
|
215
216
|
address tokenIn;
|
|
216
217
|
address tokenOut;
|
|
217
|
-
|
|
218
|
+
address stablePool; // if not empty then use stable pool
|
|
219
|
+
address wrapToken;
|
|
220
|
+
bool isConvertFirst;
|
|
218
221
|
}
|
|
219
222
|
|
|
220
223
|
struct MaticMigrate {
|
|
@@ -232,6 +235,46 @@ interface IExecutorHelper {
|
|
|
232
235
|
address toToken;
|
|
233
236
|
}
|
|
234
237
|
|
|
238
|
+
struct BalancerV1 {
|
|
239
|
+
address pool;
|
|
240
|
+
address tokenIn;
|
|
241
|
+
address tokenOut;
|
|
242
|
+
uint256 amount;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
struct SwaapV2 {
|
|
246
|
+
address router;
|
|
247
|
+
uint256 amount;
|
|
248
|
+
bytes data;
|
|
249
|
+
address tokenIn;
|
|
250
|
+
address tokenOut;
|
|
251
|
+
address recipient;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
struct ArbswapStable {
|
|
255
|
+
address pool;
|
|
256
|
+
uint256 dx;
|
|
257
|
+
uint256 tokenIndexFrom;
|
|
258
|
+
address tokenIn;
|
|
259
|
+
address tokenOut;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
struct BancorV2 {
|
|
263
|
+
address pool;
|
|
264
|
+
address[] swapPath;
|
|
265
|
+
uint256 amount;
|
|
266
|
+
address recipient;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
struct Ambient {
|
|
270
|
+
address pool;
|
|
271
|
+
uint128 qty;
|
|
272
|
+
address base;
|
|
273
|
+
address quote;
|
|
274
|
+
uint256 poolIdx;
|
|
275
|
+
uint8 settleFlags;
|
|
276
|
+
}
|
|
277
|
+
|
|
235
278
|
function executeUniswap(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
236
279
|
|
|
237
280
|
function executeStableSwap(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
@@ -311,4 +354,18 @@ interface IExecutorHelper {
|
|
|
311
354
|
function executeSolidlyV2(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
312
355
|
|
|
313
356
|
function executeKokonut(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
357
|
+
|
|
358
|
+
function executeBalancerV1(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
359
|
+
|
|
360
|
+
function executeSwaapV2(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
361
|
+
|
|
362
|
+
function executeNomiswapStable(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
363
|
+
|
|
364
|
+
function executeArbswapStable(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
365
|
+
|
|
366
|
+
function executeBancorV2(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
367
|
+
|
|
368
|
+
function executeBancorV3(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
369
|
+
|
|
370
|
+
function executeAmbient(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
314
371
|
}
|
|
@@ -232,9 +232,12 @@ interface IExecutorHelperL2 {
|
|
|
232
232
|
|
|
233
233
|
struct VelocoreV2 {
|
|
234
234
|
address vault;
|
|
235
|
+
uint256 amount;
|
|
235
236
|
address tokenIn;
|
|
236
237
|
address tokenOut;
|
|
237
|
-
|
|
238
|
+
address stablePool; // if not empty then use stable pool
|
|
239
|
+
address wrapToken;
|
|
240
|
+
bool isConvertFirst;
|
|
238
241
|
}
|
|
239
242
|
|
|
240
243
|
struct MaticMigrate {
|
|
@@ -252,6 +255,46 @@ interface IExecutorHelperL2 {
|
|
|
252
255
|
address toToken;
|
|
253
256
|
}
|
|
254
257
|
|
|
258
|
+
struct BalancerV1 {
|
|
259
|
+
address pool;
|
|
260
|
+
uint256 amount;
|
|
261
|
+
address tokenIn;
|
|
262
|
+
address tokenOut;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
struct SwaapV2 {
|
|
266
|
+
address router;
|
|
267
|
+
uint256 amount;
|
|
268
|
+
bytes data;
|
|
269
|
+
address tokenIn;
|
|
270
|
+
address tokenOut;
|
|
271
|
+
address recipient;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
struct ArbswapStable {
|
|
275
|
+
address pool;
|
|
276
|
+
uint256 dx;
|
|
277
|
+
uint256 tokenIndexFrom;
|
|
278
|
+
address tokenIn;
|
|
279
|
+
address tokenOut;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
struct BancorV2 {
|
|
283
|
+
address pool;
|
|
284
|
+
address[] swapPath;
|
|
285
|
+
uint256 amount;
|
|
286
|
+
address recipient;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
struct Ambient {
|
|
290
|
+
address pool;
|
|
291
|
+
uint128 qty;
|
|
292
|
+
address base;
|
|
293
|
+
address quote;
|
|
294
|
+
uint256 poolIdx;
|
|
295
|
+
uint8 settleFlags;
|
|
296
|
+
}
|
|
297
|
+
|
|
255
298
|
function executeUniswap(
|
|
256
299
|
uint256 index,
|
|
257
300
|
bytes memory data,
|
|
@@ -557,4 +600,67 @@ interface IExecutorHelperL2 {
|
|
|
557
600
|
bool getPoolOnly,
|
|
558
601
|
address nextPool
|
|
559
602
|
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
603
|
+
|
|
604
|
+
function executeBalancerV1(
|
|
605
|
+
uint256 index,
|
|
606
|
+
bytes memory data,
|
|
607
|
+
uint256 previousAmountOut,
|
|
608
|
+
address tokenIn,
|
|
609
|
+
bool getPoolOnly,
|
|
610
|
+
address nextPool
|
|
611
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
612
|
+
|
|
613
|
+
function executeSwaapV2(
|
|
614
|
+
uint256 index,
|
|
615
|
+
bytes memory data,
|
|
616
|
+
uint256 previousAmountOut,
|
|
617
|
+
address tokenIn,
|
|
618
|
+
bool getPoolOnly,
|
|
619
|
+
address nextPool
|
|
620
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
621
|
+
|
|
622
|
+
function executeNomiswapStable(
|
|
623
|
+
uint256 index,
|
|
624
|
+
bytes memory data,
|
|
625
|
+
uint256 previousAmountOut,
|
|
626
|
+
address tokenIn,
|
|
627
|
+
bool getPoolOnly,
|
|
628
|
+
address nextPool
|
|
629
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
630
|
+
|
|
631
|
+
function executeArbswapStable(
|
|
632
|
+
uint256 index,
|
|
633
|
+
bytes memory data,
|
|
634
|
+
uint256 previousAmountOut,
|
|
635
|
+
address tokenIn,
|
|
636
|
+
bool getPoolOnly,
|
|
637
|
+
address nextPool
|
|
638
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
639
|
+
|
|
640
|
+
function executeBancorV2(
|
|
641
|
+
uint256 index,
|
|
642
|
+
bytes memory data,
|
|
643
|
+
uint256 previousAmountOut,
|
|
644
|
+
address tokenIn,
|
|
645
|
+
bool getPoolOnly,
|
|
646
|
+
address nextPool
|
|
647
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
648
|
+
|
|
649
|
+
function executeBancorV3(
|
|
650
|
+
uint256 index,
|
|
651
|
+
bytes memory data,
|
|
652
|
+
uint256 previousAmountOut,
|
|
653
|
+
address tokenIn,
|
|
654
|
+
bool getPoolOnly,
|
|
655
|
+
address nextPool
|
|
656
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
657
|
+
|
|
658
|
+
function executeAmbient(
|
|
659
|
+
uint256 index,
|
|
660
|
+
bytes memory data,
|
|
661
|
+
uint256 previousAmountOut,
|
|
662
|
+
address tokenIn,
|
|
663
|
+
bool getPoolOnly,
|
|
664
|
+
address nextPool
|
|
665
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
560
666
|
}
|