@pendle/core-v2 4.0.6 → 4.1.0

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.
Files changed (116) hide show
  1. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.dbg.json +1 -1
  2. package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol/PendleAaveV3SY.json +2 -2
  3. package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.dbg.json +1 -1
  4. package/build/artifacts/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol/PendleWEEthSY.json +2 -2
  5. package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.dbg.json +1 -1
  6. package/build/artifacts/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol/PendleRsETHSY.json +20 -2
  7. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleL2LRTSY.sol/PendleL2LRTSY.dbg.json +4 -0
  8. package/build/artifacts/contracts/core/StandardizedYield/implementations/PendleL2LRTSY.sol/PendleL2LRTSY.json +1054 -0
  9. package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol/PendleEzETHSY.dbg.json +4 -0
  10. package/build/artifacts/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol/PendleEzETHSY.json +1141 -0
  11. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleRswETHSY.sol/PendleRswETHSY.dbg.json +4 -0
  12. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleRswETHSY.sol/PendleRswETHSY.json +1044 -0
  13. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.dbg.json +1 -1
  14. package/build/artifacts/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol/SwETHSY.json +2 -2
  15. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.dbg.json +1 -1
  16. package/build/artifacts/contracts/interfaces/IPActionMarketCoreStatic.sol/IPActionMarketCoreStatic.json +0 -45
  17. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.dbg.json +1 -1
  18. package/build/artifacts/contracts/interfaces/IPActionMintRedeemStatic.sol/IPActionMintRedeemStatic.json +0 -69
  19. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
  20. package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.json +0 -26
  21. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
  22. package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.json +0 -140
  23. package/build/artifacts/contracts/interfaces/Renzo/IRenzoOracle.sol/IRenzoOracle.dbg.json +4 -0
  24. package/build/artifacts/contracts/interfaces/Renzo/IRenzoOracle.sol/IRenzoOracle.json +64 -0
  25. package/build/artifacts/contracts/interfaces/Renzo/IRenzoRestakeManager.sol/IRenzoRestakeManager.dbg.json +4 -0
  26. package/build/artifacts/contracts/interfaces/Renzo/IRenzoRestakeManager.sol/IRenzoRestakeManager.json +102 -0
  27. package/build/artifacts/contracts/interfaces/Swell/IRswETH.sol/IRswETH.dbg.json +4 -0
  28. package/build/artifacts/contracts/interfaces/Swell/IRswETH.sol/IRswETH.json +44 -0
  29. package/build/artifacts/contracts/interfaces/Swell/ISwETH.sol/ISwETH.dbg.json +4 -0
  30. package/build/artifacts/contracts/interfaces/{ISwETH.sol → Swell/ISwETH.sol}/ISwETH.json +8 -8
  31. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +4 -0
  32. package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.json +30 -0
  33. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +4 -0
  34. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.json +307 -0
  35. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +4 -0
  36. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.json +409 -0
  37. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +4 -0
  38. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.json +1352 -0
  39. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +4 -0
  40. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.json +247 -0
  41. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +4 -0
  42. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.json +202 -0
  43. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +4 -0
  44. package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.json +93 -0
  45. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +4 -0
  46. package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.json +10 -0
  47. package/build/artifacts/contracts/oracles/PendleRedStoneRateOracle.sol/PendleRedStoneRateOracle.dbg.json +4 -0
  48. package/build/artifacts/contracts/oracles/PendleRedStoneRateOracle.sol/PendleRedStoneRateOracle.json +66 -0
  49. package/contracts/core/StandardizedYield/implementations/AaveV3/PendleAaveV3SY.sol +1 -1
  50. package/contracts/core/StandardizedYield/implementations/EtherFi/PendleWEEthSY.sol +1 -1
  51. package/contracts/core/StandardizedYield/implementations/KelpDAO/PendleRsETHSY.sol +18 -9
  52. package/contracts/core/StandardizedYield/implementations/PendleL2LRTSY.sol +93 -0
  53. package/contracts/core/StandardizedYield/implementations/Renzo/PendleEzETHSY.sol +139 -0
  54. package/contracts/core/StandardizedYield/implementations/Swell/PendleRswETHSY.sol +101 -0
  55. package/contracts/core/StandardizedYield/implementations/Swell/PendleSwETH.sol +1 -1
  56. package/contracts/interfaces/IPActionMarketCoreStatic.sol +8 -17
  57. package/contracts/interfaces/IPActionMintRedeemStatic.sol +4 -16
  58. package/contracts/interfaces/IPActionStorageStatic.sol +0 -4
  59. package/contracts/interfaces/Renzo/IRenzoOracle.sol +8 -0
  60. package/contracts/interfaces/Renzo/IRenzoRestakeManager.sol +14 -0
  61. package/contracts/interfaces/Swell/IRswETH.sol +10 -0
  62. package/contracts/interfaces/{ISwETH.sol → Swell/ISwETH.sol} +2 -2
  63. package/contracts/offchain-helpers/router-static/PendleRouterStatic.sol +19 -0
  64. package/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol +109 -0
  65. package/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol +182 -0
  66. package/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol +672 -0
  67. package/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol +116 -0
  68. package/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol +64 -0
  69. package/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol +55 -0
  70. package/contracts/offchain-helpers/router-static/base/StorageLayout.sol +20 -0
  71. package/contracts/oracles/PendleRedStoneRateOracle.sol +23 -0
  72. package/deployments/1-markets/EZETH-JUNE2024.json +11 -0
  73. package/deployments/1-markets/RSETH-KELP-JUNE2024.json +11 -0
  74. package/deployments/42161-markets/RSETH-APR2024-ARBITRUM.json +11 -0
  75. package/deployments/42161-markets/WEETH-APR2024.json +11 -0
  76. package/deployments/merkle-distribution/2024-01-25.json +9615 -0
  77. package/package.json +1 -1
  78. package/typechain-types/IPActionMarketCoreStatic.ts +18 -63
  79. package/typechain-types/IPActionMintRedeemStatic.ts +10 -102
  80. package/typechain-types/IPActionStorageStatic.ts +0 -55
  81. package/typechain-types/IPRouterStatic.ts +28 -220
  82. package/typechain-types/IRenzoOracle.ts +152 -0
  83. package/typechain-types/IRenzoRestakeManager.ts +219 -0
  84. package/typechain-types/IRswETH.ts +138 -0
  85. package/typechain-types/ISwETH.ts +24 -9
  86. package/typechain-types/PendleEzETHSY.ts +1471 -0
  87. package/typechain-types/PendleL2LRTSY.ts +1323 -0
  88. package/typechain-types/PendleRedStoneRateOracle.ts +113 -0
  89. package/typechain-types/PendleRsETHSY.ts +21 -0
  90. package/typechain-types/PendleRswETHSY.ts +1294 -0
  91. package/typechain-types/factories/ActionInfoStatic__factory.ts +1 -1
  92. package/typechain-types/factories/ActionMarketAuxStatic__factory.ts +1 -1
  93. package/typechain-types/factories/ActionMarketCoreStatic__factory.ts +1 -1
  94. package/typechain-types/factories/ActionMintRedeemStatic__factory.ts +1 -1
  95. package/typechain-types/factories/ActionStorageStatic__factory.ts +1 -1
  96. package/typechain-types/factories/ActionVePendleStatic__factory.ts +1 -1
  97. package/typechain-types/factories/IPActionMarketCoreStatic__factory.ts +0 -45
  98. package/typechain-types/factories/IPActionMintRedeemStatic__factory.ts +0 -69
  99. package/typechain-types/factories/IPActionStorageStatic__factory.ts +0 -26
  100. package/typechain-types/factories/IPRouterStatic__factory.ts +0 -140
  101. package/typechain-types/factories/IRenzoOracle__factory.ts +76 -0
  102. package/typechain-types/factories/IRenzoRestakeManager__factory.ts +121 -0
  103. package/typechain-types/factories/IRswETH__factory.ts +56 -0
  104. package/typechain-types/factories/ISwETH__factory.ts +7 -7
  105. package/typechain-types/factories/PendleAaveV3SY__factory.ts +1 -1
  106. package/typechain-types/factories/PendleEzETHSY__factory.ts +1218 -0
  107. package/typechain-types/factories/PendleL2LRTSY__factory.ts +1139 -0
  108. package/typechain-types/factories/PendleRedStoneRateOracle__factory.ts +142 -0
  109. package/typechain-types/factories/PendleRouterStatic__factory.ts +1 -1
  110. package/typechain-types/factories/PendleRsETHSY__factory.ts +23 -1
  111. package/typechain-types/factories/PendleRswETHSY__factory.ts +1117 -0
  112. package/typechain-types/factories/PendleWEEthSY__factory.ts +1 -1
  113. package/typechain-types/factories/SwETHSY__factory.ts +1 -1
  114. package/typechain-types/hardhat.d.ts +135 -0
  115. package/typechain-types/index.ts +28 -0
  116. package/build/artifacts/contracts/interfaces/ISwETH.sol/ISwETH.dbg.json +0 -4
