@pendle/core-v2 0.8.0-beta → 0.8.0-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,14 +65,18 @@ contract PendleYearnVaultSCY is SCYBase {
65
65
  amountTokenOut = amountSharesToRedeem;
66
66
  } else {
67
67
  // tokenOut == underlying
68
- uint256 sharesRedeemed = IYearnVault(yvToken).withdraw(amountSharesToRedeem);
68
+ uint256 preBalanceYvToken = _selfBalance(yvToken);
69
+
70
+ amountTokenOut = IYearnVault(yvToken).withdraw(
71
+ amountSharesToRedeem,
72
+ address(this),
73
+ 10000
74
+ );
69
75
 
70
76
  require(
71
- sharesRedeemed == amountSharesToRedeem,
77
+ preBalanceYvToken - _selfBalance(yvToken) == amountSharesToRedeem,
72
78
  "Yearn Vault SCY: Not allowed to redeem all shares"
73
79
  );
74
-
75
- amountTokenOut = _selfBalance(underlying);
76
80
  }
77
81
  }
78
82
 
@@ -18,7 +18,7 @@ abstract contract SCYBase is ISuperComposableYield, PendleERC20, TokenHelper {
18
18
  string memory _name,
19
19
  string memory _symbol,
20
20
  address _yieldToken
21
- ) PendleERC20(_name, _symbol, 18) {
21
+ ) PendleERC20(_name, _symbol, IERC20Metadata(_yieldToken).decimals()) {
22
22
  yieldToken = _yieldToken;
23
23
  }
24
24
 
@@ -103,7 +103,7 @@ contract PendleMarket is PendleERC20, PendleGauge, IPMarket {
103
103
  index,
104
104
  scyDesired,
105
105
  ptDesired,
106
- true
106
+ block.timestamp
107
107
  );
108
108
 
109
109
  // initializing the market
@@ -133,7 +133,7 @@ contract PendleMarket is PendleERC20, PendleGauge, IPMarket {
133
133
  uint256 lpToRemove = balanceOf(address(this));
134
134
  _burn(address(this), lpToRemove);
135
135
 
136
- (scyToAccount, ptToAccount) = market.removeLiquidity(lpToRemove, true);
136
+ (scyToAccount, ptToAccount) = market.removeLiquidity(lpToRemove);
137
137
 
138
138
  IERC20(SCY).safeTransfer(receiverScy, scyToAccount);
139
139
  IERC20(PT).safeTransfer(receiverPt, ptToAccount);
@@ -197,6 +197,31 @@ contract PendleYieldToken is
197
197
  return MiniHelpers.isCurrentlyExpired(expiry);
198
198
  }
199
199
 
200
+ function getPostExpiryData()
201
+ external
202
+ view
203
+ returns (
204
+ uint256 firstScyIndex,
205
+ uint256 totalScyInterestForTreasury,
206
+ uint256[] memory firstRewardIndexes,
207
+ uint256[] memory userRewardOwed
208
+ )
209
+ {
210
+ require(postExpiry.firstScyIndex != 0, "PostExpiry data not set");
211
+
212
+ firstScyIndex = postExpiry.firstScyIndex;
213
+ totalScyInterestForTreasury = postExpiry.totalScyInterestForTreasury;
214
+
215
+ address[] memory tokens = getRewardTokens();
216
+ firstRewardIndexes = new uint256[](tokens.length);
217
+ userRewardOwed = new uint256[](tokens.length);
218
+
219
+ for (uint256 i = 0; i < tokens.length; ++i) {
220
+ firstRewardIndexes[i] = postExpiry.firstRewardIndex[tokens[i]];
221
+ userRewardOwed[i] = postExpiry.userRewardOwed[tokens[i]];
222
+ }
223
+ }
224
+
200
225
  function _redeemPY(address[] memory receivers, uint256[] memory amountPYToRedeems)
201
226
  internal
202
227
  returns (uint256[] memory amountScyOuts)
@@ -370,6 +395,7 @@ contract PendleYieldToken is
370
395
  address to,
371
396
  uint256
372
397
  ) internal override {
398
+ _setPostExpiryData();
373
399
  _updateAndDistributeRewardsForTwo(from, to);
374
400
  _distributeInterestForTwo(from, to);
375
401
  }
