@pendle/core-v2 5.0.1 → 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 +1 -1
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mellow/PendleAmphorWstETHVaultSY.sol/PendleAmphorWstETHVaultSY.json +2 -2
- 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/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/deployments/1-markets/ENA-MAINNET-OCT2024.json +14 -0
- package/deployments/1-markets/USD0++-MAINNET-OCT2024.json +14 -0
- package/deployments/42161-markets/GUSDC-ARBITRUM-SEP2024.json +15 -0
- package/deployments/5000-markets/METH-MANTLE-DEC2024.json +15 -0
- 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/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 +1 -1
- 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 +72 -9
- package/typechain-types/index.ts +16 -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/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
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../../interfaces/IPMarket.sol";
|
|
5
|
-
import "../../../interfaces/IPMarketFactory.sol";
|
|
6
|
-
import "../../../interfaces/IPMarketSwapCallback.sol";
|
|
7
|
-
|
|
8
|
-
import "../../erc20/PendleERC20.sol";
|
|
9
|
-
import "./PendleGaugeV2.sol";
|
|
10
|
-
import "../OracleLib.sol";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
Invariance to maintain:
|
|
14
|
-
- Internal balances totalPt & totalSy not interfered by people transferring tokens in directly
|
|
15
|
-
- address(0) & address(this) should never have any rewards & activeBalance accounting done. This is
|
|
16
|
-
guaranteed by address(0) & address(this) check in each updateForTwo function
|
|
17
|
-
*/
|
|
18
|
-
contract PendleMarketV2 is PendleERC20, PendleGaugeV2, IPMarket {
|
|
19
|
-
using PMath for uint256;
|
|
20
|
-
using PMath for int256;
|
|
21
|
-
using MarketMathCore for MarketState;
|
|
22
|
-
using SafeERC20 for IERC20;
|
|
23
|
-
using PYIndexLib for IPYieldToken;
|
|
24
|
-
using OracleLib for OracleLib.Observation[65535];
|
|
25
|
-
|
|
26
|
-
struct MarketStorage {
|
|
27
|
-
int128 totalPt;
|
|
28
|
-
int128 totalSy;
|
|
29
|
-
// 1 SLOT = 256 bits
|
|
30
|
-
uint96 lastLnImpliedRate;
|
|
31
|
-
uint16 observationIndex;
|
|
32
|
-
uint16 observationCardinality;
|
|
33
|
-
uint16 observationCardinalityNext;
|
|
34
|
-
// 1 SLOT = 144 bits
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
string private constant NAME = "Pendle Market";
|
|
38
|
-
string private constant SYMBOL = "PENDLE-LPT";
|
|
39
|
-
|
|
40
|
-
IPPrincipalToken internal immutable PT;
|
|
41
|
-
IStandardizedYield internal immutable SY;
|
|
42
|
-
IPYieldToken internal immutable YT;
|
|
43
|
-
|
|
44
|
-
address public immutable factory;
|
|
45
|
-
uint256 public immutable expiry;
|
|
46
|
-
int256 public immutable scalarRoot;
|
|
47
|
-
int256 public immutable initialAnchor;
|
|
48
|
-
|
|
49
|
-
MarketStorage public _storage;
|
|
50
|
-
|
|
51
|
-
OracleLib.Observation[65535] public observations;
|
|
52
|
-
|
|
53
|
-
modifier notExpired() {
|
|
54
|
-
if (isExpired()) revert Errors.MarketExpired();
|
|
55
|
-
_;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
constructor(
|
|
59
|
-
address _PT,
|
|
60
|
-
int256 _scalarRoot,
|
|
61
|
-
int256 _initialAnchor,
|
|
62
|
-
address _vePendle,
|
|
63
|
-
address _gaugeController,
|
|
64
|
-
address _externalRewardDistributor
|
|
65
|
-
)
|
|
66
|
-
PendleERC20(NAME, SYMBOL, 18)
|
|
67
|
-
PendleGaugeV2(IPPrincipalToken(_PT).SY(), _vePendle, _gaugeController, _externalRewardDistributor)
|
|
68
|
-
{
|
|
69
|
-
PT = IPPrincipalToken(_PT);
|
|
70
|
-
SY = IStandardizedYield(PT.SY());
|
|
71
|
-
YT = IPYieldToken(PT.YT());
|
|
72
|
-
|
|
73
|
-
(_storage.observationCardinality, _storage.observationCardinalityNext) = observations.initialize(
|
|
74
|
-
uint32(block.timestamp)
|
|
75
|
-
);
|
|
76
|
-
|
|
77
|
-
if (_scalarRoot <= 0) revert Errors.MarketScalarRootBelowZero(_scalarRoot);
|
|
78
|
-
|
|
79
|
-
scalarRoot = _scalarRoot;
|
|
80
|
-
initialAnchor = _initialAnchor;
|
|
81
|
-
expiry = IPPrincipalToken(_PT).expiry();
|
|
82
|
-
factory = msg.sender;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* @notice PendleMarket allows users to provide in PT & SY in exchange for LPs, which
|
|
87
|
-
* will grant LP holders more exchange fee over time
|
|
88
|
-
* @dev will mint as much LP as possible such that the corresponding SY and PT used do
|
|
89
|
-
* not exceed `netSyDesired` and `netPtDesired`, respectively
|
|
90
|
-
* @dev PT and SY should be transferred to this contract prior to calling
|
|
91
|
-
* @dev will revert if PT is expired
|
|
92
|
-
*/
|
|
93
|
-
function mint(
|
|
94
|
-
address receiver,
|
|
95
|
-
uint256 netSyDesired,
|
|
96
|
-
uint256 netPtDesired
|
|
97
|
-
) external nonReentrant notExpired returns (uint256 netLpOut, uint256 netSyUsed, uint256 netPtUsed) {
|
|
98
|
-
MarketState memory market = readState(msg.sender);
|
|
99
|
-
PYIndex index = YT.newIndex();
|
|
100
|
-
|
|
101
|
-
uint256 lpToReserve;
|
|
102
|
-
|
|
103
|
-
(lpToReserve, netLpOut, netSyUsed, netPtUsed) = market.addLiquidity(
|
|
104
|
-
netSyDesired,
|
|
105
|
-
netPtDesired,
|
|
106
|
-
block.timestamp
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
// initializing the market
|
|
110
|
-
if (lpToReserve != 0) {
|
|
111
|
-
market.setInitialLnImpliedRate(index, initialAnchor, block.timestamp);
|
|
112
|
-
_mint(address(1), lpToReserve);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
_mint(receiver, netLpOut);
|
|
116
|
-
|
|
117
|
-
_writeState(market);
|
|
118
|
-
|
|
119
|
-
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
120
|
-
revert Errors.MarketInsufficientSyReceived(_selfBalance(SY), market.totalSy.Uint());
|
|
121
|
-
if (_selfBalance(PT) < market.totalPt.Uint())
|
|
122
|
-
revert Errors.MarketInsufficientPtReceived(_selfBalance(PT), market.totalPt.Uint());
|
|
123
|
-
|
|
124
|
-
emit Mint(receiver, netLpOut, netSyUsed, netPtUsed);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @notice LP Holders can burn their LP to receive back SY & PT proportionally
|
|
129
|
-
* to their share of the market
|
|
130
|
-
*/
|
|
131
|
-
function burn(
|
|
132
|
-
address receiverSy,
|
|
133
|
-
address receiverPt,
|
|
134
|
-
uint256 netLpToBurn
|
|
135
|
-
) external nonReentrant returns (uint256 netSyOut, uint256 netPtOut) {
|
|
136
|
-
MarketState memory market = readState(msg.sender);
|
|
137
|
-
|
|
138
|
-
_burn(address(this), netLpToBurn);
|
|
139
|
-
|
|
140
|
-
(netSyOut, netPtOut) = market.removeLiquidity(netLpToBurn);
|
|
141
|
-
|
|
142
|
-
if (receiverSy != address(this)) IERC20(SY).safeTransfer(receiverSy, netSyOut);
|
|
143
|
-
if (receiverPt != address(this)) IERC20(PT).safeTransfer(receiverPt, netPtOut);
|
|
144
|
-
|
|
145
|
-
_writeState(market);
|
|
146
|
-
|
|
147
|
-
emit Burn(receiverSy, receiverPt, netLpToBurn, netSyOut, netPtOut);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* @notice Pendle Market allows swaps between PT & SY it is holding. This function
|
|
152
|
-
* aims to swap an exact amount of PT to SY.
|
|
153
|
-
* @dev steps working of this contract
|
|
154
|
-
- The outcome amount of SY will be precomputed by MarketMathLib
|
|
155
|
-
- Release the calculated amount of SY to receiver
|
|
156
|
-
- Callback to msg.sender if data.length > 0
|
|
157
|
-
- Ensure exactPtIn amount of PT has been transferred to this address
|
|
158
|
-
* @dev will revert if PT is expired
|
|
159
|
-
* @param data bytes data to be sent in the callback (if any)
|
|
160
|
-
*/
|
|
161
|
-
function swapExactPtForSy(
|
|
162
|
-
address receiver,
|
|
163
|
-
uint256 exactPtIn,
|
|
164
|
-
bytes calldata data
|
|
165
|
-
) external nonReentrant notExpired returns (uint256 netSyOut, uint256 netSyFee) {
|
|
166
|
-
MarketState memory market = readState(msg.sender);
|
|
167
|
-
|
|
168
|
-
uint256 netSyToReserve;
|
|
169
|
-
(netSyOut, netSyFee, netSyToReserve) = market.swapExactPtForSy(YT.newIndex(), exactPtIn, block.timestamp);
|
|
170
|
-
|
|
171
|
-
if (receiver != address(this)) IERC20(SY).safeTransfer(receiver, netSyOut);
|
|
172
|
-
IERC20(SY).safeTransfer(market.treasury, netSyToReserve);
|
|
173
|
-
|
|
174
|
-
_writeState(market);
|
|
175
|
-
|
|
176
|
-
if (data.length > 0) {
|
|
177
|
-
IPMarketSwapCallback(msg.sender).swapCallback(exactPtIn.neg(), netSyOut.Int(), data);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (_selfBalance(PT) < market.totalPt.Uint())
|
|
181
|
-
revert Errors.MarketInsufficientPtReceived(_selfBalance(PT), market.totalPt.Uint());
|
|
182
|
-
|
|
183
|
-
emit Swap(msg.sender, receiver, exactPtIn.neg(), netSyOut.Int(), netSyFee, netSyToReserve);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @notice Pendle Market allows swaps between PT & SY it is holding. This function
|
|
188
|
-
* aims to swap SY for an exact amount of PT.
|
|
189
|
-
* @dev steps working of this function
|
|
190
|
-
- The exact outcome amount of PT will be transferred to receiver
|
|
191
|
-
- Callback to msg.sender if data.length > 0
|
|
192
|
-
- Ensure the calculated required amount of SY is transferred to this address
|
|
193
|
-
* @dev will revert if PT is expired
|
|
194
|
-
* @param data bytes data to be sent in the callback (if any)
|
|
195
|
-
*/
|
|
196
|
-
function swapSyForExactPt(
|
|
197
|
-
address receiver,
|
|
198
|
-
uint256 exactPtOut,
|
|
199
|
-
bytes calldata data
|
|
200
|
-
) external nonReentrant notExpired returns (uint256 netSyIn, uint256 netSyFee) {
|
|
201
|
-
MarketState memory market = readState(msg.sender);
|
|
202
|
-
|
|
203
|
-
uint256 netSyToReserve;
|
|
204
|
-
(netSyIn, netSyFee, netSyToReserve) = market.swapSyForExactPt(YT.newIndex(), exactPtOut, block.timestamp);
|
|
205
|
-
|
|
206
|
-
if (receiver != address(this)) IERC20(PT).safeTransfer(receiver, exactPtOut);
|
|
207
|
-
IERC20(SY).safeTransfer(market.treasury, netSyToReserve);
|
|
208
|
-
|
|
209
|
-
_writeState(market);
|
|
210
|
-
|
|
211
|
-
if (data.length > 0) {
|
|
212
|
-
IPMarketSwapCallback(msg.sender).swapCallback(exactPtOut.Int(), netSyIn.neg(), data);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// have received enough SY
|
|
216
|
-
if (_selfBalance(SY) < market.totalSy.Uint())
|
|
217
|
-
revert Errors.MarketInsufficientSyReceived(_selfBalance(SY), market.totalSy.Uint());
|
|
218
|
-
|
|
219
|
-
emit Swap(msg.sender, receiver, exactPtOut.Int(), netSyIn.neg(), netSyFee, netSyToReserve);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/// @notice forces balances to match reserves
|
|
223
|
-
function skim() external nonReentrant {
|
|
224
|
-
MarketState memory market = readState(msg.sender);
|
|
225
|
-
uint256 excessPt = _selfBalance(PT) - market.totalPt.Uint();
|
|
226
|
-
uint256 excessSy = _selfBalance(SY) - market.totalSy.Uint();
|
|
227
|
-
if (excessPt != 0) IERC20(PT).safeTransfer(market.treasury, excessPt);
|
|
228
|
-
if (excessSy != 0) IERC20(SY).safeTransfer(market.treasury, excessSy);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @notice redeems the user's reward
|
|
233
|
-
* @return amount of reward token redeemed, in the same order as `getRewardTokens()`
|
|
234
|
-
*/
|
|
235
|
-
function redeemRewards(address user) external nonReentrant returns (uint256[] memory) {
|
|
236
|
-
return _redeemRewards(user);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/// @notice returns the list of reward tokens
|
|
240
|
-
function getRewardTokens() external view returns (address[] memory) {
|
|
241
|
-
return _getRewardTokens();
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/*///////////////////////////////////////////////////////////////
|
|
245
|
-
ORACLE
|
|
246
|
-
//////////////////////////////////////////////////////////////*/
|
|
247
|
-
|
|
248
|
-
function observe(uint32[] memory secondsAgos) external view returns (uint216[] memory lnImpliedRateCumulative) {
|
|
249
|
-
return
|
|
250
|
-
observations.observe(
|
|
251
|
-
uint32(block.timestamp),
|
|
252
|
-
secondsAgos,
|
|
253
|
-
_storage.lastLnImpliedRate,
|
|
254
|
-
_storage.observationIndex,
|
|
255
|
-
_storage.observationCardinality
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function increaseObservationsCardinalityNext(uint16 cardinalityNext) external nonReentrant {
|
|
260
|
-
uint16 cardinalityNextOld = _storage.observationCardinalityNext;
|
|
261
|
-
uint16 cardinalityNextNew = observations.grow(cardinalityNextOld, cardinalityNext);
|
|
262
|
-
if (cardinalityNextOld != cardinalityNextNew) {
|
|
263
|
-
_storage.observationCardinalityNext = cardinalityNextNew;
|
|
264
|
-
emit IncreaseObservationCardinalityNext(cardinalityNextOld, cardinalityNextNew);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/*///////////////////////////////////////////////////////////////
|
|
269
|
-
READ/WRITE STATES
|
|
270
|
-
//////////////////////////////////////////////////////////////*/
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @notice read the state of the market from storage into memory for gas-efficient manipulation
|
|
274
|
-
*/
|
|
275
|
-
function readState(address router) public view returns (MarketState memory market) {
|
|
276
|
-
market.totalPt = _storage.totalPt;
|
|
277
|
-
market.totalSy = _storage.totalSy;
|
|
278
|
-
market.totalLp = totalSupply().Int();
|
|
279
|
-
|
|
280
|
-
(market.treasury, market.lnFeeRateRoot, market.reserveFeePercent) = IPMarketFactory(factory).getMarketConfig(
|
|
281
|
-
router
|
|
282
|
-
);
|
|
283
|
-
|
|
284
|
-
market.scalarRoot = scalarRoot;
|
|
285
|
-
market.expiry = expiry;
|
|
286
|
-
|
|
287
|
-
market.lastLnImpliedRate = _storage.lastLnImpliedRate;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/// @notice write back the state of the market from memory to storage
|
|
291
|
-
function _writeState(MarketState memory market) internal {
|
|
292
|
-
uint96 lastLnImpliedRate96 = market.lastLnImpliedRate.Uint96();
|
|
293
|
-
int128 totalPt128 = market.totalPt.Int128();
|
|
294
|
-
int128 totalSy128 = market.totalSy.Int128();
|
|
295
|
-
|
|
296
|
-
(uint16 observationIndex, uint16 observationCardinality) = observations.write(
|
|
297
|
-
_storage.observationIndex,
|
|
298
|
-
uint32(block.timestamp),
|
|
299
|
-
_storage.lastLnImpliedRate,
|
|
300
|
-
_storage.observationCardinality,
|
|
301
|
-
_storage.observationCardinalityNext
|
|
302
|
-
);
|
|
303
|
-
|
|
304
|
-
_storage.totalPt = totalPt128;
|
|
305
|
-
_storage.totalSy = totalSy128;
|
|
306
|
-
_storage.lastLnImpliedRate = lastLnImpliedRate96;
|
|
307
|
-
_storage.observationIndex = observationIndex;
|
|
308
|
-
_storage.observationCardinality = observationCardinality;
|
|
309
|
-
|
|
310
|
-
emit UpdateImpliedRate(block.timestamp, market.lastLnImpliedRate);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/*///////////////////////////////////////////////////////////////
|
|
314
|
-
TRIVIAL FUNCTIONS
|
|
315
|
-
//////////////////////////////////////////////////////////////*/
|
|
316
|
-
|
|
317
|
-
function readTokens() external view returns (IStandardizedYield _SY, IPPrincipalToken _PT, IPYieldToken _YT) {
|
|
318
|
-
_SY = SY;
|
|
319
|
-
_PT = PT;
|
|
320
|
-
_YT = YT;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
function isExpired() public view returns (bool) {
|
|
324
|
-
return MiniHelpers.isCurrentlyExpired(expiry);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/*///////////////////////////////////////////////////////////////
|
|
328
|
-
PENDLE GAUGE - RELATED
|
|
329
|
-
//////////////////////////////////////////////////////////////*/
|
|
330
|
-
|
|
331
|
-
function _stakedBalance(address user) internal view override returns (uint256) {
|
|
332
|
-
return balanceOf(user);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
function _totalStaked() internal view override returns (uint256) {
|
|
336
|
-
return totalSupply();
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// solhint-disable-next-line ordering
|
|
340
|
-
function _beforeTokenTransfer(
|
|
341
|
-
address from,
|
|
342
|
-
address to,
|
|
343
|
-
uint256 amount
|
|
344
|
-
) internal override(PendleERC20, PendleGaugeV2) {
|
|
345
|
-
PendleGaugeV2._beforeTokenTransfer(from, to, amount);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// solhint-disable-next-line ordering
|
|
349
|
-
function _afterTokenTransfer(
|
|
350
|
-
address from,
|
|
351
|
-
address to,
|
|
352
|
-
uint256 amount
|
|
353
|
-
) internal override(PendleERC20, PendleGaugeV2) {
|
|
354
|
-
PendleGaugeV2._afterTokenTransfer(from, to, amount);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
5
|
-
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
|
6
|
-
import "../libraries/BoringOwnableUpgradeable.sol";
|
|
7
|
-
import "../libraries/TokenHelper.sol";
|
|
8
|
-
import "../libraries/math/PMath.sol";
|
|
9
|
-
import "../../interfaces/IPLinearDistributor.sol";
|
|
10
|
-
|
|
11
|
-
contract PendleLinearDistributor is UUPSUpgradeable, AccessControlUpgradeable, TokenHelper, IPLinearDistributor {
|
|
12
|
-
using PMath for uint128;
|
|
13
|
-
using PMath for uint192;
|
|
14
|
-
using PMath for uint256;
|
|
15
|
-
|
|
16
|
-
bytes32 public constant MAINTAINER = keccak256("MAINTAINER");
|
|
17
|
-
|
|
18
|
-
mapping(address => bool) internal isWhitelisted;
|
|
19
|
-
|
|
20
|
-
// [token, addr] => distribution
|
|
21
|
-
mapping(address => mapping(address => DistributionData)) public distributionDatas;
|
|
22
|
-
|
|
23
|
-
constructor() {
|
|
24
|
-
_disableInitializers();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
modifier onlyWhitelisted() {
|
|
28
|
-
require(isWhitelisted[msg.sender], "not whitelisted");
|
|
29
|
-
_;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function isMaintainer(address addr) public view returns (bool) {
|
|
33
|
-
return (hasRole(DEFAULT_ADMIN_ROLE, addr) || hasRole(MAINTAINER, addr));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
modifier onlyMaintainer() {
|
|
37
|
-
require(isMaintainer(msg.sender), "not maintainer");
|
|
38
|
-
_;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
modifier onlyAdmin() {
|
|
42
|
-
require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "not admin");
|
|
43
|
-
_;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// ----------------- core-logic ----------------------
|
|
47
|
-
|
|
48
|
-
function queueVestAndClaim(address token, uint256 amountVestToQueue) external onlyWhitelisted returns (uint256) {
|
|
49
|
-
require(amountVestToQueue > 0, "invalid amountVestToQueue");
|
|
50
|
-
|
|
51
|
-
uint256 amountOut = _getClaimableRewardAndUpdate(token, msg.sender, amountVestToQueue);
|
|
52
|
-
|
|
53
|
-
// dodging extreme case of amountOut = amountVestToQueue
|
|
54
|
-
if (amountOut > amountVestToQueue) {
|
|
55
|
-
_transferOut(token, msg.sender, amountOut - amountVestToQueue);
|
|
56
|
-
} else if (amountVestToQueue > amountOut) {
|
|
57
|
-
_transferIn(token, msg.sender, amountVestToQueue - amountOut);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
emit VestQueued(token, msg.sender, amountVestToQueue);
|
|
61
|
-
emit Claim(token, msg.sender, amountOut);
|
|
62
|
-
|
|
63
|
-
return amountOut;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function claim(address token) external returns (uint256) {
|
|
67
|
-
uint256 amountOut = _getClaimableRewardAndUpdate(token, msg.sender, 0);
|
|
68
|
-
if (amountOut > 0) {
|
|
69
|
-
_transferOut(token, msg.sender, amountOut);
|
|
70
|
-
}
|
|
71
|
-
emit Claim(token, msg.sender, amountOut);
|
|
72
|
-
return amountOut;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function applyVestRewards(
|
|
76
|
-
address[] memory tokens,
|
|
77
|
-
address[] memory addrs,
|
|
78
|
-
uint256[] memory durations
|
|
79
|
-
) external onlyMaintainer {
|
|
80
|
-
require(tokens.length == addrs.length, "invalid array length");
|
|
81
|
-
require(tokens.length == durations.length, "invalid array length");
|
|
82
|
-
|
|
83
|
-
for (uint256 i = 0; i < tokens.length; ++i) {
|
|
84
|
-
_applyVestReward(tokens[i], addrs[i], durations[i]);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function _applyVestReward(address token, address addr, uint256 duration) internal {
|
|
89
|
-
DistributionData memory data = _updateRewardView(token, addr);
|
|
90
|
-
|
|
91
|
-
uint256 amountVesting = data.unvestedReward;
|
|
92
|
-
if (amountVesting == 0) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
uint256 leftOver = data.rewardPerSec.mulDown((data.endTime - PMath.min(block.timestamp, data.endTime)));
|
|
97
|
-
uint256 undistrbutedReward = amountVesting + leftOver;
|
|
98
|
-
|
|
99
|
-
data.unvestedReward = 0;
|
|
100
|
-
data.endTime = (block.timestamp + duration).Uint32();
|
|
101
|
-
data.rewardPerSec = undistrbutedReward.divDown(duration).Uint192();
|
|
102
|
-
distributionDatas[token][addr] = data;
|
|
103
|
-
|
|
104
|
-
emit Vested(token, addr, amountVesting, duration);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// data.lastDistributedTime is guaranteed to be block.timestamp after calling this
|
|
108
|
-
function _getClaimableRewardAndUpdate(
|
|
109
|
-
address token,
|
|
110
|
-
address addr,
|
|
111
|
-
uint256 amountVestToQueue
|
|
112
|
-
) internal returns (uint256 amountOut) {
|
|
113
|
-
DistributionData memory data = _updateRewardView(token, addr);
|
|
114
|
-
amountOut = data.accruedReward;
|
|
115
|
-
|
|
116
|
-
data.accruedReward = 0;
|
|
117
|
-
data.unvestedReward += amountVestToQueue.Uint128();
|
|
118
|
-
|
|
119
|
-
distributionDatas[token][addr] = data;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function _updateRewardView(address token, address addr) internal view returns (DistributionData memory data) {
|
|
123
|
-
data = distributionDatas[token][addr];
|
|
124
|
-
uint256 distributeFrom = PMath.min(data.lastDistributedTime, data.endTime);
|
|
125
|
-
uint256 distributeTo = PMath.min(block.timestamp, data.endTime);
|
|
126
|
-
data.accruedReward += data.rewardPerSec.mulDown(distributeTo - distributeFrom).Uint128();
|
|
127
|
-
data.lastDistributedTime = block.timestamp.Uint32();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// ----------------- governance-related --------------
|
|
131
|
-
|
|
132
|
-
function setWhitelisted(address addr, bool status) external onlyAdmin {
|
|
133
|
-
isWhitelisted[addr] = status;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function initialize() external initializer {
|
|
137
|
-
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// ----------------- upgrade-related -----------------
|
|
141
|
-
|
|
142
|
-
function _authorizeUpgrade(address) internal override onlyAdmin {}
|
|
143
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../interfaces/IPYieldToken.sol";
|
|
5
|
-
import "../../interfaces/IPPrincipalToken.sol";
|
|
6
|
-
import "../../interfaces/IPInterestManagerYTV2.sol";
|
|
7
|
-
import "../../interfaces/IPYieldContractFactory.sol";
|
|
8
|
-
|
|
9
|
-
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
10
|
-
|
|
11
|
-
import "../libraries/math/PMath.sol";
|
|
12
|
-
import "../libraries/TokenHelper.sol";
|
|
13
|
-
import "../StandardizedYield/SYUtils.sol";
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
With YT yielding more SYs overtime, which is allowed to be redeemed by users, the reward distribution should
|
|
17
|
-
be based on the amount of SYs that their YT currently represent, plus with their dueInterest.
|
|
18
|
-
|
|
19
|
-
It has been proven and tested that totalSyRedeemable will not change over time, unless users redeem their interest or redeemPY.
|
|
20
|
-
|
|
21
|
-
Due to this, it is required to update users' accruedReward STRICTLY BEFORE redeeming their interest.
|
|
22
|
-
*/
|
|
23
|
-
abstract contract InterestManagerYTV2 is TokenHelper, IPInterestManagerYTV2 {
|
|
24
|
-
using PMath for uint256;
|
|
25
|
-
|
|
26
|
-
struct UserInterest {
|
|
27
|
-
uint128 index;
|
|
28
|
-
uint128 accrued;
|
|
29
|
-
uint256 pyIndex;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
uint256 public lastInterestBlock;
|
|
33
|
-
|
|
34
|
-
uint256 public globalInterestIndex;
|
|
35
|
-
|
|
36
|
-
mapping(address => UserInterest) public userInterest;
|
|
37
|
-
|
|
38
|
-
uint256 internal constant INITIAL_INTEREST_INDEX = 1;
|
|
39
|
-
|
|
40
|
-
function _updateAndDistributeInterest(address user) internal virtual {
|
|
41
|
-
_updateAndDistributeInterestForTwo(user, address(0));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _updateAndDistributeInterestForTwo(address user1, address user2) internal virtual {
|
|
45
|
-
(uint256 index, uint256 pyIndex) = _updateInterestIndex();
|
|
46
|
-
|
|
47
|
-
if (user1 != address(0) && user1 != address(this)) _distributeInterestPrivate(user1, index, pyIndex);
|
|
48
|
-
if (user2 != address(0) && user2 != address(this)) _distributeInterestPrivate(user2, index, pyIndex);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function _doTransferOutInterest(address user, address SY) internal returns (uint256 interestAmount) {
|
|
52
|
-
interestAmount = userInterest[user].accrued;
|
|
53
|
-
userInterest[user].accrued = 0;
|
|
54
|
-
_transferOut(SY, user, interestAmount);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// should only be callable from `_distributeInterestForTwo` & make sure user != address(0) && user != address(this)
|
|
58
|
-
function _distributeInterestPrivate(address user, uint256 currentIndex, uint256 pyIndex) private {
|
|
59
|
-
assert(user != address(0) && user != address(this));
|
|
60
|
-
|
|
61
|
-
uint256 prevIndex = userInterest[user].index;
|
|
62
|
-
// uint256 interestFeeRate = _getInterestFeeRate();
|
|
63
|
-
|
|
64
|
-
if (prevIndex == currentIndex) return;
|
|
65
|
-
|
|
66
|
-
if (prevIndex == 0) {
|
|
67
|
-
userInterest[user].index = currentIndex.Uint128();
|
|
68
|
-
userInterest[user].pyIndex = pyIndex;
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
userInterest[user].accrued += _YTbalance(user).mulDown(currentIndex - prevIndex).Uint128();
|
|
73
|
-
userInterest[user].index = currentIndex.Uint128();
|
|
74
|
-
userInterest[user].pyIndex = pyIndex;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function _updateInterestIndex() internal returns (uint256 index, uint256 pyIndex) {
|
|
78
|
-
if (lastInterestBlock != block.number) {
|
|
79
|
-
// if we have not yet update the index for this block
|
|
80
|
-
lastInterestBlock = block.number;
|
|
81
|
-
|
|
82
|
-
uint256 totalShares = _YTSupply();
|
|
83
|
-
uint256 accrued;
|
|
84
|
-
|
|
85
|
-
(accrued, pyIndex) = _collectInterest();
|
|
86
|
-
index = globalInterestIndex;
|
|
87
|
-
|
|
88
|
-
if (index == 0) index = INITIAL_INTEREST_INDEX;
|
|
89
|
-
if (totalShares != 0) index += accrued.divDown(totalShares);
|
|
90
|
-
|
|
91
|
-
globalInterestIndex = index;
|
|
92
|
-
} else {
|
|
93
|
-
index = globalInterestIndex;
|
|
94
|
-
pyIndex = _getGlobalPYIndex();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function _getGlobalPYIndex() internal view virtual returns (uint256);
|
|
99
|
-
|
|
100
|
-
function _collectInterest() internal virtual returns (uint256, uint256);
|
|
101
|
-
|
|
102
|
-
function _YTbalance(address user) internal view virtual returns (uint256);
|
|
103
|
-
|
|
104
|
-
function _YTSupply() internal view virtual returns (uint256);
|
|
105
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../interfaces/IPPrincipalToken.sol";
|
|
5
|
-
import "../../interfaces/IPYieldToken.sol";
|
|
6
|
-
|
|
7
|
-
import "../libraries/MiniHelpers.sol";
|
|
8
|
-
import "../libraries/Errors.sol";
|
|
9
|
-
|
|
10
|
-
import "../erc20/PendleERC20.sol";
|
|
11
|
-
|
|
12
|
-
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
|
|
13
|
-
|
|
14
|
-
contract PendlePrincipalTokenV2 is PendleERC20, Initializable, IPPrincipalToken {
|
|
15
|
-
address public immutable SY;
|
|
16
|
-
address public immutable factory;
|
|
17
|
-
uint256 public immutable expiry;
|
|
18
|
-
address public YT;
|
|
19
|
-
|
|
20
|
-
modifier onlyYT() {
|
|
21
|
-
if (msg.sender != YT) revert Errors.OnlyYT();
|
|
22
|
-
_;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
modifier onlyYieldFactory() {
|
|
26
|
-
if (msg.sender != factory) revert Errors.OnlyYCFactory();
|
|
27
|
-
_;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
constructor(
|
|
31
|
-
address _SY,
|
|
32
|
-
string memory _name,
|
|
33
|
-
string memory _symbol,
|
|
34
|
-
uint8 __decimals,
|
|
35
|
-
uint256 _expiry
|
|
36
|
-
) PendleERC20(_name, _symbol, __decimals) {
|
|
37
|
-
SY = _SY;
|
|
38
|
-
expiry = _expiry;
|
|
39
|
-
factory = msg.sender;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function initialize(address _YT) external initializer onlyYieldFactory {
|
|
43
|
-
YT = _YT;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @dev only callable by the YT correspond to this PT
|
|
48
|
-
*/
|
|
49
|
-
function burnByYT(address user, uint256 amount) external onlyYT {
|
|
50
|
-
_burn(user, amount);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @dev only callable by the YT correspond to this PT
|
|
55
|
-
*/
|
|
56
|
-
function mintByYT(address user, uint256 amount) external onlyYT {
|
|
57
|
-
_mint(user, amount);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function isExpired() public view returns (bool) {
|
|
61
|
-
return MiniHelpers.isCurrentlyExpired(expiry);
|
|
62
|
-
}
|
|
63
|
-
}
|