@@ -0,0 +1,116 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "../../../interfaces/IPRouterStatic.sol";
5
+ import "./StorageLayout.sol";
6
+
7
+ contract ActionMintRedeemStatic is StorageLayout, IPActionMintRedeemStatic {
8
+ using PMath for uint256;
9
+
10
+ function mintPyFromSyStatic(address YT, uint256 netSyToMint) public view returns (uint256 netPYOut) {
11
+ if (IPYieldToken(YT).isExpired()) revert Errors.YCExpired();
12
+ return netSyToMint.mulDown(pyIndexCurrentViewYt(YT));
13
+ }
14
+
15
+ function redeemPyToSyStatic(address YT, uint256 netPYToRedeem) public view returns (uint256 netSyOut) {
16
+ return netPYToRedeem.divDown(pyIndexCurrentViewYt(YT));
17
+ }
18
+
19
+ function mintPyFromTokenStatic(
20
+ address YT,
21
+ address tokenIn,
22
+ uint256 netTokenIn
23
+ ) external view returns (uint256 netPyOut) {
24
+ address SY = IPYieldToken(YT).SY();
25
+ uint256 netSyReceived = mintSyFromTokenStatic(SY, tokenIn, netTokenIn);
26
+ netPyOut = mintPyFromSyStatic(YT, netSyReceived);
27
+ }
28
+
29
+ function redeemPyToTokenStatic(
30
+ address YT,
31
+ uint256 netPYToRedeem,
32
+ address tokenOut
33
+ ) external view returns (uint256 netTokenOut) {
34
+ address SY = IPYieldToken(YT).SY();
35
+ uint256 netSyReceived = redeemPyToSyStatic(YT, netPYToRedeem);
36
+ netTokenOut = redeemSyToTokenStatic(SY, tokenOut, netSyReceived);
37
+ }
38
+
39
+ function mintSyFromTokenStatic(
40
+ address SY,
41
+ address tokenIn,
42
+ uint256 netTokenIn
43
+ ) public view returns (uint256 netSyOut) {
44
+ return IStandardizedYield(SY).previewDeposit(tokenIn, netTokenIn);
45
+ }
46
+
47
+ function redeemSyToTokenStatic(
48
+ address SY,
49
+ address tokenOut,
50
+ uint256 netSyIn
51
+ ) public view returns (uint256 netTokenOut) {
52
+ return IStandardizedYield(SY).previewRedeem(tokenOut, netSyIn);
53
+ }
54
+
55
+ function getAmountTokenToMintSy(
56
+ address SY,
57
+ address tokenIn,
58
+ uint256 netSyOut
59
+ ) external view returns (uint256 netTokenIn) {
60
+ uint256 pivotAmount;
61
+
62
+ if (tokenIn == address(0)) pivotAmount = 1e18;
63
+ else pivotAmount = 10 ** IStandardizedYield(SY).decimals();
64
+
65
+ uint256 low = pivotAmount;
66
+ {
67
+ while (true) {
68
+ uint256 lowSyOut = mintSyFromTokenStatic(SY, tokenIn, low);
69
+ if (lowSyOut >= netSyOut) low /= 10;
70
+ else break;
71
+ }
72
+ }
73
+
74
+ uint256 high = pivotAmount;
75
+ {
76
+ while (true) {
77
+ uint256 highSyOut = mintSyFromTokenStatic(SY, tokenIn, high);
78
+ if (highSyOut < netSyOut) high *= 10;
79
+ else break;
80
+ }
81
+ }
82
+
83
+ while (low <= high) {
84
+ uint256 mid = (low + high) / 2;
85
+ uint256 syOut = mintSyFromTokenStatic(SY, tokenIn, mid);
86
+
87
+ if (syOut >= netSyOut) {
88
+ netTokenIn = mid;
89
+ high = mid - 1;
90
+ } else {
91
+ low = mid + 1;
92
+ }
93
+ }
94
+
95
+ assert(netTokenIn > 0);
96
+ }
97
+
98
+ function pyIndexCurrentViewMarket(address market) public view returns (uint256) {
99
+ (, , IPYieldToken YT) = IPMarket(market).readTokens();
100
+ return pyIndexCurrentViewYt(address(YT));
101
+ }
102
+
103
+ function pyIndexCurrentViewYt(address yt) public view returns (uint256) {
104
+ IPYieldToken YT = IPYieldToken(yt);
105
+ IStandardizedYield SY = IStandardizedYield(YT.SY());
106
+
107
+ uint256 syIndex = SY.exchangeRate();
108
+ uint256 pyIndexStored = YT.pyIndexStored();
109
+
110
+ if (YT.doCacheIndexSameBlock() && YT.pyIndexLastUpdatedBlock() == block.number) {
111
+ return pyIndexStored;
112
+ } else {
113
+ return PMath.max(syIndex, pyIndexStored);
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,64 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "./StorageLayout.sol";
5
+ import "../../../interfaces/IPActionStorageStatic.sol";
6
+ import "../../../interfaces/IPMiniDiamond.sol";
7
+
8
+ contract ActionStorageStatic is StorageLayout, IPActionStorageStatic, IPMiniDiamond {
9
+ function setDefaultApproxParams(ApproxParams memory params) external onlyOwner {
10
+ defaultApproxParams = params;
11
+ }
12
+
13
+ function getDefaultApproxParams() external view returns (ApproxParams memory) {
14
+ return defaultApproxParams;
15
+ }
16
+
17
+ function getOwnerAndPendingOwner() external view returns (address _owner, address _pendingOwner) {
18
+ _owner = owner;
19
+ _pendingOwner = pendingOwner;
20
+ }
21
+
22
+ function setFacetForSelectors(SelectorsToFacet[] calldata arr) external onlyOwner {
23
+ for (uint256 i = 0; i < arr.length; ) {
24
+ SelectorsToFacet memory s = arr[i];
25
+ for (uint256 j = 0; j < s.selectors.length; ) {
26
+ selectorToFacet[s.selectors[j]] = s.facet;
27
+ unchecked {
28
+ j++;
29
+ }
30
+ }
31
+ unchecked {
32
+ i++;
33
+ }
34
+ }
35
+ }
36
+
37
+ function facetAddress(bytes4 selector) external view returns (address res) {
38
+ res = selectorToFacet[selector];
39
+ require(res != address(0), "selector not found");
40
+ }
41
+
42
+ // Ownable
43
+ function transferOwnership(address newOwner, bool direct, bool renounce) external onlyOwner {
44
+ if (direct) {
45
+ require(newOwner != address(0) || renounce, "Ownable: zero address");
46
+
47
+ emit OwnershipTransferred(owner, newOwner);
48
+ owner = newOwner;
49
+ pendingOwner = address(0);
50
+ } else {
51
+ pendingOwner = newOwner;
52
+ }
53
+ }
54
+
55
+ function claimOwnership() external {
56
+ address _pendingOwner = pendingOwner;
57
+
58
+ require(msg.sender == _pendingOwner, "Ownable: caller != pending owner");
59
+
60
+ emit OwnershipTransferred(owner, _pendingOwner);
61
+ owner = _pendingOwner;
62
+ pendingOwner = address(0);
63
+ }
64
+ }
@@ -0,0 +1,55 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "../../../core/libraries/MiniHelpers.sol";
5
+ import "../../../interfaces/IPRouterStatic.sol";
6
+ import "../../../interfaces/IPVotingEscrowMainchain.sol";
7
+ import "../../../LiquidityMining/libraries/VeBalanceLib.sol";
8
+
9
+ contract ActionVePendleStatic is IPActionVePendleStatic {
10
+ using VeBalanceLib for VeBalance;
11
+ using VeBalanceLib for LockedPosition;
12
+
13
+ uint128 private constant MAX_LOCK_TIME = 104 weeks;
14
+ uint128 private constant MIN_LOCK_TIME = 1 weeks;
15
+
16
+ IPVotingEscrowMainchain private immutable vePENDLE;
17
+
18
+ constructor(IPVotingEscrowMainchain _vePENDLE) {
19
+ vePENDLE = _vePENDLE;
20
+ }
21
+
22
+ function increaseLockPositionStatic(
23
+ address user,
24
+ uint128 additionalAmountToLock,
25
+ uint128 newExpiry
26
+ ) external view returns (uint128 newVeBalance) {
27
+ if (!WeekMath.isValidWTime(newExpiry)) revert Errors.InvalidWTime(newExpiry);
28
+ if (MiniHelpers.isTimeInThePast(newExpiry)) revert Errors.ExpiryInThePast(newExpiry);
29
+
30
+ if (newExpiry > block.timestamp + MAX_LOCK_TIME) revert Errors.VEExceededMaxLockTime();
31
+ if (newExpiry < block.timestamp + MIN_LOCK_TIME) revert Errors.VEInsufficientLockTime();
32
+
33
+ LockedPosition memory oldPosition;
34
+
35
+ {
36
+ (uint128 amount, uint128 expiry) = vePENDLE.positionData(user);
37
+ oldPosition = LockedPosition(amount, expiry);
38
+ }
39
+
40
+ if (newExpiry < oldPosition.expiry) revert Errors.VENotAllowedReduceExpiry();
41
+
42
+ uint128 newTotalAmountLocked = additionalAmountToLock + oldPosition.amount;
43
+ if (newTotalAmountLocked == 0) revert Errors.VEZeroAmountLocked();
44
+
45
+ uint128 additionalDurationToLock = newExpiry - oldPosition.expiry;
46
+
47
+ LockedPosition memory newPosition = LockedPosition(
48
+ oldPosition.amount + additionalAmountToLock,
49
+ oldPosition.expiry + additionalDurationToLock
50
+ );
51
+
52
+ VeBalance memory newBalance = newPosition.convertToVeBalance();
53
+ return newBalance.getCurrentValue();
54
+ }
55
+ }
@@ -0,0 +1,20 @@
1
+ // SPDX-License-Identifier: GPL-3.0-or-later
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "../../../router/base/MarketApproxLib.sol";
5
+
6
+ abstract contract StorageLayout {
7
+ address internal owner;
8
+ address internal pendingOwner;
9
+
10
+ mapping(bytes4 => address) internal selectorToFacet;
11
+
12
+ ApproxParams internal defaultApproxParams;
13
+
14
+ address internal _deprecated_bulkSellerFactory;
15
+
16
+ modifier onlyOwner() {
17
+ require(msg.sender == owner, "Ownable: caller is not the owner");
18
+ _;
19
+ }
20
+ }
@@ -0,0 +1,23 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.17;
3
+
4
+ import "../core/libraries/math/PMath.sol";
5
+ import "../interfaces/IPExchangeRateOracle.sol";
6
+ import {AggregatorV3Interface as IChainlinkAggregator} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
7
+
8
+ contract PendleRedStoneRateOracle is IPExchangeRateOracle {
9
+ using PMath for int256;
10
+
11
+ address public immutable oracle;
12
+ uint8 public immutable decimals;
13
+
14
+ constructor(address _redStoneOracle, uint8 _decimals) {
15
+ oracle = _redStoneOracle;
16
+ decimals = _decimals;
17
+ }
18
+
19
+ function getExchangeRate() external view returns (uint256) {
20
+ (, int256 answer, , , ) = IChainlinkAggregator(oracle).latestRoundData();
21
+ return (answer.Uint() * 10 ** decimals) / 10 ** IChainlinkAggregator(oracle).decimals();
22
+ }
23
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "SY ezETH",
3
+ "SY": "0x22E12A50e3ca49FB183074235cB1db84Fe4C716D",
4
+ "YT": "0x256Fb830945141f7927785c06b65dAbc3744213c",
5
+ "PT": "0xeEE8aED1957ca1545a0508AfB51b53cCA7e3c0d1",
6
+ "market": "0xDe715330043799D7a80249660d1e6b61eB3713B3",
7
+ "expiry": 1714003200,
8
+ "scalarRoot": "11664642502000000000",
9
+ "initAnchor": "1056877081000000000",
10
+ "lnFeeRateRoot": "999500333000000"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "SY Kelp DAO rsETH",
3
+ "SY": "0x730A5E2AcEbccAA5e9095723B3CB862739DA793c",
4
+ "YT": "0x0ED3A1D45DfdCf85BCc6C7BAFDC0170A357B974C",
5
+ "PT": "0xB05cABCd99cf9a73b19805edefC5f67CA5d1895E",
6
+ "market": "0x4f43c77872Db6BA177c270986CD30c3381AF37Ee",
7
+ "expiry": 1719446400,
8
+ "scalarRoot": "11473762817000000000",
9
+ "initAnchor": "1090881589000000000",
10
+ "lnFeeRateRoot": "999500333000000"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "SY rsETH",
3
+ "SY": "0xf176fB51F4eB826136a54FDc71C50fCd2202E272",
4
+ "YT": "0x28DF0f193D8e45073BC1db6F2347812C031bA818",
5
+ "PT": "0x8D164E0C662C9E199baaC9E97b6A8664c75700EA",
6
+ "market": "0x6F02C88650837C8dfe89F66723c4743E9cF833cd",
7
+ "expiry": 1714003200,
8
+ "scalarRoot": "13486943734000000000",
9
+ "initAnchor": "1050863540000000000",
10
+ "lnFeeRateRoot": "999500333000000"
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "SY weETH",
3
+ "SY": "0xa6C895EB332E91c5b3D00B7baeEAae478cc502DA",
4
+ "YT": "0xF28Db483773E3616DA91FDfa7b5D4090Ac40cC59",
5
+ "PT": "0x9bEcd6b4Fb076348A455518aea23d3799361FE95",
6
+ "market": "0xE11f9786B06438456b044B3E21712228ADcAA0D1",
7
+ "expiry": 1714003200,
8
+ "scalarRoot": "13422165649000000000",
9
+ "initAnchor": "1056001760000000000",
10
+ "lnFeeRateRoot": "999500333000000"
11
+ }