@pendle/core-v2 5.0.0 → 5.0.3
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/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol/PendleGaugeControllerBaseUpg.json +13 -0
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol/PendleGaugeControllerMainchainUpg.json +20 -2
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol/PendleGaugeControllerSidechainUpg.json +20 -2
- 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/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleMainchain.sol/VotingEscrowPendleMainchain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowPendleSidechain.sol/VotingEscrowPendleSidechain.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/VotingEscrow/VotingEscrowTokenBase.sol/VotingEscrowTokenBase.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeBalanceLib.sol/VeBalanceLib.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/CheckpointHelper.json +2 -2
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/libraries/VeHistoryLib.sol/Checkpoints.json +2 -2
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/MarketMathCore.sol/MarketMathCore.json +2 -2
- package/build/artifacts/contracts/core/Market/PendleGauge.sol/PendleGauge.dbg.json +1 -1
- 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 +2 -2
- package/build/artifacts/contracts/core/Market/v1/PendleMarketFactory.sol/PendleMarketFactory.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v1/PendleMarketFactory.sol/PendleMarketFactory.json +2 -2
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.dbg.json +1 -1
- package/build/artifacts/contracts/core/Market/v3/PendleMarketFactoryV3.sol/PendleMarketFactoryV3.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/PYIndex.sol/PYIndexLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/PYIndex.sol/PYIndexLib.json +2 -2
- 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/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3WithRewardsSY.sol/PendleAaveV3WithRewardsSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3WithRewardsSY.sol/PendleAaveV3WithRewardsSY.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/BedRock/PendleUniETHSY.sol/PendleUniETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BedRock/PendleUniETHSY.sol/PendleUniETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/BenQi/PendleQiTokenSY.sol/PendleQiTokenSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileCommon.sol/CamelotV1VolatileCommon.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatileLpHelper.sol/CamelotV1VolatileLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/CamelotV1Volatile/CamelotV1VolatilePreview.sol/CamelotV1VolatilePreview.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/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/Curve3CrvPoolHelper.sol/Curve3CrvPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveFraxUsdcPoolHelper.sol/CurveFraxUsdcPoolHelper.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Convex/base/CurveUsdd3CrvPoolHelper.sol/CurveUsdd3CrvPoolHelper.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/Dolomite/PendleDolomiteSY.sol/PendleDolomiteSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Dolomite/PendleDolomiteSY.sol/PendleDolomiteSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDEMantleSY.sol/PendleSUSDEMantleSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDEMantleSY.sol/PendleSUSDEMantleSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDESY.sol/PendleSUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleSUSDESY.sol/PendleSUSDESY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDEL2SY.sol/PendleUSDEL2SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDEL2SY.sol/PendleUSDEL2SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDESY.sol/PendleUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Ethena/PendleUSDESY.sol/PendleUSDESY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthkSY.sol/PendleWEEthkSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthkSY.sol/PendleWEEthkSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthsSY.sol/PendleWEEthsSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthsSY.sol/PendleWEEthsSY.json +2 -2
- 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/Gains/PendleGTokenSY.sol/PendleGTokenSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Gains/PendleGTokenSY.sol/PendleGTokenSY.json +1026 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Gains/PendleGUSDCSY.sol/PendleGUSDCSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Gains/PendleGUSDCSY.sol/PendleGUSDCSY.json +1023 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Gains/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/{PendleGdaiSY.sol → Gains/PendleGdaiSY.sol}/PendleGDaiSY.json +3 -3
- 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/Karak/PendleKarakVaultERC20SY.sol/PendleKarakVaultERC20SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultERC20SY.sol/PendleKarakVaultERC20SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultEzETHSY.sol/PendleKarakVaultEzETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultEzETHSY.sol/PendleKarakVaultEzETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultSUSDESY.sol/PendleKarakVaultSUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultSUSDESY.sol/PendleKarakVaultSUSDESY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultSYBaseUpg.sol/PendleKarakVaultSYBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultUSDESY.sol/PendleKarakVaultUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultUSDESY.sol/PendleKarakVaultUSDESY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultWEETHSY.sol/PendleKarakVaultWEETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Karak/PendleKarakVaultWEETHSY.sol/PendleKarakVaultWEETHSY.json +2 -2
- 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/KyberMathHelper.sol/KyberMathHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Kyber/KyberMathHelper.sol/KyberMathHelper.json +2 -2
- 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/Mantle/PendleMETHSY.sol/PendleMETHSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mantle/PendleMETHSY.sol/PendleMETHSY.json +1049 -0
- 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/Mellow/PendleAmphorWstETHVaultSY.sol/PendleAmphorWstETHVaultSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleAmphorWstETHVaultSY.sol/PendleAmphorWstETHVaultSY.json +1010 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC20SYUpg.sol/PendleMellowVaultERC20SYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC20SYUpg.sol/PendleMellowVaultERC20SYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC4626SYUpg.sol/PendleMellowVaultERC4626SYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC4626SYUpg.sol/PendleMellowVaultERC4626SYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultSYBaseUpg.sol/PendleMellowVaultSYBaseUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultSYBaseUpg.sol/PendleMellowVaultSYBaseUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultWstETHSYUpg.sol/PendleMellowVaultWstETHSYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultWstETHSYUpg.sol/PendleMellowVaultWstETHSYUpg.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/PendleERC20SY.sol/PendleERC20SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SY.sol/PendleERC20SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SYUpg.sol/PendleERC20SYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20SYUpg.sol/PendleERC20SYUpg.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20WithSupplyCapSY.sol/PendleERC20WithSupplyCapSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC20WithSupplyCapSY.sol/PendleERC20WithSupplyCapSY.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/PendleERC4626UpgSY.sol/PendleERC4626SYUpg.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleERC4626UpgSY.sol/PendleERC4626SYUpg.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/PendleL2LRTSY.sol/PendleL2LRTSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleL2LRTSY.sol/PendleL2LRTSY.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/PirexETH/PendleApxETHSY.sol/PendleApxETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PirexETH/PendleApxETHSY.sol/PendleApxETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufStETHSY.sol/PendlePufStETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufStETHSY.sol/PendlePufStETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufWETHSY.sol/PendlePufWETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Puffer/PendlePufWETHSY.sol/PendlePufWETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHL2SY.sol/PendleEzETHL2SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHL2SY.sol/PendleEzETHL2SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol/PendleEzETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol/PendleEzETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleREZtakeSY.sol/PendleREZtakeSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleREZtakeSY.sol/PendleREZtakeSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleRenzoPreviewHelper.sol/PendleRenzoPreviewHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleRenzoPreviewHelper.sol/PendleRenzoPreviewHelper.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/Sophon/PendleSophonFarmingSY.sol/PendleSophonFarmingSY.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Sophon/PendleSophonFarmingSY.sol/PendleSophonFarmingSY.json +1128 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Sophon/PendleSophonPointManager.sol/PendleSophonPointManager.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Sophon/PendleSophonPointManager.sol/PendleSophonPointManager.json +420 -0
- 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/PendleRswETHSY.sol/PendleRswETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleRswETHSY.sol/PendleRswETHSY.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/Swell/PendleSwellRswETHStakingSY.sol/PendleSwellRswETHStakingSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwellRswETHStakingSY.sol/PendleSwellRswETHStakingSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwellStakingERC20SY.sol/PendleSwellStakingERC20SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwellStakingERC20SY.sol/PendleSwellStakingERC20SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Tensorplex/PendleStTAOSY.sol/PendleStTAOSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Tensorplex/PendleStTAOSY.sol/PendleStTAOSY.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/StandardizedYield/implementations/Thena/ThenaLpHelper.sol/ThenaLpHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaMath.sol/ThenaMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/IThenaSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Thena/ThenaPreview.sol/ThenaPreview.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeERC20SY.sol/PendleZtakeERC20SY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeERC20SY.sol/PendleZtakeERC20SY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeEzETHSY.sol/PendleZtakeEzETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeEzETHSY.sol/PendleZtakeEzETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeRsETHSY.sol/PendleZtakeRsETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeRsETHSY.sol/PendleZtakeRsETHSY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeUSDESY.sol/PendleZtakeUSDESY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeUSDESY.sol/PendleZtakeUSDESY.json +2 -2
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWeETHSY.sol/PendleZtakeWeETHSY.dbg.json +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Zircuit/PendleZtakeWeETHSY.sol/PendleZtakeWeETHSY.json +2 -2
- package/build/artifacts/contracts/core/YieldContracts/InterestManagerYT.sol/InterestManagerYT.dbg.json +1 -1
- 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/libraries/math/PMath.sol/PMath.dbg.json +1 -1
- package/build/artifacts/contracts/core/libraries/math/PMath.sol/PMath.json +2 -2
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionCallbackV3.sol/IPActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.json +200 -0
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitOrderType.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPLimitRouter.sol/IPLimitRouterCallback.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarket.sol/IPMarket.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMarketV3.sol/IPMarketV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterHelper.sol/IPRouterHelper.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +200 -0
- package/build/artifacts/contracts/interfaces/IPVotingController.sol/IPVotingController.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPVotingEscrowMainchain.sol/IPVotingEscrowMainchain.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/Sophon/IPSophonPointManager.sol/IPSophonPointManager.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Sophon/IPSophonPointManager.sol/IPSophonPointManager.json +18 -0
- package/build/artifacts/contracts/interfaces/Sophon/ISophonFarming.sol/ISophonFarming.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/Sophon/ISophonFarming.sol/ISophonFarming.json +168 -0
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.dbg.json +1 -1
- package/build/artifacts/contracts/limit/LimitMathCore.sol/LimitMathCore.json +2 -2
- package/build/artifacts/contracts/limit/LimitRouterBase.sol/LimitRouterBase.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.dbg.json +1 -1
- package/build/artifacts/contracts/limit/PendleLimitRouter.sol/PendleLimitRouter.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/Broadcaster.sol/Broadcaster.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/MarketExchangeRateLib.sol/MarketExchangeRateLib.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/MarketExchangeRateLib.sol/MarketExchangeRateLib.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendleExchangeRateOracle.sol/PendleExchangeRateOracle.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +258 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +2 -2
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleLpOracleLib.sol/PendleLpOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePYLpOracle.sol/PendlePYLpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePYLpOracle.sol/PendlePYLpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/PendlePYOracleLib.sol/PendlePYOracleLib.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendlePYOracleLib.sol/PendlePYOracleLib.json +2 -2
- package/build/artifacts/contracts/oracles/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/PendleRedStoneRateOracleAdapter.sol/PendleRedStoneRateOracleAdapter.json +2 -2
- package/build/artifacts/contracts/oracles/samples/BoringLpGlpOracle.sol/BoringLpGlpOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/BoringLpGlpOracle.sol/BoringLpGlpOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/BoringLpSeller.sol/BoringLpSeller.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkAssetOracle.sol/BoringPYUsdChainlinkAssetOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.dbg.json +1 -1
- package/build/artifacts/contracts/oracles/samples/BoringPYUsdChainlinkSYOracle.sol/BoringPYUsdChainlinkSYOracle.json +2 -2
- package/build/artifacts/contracts/oracles/samples/BoringPtSeller.sol/BoringPtSeller.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionAddRemoveLiqV3.sol/ActionAddRemoveLiqV3.json +2 -2
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionCallbackV3.sol/ActionCallbackV3.json +2 -2
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionMiscV3.sol/ActionMiscV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapPTV3.sol/ActionSwapPTV3.json +2 -2
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionSwapYTV3.sol/ActionSwapYTV3.json +2 -2
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtInLib.json +2 -2
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/MarketApproxLib.sol/MarketApproxPtOutLib.json +2 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerBaseUpg.sol +11 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerMainchainUpg.sol +3 -2
- package/contracts/LiquidityMining/GaugeController/PendleGaugeControllerSidechainUpg.sol +2 -1
- package/contracts/core/RewardManager/RewardManager.sol +6 -17
- package/contracts/core/StandardizedYield/implementations/Gains/PendleGTokenSY.sol +26 -0
- package/contracts/core/StandardizedYield/implementations/Gains/PendleGUSDCSY.sol +10 -0
- package/contracts/core/StandardizedYield/implementations/{PendleGdaiSY.sol → Gains/PendleGdaiSY.sol} +2 -2
- package/contracts/core/StandardizedYield/implementations/Mantle/PendleMETHSY.sol +82 -0
- package/contracts/core/StandardizedYield/implementations/Mellow/PendleAmphorWstETHVaultSY.sol +77 -0
- package/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC20SYUpg.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/Mellow/PendleMellowVaultERC4626SYUpg.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/PendleERC4626SY.sol +6 -1
- package/contracts/core/StandardizedYield/implementations/Sophon/PendleSophonFarmingSY.sol +116 -0
- package/contracts/core/StandardizedYield/implementations/Sophon/PendleSophonPointManager.sol +57 -0
- package/contracts/core/libraries/math/PMath.sol +8 -0
- package/contracts/interfaces/IPActionMarketAuxStatic.sol +39 -0
- package/contracts/interfaces/Sophon/IPSophonPointManager.sol +6 -0
- package/contracts/interfaces/Sophon/ISophonFarming.sol +19 -0
- package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +93 -0
- package/contracts/router/Reflector.sol +33 -1
- package/deployments/1-core.json +2 -2
- package/deployments/1-markets/AMPHRLRT-MAINNET-SEP2024.json +14 -0
- package/deployments/1-markets/ENA-MAINNET-OCT2024.json +14 -0
- package/deployments/1-markets/MELLOW-AMPHRETH-MAINNET-SEP2024.json +14 -0
- package/deployments/1-markets/MELLOW-RE7LRT-MAINNET-SEP2024.json +14 -0
- package/deployments/1-markets/MELLOW-RSTETH-MAINNET-SEP2024.json +14 -0
- package/deployments/1-markets/MELLOW-STEAKLRT-MAINNET-SEP2024.json +14 -0
- package/deployments/1-markets/RSWETH-SWELL-STAKING-MAINNET-SEP2024.json +15 -0
- package/deployments/1-markets/SUSDE-MAINNET-DEC2024.json +14 -0
- package/deployments/1-markets/SUSDE-MAINNET-OCT2024.json +14 -0
- package/deployments/1-markets/USD0++-MAINNET-OCT2024.json +14 -0
- package/deployments/1-markets/USDE-MAINNET-DEC2024.json +14 -0
- package/deployments/1-markets/USDE-MAINNET-OCT2024.json +14 -0
- package/deployments/10-core.json +2 -2
- package/deployments/42161-core.json +2 -2
- package/deployments/42161-markets/GUSDC-ARBITRUM-SEP2024.json +15 -0
- package/deployments/42161-markets/UNIETH-ARBITRUM-DEC2024.json +15 -0
- package/deployments/5000-core.json +2 -2
- package/deployments/5000-markets/METH-MANTLE-DEC2024.json +15 -0
- package/deployments/5000-markets/USDE-MANTLE-DEC2024.json +14 -0
- package/deployments/56-core.json +2 -2
- package/deployments/merkle-distribution/2024-07-25.json +20365 -0
- package/package.json +3 -2
- package/typechain-types/ActionMarketAuxStatic.ts +296 -0
- package/typechain-types/IPActionMarketAuxStatic.ts +252 -0
- package/typechain-types/IPRouterStatic.ts +230 -0
- package/typechain-types/IPSophonPointManager.ts +97 -0
- package/typechain-types/ISophonFarming.ts +303 -0
- package/typechain-types/PendleAmphorWstETHVaultSY.ts +1281 -0
- package/typechain-types/PendleGTokenSY.ts +1281 -0
- package/typechain-types/PendleGUSDCSY.ts +1294 -0
- package/typechain-types/PendleGaugeControllerBaseUpg.ts +19 -0
- package/typechain-types/PendleGaugeControllerMainchainUpg.ts +19 -0
- package/typechain-types/PendleGaugeControllerSidechainUpg.ts +19 -0
- package/typechain-types/PendleMETHSY.ts +1349 -0
- package/typechain-types/PendleSophonFarmingSY.ts +1412 -0
- package/typechain-types/PendleSophonPointManager.ts +610 -0
- package/typechain-types/factories/ActionAddRemoveLiqV3__factory.ts +1 -1
- package/typechain-types/factories/ActionCallbackV3__factory.ts +1 -1
- package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +257 -1
- package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionMiscV3__factory.ts +1 -1
- package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapPTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionSwapYTV3__factory.ts +1 -1
- package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
- package/typechain-types/factories/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/BoringLpGlpOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkAssetOracle__factory.ts +1 -1
- package/typechain-types/factories/BoringPYUsdChainlinkSYOracle__factory.ts +1 -1
- package/typechain-types/factories/Broadcaster__factory.ts +1 -1
- package/typechain-types/factories/CamelotV1VolatilePreview__factory.ts +1 -1
- package/typechain-types/factories/IPActionMarketAuxStatic__factory.ts +200 -0
- package/typechain-types/factories/IPRouterStatic__factory.ts +200 -0
- package/typechain-types/factories/IPSophonPointManager__factory.ts +37 -0
- package/typechain-types/factories/ISophonFarming__factory.ts +183 -0
- package/typechain-types/factories/KyberMathHelper__factory.ts +1 -1
- package/typechain-types/factories/LimitBackendHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleAaveV3SY__factory.ts +1 -1
- package/typechain-types/factories/PendleAaveV3WithRewardsSY__factory.ts +1 -1
- package/typechain-types/factories/PendleAmphorWstETHVaultSY__factory.ts +1067 -0
- package/typechain-types/factories/PendleAnkrBNBSY__factory.ts +1 -1
- package/typechain-types/factories/PendleApxETHSY__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/PendleDolomiteSY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20SYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20SY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC20WithSupplyCapSY__factory.ts +1 -1
- package/typechain-types/factories/PendleERC4626SYUpg__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 +1 -1
- package/typechain-types/factories/PendleExternalRewardDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleEzETHL2SY__factory.ts +1 -1
- package/typechain-types/factories/PendleEzETHSY__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/PendleGTokenSY__factory.ts +1095 -0
- package/typechain-types/factories/PendleGUSDCSY__factory.ts +1073 -0
- package/typechain-types/factories/PendleGaugeControllerBaseUpg__factory.ts +13 -0
- package/typechain-types/factories/PendleGaugeControllerMainchainUpg__factory.ts +23 -1
- package/typechain-types/factories/PendleGaugeControllerSidechainUpg__factory.ts +23 -1
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleHlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKarakVaultERC20SY__factory.ts +1 -1
- package/typechain-types/factories/PendleKarakVaultEzETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKarakVaultSUSDESY__factory.ts +1 -1
- package/typechain-types/factories/PendleKarakVaultUSDESY__factory.ts +1 -1
- package/typechain-types/factories/PendleKarakVaultWEETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleKyberElasticSYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleL2LRTSY__factory.ts +1 -1
- package/typechain-types/factories/PendleLimitRouter__factory.ts +1 -1
- package/typechain-types/factories/PendleLinearDistributor__factory.ts +1 -1
- package/typechain-types/factories/PendleLooksStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMETHSY__factory.ts +1099 -0
- package/typechain-types/factories/PendleMantleStakedEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV2__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactoryV3__factory.ts +1 -1
- package/typechain-types/factories/PendleMarketFactory__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/PendleMellowVaultERC20SYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMellowVaultERC4626SYUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMellowVaultSYBaseUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleMellowVaultWstETHSYUpg__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/PendlePYLpOracle__factory.ts +1 -1
- package/typechain-types/factories/PendlePoolDeployHelper__factory.ts +1 -1
- package/typechain-types/factories/PendlePufStETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendlePufWETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleQiTokenSY__factory.ts +1 -1
- package/typechain-types/factories/PendleREZtakeSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRedStoneRateOracleAdapter__factory.ts +1 -1
- package/typechain-types/factories/PendleRenzoPreviewHelper__factory.ts +1 -1
- package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
- package/typechain-types/factories/PendleRsETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleRswETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSUSDEMantleSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSUSDESY__factory.ts +1 -1
- package/typechain-types/factories/PendleSfrxEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSiloWithIncentiveSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSophonFarmingSY__factory.ts +1216 -0
- package/typechain-types/factories/PendleSophonPointManager__factory.ts +500 -0
- package/typechain-types/factories/PendleStTAOSY__factory.ts +1 -1
- package/typechain-types/factories/PendleStargateLPSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwellRswETHStakingSY__factory.ts +1 -1
- package/typechain-types/factories/PendleSwellStakingERC20SY__factory.ts +1 -1
- package/typechain-types/factories/PendleThenaSY__factory.ts +1 -1
- package/typechain-types/factories/PendleUSDEL2SY__factory.ts +1 -1
- package/typechain-types/factories/PendleUSDESY__factory.ts +1 -1
- package/typechain-types/factories/PendleUniETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +1 -1
- package/typechain-types/factories/PendleWEEthSY__factory.ts +1 -1
- package/typechain-types/factories/PendleWEEthkSY__factory.ts +1 -1
- package/typechain-types/factories/PendleWEEthsSY__factory.ts +1 -1
- 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/PendleZtakeERC20SY__factory.ts +1 -1
- package/typechain-types/factories/PendleZtakeEzETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleZtakeRsETHSY__factory.ts +1 -1
- package/typechain-types/factories/PendleZtakeUSDESY__factory.ts +1 -1
- package/typechain-types/factories/PendleZtakeWeETHSY__factory.ts +1 -1
- package/typechain-types/factories/Reflector__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/factories/ThenaPreview__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleMainchain__factory.ts +1 -1
- package/typechain-types/factories/VotingEscrowPendleSidechain__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +81 -9
- package/typechain-types/index.ts +18 -2
- package/build/artifacts/contracts/core/Market/v2/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v2/PendleExternalRewardDistributor.sol/PendleExternalRewardDistributor.json +0 -373
- package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v2/PendleGaugeV2.sol/PendleGaugeV2.json +0 -128
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v2/PendleMarketFactoryV2.sol/PendleMarketFactoryV2.json +0 -682
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/Market/v2/PendleMarketV2.sol/PendleMarketV2.json +0 -1144
- package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/core/RewardManager/PendleLinearDistributor.sol/PendleLinearDistributor.json +0 -570
- package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleGdaiSY.sol/PendleGDaiSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContractsV2/InterestManagerYTV2.sol/InterestManagerYTV2.json +0 -66
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol/PendlePrincipalTokenV2.json +0 -401
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol/PendleYieldContractFactoryV2.json +0 -590
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.dbg.json +0 -4
- package/build/artifacts/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol/PendleYieldTokenV2.json +0 -942
- package/contracts/core/Market/v2/PendleExternalRewardDistributor.sol +0 -129
- package/contracts/core/Market/v2/PendleGaugeV2.sol +0 -126
- package/contracts/core/Market/v2/PendleMarketFactoryV2.sol +0 -158
- package/contracts/core/Market/v2/PendleMarketV2.sol +0 -356
- package/contracts/core/RewardManager/PendleLinearDistributor.sol +0 -143
- package/contracts/core/RewardManager/diff.fish +0 -0
- package/contracts/core/YieldContractsV2/InterestManagerYTV2.sol +0 -105
- package/contracts/core/YieldContractsV2/PendlePrincipalTokenV2.sol +0 -63
- package/contracts/core/YieldContractsV2/PendleYieldContractFactoryV2.sol +0 -199
- package/contracts/core/YieldContractsV2/PendleYieldTokenV2.sol +0 -436
- /package/deployments/5000-markets/{USD-MANTLE-JUL2024.json → USDE-MANTLE-JUL2024.json} +0 -0
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
/*
|
|
3
|
-
* MIT License
|
|
4
|
-
* ===========
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
pragma solidity ^0.8.17;
|
|
25
|
-
|
|
26
|
-
import "../../interfaces/IPYieldContractFactory.sol";
|
|
27
|
-
|
|
28
|
-
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
29
|
-
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
|
30
|
-
|
|
31
|
-
import "../libraries/ExpiryUtilsLib.sol";
|
|
32
|
-
import "../libraries/BaseSplitCodeFactory.sol";
|
|
33
|
-
import "../libraries/MiniHelpers.sol";
|
|
34
|
-
import "../libraries/Errors.sol";
|
|
35
|
-
import "../libraries/BoringOwnableUpgradeable.sol";
|
|
36
|
-
import "../libraries/StringLib.sol";
|
|
37
|
-
|
|
38
|
-
import "./PendlePrincipalTokenV2.sol";
|
|
39
|
-
import "./PendleYieldTokenV2.sol";
|
|
40
|
-
|
|
41
|
-
/// @dev If this contract is ever made upgradeable, please pay attention to the numContractDeployed variable
|
|
42
|
-
contract PendleYieldContractFactoryV2 is BoringOwnableUpgradeable, IPYieldContractFactory {
|
|
43
|
-
using ExpiryUtils for string;
|
|
44
|
-
using StringLib for string;
|
|
45
|
-
using StringLib for StringLib.slice;
|
|
46
|
-
|
|
47
|
-
string private constant PT_PREFIX = "PT";
|
|
48
|
-
string private constant YT_PREFIX = "YT";
|
|
49
|
-
string private constant SY_SYMBOL_PREF = "SY-";
|
|
50
|
-
string private constant SY_NAME_PREF = "SY ";
|
|
51
|
-
|
|
52
|
-
address public immutable ytCreationCodeContractA;
|
|
53
|
-
uint256 public immutable ytCreationCodeSizeA;
|
|
54
|
-
address public immutable ytCreationCodeContractB;
|
|
55
|
-
uint256 public immutable ytCreationCodeSizeB;
|
|
56
|
-
|
|
57
|
-
// 1 SLOT
|
|
58
|
-
uint128 public interestFeeRate; // a fixed point number
|
|
59
|
-
uint128 public rewardFeeRate; // a fixed point number
|
|
60
|
-
|
|
61
|
-
// 1 SLOT
|
|
62
|
-
address public treasury;
|
|
63
|
-
uint96 public expiryDivisor;
|
|
64
|
-
|
|
65
|
-
// SY => expiry => address
|
|
66
|
-
// returns address(0) if not created
|
|
67
|
-
mapping(address => mapping(uint256 => address)) public getPT;
|
|
68
|
-
mapping(address => mapping(uint256 => address)) public getYT;
|
|
69
|
-
mapping(address => bool) public isPT;
|
|
70
|
-
mapping(address => bool) public isYT;
|
|
71
|
-
|
|
72
|
-
uint256 public constant maxInterestFeeRate = 2e17; // 20%
|
|
73
|
-
uint256 public constant maxRewardFeeRate = 2e17; // 20%
|
|
74
|
-
|
|
75
|
-
constructor(
|
|
76
|
-
address _ytCreationCodeContractA,
|
|
77
|
-
uint256 _ytCreationCodeSizeA,
|
|
78
|
-
address _ytCreationCodeContractB,
|
|
79
|
-
uint256 _ytCreationCodeSizeB
|
|
80
|
-
) {
|
|
81
|
-
ytCreationCodeContractA = _ytCreationCodeContractA;
|
|
82
|
-
ytCreationCodeSizeA = _ytCreationCodeSizeA;
|
|
83
|
-
ytCreationCodeContractB = _ytCreationCodeContractB;
|
|
84
|
-
ytCreationCodeSizeB = _ytCreationCodeSizeB;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function initialize(
|
|
88
|
-
uint96 _expiryDivisor,
|
|
89
|
-
uint128 _interestFeeRate,
|
|
90
|
-
uint128 _rewardFeeRate,
|
|
91
|
-
address _treasury
|
|
92
|
-
) external initializer {
|
|
93
|
-
__BoringOwnable_init();
|
|
94
|
-
setExpiryDivisor(_expiryDivisor);
|
|
95
|
-
setInterestFeeRate(_interestFeeRate);
|
|
96
|
-
setRewardFeeRate(_rewardFeeRate);
|
|
97
|
-
setTreasury(_treasury);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* @notice Create a pair of (PT, YT) from any SY and valid expiry. Anyone can create a yield contract
|
|
102
|
-
* @dev It's intentional to make expiry an uint32 to guard against fat fingers. uint32.max is year 2106
|
|
103
|
-
*/
|
|
104
|
-
function createYieldContract(
|
|
105
|
-
address SY,
|
|
106
|
-
uint32 expiry,
|
|
107
|
-
bool doCacheIndexSameBlock
|
|
108
|
-
) external returns (address PT, address YT) {
|
|
109
|
-
if (MiniHelpers.isTimeInThePast(expiry) || expiry % expiryDivisor != 0) revert Errors.YCFactoryInvalidExpiry();
|
|
110
|
-
|
|
111
|
-
if (getPT[SY][expiry] != address(0)) revert Errors.YCFactoryYieldContractExisted();
|
|
112
|
-
|
|
113
|
-
IStandardizedYield _SY = IStandardizedYield(SY);
|
|
114
|
-
|
|
115
|
-
(, , uint8 assetDecimals) = _SY.assetInfo();
|
|
116
|
-
|
|
117
|
-
string memory syCoreName = _stripSYPrefix(_SY.name());
|
|
118
|
-
string memory syCoreSymbol = _stripSYPrefix(_SY.symbol());
|
|
119
|
-
|
|
120
|
-
PT = Create2.deploy(
|
|
121
|
-
0,
|
|
122
|
-
bytes32(block.chainid),
|
|
123
|
-
abi.encodePacked(
|
|
124
|
-
type(PendlePrincipalTokenV2).creationCode,
|
|
125
|
-
abi.encode(
|
|
126
|
-
SY,
|
|
127
|
-
PT_PREFIX.concat(syCoreName, expiry, " "),
|
|
128
|
-
PT_PREFIX.concat(syCoreSymbol, expiry, "-"),
|
|
129
|
-
assetDecimals,
|
|
130
|
-
expiry
|
|
131
|
-
)
|
|
132
|
-
)
|
|
133
|
-
);
|
|
134
|
-
|
|
135
|
-
YT = BaseSplitCodeFactory._create2(
|
|
136
|
-
0,
|
|
137
|
-
bytes32(block.chainid),
|
|
138
|
-
abi.encode(
|
|
139
|
-
SY,
|
|
140
|
-
PT,
|
|
141
|
-
YT_PREFIX.concat(syCoreName, expiry, " "),
|
|
142
|
-
YT_PREFIX.concat(syCoreSymbol, expiry, "-"),
|
|
143
|
-
assetDecimals,
|
|
144
|
-
expiry,
|
|
145
|
-
doCacheIndexSameBlock
|
|
146
|
-
),
|
|
147
|
-
ytCreationCodeContractA,
|
|
148
|
-
ytCreationCodeSizeA,
|
|
149
|
-
ytCreationCodeContractB,
|
|
150
|
-
ytCreationCodeSizeB
|
|
151
|
-
);
|
|
152
|
-
|
|
153
|
-
IPPrincipalToken(PT).initialize(YT);
|
|
154
|
-
|
|
155
|
-
getPT[SY][expiry] = PT;
|
|
156
|
-
getYT[SY][expiry] = YT;
|
|
157
|
-
isPT[PT] = true;
|
|
158
|
-
isYT[YT] = true;
|
|
159
|
-
|
|
160
|
-
emit CreateYieldContract(SY, expiry, PT, YT);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function setExpiryDivisor(uint96 newExpiryDivisor) public onlyOwner {
|
|
164
|
-
if (newExpiryDivisor == 0) revert Errors.YCFactoryZeroExpiryDivisor();
|
|
165
|
-
|
|
166
|
-
expiryDivisor = newExpiryDivisor;
|
|
167
|
-
emit SetExpiryDivisor(newExpiryDivisor);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function setInterestFeeRate(uint128 newInterestFeeRate) public onlyOwner {
|
|
171
|
-
if (newInterestFeeRate > maxInterestFeeRate)
|
|
172
|
-
revert Errors.YCFactoryInterestFeeRateTooHigh(newInterestFeeRate, maxInterestFeeRate);
|
|
173
|
-
|
|
174
|
-
interestFeeRate = newInterestFeeRate;
|
|
175
|
-
emit SetInterestFeeRate(newInterestFeeRate);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function setRewardFeeRate(uint128 newRewardFeeRate) public onlyOwner {
|
|
179
|
-
if (newRewardFeeRate > maxRewardFeeRate)
|
|
180
|
-
revert Errors.YCFactoryRewardFeeRateTooHigh(newRewardFeeRate, maxRewardFeeRate);
|
|
181
|
-
|
|
182
|
-
rewardFeeRate = newRewardFeeRate;
|
|
183
|
-
emit SetRewardFeeRate(newRewardFeeRate);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function setTreasury(address newTreasury) public onlyOwner {
|
|
187
|
-
if (newTreasury == address(0)) revert Errors.YCFactoryZeroTreasury();
|
|
188
|
-
|
|
189
|
-
treasury = newTreasury;
|
|
190
|
-
emit SetTreasury(newTreasury);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function _stripSYPrefix(string memory _str) internal pure returns (string memory) {
|
|
194
|
-
StringLib.slice memory str = _str.toSlice();
|
|
195
|
-
StringLib.slice memory delim_name = SY_NAME_PREF.toSlice();
|
|
196
|
-
StringLib.slice memory delim_symbol = SY_SYMBOL_PREF.toSlice();
|
|
197
|
-
return str.beyond(delim_name).beyond(delim_symbol).toString();
|
|
198
|
-
}
|
|
199
|
-
}
|
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
-
|
|
6
|
-
import "../../interfaces/IStandardizedYield.sol";
|
|
7
|
-
import "../../interfaces/IPYieldTokenV2.sol";
|
|
8
|
-
import "../../interfaces/IPPrincipalToken.sol";
|
|
9
|
-
|
|
10
|
-
import "../libraries/math/PMath.sol";
|
|
11
|
-
import "../libraries/ArrayLib.sol";
|
|
12
|
-
import "../../interfaces/IPYieldContractFactory.sol";
|
|
13
|
-
import "../StandardizedYield/SYUtils.sol";
|
|
14
|
-
import "../libraries/Errors.sol";
|
|
15
|
-
import "../libraries/MiniHelpers.sol";
|
|
16
|
-
|
|
17
|
-
import "../RewardManager/RewardManager.sol";
|
|
18
|
-
import "../erc20/PendleERC20.sol";
|
|
19
|
-
import "./InterestManagerYTV2.sol";
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
Invariance to maintain:
|
|
23
|
-
- address(0) & address(this) should never have any rewards & activeBalance accounting done. This is
|
|
24
|
-
guaranteed by address(0) & address(this) check in each updateForTwo function
|
|
25
|
-
*/
|
|
26
|
-
contract PendleYieldTokenV2 is IPYieldTokenV2, PendleERC20, RewardManager, InterestManagerYTV2 {
|
|
27
|
-
using PMath for uint256;
|
|
28
|
-
using SafeERC20 for IERC20;
|
|
29
|
-
using ArrayLib for uint256[];
|
|
30
|
-
|
|
31
|
-
struct PostExpiryData {
|
|
32
|
-
uint256 firstPYIndex;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
address public immutable SY;
|
|
36
|
-
address public immutable PT;
|
|
37
|
-
address public immutable factory;
|
|
38
|
-
uint256 public immutable expiry;
|
|
39
|
-
|
|
40
|
-
bool public immutable doCacheIndexSameBlock;
|
|
41
|
-
|
|
42
|
-
uint256 public syReserve;
|
|
43
|
-
|
|
44
|
-
uint128 public pyIndexLastUpdatedBlock;
|
|
45
|
-
uint128 internal _pyIndexStored;
|
|
46
|
-
|
|
47
|
-
PostExpiryData public postExpiry;
|
|
48
|
-
|
|
49
|
-
uint256 internal _lastCollectedInterestIndex;
|
|
50
|
-
|
|
51
|
-
modifier updateData() {
|
|
52
|
-
if (isExpired()) _setPostExpiryData();
|
|
53
|
-
_;
|
|
54
|
-
_updateSyReserve();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
modifier notExpired() {
|
|
58
|
-
if (isExpired()) revert Errors.YCExpired();
|
|
59
|
-
_;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @param _doCacheIndexSameBlock if true, the PY index is cached for each block, and thus is
|
|
64
|
-
* constant for all txs within the same block. Otherwise, the PY index is recalculated for
|
|
65
|
-
* every tx.
|
|
66
|
-
*/
|
|
67
|
-
constructor(
|
|
68
|
-
address _SY,
|
|
69
|
-
address _PT,
|
|
70
|
-
string memory _name,
|
|
71
|
-
string memory _symbol,
|
|
72
|
-
uint8 __decimals,
|
|
73
|
-
uint256 _expiry,
|
|
74
|
-
bool _doCacheIndexSameBlock
|
|
75
|
-
) PendleERC20(_name, _symbol, __decimals) {
|
|
76
|
-
SY = _SY;
|
|
77
|
-
PT = _PT;
|
|
78
|
-
expiry = _expiry;
|
|
79
|
-
factory = msg.sender;
|
|
80
|
-
doCacheIndexSameBlock = _doCacheIndexSameBlock;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @notice Tokenize SY into PT + YT of equal qty. Every unit of asset of SY will create 1 PT + 1 YT
|
|
85
|
-
* @dev SY must be transferred to this contract prior to calling
|
|
86
|
-
*/
|
|
87
|
-
function mintPY(
|
|
88
|
-
address receiverPT,
|
|
89
|
-
address receiverYT
|
|
90
|
-
) external nonReentrant notExpired updateData returns (uint256 amountPYOut) {
|
|
91
|
-
address[] memory receiverPTs = new address[](1);
|
|
92
|
-
address[] memory receiverYTs = new address[](1);
|
|
93
|
-
uint256[] memory amountSyToMints = new uint256[](1);
|
|
94
|
-
|
|
95
|
-
(receiverPTs[0], receiverYTs[0], amountSyToMints[0]) = (receiverPT, receiverYT, _getFloatingSyAmount());
|
|
96
|
-
|
|
97
|
-
uint256[] memory amountPYOuts = _mintPY(receiverPTs, receiverYTs, amountSyToMints);
|
|
98
|
-
amountPYOut = amountPYOuts[0];
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/// @notice Tokenize SY into PT + YT for multiple receivers. See `mintPY()` for more details
|
|
102
|
-
function mintPYMulti(
|
|
103
|
-
address[] calldata receiverPTs,
|
|
104
|
-
address[] calldata receiverYTs,
|
|
105
|
-
uint256[] calldata amountSyToMints
|
|
106
|
-
) external nonReentrant notExpired updateData returns (uint256[] memory amountPYOuts) {
|
|
107
|
-
uint256 length = receiverPTs.length;
|
|
108
|
-
|
|
109
|
-
if (length == 0) revert Errors.ArrayEmpty();
|
|
110
|
-
if (receiverYTs.length != length || amountSyToMints.length != length) revert Errors.ArrayLengthMismatch();
|
|
111
|
-
|
|
112
|
-
uint256 totalSyToMint = amountSyToMints.sum();
|
|
113
|
-
if (totalSyToMint > _getFloatingSyAmount())
|
|
114
|
-
revert Errors.YieldContractInsufficientSy(totalSyToMint, _getFloatingSyAmount());
|
|
115
|
-
|
|
116
|
-
amountPYOuts = _mintPY(receiverPTs, receiverYTs, amountSyToMints);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @notice converts PT(+YT) tokens into SY, but interests & rewards are not redeemed at the
|
|
121
|
-
* same time
|
|
122
|
-
* @dev PT/YT must be transferred to this contract prior to calling
|
|
123
|
-
*/
|
|
124
|
-
function redeemPY(address receiver) external nonReentrant updateData returns (uint256 amountSyOut) {
|
|
125
|
-
address[] memory receivers = new address[](1);
|
|
126
|
-
uint256[] memory amounts = new uint256[](1);
|
|
127
|
-
(receivers[0], amounts[0]) = (receiver, _getAmountPYToRedeem());
|
|
128
|
-
|
|
129
|
-
uint256[] memory amountSyOuts;
|
|
130
|
-
amountSyOuts = _redeemPY(receivers, amounts);
|
|
131
|
-
|
|
132
|
-
amountSyOut = amountSyOuts[0];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* @notice redeems PT(+YT) for multiple users. See `redeemPY()`
|
|
137
|
-
* @dev PT/YT must be transferred to this contract prior to calling
|
|
138
|
-
* @dev fails if unable to redeem the total PY amount in `amountPYToRedeems`
|
|
139
|
-
*/
|
|
140
|
-
function redeemPYMulti(
|
|
141
|
-
address[] calldata receivers,
|
|
142
|
-
uint256[] calldata amountPYToRedeems
|
|
143
|
-
) external nonReentrant updateData returns (uint256[] memory amountSyOuts) {
|
|
144
|
-
if (receivers.length != amountPYToRedeems.length) revert Errors.ArrayLengthMismatch();
|
|
145
|
-
if (receivers.length == 0) revert Errors.ArrayEmpty();
|
|
146
|
-
amountSyOuts = _redeemPY(receivers, amountPYToRedeems);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* @notice Redeems interests and rewards for `user`
|
|
151
|
-
* @param redeemInterest will only transfer out interest for user if true
|
|
152
|
-
* @param redeemRewards will only transfer out rewards for user if true
|
|
153
|
-
* @dev With YT yielding interest in the form of SY, which is redeemable by users, the reward
|
|
154
|
-
* distribution should be based on the amount of SYs that their YT currently represent, plus
|
|
155
|
-
* their dueInterest. It has been proven and tested that _rewardSharesUser will not change over
|
|
156
|
-
* time, unless users redeem their dueInterest or redeemPY. Due to this, it is required to
|
|
157
|
-
* update users' accruedReward STRICTLY BEFORE transferring out their interest.
|
|
158
|
-
*/
|
|
159
|
-
function redeemDueInterestAndRewards(
|
|
160
|
-
address user,
|
|
161
|
-
bool redeemInterest,
|
|
162
|
-
bool redeemRewards
|
|
163
|
-
) external nonReentrant updateData returns (uint256 interestOut, uint256[] memory rewardsOut) {
|
|
164
|
-
if (!redeemInterest && !redeemRewards) revert Errors.YCNothingToRedeem();
|
|
165
|
-
|
|
166
|
-
// if redeemRewards == true, this line must be here for obvious reason
|
|
167
|
-
// if redeemInterest == true, this line must be here because of the reason above
|
|
168
|
-
_updateAndDistributeRewards(user);
|
|
169
|
-
|
|
170
|
-
if (redeemRewards) {
|
|
171
|
-
rewardsOut = _doTransferOutRewards(user, user);
|
|
172
|
-
emit RedeemRewards(user, rewardsOut);
|
|
173
|
-
} else {
|
|
174
|
-
address[] memory tokens = getRewardTokens();
|
|
175
|
-
rewardsOut = new uint256[](tokens.length);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (redeemInterest) {
|
|
179
|
-
_updateAndDistributeInterest(user);
|
|
180
|
-
interestOut = _doTransferOutInterest(user, SY);
|
|
181
|
-
emit RedeemInterest(user, interestOut);
|
|
182
|
-
} else {
|
|
183
|
-
interestOut = 0;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* @dev All rewards and interests accrued post-expiry goes to the treasury.
|
|
189
|
-
* Reverts if called pre-expiry.
|
|
190
|
-
*/
|
|
191
|
-
function redeemInterestAndRewardsPostExpiryForTreasury() external nonReentrant updateData {
|
|
192
|
-
if (!isExpired()) revert Errors.YCNotExpired();
|
|
193
|
-
|
|
194
|
-
_collectInterest();
|
|
195
|
-
_redeemExternalReward();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/// @notice updates and returns the reward indexes
|
|
199
|
-
function rewardIndexesCurrent() external override nonReentrant returns (uint256[] memory) {
|
|
200
|
-
return IStandardizedYield(SY).rewardIndexesCurrent();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @notice updates and returns the current PY index
|
|
205
|
-
* @dev this function maximizes the current PY index with the previous index, guaranteeing
|
|
206
|
-
* non-decreasing PY index
|
|
207
|
-
* @dev if `doCacheIndexSameBlock` is true, PY index only updates at most once per block,
|
|
208
|
-
* and has no state changes on the second call onwards (within the same block).
|
|
209
|
-
* @dev see `pyIndexStored()` for view function for cached value.
|
|
210
|
-
*/
|
|
211
|
-
function pyIndexCurrent() public nonReentrant returns (uint256 currentIndex) {
|
|
212
|
-
currentIndex = _pyIndexCurrent();
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/// @notice returns the last-updated PY index
|
|
216
|
-
function pyIndexStored() public view returns (uint256) {
|
|
217
|
-
return _pyIndexStored;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @notice do a final rewards redeeming, and sets post-expiry data
|
|
222
|
-
* @dev has no effect if called pre-expiry
|
|
223
|
-
*/
|
|
224
|
-
function setPostExpiryData() external nonReentrant {
|
|
225
|
-
if (isExpired()) {
|
|
226
|
-
_setPostExpiryData();
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* @notice returns the current data post-expiry, if exists
|
|
232
|
-
* @dev reverts if post-expiry data not set (see `setPostExpiryData()`)
|
|
233
|
-
* @return firstPYIndex the earliest PY index post-expiry
|
|
234
|
-
*/
|
|
235
|
-
function getPostExpiryData() external view returns (uint256 firstPYIndex) {
|
|
236
|
-
if (postExpiry.firstPYIndex == 0) revert Errors.YCPostExpiryDataNotSet();
|
|
237
|
-
firstPYIndex = postExpiry.firstPYIndex;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function _mintPY(
|
|
241
|
-
address[] memory receiverPTs,
|
|
242
|
-
address[] memory receiverYTs,
|
|
243
|
-
uint256[] memory amountSyToMints
|
|
244
|
-
) internal returns (uint256[] memory amountPYOuts) {
|
|
245
|
-
amountPYOuts = new uint256[](amountSyToMints.length);
|
|
246
|
-
|
|
247
|
-
uint256 index = _pyIndexCurrent();
|
|
248
|
-
|
|
249
|
-
for (uint256 i = 0; i < amountSyToMints.length; i++) {
|
|
250
|
-
amountPYOuts[i] = _calcPYToMint(amountSyToMints[i], index);
|
|
251
|
-
|
|
252
|
-
_mint(receiverYTs[i], amountPYOuts[i]);
|
|
253
|
-
IPPrincipalToken(PT).mintByYT(receiverPTs[i], amountPYOuts[i]);
|
|
254
|
-
|
|
255
|
-
emit Mint(msg.sender, receiverPTs[i], receiverYTs[i], amountSyToMints[i], amountPYOuts[i]);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function isExpired() public view returns (bool) {
|
|
260
|
-
return MiniHelpers.isCurrentlyExpired(expiry);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
function isDistributingInterestAndRewards() public view returns (bool) {
|
|
264
|
-
return postExpiry.firstPYIndex == 0;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function _redeemPY(
|
|
268
|
-
address[] memory receivers,
|
|
269
|
-
uint256[] memory amountPYToRedeems
|
|
270
|
-
) internal returns (uint256[] memory amountSyOuts) {
|
|
271
|
-
uint256 totalAmountPYToRedeem = amountPYToRedeems.sum();
|
|
272
|
-
IPPrincipalToken(PT).burnByYT(address(this), totalAmountPYToRedeem);
|
|
273
|
-
if (!isExpired()) _burn(address(this), totalAmountPYToRedeem);
|
|
274
|
-
|
|
275
|
-
uint256 index = _pyIndexCurrent();
|
|
276
|
-
uint256 totalSyInterestPostExpiry;
|
|
277
|
-
amountSyOuts = new uint256[](receivers.length);
|
|
278
|
-
|
|
279
|
-
for (uint256 i = 0; i < receivers.length; i++) {
|
|
280
|
-
uint256 syInterestPostExpiry;
|
|
281
|
-
(amountSyOuts[i], syInterestPostExpiry) = _calcSyRedeemableFromPY(amountPYToRedeems[i], index);
|
|
282
|
-
_transferOut(SY, receivers[i], amountSyOuts[i]);
|
|
283
|
-
totalSyInterestPostExpiry += syInterestPostExpiry;
|
|
284
|
-
|
|
285
|
-
emit Burn(msg.sender, receivers[i], amountPYToRedeems[i], amountSyOuts[i]);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
address treasury = IPYieldContractFactory(factory).treasury();
|
|
289
|
-
_transferOut(SY, treasury, totalSyInterestPostExpiry);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
function _calcPYToMint(uint256 amountSy, uint256 indexCurrent) internal pure returns (uint256 amountPY) {
|
|
293
|
-
// doesn't matter before or after expiry, since mintPY is only allowed before expiry
|
|
294
|
-
return SYUtils.syToAsset(indexCurrent, amountSy);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
function _calcSyRedeemableFromPY(
|
|
298
|
-
uint256 amountPY,
|
|
299
|
-
uint256 indexCurrent
|
|
300
|
-
) internal view returns (uint256 syToUser, uint256 syInterestPostExpiry) {
|
|
301
|
-
syToUser = SYUtils.assetToSy(indexCurrent, amountPY);
|
|
302
|
-
if (isExpired()) {
|
|
303
|
-
uint256 totalSyRedeemable = SYUtils.assetToSy(postExpiry.firstPYIndex, amountPY);
|
|
304
|
-
syInterestPostExpiry = totalSyRedeemable - syToUser;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
function _getAmountPYToRedeem() internal view returns (uint256) {
|
|
309
|
-
if (!isExpired()) return PMath.min(_selfBalance(PT), balanceOf(address(this)));
|
|
310
|
-
else return _selfBalance(PT);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
function _updateSyReserve() internal virtual {
|
|
314
|
-
syReserve = _selfBalance(SY);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function _getFloatingSyAmount() internal view returns (uint256 amount) {
|
|
318
|
-
amount = _selfBalance(SY) - syReserve;
|
|
319
|
-
if (amount == 0) revert Errors.YCNoFloatingSy();
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
function _setPostExpiryData() internal {
|
|
323
|
-
PostExpiryData storage local = postExpiry;
|
|
324
|
-
if (local.firstPYIndex != 0) return; // already set
|
|
325
|
-
|
|
326
|
-
_updateInterestIndex();
|
|
327
|
-
_updateRewardIndex();
|
|
328
|
-
|
|
329
|
-
// by setting this, we have finished setting postExpiry data, all income will go to treasury
|
|
330
|
-
local.firstPYIndex = _pyIndexCurrent().Uint128();
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/*///////////////////////////////////////////////////////////////
|
|
334
|
-
INTEREST-RELATED
|
|
335
|
-
//////////////////////////////////////////////////////////////*/
|
|
336
|
-
|
|
337
|
-
function _pyIndexCurrent() internal returns (uint256 currentIndex) {
|
|
338
|
-
if (doCacheIndexSameBlock && pyIndexLastUpdatedBlock == block.number) return _pyIndexStored;
|
|
339
|
-
|
|
340
|
-
uint128 index128 = PMath.max(IStandardizedYield(SY).exchangeRate(), _pyIndexStored).Uint128();
|
|
341
|
-
|
|
342
|
-
currentIndex = index128;
|
|
343
|
-
_pyIndexStored = index128;
|
|
344
|
-
pyIndexLastUpdatedBlock = uint128(block.number);
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
function _collectInterest() internal override returns (uint256 accruedAmount, uint256 currentIndex) {
|
|
348
|
-
uint256 prevIndex = _lastCollectedInterestIndex;
|
|
349
|
-
currentIndex = _pyIndexCurrent();
|
|
350
|
-
|
|
351
|
-
if (prevIndex != 0 && prevIndex != currentIndex) {
|
|
352
|
-
// guaranteed feeAmount != 0
|
|
353
|
-
address treasury = IPYieldContractFactory(factory).treasury();
|
|
354
|
-
uint256 interestFeeRate = isDistributingInterestAndRewards()
|
|
355
|
-
? IPYieldContractFactory(factory).interestFeeRate()
|
|
356
|
-
: PMath.ONE;
|
|
357
|
-
|
|
358
|
-
uint256 totalInterest = _calcInterest(totalSupply(), prevIndex, currentIndex);
|
|
359
|
-
uint256 feeAmount = totalInterest.mulDown(interestFeeRate);
|
|
360
|
-
accruedAmount = totalInterest - feeAmount;
|
|
361
|
-
|
|
362
|
-
_transferOut(SY, treasury, feeAmount);
|
|
363
|
-
_updateSyReserve();
|
|
364
|
-
emit CollectInterestFee(feeAmount);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
_lastCollectedInterestIndex = currentIndex;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
function _calcInterest(uint256 principal, uint256 prevIndex, uint256 currentIndex) internal pure returns (uint256) {
|
|
371
|
-
return (principal * (currentIndex - prevIndex)).divDown(prevIndex * currentIndex);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function _YTbalance(address user) internal view override returns (uint256) {
|
|
375
|
-
return balanceOf(user);
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
function _YTSupply() internal view override returns (uint256) {
|
|
379
|
-
return totalSupply();
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function _getGlobalPYIndex() internal view virtual override returns (uint256) {
|
|
383
|
-
return _pyIndexStored;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/*///////////////////////////////////////////////////////////////
|
|
387
|
-
REWARDS-RELATED
|
|
388
|
-
//////////////////////////////////////////////////////////////*/
|
|
389
|
-
|
|
390
|
-
function getRewardTokens() public view returns (address[] memory) {
|
|
391
|
-
return IStandardizedYield(SY).getRewardTokens();
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
function _redeemExternalReward() internal virtual override {
|
|
395
|
-
IStandardizedYield(SY).claimRewards(address(this));
|
|
396
|
-
|
|
397
|
-
address treasury = IPYieldContractFactory(factory).treasury();
|
|
398
|
-
uint256 rewardFeeRate = isDistributingInterestAndRewards()
|
|
399
|
-
? IPYieldContractFactory(factory).rewardFeeRate()
|
|
400
|
-
: PMath.ONE;
|
|
401
|
-
|
|
402
|
-
address[] memory rewardTokens = getRewardTokens();
|
|
403
|
-
|
|
404
|
-
for (uint256 i = 0; i < rewardTokens.length; ++i) {
|
|
405
|
-
address token = rewardTokens[i];
|
|
406
|
-
uint256 accruedReward = _selfBalance(token) - rewardState[token].lastBalance;
|
|
407
|
-
|
|
408
|
-
uint256 amountRewardFee = accruedReward.mulDown(rewardFeeRate);
|
|
409
|
-
|
|
410
|
-
_transferOut(token, treasury, amountRewardFee);
|
|
411
|
-
emit CollectRewardFee(token, amountRewardFee);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
/// @dev effectively returning the amount of SY generating rewards for this user
|
|
416
|
-
function _rewardSharesUser(address user) internal view virtual override returns (uint256) {
|
|
417
|
-
uint256 index = userInterest[user].pyIndex;
|
|
418
|
-
if (index == 0) return 0;
|
|
419
|
-
return SYUtils.assetToSy(index, balanceOf(user)) + userInterest[user].accrued;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
function _rewardSharesTotal() internal view virtual override returns (uint256) {
|
|
423
|
-
return syReserve;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
function _getRewardTokens() internal view virtual override returns (address[] memory) {
|
|
427
|
-
return IStandardizedYield(SY).getRewardTokens();
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
//solhint-disable-next-line ordering
|
|
431
|
-
function _beforeTokenTransfer(address from, address to, uint256) internal override {
|
|
432
|
-
if (isExpired()) _setPostExpiryData();
|
|
433
|
-
_updateAndDistributeRewardsForTwo(from, to);
|
|
434
|
-
_updateAndDistributeInterestForTwo(from, to);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
File without changes
|