@pendle/core-v2 2.25.0 → 2.26.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.
- package/contracts/core/Market/PendleExternalRewardDistributor.sol +2 -2
- package/contracts/core/StandardizedYield/implementations/PendleBridgedLSDSY.sol +99 -0
- package/deployments/10-core.json +30 -0
- package/deployments/10-markets/RETH-OPTIMISM-JUNE2024.json +10 -0
- package/deployments/10-markets/WSTETH-OPTIMISM-SEP2024.json +10 -0
- package/package.json +1 -1
|
@@ -45,11 +45,11 @@ contract PendleExternalRewardDistributor is
|
|
|
45
45
|
|
|
46
46
|
function getRewardTokens(
|
|
47
47
|
address market
|
|
48
|
-
) external view
|
|
48
|
+
) external view returns (address[] memory) {
|
|
49
49
|
return rewardTokens[market];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
function redeemRewards() external
|
|
52
|
+
function redeemRewards() external {
|
|
53
53
|
address market = msg.sender;
|
|
54
54
|
address[] memory tokens = rewardTokens[market];
|
|
55
55
|
for (uint256 i = 0; i < tokens.length; ++i) {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity 0.8.17;
|
|
3
|
+
|
|
4
|
+
import "../SYBase.sol";
|
|
5
|
+
import { AggregatorV2V3Interface as IChainlinkAggregator } from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
|
|
6
|
+
|
|
7
|
+
contract PendleBridgedLSDSY is SYBase {
|
|
8
|
+
using Math for int256;
|
|
9
|
+
|
|
10
|
+
address public immutable chainlinkFeed;
|
|
11
|
+
address internal immutable underlyingAssetOnEthAddr;
|
|
12
|
+
uint8 internal immutable underlyingAssetOnEthDecimals;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
string memory _name,
|
|
16
|
+
string memory _symbol,
|
|
17
|
+
address _token,
|
|
18
|
+
address _chainlinkFeed,
|
|
19
|
+
address _underlyingAssetOnEthAddr,
|
|
20
|
+
uint8 _underlyingAssetOnEthDecimals
|
|
21
|
+
) SYBase(_name, _symbol, _token) {
|
|
22
|
+
chainlinkFeed = _chainlinkFeed;
|
|
23
|
+
underlyingAssetOnEthAddr = _underlyingAssetOnEthAddr;
|
|
24
|
+
underlyingAssetOnEthDecimals = _underlyingAssetOnEthDecimals;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/*///////////////////////////////////////////////////////////////
|
|
28
|
+
DEPOSIT/REDEEM USING BASE TOKENS
|
|
29
|
+
//////////////////////////////////////////////////////////////*/
|
|
30
|
+
|
|
31
|
+
function _deposit(
|
|
32
|
+
address,
|
|
33
|
+
uint256 amountDeposited
|
|
34
|
+
) internal pure override returns (uint256 /*amountSharesOut*/) {
|
|
35
|
+
return amountDeposited;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function _redeem(
|
|
39
|
+
address receiver,
|
|
40
|
+
address tokenOut,
|
|
41
|
+
uint256 amountSharesToRedeem
|
|
42
|
+
) internal override returns (uint256 /*amountTokenOut*/) {
|
|
43
|
+
_transferOut(tokenOut, receiver, amountSharesToRedeem);
|
|
44
|
+
return amountSharesToRedeem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*///////////////////////////////////////////////////////////////
|
|
48
|
+
EXCHANGE-RATE
|
|
49
|
+
//////////////////////////////////////////////////////////////*/
|
|
50
|
+
|
|
51
|
+
function exchangeRate() public view override returns (uint256) {
|
|
52
|
+
(, int256 answer, , , ) = IChainlinkAggregator(chainlinkFeed).latestRoundData();
|
|
53
|
+
return answer.Uint();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*///////////////////////////////////////////////////////////////
|
|
57
|
+
MISC FUNCTIONS FOR METADATA
|
|
58
|
+
//////////////////////////////////////////////////////////////*/
|
|
59
|
+
|
|
60
|
+
function _previewDeposit(
|
|
61
|
+
address,
|
|
62
|
+
uint256 amountTokenToDeposit
|
|
63
|
+
) internal pure override returns (uint256 /*amountSharesOut*/) {
|
|
64
|
+
return amountTokenToDeposit;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function _previewRedeem(
|
|
68
|
+
address,
|
|
69
|
+
uint256 amountSharesToRedeem
|
|
70
|
+
) internal pure override returns (uint256 /*amountTokenOut*/) {
|
|
71
|
+
return amountSharesToRedeem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function getTokensIn() public view override returns (address[] memory res) {
|
|
75
|
+
res = new address[](1);
|
|
76
|
+
res[0] = yieldToken;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function getTokensOut() public view override returns (address[] memory res) {
|
|
80
|
+
res = new address[](1);
|
|
81
|
+
res[0] = yieldToken;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function isValidTokenIn(address token) public view override returns (bool) {
|
|
85
|
+
return token == yieldToken;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function isValidTokenOut(address token) public view override returns (bool) {
|
|
89
|
+
return token == yieldToken;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function assetInfo()
|
|
93
|
+
external
|
|
94
|
+
view
|
|
95
|
+
returns (AssetType assetType, address assetAddress, uint8 assetDecimals)
|
|
96
|
+
{
|
|
97
|
+
return (AssetType.TOKEN, underlyingAssetOnEthAddr, underlyingAssetOnEthDecimals);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"deployer": "0x1FcCC097db89A86Bfc474A1028F93958295b1Fb7",
|
|
3
|
+
"network": {
|
|
4
|
+
"chainId": 10,
|
|
5
|
+
"treasury": "0xE972D450ec5b11b99D97760422e0E054Afbc8042",
|
|
6
|
+
"governance": "0xa06C863fcf17cA6f24AA81aeA75E23953193fF6A",
|
|
7
|
+
"pendle": "0xBC7B1Ff1c6989f006a1185318eD4E7b5796e66E1",
|
|
8
|
+
"lzEndpoint": "0x3c2269811836af69497E5F486A85D7316753cf62",
|
|
9
|
+
"wrappedNative": "0x4200000000000000000000000000000000000006",
|
|
10
|
+
"initialRewardFee": "30000000000000000",
|
|
11
|
+
"initialInterestFee": "30000000000000000",
|
|
12
|
+
"initialFeeRateRoot": "999500333083533",
|
|
13
|
+
"initialReserveFeePercent": "80",
|
|
14
|
+
"safeWaitTime": 15000,
|
|
15
|
+
"sySwapper": ""
|
|
16
|
+
},
|
|
17
|
+
"baseCodeSplitter": "0x9a5aF6A35bb56443C577d57c303CDA39F56Dd173",
|
|
18
|
+
"PENDLE": "0xBC7B1Ff1c6989f006a1185318eD4E7b5796e66E1",
|
|
19
|
+
"yieldContractFactory": "0xf5a7De2D276dbda3EEf1b62A9E718EFf4d29dDC8",
|
|
20
|
+
"marketFactory": "0x17F100fB4bE2707675c6439468d38249DD993d58",
|
|
21
|
+
"routerStatic": "0x704478Dd72FD7F9B83d1F1e0fc18C14B54F034d0",
|
|
22
|
+
"pendleSwap": "0x963ddBB35c1AE44e2a159E3b5fb5177E0B32660d",
|
|
23
|
+
"ptOracle": "0x4106FC9811a792130502Bb3A5b693894cca7bD8e",
|
|
24
|
+
"externalRewardDistributor": "0x1fBaCedf510dAA79dfD9B41227A7ba192d5D548D",
|
|
25
|
+
"receiverEndpoint": "0x4d717868F4Bd14ac8B29Bb6361901e30Ae05e340",
|
|
26
|
+
"vePendle": "0xd5C47D2383Fddc19596489280C0A33AC42b2bB18",
|
|
27
|
+
"gaugeController": "0x6875e4A945E498FE1B90BbB13CFbAF0b68658C9C",
|
|
28
|
+
"router": "0x0000000001e4ef00d069e71d6ba041b0a16f7ea0",
|
|
29
|
+
"routerHelper": "0x462206b11d185ef6F64B41D344325401C37EC335"
|
|
30
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SY rETH",
|
|
3
|
+
"SY": "0x9D6d509C0354ACA187aAC6beA7d063D3Ef68e2A0",
|
|
4
|
+
"YT": "0xE8F0cf61598E0d7D20f99b978BdeFF4D4222FeB8",
|
|
5
|
+
"PT": "0xAA92Ea52612fA5ee5aba5510682485c19750CB82",
|
|
6
|
+
"market": "0x0C485Feb9E6fee816652Ea8f3beD2A8f59296E40",
|
|
7
|
+
"expiry": 1719446400,
|
|
8
|
+
"scalarRoot": "147092073019000000000",
|
|
9
|
+
"initAnchor": "1030688322000000000"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SY wstETH",
|
|
3
|
+
"SY": "0x96A528f4414aC3CcD21342996c93f2EcdEc24286",
|
|
4
|
+
"YT": "0x1DFe41cc7F7860BA7f1076ca6d0fedD707c87A00",
|
|
5
|
+
"PT": "0xF4225F061E5E01aA59DE5E615729A9180301EB07",
|
|
6
|
+
"market": "0x24fB77c8C776C75F869BC65e6856AF56f57d919F",
|
|
7
|
+
"expiry": 1727308800,
|
|
8
|
+
"scalarRoot": "145746856536000000000",
|
|
9
|
+
"initAnchor": "1045262948000000000"
|
|
10
|
+
}
|