@pendle/core-v2 4.4.1 → 4.4.2
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/core/Market/v1/PendleMarket.sol/PendleMarket.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v1/PendleMarket.sol/PendleMarket.json +9 -149
- 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 +9 -149
- 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 +9 -149
- package/build/artifacts/contracts/core/StandardizedYield/SYBase.sol/SYBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseUpg.sol/SYBaseUpg.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/Ankr/PendleAnkrBNBSY.sol/PendleAnkrBNBSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ape/sAPE.sol/sAPE.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraEthxBbAWethSY.sol/AuraEthxBbAWethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraSwEthBbAWethSYV2.sol/AuraSwEthBbAWethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/AuraWethVethSYUpg.sol/AuraWethVethSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraBbAWethSwethSY.sol/PendleAuraBbAWethSwethSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethAnkrethSYV2.sol/PendleAuraWethAnkrethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethRocketEthSYV2.sol/PendleAuraWethRocketEthSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethStafiEthSY.sol/PendleAuraWethStafiEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWethWstethSYV2.sol/PendleAuraWethWstethSYV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BalancerStable/PendleAuraWstethAnkreth.sol/PendleAuraWstethAnkreth.dbg.json +1 -1
- 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/BedRock/PendleUniETHSY.sol/PendleUniETHSY.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/CamelotV1Volatile/PendleCamelotV1VolatileSY.sol/PendleCamelotV1VolatileSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveFraxUsdcSY.sol/PendleCurveFraxUsdcSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/PendleCurveUsdd3CrvSY.sol/PendleCurveUsdd3CrvSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/PendleConvexLPSY.sol/PendleConvexLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDEMantleSY.sol/PendleSUSDEMantleSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDEMantleSY.sol/PendleSUSDEMantleSY.json +1099 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDESY.sol/PendleSUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDEMantleSY.sol/PendleUSDEMantleSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDEMantleSY.sol/PendleUSDEMantleSY.json +1055 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDESY.sol/PendleUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Flux/PendleFluxLendingSY.sol/PendleFluxLendingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGMV2TokenSY.sol/PendleGMV2TokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol/PendleGlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/HMX/PendleHlpSY.sol/PendleHlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/PendleKyberElasticSYUpg.sol/PendleKyberElasticSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MUX/PendleMlpSY.sol/PendleMlpSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleMantleStakedEthSY.sol/PendleMantleStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/MantleStakedEth/PendleOracleForSyProxy.sol/PendleOracleForSyProxy.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleArbitrumStakedEthSY.sol/PendleArbitrumStakedEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol/PendleBridgedLSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SY.sol/PendleERC20SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SYUpg.sol/PendleERC20SYUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SYUpg.sol/PendleERC20SYUpg.json +976 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol/PendleERC4626SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626UpgSY.sol/PendleERC4626SYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleEUSDSY.sol/PendleEUSDSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleL2LRTSY.sol/PendleL2LRTSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleLooksStakingSY.sol/PendleLooksStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleSfrxEthSY.sol/PendleSfrxEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleStargateLPSY.sol/PendleStargateLPSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWbEthSY.sol/PendleWbEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleWstEthSY.sol/PendleWstEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PirexETH/PendleApxETHSY.sol/PendleApxETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufStETHSY.sol/PendlePufStETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufWETHSY.sol/PendlePufWETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHL2SY.sol/PendleEzETHL2SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol/PendleEzETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Silo/PendleSiloWithIncentiveSY.sol/PendleSiloWithIncentiveSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Stader/PendleETHXSY.sol/PendleETHXSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleRswETHSY.sol/PendleRswETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/PendleThenaSY.sol/PendleThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeEzETHSY.sol/PendleZtakeEzETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeRsETHSY.sol/PendleZtakeRsETHSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeRsETHSY.sol/PendleZtakeRsETHSY.json +1074 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWETHSY.sol/PendleZtakeWETHSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWETHSY.sol/PendleZtakeWETHSY.json +1025 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWeETHSY.sol/PendleZtakeWeETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContracts/PendlePrincipalToken.sol/PendlePrincipalToken.json +2 -142
- 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 -142
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +1 -1
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +2 -142
- 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 -142
- package/build/artifacts/contracts/core/erc20/PendleERC20Permit.sol/PendleERC20Permit.dbg.json +1 -1
- package/build/artifacts/contracts/core/erc20/PendleERC20PermitUpg.sol/PendleERC20PermitUpg.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpDepositPool.sol/IKelpDepositPool.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/KelpDAO/IKelpDepositPool.sol/IKelpDepositPool.json +18 -0
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/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 +336 -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 +54 -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/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/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/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/Market/v1/PendleMarket.sol +3 -3
- package/contracts/core/Market/v2/PendleMarketV2.sol +3 -3
- package/contracts/core/Market/v3/PendleMarketV3.sol +3 -3
- package/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDEMantleSY.sol +86 -0
- package/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDEMantleSY.sol +61 -0
- package/contracts/core/StandardizedYield/implementations/PendleERC20SYUpg.sol +66 -0
- package/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeRsETHSY.sol +117 -0
- package/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWETHSY.sol +89 -0
- package/contracts/core/YieldContracts/PendlePrincipalToken.sol +3 -3
- package/contracts/core/YieldContracts/PendleYieldToken.sol +3 -3
- package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +3 -3
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +3 -3
- package/contracts/interfaces/KelpDAO/IKelpDepositPool.sol +2 -0
- package/contracts/limit/LimitRouterBase.sol +2 -2
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelper.sol +64 -0
- package/contracts/router/swap-aggregator/kyberswap/interfaces/IExecutorHelperL2.sol +15 -0
- package/contracts/router/swap-aggregator/kyberswap/l1-contracts/InputScalingHelper.sol +28 -0
- package/contracts/router/swap-aggregator/kyberswap/l1-contracts/ScalingDataLib.sol +83 -2
- package/deployments/1-core.json +1 -1
- package/deployments/1-markets/AAVE-USDT-SEP2024.json +3 -3
- package/deployments/1-markets/RSWETH-JUNE2024-NEW.json +11 -0
- package/deployments/1-markets/UNIETH-JUNE2024-NEW.json +11 -0
- package/deployments/1-markets/USDE-JUL2024.json +13 -0
- package/deployments/1-markets/ZIRCUIT-EETH-JUN2024.json +11 -0
- package/deployments/1-markets/ZIRCUIT-RSETH-JUN2024.json +11 -0
- package/deployments/10-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/deployments/42161-markets/EZETH-JUNE2024-NEW.json +11 -0
- package/deployments/5000-core.json +3 -2
- package/deployments/5000-markets/USD-MANTLE-JUL2024.json +11 -0
- package/deployments/56-core.json +1 -1
- package/deployments/merkle-distribution/2024-03-28.json +12725 -0
- package/package.json +1 -1
- package/typechain-types/IExecutorHelper.ts +546 -0
- package/typechain-types/IExecutorHelperL2.ts +65 -0
- package/typechain-types/IKelpDepositPool.ts +37 -0
- package/typechain-types/PendleERC20SYUpg.ts +1270 -0
- package/typechain-types/PendleMarket.ts +0 -169
- package/typechain-types/PendleMarketV2.ts +0 -169
- package/typechain-types/PendleMarketV3.ts +0 -169
- package/typechain-types/PendlePrincipalToken.ts +0 -169
- package/typechain-types/PendlePrincipalTokenV2.ts +0 -169
- package/typechain-types/PendleSUSDEMantleSY.ts +1438 -0
- package/typechain-types/PendleUSDEMantleSY.ts +1363 -0
- package/typechain-types/PendleYieldToken.ts +0 -169
- package/typechain-types/PendleYieldTokenV2.ts +0 -169
- package/typechain-types/PendleZtakeRsETHSY.ts +1377 -0
- package/typechain-types/PendleZtakeWETHSY.ts +1324 -0
- package/typechain-types/factories/IExecutorHelperL2__factory.ts +54 -0
- package/typechain-types/factories/IExecutorHelper__factory.ts +336 -0
- package/typechain-types/factories/IKelpDepositPool__factory.ts +18 -0
- package/typechain-types/factories/PendleERC20SYUpg__factory.ts +991 -0
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketV2__factory.ts +1 -141
- package/typechain-types/factories/PendleMarketV3__factory.ts +1 -141
- package/typechain-types/factories/PendleMarket__factory.ts +1 -141
- package/typechain-types/factories/PendlePrincipalTokenV2__factory.ts +1 -141
- package/typechain-types/factories/PendlePrincipalToken__factory.ts +1 -141
- package/typechain-types/factories/PendleRsETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSUSDEMantleSY__factory.ts +1157 -0
- package/typechain-types/factories/PendleSwapL1__factory.ts +1 -1
- package/typechain-types/factories/PendleSwapL2__factory.ts +1 -1
- package/typechain-types/factories/PendleUSDEMantleSY__factory.ts +1110 -0
- 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 -141
- package/typechain-types/factories/PendleYieldToken__factory.ts +1 -141
- package/typechain-types/factories/PendleZtakeRsETHSY__factory.ts +1147 -0
- package/typechain-types/factories/PendleZtakeWETHSY__factory.ts +1086 -0
- package/typechain-types/hardhat.d.ts +45 -0
- package/typechain-types/index.ts +10 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../PendleERC20SYUpg.sol";
|
|
5
|
+
import "../../../../interfaces/IPExchangeRateOracle.sol";
|
|
6
|
+
|
|
7
|
+
contract PendleSUSDEMantleSY is PendleERC20SYUpg {
|
|
8
|
+
event SetNewExchangeRateOracle(address oracle);
|
|
9
|
+
|
|
10
|
+
event SupplyCapUpdated(uint256 newSupplyCap);
|
|
11
|
+
|
|
12
|
+
error SupplyCapExceeded(uint256 totalSupply, uint256 supplyCap);
|
|
13
|
+
|
|
14
|
+
address public exchangeRateOracle;
|
|
15
|
+
uint256 public supplyCap;
|
|
16
|
+
|
|
17
|
+
constructor(address _susde) PendleERC20SYUpg(_susde) {
|
|
18
|
+
_disableInitializers();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function initialize(uint256 _initialSupplyCap, address _initialExchangeRateOracle) external initializer {
|
|
22
|
+
__SYBaseUpg_init("SY Ethena sUSDE", "SY-sUSDE");
|
|
23
|
+
_setExchangeRateOracle(_initialExchangeRateOracle);
|
|
24
|
+
_updateSupplyCap(_initialSupplyCap);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*///////////////////////////////////////////////////////////////
|
|
28
|
+
EXCHANGE RATE ORACLE
|
|
29
|
+
//////////////////////////////////////////////////////////////*/
|
|
30
|
+
|
|
31
|
+
function exchangeRate() public view virtual override returns (uint256) {
|
|
32
|
+
return IPExchangeRateOracle(exchangeRateOracle).getExchangeRate();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function setExchangeRateOracle(address _exchangeRateOracle) external onlyOwner {
|
|
36
|
+
_setExchangeRateOracle(_exchangeRateOracle);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function _setExchangeRateOracle(address _exchangeRateOracle) internal {
|
|
40
|
+
exchangeRateOracle = _exchangeRateOracle;
|
|
41
|
+
emit SetNewExchangeRateOracle(_exchangeRateOracle);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*///////////////////////////////////////////////////////////////
|
|
45
|
+
SUPPLY CAP LOGIC
|
|
46
|
+
//////////////////////////////////////////////////////////////*/
|
|
47
|
+
|
|
48
|
+
function _previewDeposit(
|
|
49
|
+
address /*tokenIn*/,
|
|
50
|
+
uint256 amountTokenToDeposit
|
|
51
|
+
) internal view override returns (uint256 /*amountSharesOut*/) {
|
|
52
|
+
uint256 _newSupply = totalSupply() + amountTokenToDeposit;
|
|
53
|
+
uint256 _supplyCap = supplyCap;
|
|
54
|
+
|
|
55
|
+
if (_newSupply > _supplyCap) {
|
|
56
|
+
revert SupplyCapExceeded(_newSupply, _supplyCap);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return amountTokenToDeposit;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function updateSupplyCap(uint256 newSupplyCap) external onlyOwner {
|
|
63
|
+
_updateSupplyCap(newSupplyCap);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _updateSupplyCap(uint256 newSupplyCap) internal {
|
|
67
|
+
supplyCap = newSupplyCap;
|
|
68
|
+
emit SupplyCapUpdated(newSupplyCap);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// @dev: whenNotPaused not needed as it has already been added to beforeTransfer
|
|
72
|
+
function _afterTokenTransfer(address from, address, uint256) internal virtual override {
|
|
73
|
+
// only check for minting case
|
|
74
|
+
// saving gas on user->user transfers
|
|
75
|
+
// skip supply cap checking on burn to allow lowering supply cap
|
|
76
|
+
if (from != address(0)) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
uint256 _supply = totalSupply();
|
|
81
|
+
uint256 _supplyCap = supplyCap;
|
|
82
|
+
if (_supply > _supplyCap) {
|
|
83
|
+
revert SupplyCapExceeded(_supply, _supplyCap);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../PendleERC20SYUpg.sol";
|
|
5
|
+
|
|
6
|
+
contract PendleUSDEMantleSY is PendleERC20SYUpg {
|
|
7
|
+
uint256 public supplyCap;
|
|
8
|
+
|
|
9
|
+
event SupplyCapUpdated(uint256 newSupplyCap);
|
|
10
|
+
|
|
11
|
+
error SupplyCapExceeded(uint256 totalSupply, uint256 supplyCap);
|
|
12
|
+
|
|
13
|
+
constructor(address _usde) PendleERC20SYUpg(_usde) {
|
|
14
|
+
_disableInitializers();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function initialize(uint256 _initialSupplyCap) external initializer {
|
|
18
|
+
__SYBaseUpg_init("SY Ethena USDe", "SY-USDe");
|
|
19
|
+
_updateSupplyCap(_initialSupplyCap);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
function _previewDeposit(
|
|
24
|
+
address /*tokenIn*/,
|
|
25
|
+
uint256 amountTokenToDeposit
|
|
26
|
+
) internal view override returns (uint256 /*amountSharesOut*/) {
|
|
27
|
+
uint256 _newSupply = totalSupply() + amountTokenToDeposit;
|
|
28
|
+
uint256 _supplyCap = supplyCap;
|
|
29
|
+
|
|
30
|
+
if (_newSupply > _supplyCap) {
|
|
31
|
+
revert SupplyCapExceeded(_newSupply, _supplyCap);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return amountTokenToDeposit;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function updateSupplyCap(uint256 newSupplyCap) external onlyOwner {
|
|
38
|
+
_updateSupplyCap(newSupplyCap);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function _updateSupplyCap(uint256 newSupplyCap) internal {
|
|
42
|
+
supplyCap = newSupplyCap;
|
|
43
|
+
emit SupplyCapUpdated(newSupplyCap);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// @dev: whenNotPaused not needed as it has already been added to beforeTransfer
|
|
47
|
+
function _afterTokenTransfer(address from, address, uint256) internal virtual override {
|
|
48
|
+
// only check for minting case
|
|
49
|
+
// saving gas on user->user transfers
|
|
50
|
+
// skip supply cap checking on burn to allow lowering supply cap
|
|
51
|
+
if (from != address(0)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
uint256 _supply = totalSupply();
|
|
56
|
+
uint256 _supplyCap = supplyCap;
|
|
57
|
+
if (_supply > _supplyCap) {
|
|
58
|
+
revert SupplyCapExceeded(_supply, _supplyCap);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../SYBaseUpg.sol";
|
|
5
|
+
|
|
6
|
+
abstract contract PendleERC20SYUpg is SYBaseUpg {
|
|
7
|
+
using PMath for uint256;
|
|
8
|
+
|
|
9
|
+
uint256[100] private __gap;
|
|
10
|
+
|
|
11
|
+
constructor(address _erc20) SYBaseUpg(_erc20) {}
|
|
12
|
+
|
|
13
|
+
function _deposit(
|
|
14
|
+
address /*tokenIn*/,
|
|
15
|
+
uint256 amountDeposited
|
|
16
|
+
) internal virtual override returns (uint256 /*amountSharesOut*/) {
|
|
17
|
+
return amountDeposited;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _redeem(
|
|
21
|
+
address receiver,
|
|
22
|
+
address /*tokenOut*/,
|
|
23
|
+
uint256 amountSharesToRedeem
|
|
24
|
+
) internal override returns (uint256) {
|
|
25
|
+
_transferOut(yieldToken, receiver, amountSharesToRedeem);
|
|
26
|
+
return amountSharesToRedeem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function exchangeRate() public view virtual override returns (uint256 res) {
|
|
30
|
+
return PMath.ONE;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _previewDeposit(
|
|
34
|
+
address /*tokenIn*/,
|
|
35
|
+
uint256 amountTokenToDeposit
|
|
36
|
+
) internal view virtual override returns (uint256 /*amountSharesOut*/) {
|
|
37
|
+
return amountTokenToDeposit;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _previewRedeem(
|
|
41
|
+
address /*tokenOut*/,
|
|
42
|
+
uint256 amountSharesToRedeem
|
|
43
|
+
) internal view virtual override returns (uint256 /*amountTokenOut*/) {
|
|
44
|
+
return amountSharesToRedeem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
48
|
+
return ArrayLib.create(yieldToken);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
52
|
+
return ArrayLib.create(yieldToken);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
56
|
+
return token == yieldToken;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
60
|
+
return token == yieldToken;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
64
|
+
return (AssetType.TOKEN, yieldToken, IERC20Metadata(yieldToken).decimals());
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../SYBaseUpg.sol";
|
|
5
|
+
import "../../../../interfaces/Zircuit/IZircuitZtaking.sol";
|
|
6
|
+
import "../../../../interfaces/IPExchangeRateOracle.sol";
|
|
7
|
+
import "../../../../interfaces/KelpDAO/IKelpDepositPool.sol";
|
|
8
|
+
import "../../../../interfaces/KelpDAO/IKelpLRTConfig.sol";
|
|
9
|
+
|
|
10
|
+
contract PendleZtakeRsETHSY is SYBaseUpg {
|
|
11
|
+
address public constant ETH_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
12
|
+
|
|
13
|
+
// solhint-disable immutable-vars-naming
|
|
14
|
+
address public immutable zircuitStaking;
|
|
15
|
+
address public immutable rsETH;
|
|
16
|
+
address public immutable depositPool;
|
|
17
|
+
address public immutable exchangeRateOracle;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
address _zircuitStaking,
|
|
21
|
+
address _rsETH,
|
|
22
|
+
address _depositPool,
|
|
23
|
+
address _exchangeRateOracle
|
|
24
|
+
) SYBaseUpg(_rsETH) {
|
|
25
|
+
_disableInitializers();
|
|
26
|
+
zircuitStaking = _zircuitStaking;
|
|
27
|
+
rsETH = _rsETH;
|
|
28
|
+
depositPool = _depositPool;
|
|
29
|
+
exchangeRateOracle = _exchangeRateOracle;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function initialize() external initializer {
|
|
33
|
+
__SYBaseUpg_init("SY Zircuit Staking rsETH", "SY-zs-rsETH");
|
|
34
|
+
_safeApproveInf(rsETH, zircuitStaking);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/*///////////////////////////////////////////////////////////////
|
|
38
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
39
|
+
//////////////////////////////////////////////////////////////*/
|
|
40
|
+
|
|
41
|
+
function _deposit(
|
|
42
|
+
address tokenIn,
|
|
43
|
+
uint256 amountDeposited
|
|
44
|
+
) internal virtual override returns (uint256 amountSharesOut) {
|
|
45
|
+
if (tokenIn == NATIVE) {
|
|
46
|
+
IKelpDepositPool(depositPool).depositETH{value: amountDeposited}(
|
|
47
|
+
0,
|
|
48
|
+
"c05f6902ec7c7434ceb666010c16a63a2e3995aad11f1280855b26402194346b"
|
|
49
|
+
);
|
|
50
|
+
amountSharesOut = _selfBalance(rsETH);
|
|
51
|
+
} else {
|
|
52
|
+
amountSharesOut = amountDeposited;
|
|
53
|
+
}
|
|
54
|
+
IZircuitZtaking(zircuitStaking).depositFor(rsETH, address(this), amountSharesOut);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function _redeem(
|
|
58
|
+
address receiver,
|
|
59
|
+
address /*tokenOut*/,
|
|
60
|
+
uint256 amountSharesToRedeem
|
|
61
|
+
) internal override returns (uint256 /*amountTokenOut*/) {
|
|
62
|
+
IZircuitZtaking(zircuitStaking).withdraw(rsETH, amountSharesToRedeem);
|
|
63
|
+
_transferOut(rsETH, receiver, amountSharesToRedeem);
|
|
64
|
+
return amountSharesToRedeem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/*///////////////////////////////////////////////////////////////
|
|
68
|
+
EXCHANGE-RATE
|
|
69
|
+
//////////////////////////////////////////////////////////////*/
|
|
70
|
+
|
|
71
|
+
function exchangeRate() public view virtual override returns (uint256) {
|
|
72
|
+
return IPExchangeRateOracle(exchangeRateOracle).getExchangeRate();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*///////////////////////////////////////////////////////////////
|
|
76
|
+
MISC FUNCTIONS FOR METADATA
|
|
77
|
+
//////////////////////////////////////////////////////////////*/
|
|
78
|
+
|
|
79
|
+
function _previewDeposit(
|
|
80
|
+
address tokenIn,
|
|
81
|
+
uint256 amountTokenToDeposit
|
|
82
|
+
) internal view override returns (uint256 /*amountSharesOut*/) {
|
|
83
|
+
if (tokenIn == rsETH) {
|
|
84
|
+
return amountTokenToDeposit;
|
|
85
|
+
}
|
|
86
|
+
return IKelpDepositPool(depositPool).getRsETHAmountToMint(ETH_TOKEN, amountTokenToDeposit);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function _previewRedeem(
|
|
90
|
+
address /*tokenOut*/,
|
|
91
|
+
uint256 amountSharesToRedeem
|
|
92
|
+
) internal pure override returns (uint256 /*amountTokenOut*/) {
|
|
93
|
+
return amountSharesToRedeem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
97
|
+
return ArrayLib.create(NATIVE, rsETH);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
101
|
+
return ArrayLib.create(rsETH);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
105
|
+
return token == NATIVE || token == rsETH;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
109
|
+
return token == rsETH;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function assetInfo() external pure returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
113
|
+
assetType = AssetType.TOKEN;
|
|
114
|
+
assetAddress = NATIVE;
|
|
115
|
+
assetDecimals = 18;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../../SYBaseUpg.sol";
|
|
5
|
+
import "../../../../interfaces/Zircuit/IZircuitZtaking.sol";
|
|
6
|
+
|
|
7
|
+
contract PendleZtakeWETHSY is SYBaseUpg {
|
|
8
|
+
// solhint-disable immutable-vars-naming
|
|
9
|
+
address public immutable zircuitStaking;
|
|
10
|
+
address public immutable wETH;
|
|
11
|
+
|
|
12
|
+
constructor(address _zircuitStaking, address _wETH) SYBaseUpg(_wETH) {
|
|
13
|
+
_disableInitializers();
|
|
14
|
+
zircuitStaking = _zircuitStaking;
|
|
15
|
+
wETH = _wETH;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function initialize() external initializer {
|
|
19
|
+
__SYBaseUpg_init("SY Zircuit Staking wETH", "SY-zs-wETH");
|
|
20
|
+
_safeApproveInf(wETH, zircuitStaking);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/*///////////////////////////////////////////////////////////////
|
|
24
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
25
|
+
//////////////////////////////////////////////////////////////*/
|
|
26
|
+
|
|
27
|
+
function _deposit(address /*tokenIn*/, uint256 amountDeposited) internal virtual override returns (uint256) {
|
|
28
|
+
IZircuitZtaking(zircuitStaking).depositFor(wETH, address(this), amountDeposited);
|
|
29
|
+
return amountDeposited;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _redeem(
|
|
33
|
+
address receiver,
|
|
34
|
+
address /*tokenOut*/,
|
|
35
|
+
uint256 amountSharesToRedeem
|
|
36
|
+
) internal override returns (uint256 /*amountTokenOut*/) {
|
|
37
|
+
IZircuitZtaking(zircuitStaking).withdraw(wETH, amountSharesToRedeem);
|
|
38
|
+
_transferOut(wETH, receiver, amountSharesToRedeem);
|
|
39
|
+
return amountSharesToRedeem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/*///////////////////////////////////////////////////////////////
|
|
43
|
+
EXCHANGE-RATE
|
|
44
|
+
//////////////////////////////////////////////////////////////*/
|
|
45
|
+
|
|
46
|
+
function exchangeRate() public view virtual override returns (uint256) {
|
|
47
|
+
return PMath.ONE;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*///////////////////////////////////////////////////////////////
|
|
51
|
+
MISC FUNCTIONS FOR METADATA
|
|
52
|
+
//////////////////////////////////////////////////////////////*/
|
|
53
|
+
|
|
54
|
+
function _previewDeposit(
|
|
55
|
+
address /*tokenIn*/,
|
|
56
|
+
uint256 amountTokenToDeposit
|
|
57
|
+
) internal pure override returns (uint256 /*amountSharesOut*/) {
|
|
58
|
+
return amountTokenToDeposit;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function _previewRedeem(
|
|
62
|
+
address /*tokenOut*/,
|
|
63
|
+
uint256 amountSharesToRedeem
|
|
64
|
+
) internal pure override returns (uint256 /*amountTokenOut*/) {
|
|
65
|
+
return amountSharesToRedeem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
69
|
+
return ArrayLib.create(wETH);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
73
|
+
return ArrayLib.create(wETH);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
77
|
+
return token == wETH;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
81
|
+
return token == wETH;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
85
|
+
assetType = AssetType.TOKEN;
|
|
86
|
+
assetAddress = wETH;
|
|
87
|
+
assetDecimals = 18;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -7,11 +7,11 @@ import "../../interfaces/IPYieldToken.sol";
|
|
|
7
7
|
import "../libraries/MiniHelpers.sol";
|
|
8
8
|
import "../libraries/Errors.sol";
|
|
9
9
|
|
|
10
|
-
import "../erc20/
|
|
10
|
+
import "../erc20/PendleERC20.sol";
|
|
11
11
|
|
|
12
12
|
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
13
13
|
|
|
14
|
-
contract PendlePrincipalToken is
|
|
14
|
+
contract PendlePrincipalToken is PendleERC20, Initializable, IPPrincipalToken {
|
|
15
15
|
address public immutable SY;
|
|
16
16
|
address public immutable factory;
|
|
17
17
|
uint256 public immutable expiry;
|
|
@@ -33,7 +33,7 @@ contract PendlePrincipalToken is PendleERC20Permit, Initializable, IPPrincipalTo
|
|
|
33
33
|
string memory _symbol,
|
|
34
34
|
uint8 __decimals,
|
|
35
35
|
uint256 _expiry
|
|
36
|
-
)
|
|
36
|
+
) PendleERC20(_name, _symbol, __decimals) {
|
|
37
37
|
SY = _SY;
|
|
38
38
|
expiry = _expiry;
|
|
39
39
|
factory = msg.sender;
|
|
@@ -15,7 +15,7 @@ import "../libraries/Errors.sol";
|
|
|
15
15
|
import "../libraries/MiniHelpers.sol";
|
|
16
16
|
|
|
17
17
|
import "../RewardManager/RewardManagerAbstract.sol";
|
|
18
|
-
import "../erc20/
|
|
18
|
+
import "../erc20/PendleERC20.sol";
|
|
19
19
|
import "./InterestManagerYT.sol";
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -23,7 +23,7 @@ Invariance to maintain:
|
|
|
23
23
|
- address(0) & address(this) should never have any rewards & activeBalance accounting done. This is
|
|
24
24
|
guaranteed by address(0) & address(this) check in each updateForTwo function
|
|
25
25
|
*/
|
|
26
|
-
contract PendleYieldToken is IPYieldToken,
|
|
26
|
+
contract PendleYieldToken is IPYieldToken, PendleERC20, RewardManagerAbstract, InterestManagerYT {
|
|
27
27
|
using PMath for uint256;
|
|
28
28
|
using SafeERC20 for IERC20;
|
|
29
29
|
using ArrayLib for uint256[];
|
|
@@ -73,7 +73,7 @@ contract PendleYieldToken is IPYieldToken, PendleERC20Permit, RewardManagerAbstr
|
|
|
73
73
|
uint8 __decimals,
|
|
74
74
|
uint256 _expiry,
|
|
75
75
|
bool _doCacheIndexSameBlock
|
|
76
|
-
)
|
|
76
|
+
) PendleERC20(_name, _symbol, __decimals) {
|
|
77
77
|
SY = _SY;
|
|
78
78
|
PT = _PT;
|
|
79
79
|
expiry = _expiry;
|
|
@@ -7,11 +7,11 @@ import "../../interfaces/IPYieldToken.sol";
|
|
|
7
7
|
import "../libraries/MiniHelpers.sol";
|
|
8
8
|
import "../libraries/Errors.sol";
|
|
9
9
|
|
|
10
|
-
import "../erc20/
|
|
10
|
+
import "../erc20/PendleERC20.sol";
|
|
11
11
|
|
|
12
12
|
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
13
13
|
|
|
14
|
-
contract PendlePrincipalTokenV2 is
|
|
14
|
+
contract PendlePrincipalTokenV2 is PendleERC20, Initializable, IPPrincipalToken {
|
|
15
15
|
address public immutable SY;
|
|
16
16
|
address public immutable factory;
|
|
17
17
|
uint256 public immutable expiry;
|
|
@@ -33,7 +33,7 @@ contract PendlePrincipalTokenV2 is PendleERC20Permit, Initializable, IPPrincipal
|
|
|
33
33
|
string memory _symbol,
|
|
34
34
|
uint8 __decimals,
|
|
35
35
|
uint256 _expiry
|
|
36
|
-
)
|
|
36
|
+
) PendleERC20(_name, _symbol, __decimals) {
|
|
37
37
|
SY = _SY;
|
|
38
38
|
expiry = _expiry;
|
|
39
39
|
factory = msg.sender;
|
|
@@ -15,7 +15,7 @@ import "../libraries/Errors.sol";
|
|
|
15
15
|
import "../libraries/MiniHelpers.sol";
|
|
16
16
|
|
|
17
17
|
import "../RewardManager/RewardManager.sol";
|
|
18
|
-
import "../erc20/
|
|
18
|
+
import "../erc20/PendleERC20.sol";
|
|
19
19
|
import "./InterestManagerYTV2.sol";
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -23,7 +23,7 @@ Invariance to maintain:
|
|
|
23
23
|
- address(0) & address(this) should never have any rewards & activeBalance accounting done. This is
|
|
24
24
|
guaranteed by address(0) & address(this) check in each updateForTwo function
|
|
25
25
|
*/
|
|
26
|
-
contract PendleYieldTokenV2 is IPYieldTokenV2,
|
|
26
|
+
contract PendleYieldTokenV2 is IPYieldTokenV2, PendleERC20, RewardManager, InterestManagerYTV2 {
|
|
27
27
|
using PMath for uint256;
|
|
28
28
|
using SafeERC20 for IERC20;
|
|
29
29
|
using ArrayLib for uint256[];
|
|
@@ -72,7 +72,7 @@ contract PendleYieldTokenV2 is IPYieldTokenV2, PendleERC20Permit, RewardManager,
|
|
|
72
72
|
uint8 __decimals,
|
|
73
73
|
uint256 _expiry,
|
|
74
74
|
bool _doCacheIndexSameBlock
|
|
75
|
-
)
|
|
75
|
+
) PendleERC20(_name, _symbol, __decimals) {
|
|
76
76
|
SY = _SY;
|
|
77
77
|
PT = _PT;
|
|
78
78
|
expiry = _expiry;
|
|
@@ -12,4 +12,6 @@ interface IKelpDepositPool {
|
|
|
12
12
|
) external;
|
|
13
13
|
|
|
14
14
|
function getRsETHAmountToMint(address asset, uint256 amount) external view returns (uint256 rsethAmountToMint);
|
|
15
|
+
|
|
16
|
+
function depositETH(uint256 minRSETHAmountExpected, string calldata referralId) external payable;
|
|
15
17
|
}
|
|
@@ -320,8 +320,6 @@ abstract contract LimitRouterBase is
|
|
|
320
320
|
FillOrderParams[] memory params,
|
|
321
321
|
uint256[] memory netSyOuts
|
|
322
322
|
) internal returns (uint256[] memory toMakers) {
|
|
323
|
-
// netSyOuts all > 0, guarantee in LimitMath
|
|
324
|
-
|
|
325
323
|
uint256 len = params.length;
|
|
326
324
|
toMakers = new uint256[](len);
|
|
327
325
|
|
|
@@ -333,6 +331,8 @@ abstract contract LimitRouterBase is
|
|
|
333
331
|
totalSy += netSyOuts[r];
|
|
334
332
|
}
|
|
335
333
|
|
|
334
|
+
if (totalSy == 0) continue;
|
|
335
|
+
|
|
336
336
|
if (sharedToken == SY) {
|
|
337
337
|
for (uint256 i = l; i < r; i++) {
|
|
338
338
|
_transferOut(SY, params[i].order.receiver, netSyOuts[i]);
|
|
@@ -317,6 +317,39 @@ interface IExecutorHelper {
|
|
|
317
317
|
address recipient;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
+
struct Renzo {
|
|
321
|
+
address pool;
|
|
322
|
+
uint256 amount;
|
|
323
|
+
address tokenIn;
|
|
324
|
+
address tokenOut;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
struct FrxETH {
|
|
328
|
+
address pool;
|
|
329
|
+
uint256 amount;
|
|
330
|
+
address tokenOut;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
struct SfrxETH {
|
|
334
|
+
address pool;
|
|
335
|
+
uint256 amount;
|
|
336
|
+
address tokenOut;
|
|
337
|
+
address recipient;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
struct SfrxETHConvertor {
|
|
341
|
+
address pool;
|
|
342
|
+
uint256 isDepositAndAmount; // 1 isDeposit + 127 empty + 128 amount token in
|
|
343
|
+
address tokenIn;
|
|
344
|
+
address tokenOut;
|
|
345
|
+
address recipient;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
struct OriginETH {
|
|
349
|
+
address pool;
|
|
350
|
+
uint256 amount;
|
|
351
|
+
}
|
|
352
|
+
|
|
320
353
|
function executeUniswap(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
321
354
|
|
|
322
355
|
function executeStableSwap(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
@@ -430,4 +463,35 @@ interface IExecutorHelper {
|
|
|
430
463
|
function executeEthenaSusde(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
431
464
|
|
|
432
465
|
function executeMakersDAI(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
466
|
+
|
|
467
|
+
function executeRenzo(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
468
|
+
|
|
469
|
+
function executeWBETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
470
|
+
|
|
471
|
+
function executeMantleETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
472
|
+
|
|
473
|
+
function executeFrxETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
474
|
+
|
|
475
|
+
function executeSfrxETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
476
|
+
|
|
477
|
+
function executeSfrxETHConvertor(
|
|
478
|
+
bytes memory data,
|
|
479
|
+
uint256 flagsAndPrevAmountOut
|
|
480
|
+
) external payable returns (uint256);
|
|
481
|
+
|
|
482
|
+
function executeSwellETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
483
|
+
|
|
484
|
+
function executeRswETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
485
|
+
|
|
486
|
+
function executeStaderETHx(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
487
|
+
|
|
488
|
+
function executeOriginETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
489
|
+
|
|
490
|
+
function executePrimeETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
491
|
+
|
|
492
|
+
function executeMantleUsd(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
493
|
+
|
|
494
|
+
function executeBedrockUniETH(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
495
|
+
|
|
496
|
+
function executeMaiPSM(bytes memory data, uint256 flagsAndPrevAmountOut) external payable returns (uint256);
|
|
433
497
|
}
|
|
@@ -304,6 +304,12 @@ interface IExecutorHelperL2 {
|
|
|
304
304
|
address recipient;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
+
struct FrxETH {
|
|
308
|
+
address pool;
|
|
309
|
+
uint256 amount;
|
|
310
|
+
address tokenOut;
|
|
311
|
+
}
|
|
312
|
+
|
|
307
313
|
function executeUniswap(
|
|
308
314
|
uint256 index,
|
|
309
315
|
bytes memory data,
|
|
@@ -690,4 +696,13 @@ interface IExecutorHelperL2 {
|
|
|
690
696
|
bool getPoolOnly,
|
|
691
697
|
address nextPool
|
|
692
698
|
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
699
|
+
|
|
700
|
+
function executeMaiPSM(
|
|
701
|
+
uint256 index,
|
|
702
|
+
bytes memory data,
|
|
703
|
+
uint256 previousAmountOut,
|
|
704
|
+
address tokenIn,
|
|
705
|
+
bool getPoolOnly,
|
|
706
|
+
address nextPool
|
|
707
|
+
) external payable returns (address tokenOut, uint256 tokenAmountOut, address pool);
|
|
693
708
|
}
|