@@ -92,9 +92,7 @@ contract ActionCallback is IPMarketSwapCallback, CallbackHelper {
92
92
  /// ------------------------------------------------------------
93
93
  SCYIndex scyIndex = SCY.newIndex();
94
94
  uint256 ptOwed = ptToAccount.abs();
95
- uint256 totalScyNeed = scyIndex.assetToScy(ptOwed);
96
- // to guard against precision issue of lacking a few units of SCY. rawDivUp is not Fixed-Point division
97
- totalScyNeed += SCYIndex.unwrap(scyIndex).rawDivUp(SCYUtils.ONE);
95
+ uint256 totalScyNeed = scyIndex.assetToScyUp(ptOwed);
98
96
 
99
97
  /// ------------------------------------------------------------
100
98
  /// calc netScyToPull
@@ -45,7 +45,7 @@ abstract contract ActionSCYAndPTBase is ActionSCYAndPYBase {
45
45
  SCY.newIndex(),
46
46
  scyDesired,
47
47
  ptDesired,
48
- false
48
+ block.timestamp
49
49
  );
50
50
 
51
51
  // early-check
@@ -72,7 +72,7 @@ abstract contract ActionSCYAndPTBase is ActionSCYAndPYBase {
72
72
  ) internal returns (uint256 netScyOut, uint256 netPtOut) {
73
73
  MarketState memory state = IPMarket(market).readState(false);
74
74
 
75
- (netScyOut, netPtOut) = state.removeLiquidity(lpToRemove, false);
75
+ (netScyOut, netPtOut) = state.removeLiquidity(lpToRemove);
76
76
 
77
77
  // early-check
78
78
  require(netScyOut >= scyOutMin, "insufficient SCY out");
@@ -109,13 +109,16 @@ abstract contract ActionSCYAndYTBase is ActionSCYAndPYBase, CallbackHelper {
109
109
  uint256 exactYtOut,
110
110
  uint256 maxScyIn
111
111
  ) internal returns (uint256 netScyIn) {
112
- (, , IPYieldToken YT) = IPMarket(market).readTokens();
112
+ (ISuperComposableYield SCY, , IPYieldToken YT) = IPMarket(market).readTokens();
113
+
114
+ uint256 preScyBalance = SCY.balanceOf(msg.sender);
113
115
 
114
116
  IPMarket(market).swapExactPtForScy(
115
117
  address(YT),
116
118
  exactYtOut, // exactPtIn = exactYtOut
117
119
  _encodeSwapScyForExactYt(msg.sender, receiver, maxScyIn)
118
120
  );
121
+ netScyIn = preScyBalance - SCY.balanceOf(msg.sender);
119
122
  }
120
123
 
121
124
  /**
@@ -104,16 +104,21 @@ interface IPRouterStatic {
104
104
  view
105
105
  returns (uint256 netScyOut, uint256 netPtOut);
106
106
 
107
- function swapPtForScyStatic(address market, uint256 exactPtIn)
107
+ function swapExactPtForScyStatic(address market, uint256 exactPtIn)
108
108
  external
109
109
  view
110
110
  returns (uint256 netScyOut, uint256 netScyFee);
111
111
 
112
- function swapScyForPtStatic(address market, uint256 exactPtOut)
112
+ function swapScyForExactPtStatic(address market, uint256 exactPtOut)
113
113
  external
114
114
  view
115
115
  returns (uint256 netScyIn, uint256 netScyFee);
116
116
 
117
+ function swapExactScyForPtStatic(address market, uint256 exactScyIn)
118
+ external
119
+ view
120
+ returns (uint256 netPtOut, uint256 netScyFee);
121
+
117
122
  // ============= OTHER HELPERS =============
118
123
 
119
124
  function scyIndex(address market) external view returns (SCYIndex index);
@@ -28,7 +28,11 @@ interface IYearnVault {
28
28
 
29
29
  function deposit(uint256 amount, address recipient) external returns (uint256);
30
30
 
31
- function withdraw(uint256 maxShares) external returns (uint256);
31
+ function withdraw(
32
+ uint256 maxShares,
33
+ address recipient,
34
+ uint256 maxLoss
35
+ ) external returns (uint256 amountTokenRedeemed);
32
36
 
33
37
  function pricePerShare() external view returns (uint256);
34
38
 
@@ -34,6 +34,13 @@ library SCYIndexLib {
34
34
  return SCYUtils.assetToScy(SCYIndex.unwrap(index), assetAmount);
35
35
  }
36
36
 
37
+ function assetToScyUp(SCYIndex index, uint256 assetAmount)
38
+ internal
39
+ pure
40
+ returns (uint256)
41
+ {
42
+ return SCYUtils.assetToScyUp(SCYIndex.unwrap(index), assetAmount);
43
+ }
37
44
 
38
45
  function scyToAssetUp(SCYIndex index, uint256 scyAmount)
39
46
  internal
@@ -41,7 +48,7 @@ library SCYIndexLib {
41
48
  returns (uint256)
42
49
  {
43
50
  uint256 _index = SCYIndex.unwrap(index);
44
- return SCYUtils.scyToAsset(_index, scyAmount)+ _index.rawDivUp(SCYUtils.ONE);
51
+ return SCYUtils.scyToAssetUp(_index, scyAmount);
45
52
  }
46
53
 
47
54
  function scyToAsset(SCYIndex index, int256 scyAmount)
@@ -8,6 +8,14 @@ library SCYUtils {
8
8
  return (scyAmount * exchangeRate) / ONE;
9
9
  }
10
10
 
11
+ function scyToAssetUp(uint256 exchangeRate, uint256 scyAmount)
12
+ internal
13
+ pure
14
+ returns (uint256)
15
+ {
16
+ return (scyAmount * exchangeRate + ONE - 1) / ONE;
17
+ }
18
+
11
19
  function assetToScy(uint256 exchangeRate, uint256 assetAmount)
12
20
  internal
13
21
  pure
@@ -15,4 +23,12 @@ library SCYUtils {
15
23
  {
16
24
  return (assetAmount * ONE) / exchangeRate;
17
25
  }
26
+
27
+ function assetToScyUp(uint256 exchangeRate, uint256 assetAmount)
28
+ internal
29
+ pure
30
+ returns (uint256)
31
+ {
32
+ return (assetAmount * ONE + exchangeRate - 1) / exchangeRate;
33
+ }
18
34
  }
@@ -57,7 +57,7 @@ library MarketMathCore {
57
57
  SCYIndex index,
58
58
  uint256 scyDesired,
59
59
  uint256 ptDesired,
60
- bool updateState
60
+ uint256 blockTime
61
61
  )
62
62
  internal
63
63
  pure
@@ -73,7 +73,7 @@ library MarketMathCore {
73
73
  int256 _lpToAccount,
74
74
  int256 _scyUsed,
75
75
  int256 _otUsed
76
- ) = addLiquidityCore(market, index, scyDesired.Int(), ptDesired.Int(), updateState);
76
+ ) = addLiquidityCore(market, index, scyDesired.Int(), ptDesired.Int(), blockTime);
77
77
 
78
78
  lpToReserve = _lpToReserve.Uint();
79
79
  lpToAccount = _lpToAccount.Uint();
@@ -81,15 +81,14 @@ library MarketMathCore {
81
81
  ptUsed = _otUsed.Uint();
82
82
  }
83
83
 
84
- function removeLiquidity(
85
- MarketState memory market,
86
- uint256 lpToRemove,
87
- bool updateState
88
- ) internal pure returns (uint256 scyToAccount, uint256 netPtToAccount) {
84
+ function removeLiquidity(MarketState memory market, uint256 lpToRemove)
85
+ internal
86
+ pure
87
+ returns (uint256 scyToAccount, uint256 netPtToAccount)
88
+ {
89
89
  (int256 _scyToAccount, int256 _ptToAccount) = removeLiquidityCore(
90
90
  market,
91
- lpToRemove.Int(),
92
- updateState
91
+ lpToRemove.Int()
93
92
  );
94
93
 
95
94
  scyToAccount = _scyToAccount.Uint();
@@ -139,7 +138,7 @@ library MarketMathCore {
139
138
  SCYIndex index,
140
139
  int256 scyDesired,
141
140
  int256 ptDesired,
142
- bool updateState
141
+ uint256 blockTime
143
142
  )
144
143
  internal
145
144
  pure
@@ -154,6 +153,7 @@ library MarketMathCore {
154
153
  /// CHECKS
155
154
  /// ------------------------------------------------------------
156
155
  require(scyDesired > 0 && ptDesired > 0, "ZERO_AMOUNTS");
156
+ require(!MiniHelpers.isExpired(market.expiry, blockTime), "market expired");
157
157
 
158
158
  /// ------------------------------------------------------------
159
159
  /// MATH
@@ -182,18 +182,16 @@ library MarketMathCore {
182
182
  /// ------------------------------------------------------------
183
183
  /// WRITE
184
184
  /// ------------------------------------------------------------
185
- if (updateState) {
186
- market.totalScy += scyUsed;
187
- market.totalPt += ptUsed;
188
- market.totalLp += lpToAccount + lpToReserve;
189
- }
185
+ market.totalScy += scyUsed;
186
+ market.totalPt += ptUsed;
187
+ market.totalLp += lpToAccount + lpToReserve;
190
188
  }
191
189
 
192
- function removeLiquidityCore(
193
- MarketState memory market,
194
- int256 lpToRemove,
195
- bool updateState
196
- ) internal pure returns (int256 netScyToAccount, int256 netPtToAccount) {
190
+ function removeLiquidityCore(MarketState memory market, int256 lpToRemove)
191
+ internal
192
+ pure
193
+ returns (int256 netScyToAccount, int256 netPtToAccount)
194
+ {
197
195
  /// ------------------------------------------------------------
198
196
  /// CHECKS
199
197
  /// ------------------------------------------------------------
@@ -209,11 +207,9 @@ library MarketMathCore {
209
207
  /// ------------------------------------------------------------
210
208
  /// WRITE
211
209
  /// ------------------------------------------------------------
212
- if (updateState) {
213
- market.totalLp = market.totalLp.subNoNeg(lpToRemove);
214
- market.totalPt = market.totalPt.subNoNeg(netPtToAccount);
215
- market.totalScy = market.totalScy.subNoNeg(netScyToAccount);
216
- }
210
+ market.totalLp = market.totalLp.subNoNeg(lpToRemove);
211
+ market.totalPt = market.totalPt.subNoNeg(netPtToAccount);
212
+ market.totalScy = market.totalScy.subNoNeg(netScyToAccount);
217
213
  }
218
214
 
219
215
  function executeTradeCore(
@@ -59,11 +59,6 @@ library Math {
59
59
  }
60
60
  }
61
61
 
62
- function rawDivUp(uint256 a, uint256 b) internal pure returns (uint256) {
63
- require(b != 0, "divide by zero");
64
- return (a + b - 1) / b;
65
- }
66
-
67
62
  function abs(int256 x) internal pure returns (uint256) {
68
63
  return uint256(x > 0 ? x : -x);
69
64
  }
@@ -7,6 +7,7 @@ import "../interfaces/IPRouterStatic.sol";
7
7
  import "../interfaces/IPMarket.sol";
8
8
  import "../interfaces/IPYieldContractFactory.sol";
9
9
  import "../interfaces/IPMarketFactory.sol";
10
+ import "../libraries/math/MarketApproxLib.sol";
10
11
  import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
11
12
  import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
12
13
  import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
@@ -14,12 +15,22 @@ import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
14
15
  /// EXCLUDED FROM ALL AUDITS, TO BE CALLED ONLY BY PENDLE's SDK
15
16
  contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, OwnableUpgradeable {
16
17
  using MarketMathCore for MarketState;
18
+ using MarketApproxLib for MarketState;
17
19
  using Math for uint256;
18
20
  using Math for int256;
19
21
  using LogExpMath for int256;
22
+ using SCYIndexLib for SCYIndex;
20
23
 
21
24
  IPYieldContractFactory public immutable yieldContractFactory;
22
25
  IPMarketFactory public immutable marketFactory;
26
+ ApproxParams public approxParams =
27
+ ApproxParams({
28
+ guessMin: 0,
29
+ guessMax: type(uint256).max,
30
+ guessOffchain: 0,
31
+ maxIteration: 256,
32
+ eps: 1e15
33
+ });
23
34
 
24
35
  constructor(IPYieldContractFactory _yieldContractFactory, IPMarketFactory _marketFactory)
25
36
  initializer
@@ -151,7 +162,7 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
151
162
  scyIndex(market),
152
163
  scyDesired,
153
164
  ptDesired,
154
- false
165
+ block.timestamp
155
166
  );
156
167
  }
157
168
 
@@ -161,10 +172,10 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
161
172
  returns (uint256 netScyOut, uint256 netPtOut)
162
173
  {
163
174
  MarketState memory state = IPMarket(market).readState(false);
164
- (netScyOut, netPtOut) = state.removeLiquidity(lpToRemove, false);
175
+ (netScyOut, netPtOut) = state.removeLiquidity(lpToRemove);
165
176
  }
166
177
 
167
- function swapPtForScyStatic(address market, uint256 exactPtIn)
178
+ function swapExactPtForScyStatic(address market, uint256 exactPtIn)
168
179
  external
169
180
  view
170
181
  returns (uint256 netScyOut, uint256 netScyFee)
@@ -177,7 +188,7 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
177
188
  );
178
189
  }
179
190
 
180
- function swapScyForPtStatic(address market, uint256 exactPtOut)
191
+ function swapScyForExactPtStatic(address market, uint256 exactPtOut)
181
192
  external
182
193
  view
183
194
  returns (uint256 netScyIn, uint256 netScyFee)
@@ -190,8 +201,110 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
190
201
  );
191
202
  }
192
203
 
204
+ function swapExactScyForPtStatic(address market, uint256 exactScyIn)
205
+ external
206
+ view
207
+ returns (uint256 netPtOut, uint256 netScyFee)
208
+ {
209
+ MarketState memory state = IPMarket(market).readState(false);
210
+ (netPtOut, , netScyFee) = state.approxSwapExactScyForPt(
211
+ scyIndex(market),
212
+ exactScyIn,
213
+ block.timestamp,
214
+ approxParams
215
+ );
216
+ }
217
+
218
+ function swapScyForExactYtStatic(address market, uint256 exactYtOut)
219
+ external
220
+ view
221
+ returns (uint256 netScyIn, uint256 netScyFee)
222
+ {
223
+ MarketState memory state = IPMarket(market).readState(false);
224
+
225
+ SCYIndex index = scyIndex(market);
226
+
227
+ uint256 scyReceived;
228
+ (scyReceived, netScyFee) = state.swapExactPtForScy(
229
+ scyIndex(market),
230
+ exactYtOut,
231
+ block.timestamp
232
+ );
233
+
234
+ uint256 totalScyNeed = index.assetToScyUp(exactYtOut);
235
+ netScyIn = totalScyNeed.subMax0(scyReceived);
236
+ }
237
+
238
+ function swapExactScyForYtStatic(address market, uint256 exactScyIn)
239
+ external
240
+ view
241
+ returns (uint256 netYtOut, uint256 netScyFee)
242
+ {
243
+ MarketState memory state = IPMarket(market).readState(false);
244
+ SCYIndex index = scyIndex(market);
245
+
246
+ (netYtOut, , netScyFee) = state.approxSwapExactScyForYt(
247
+ index,
248
+ exactScyIn,
249
+ block.timestamp,
250
+ approxParams
251
+ );
252
+ }
253
+
254
+ function swapExactYtForScyStatic(address market, uint256 exactYtIn)
255
+ external
256
+ view
257
+ returns (uint256 netScyOut, uint256 netScyFee)
258
+ {
259
+ MarketState memory state = IPMarket(market).readState(false);
260
+
261
+ SCYIndex index = scyIndex(market);
262
+
263
+ uint256 scyOwed;
264
+ (scyOwed, netScyFee) = state.swapScyForExactPt(index, exactYtIn, block.timestamp);
265
+
266
+ uint256 amountPYToRepayScyOwed = index.scyToAssetUp(scyOwed);
267
+ uint256 amountPYToRedeemScyOut = exactYtIn - amountPYToRepayScyOwed;
268
+
269
+ netScyOut = index.assetToScy(amountPYToRedeemScyOut);
270
+ }
271
+
272
+ function swapYtForExactScyStatic(address market, uint256 exactScyOut)
273
+ external
274
+ view
275
+ returns (uint256 netYtIn, uint256 netScyFee)
276
+ {
277
+ MarketState memory state = IPMarket(market).readState(false);
278
+
279
+ SCYIndex index = scyIndex(market);
280
+
281
+ (netYtIn, , netScyFee) = state.approxSwapYtForExactScy(
282
+ index,
283
+ exactScyOut,
284
+ block.timestamp,
285
+ approxParams
286
+ );
287
+ }
288
+
193
289
  // ============= OTHER HELPERS =============
194
290
 
291
+ function previewMintPY(address YT, uint256 amountScyToMint)
292
+ external
293
+ returns (uint256 amountPY)
294
+ {
295
+ IPYieldToken _YT = IPYieldToken(YT);
296
+ require(!_YT.isExpired(), "YT is expired");
297
+ return amountScyToMint.mulDown(_YT.scyIndexCurrent());
298
+ }
299
+
300
+ function previewRedeemPY(address YT, uint256 amountPYToRedeem)
301
+ external
302
+ returns (uint256 amountPY)
303
+ {
304
+ IPYieldToken _YT = IPYieldToken(YT);
305
+ return amountPYToRedeem.divDown(_YT.scyIndexCurrent());
306
+ }
307
+
195
308
  function scyIndex(address market) public view returns (SCYIndex index) {
196
309
  (ISuperComposableYield SCY, , ) = IPMarket(market).readTokens();
197
310
 
@@ -215,6 +328,25 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
215
328
  return lnImpliedRate.exp();
216
329
  }
217
330
 
331
+ function getExchangeRate(address market) public view returns (uint256) {
332
+ MarketState memory state = IPMarket(market).readState(false);
333
+ MarketPreCompute memory comp = state.getMarketPreCompute(
334
+ scyIndex(market),
335
+ block.timestamp
336
+ );
337
+
338
+ return
339
+ MarketMathCore
340
+ ._getExchangeRate(
341
+ state.totalPt,
342
+ comp.totalAsset,
343
+ comp.rateScalar,
344
+ comp.rateAnchor,
345
+ 0
346
+ )
347
+ .Uint();
348
+ }
349
+
218
350
  function getUserPYInfo(address py, address user)
219
351
  public
220
352
  view
@@ -255,7 +387,7 @@ contract RouterStatic is IPRouterStatic, Initializable, UUPSUpgradeable, Ownable
255
387
  userMarketInfo.market = market;
256
388
  userMarketInfo.lpBalance = userLp;
257
389
 
258
- MarketState memory state = _market.readState(true);
390
+ MarketState memory state = _market.readState(false);
259
391
  uint256 totalLp = uint256(state.totalLp);
260
392
  uint256 userPt = (userLp * uint256(state.totalPt)) / totalLp;
261
393
  uint256 userScy = (userLp * uint256(state.totalScy)) / totalLp;
@@ -2,15 +2,15 @@
2
2
  "deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
3
3
  "network": 43113,
4
4
  "celerBus": "0xE9533976C590200E32d95C53f06AE12d292cFc47",
5
- "treasury": "0xeEb65778Aa8866163d28ea0fF6Dc68826C722aeD",
6
- "governanceManager": "0x8C7e949dDFA8549ddBC418Bf66135367Ec33e230",
7
- "PENDLE": "0x49a61480e7C8E08EF6e5c52411396310B9257b11",
8
- "yieldContractFactory": "0xa611Ecc96c2E59406a58115F08AaCeD05b60bB6b",
9
- "marketFactory": "0xbb1aD0bd2A7cC4d1eB08A563670d2aC819b39d83",
10
- "router": "0xc443267dC61Fda10f523795f70dB505E624caC82",
11
- "routerStatic": "0xEE3cE0bFC2b0175Dd9CCC788E39f4952463b8b7a",
5
+ "treasury": "0xf176fB51F4eB826136a54FDc71C50fCd2202E272",
6
+ "governanceManager": "0x0A60B5D39b27E18F63aa937aD09Acc2B3d46d2a1",
7
+ "PENDLE": "0x519f3907379491c291Cf7b98425F35036a698080",
8
+ "yieldContractFactory": "0x2ff0de5593c85e0609675d07A6a33093A3838b17",
9
+ "marketFactory": "0x30340f337C27768e84CA5E957Fb22dcBF95857cD",
10
+ "router": "0xFEdBED4682D136925d30FFb9B8977CC9b3a6c406",
11
+ "routerStatic": "0xc49d8fdA920a46B21E1821780238f9E7A0de68df",
12
12
  "startTime": 1657756800,
13
- "vePendle": "0x47797F05f96532070E6A3D0125b2242FA869F8a9",
14
- "votingController": "0xF89b549dF09ee805FC59F80bD333D8145e14480a",
15
- "gaugeController": "0x7F21fa9108Ef12CDd7bFF026f26a95D6e17C5dA8"
13
+ "vePendle": "0x7786729eEe8b9d30fE7d91fDFf23A0f1D0C615D9",
14
+ "votingController": "0x1001940C59e87AdfdB9f3b50aec5232c59d40Bc4",
15
+ "gaugeController": "0x3d47dBfB525cf8869B8c266a4c42E2c128F5639C"
16
16
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "SCY": "0x0acd905cCecd83505455701Eca4Efd92F232D007",
3
+ "expiry": 1673308800,
4
+ "PT": "0x132dc1190DFa55895d6F75C0720Da800AF424b81",
5
+ "YT": "0xC1ea94221d74c45695Fbc7867640F10DaE4E7e7d",
6
+ "market": "0x9f080Af83E84099ED92b1b9b4B4BbE4400f2A3CB"
7
+ }
@@ -2,14 +2,14 @@
2
2
  "deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
3
3
  "network": 80001,
4
4
  "celerBus": "0x7d43AABC515C356145049227CeE54B608342c0ad",
5
- "treasury": "0x28FcFb63c8ab55E3710e51441d003318eE235FE8",
6
- "governanceManager": "0x27FaF900007B4cBa7803000251ec96Bc69ff1BEa",
7
- "PENDLE": "0x8553e57B13aECb9704Be27d7BF0067211dEaed00",
8
- "yieldContractFactory": "0xE6DD1433d59B2eaf26E7B2107c574d3c3299023e",
9
- "marketFactory": "0x191c677bc1d2BbcBfa99fd68b34ed4fb2E157eFD",
10
- "router": "0xCd6fC1E4f430976fB5c20E747f861E6bd14454d4",
11
- "routerStatic": "0xeb83006b0aADdD15AD8AFbebE2f4e0937f210673",
5
+ "treasury": "0xFF4a4515888AEf82C9557A56E37A55a5dDe6EFF1",
6
+ "governanceManager": "0xE4a112A028D93e9E9b207eBedB1e1D6Cf5FdCEe9",
7
+ "PENDLE": "0x6D998d832b82f6307c5a2592d59A4cba7f15167f",
8
+ "yieldContractFactory": "0x058Ceec78EB7F854daBfdDd894e841423Ca344c3",
9
+ "marketFactory": "0xD33F62424acC95704D43E725B11b9e770505B425",
10
+ "router": "0x24d7CEaFBA7c7b32BE200aD6dA38C03797F0611f",
11
+ "routerStatic": "0x9902C57F6bc1e7737238777Fc52dA8A2161759f7",
12
12
  "startTime": 1657756800,
13
- "vePendle": "0xd160cd8eeb79F976d6f08EaeAA3C93612D543c2c",
14
- "gaugeController": "0x52dFCD0b5DCaa16E697de2cc4A1F404DDC41fC42"
13
+ "vePendle": "0x1b615005157B9B0DDc7c0Af817f4A570cE3b591e",
14
+ "gaugeController": "0x3663E54bf1334B60FC97d3781460Bcf73d008116"
15
15
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "SCY": "0x9Bdb1dfD15D9051D127c3cD6882e194cA1c89e56",
3
+ "expiry": 1673308800,
4
+ "PT": "0x36b83a38f5073Ef53EaaC74F2C6F29cC346f3a61",
5
+ "YT": "0x376F7aEE5e3C2Ba02CB53122e0c7D9E4FEd65801",
6
+ "market": "0x78699fa58C484e9867B8047A12E959ccB8BaD90E"
7
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pendle/core-v2",
3
3
  "description": "Core smart contracts of Pendle Protocol.",
4
4
  "license": "BUSL-1.1",
5
- "version": "0.8.0-beta",
5
+ "version": "0.8.0-beta-2",
6
6
  "homepage": "https://pendle.finance",
7
7
  "keywords": [
8
8
  "pendle",
@@ -1,7 +0,0 @@
1
- {
2
- "SCY": "0x9a337ff76905e00167D8d15008C3537a89a278B7",
3
- "expiry": 1673308800,
4
- "PT": "0x697cB12b2e7545568bBF7aea138A2D44073F4E80",
5
- "YT": "0x35f41D2adEc7E478F3559Da69E64f8ab47637ecd",
6
- "market": "0xF3150c14F776c50C9D397054d38979c7B77FC41D"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "SCY": "0x0F23e2c274a97E39813080a09D9F3E87d4d83116",
3
- "expiry": 1673308800,
4
- "PT": "0x3B5df4C6E9deC89350389a48ad0354422D1Ef2a1",
5
- "YT": "0xFcd43fE1E9E48681B222d9a0861da82ea41fAA8A",
6
- "market": "0x150b6eb90Bf636eC0c4328d13d1e1d4adDBAF904"
7
- }