@pendle/core-v2 5.1.1 → 5.2.0-beta-1
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/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol/PendleVotingControllerUpg.json +23 -67
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.dbg.json +1 -1
- package/build/artifacts/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol/VotingControllerStorageUpg.json +6 -19
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithoutPermitUpg.sol/SYBaseUpg.dbg.json +4 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithoutPermitUpg.sol/{SYBaseWithoutPermitUpg.json → SYBaseUpg.json} +1 -1
- 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/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracle.sol/IPChainlinkOracle.json +122 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleFactory.sol/IPChainlinkOracleFactory.json +91 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPChainlinkOracleWithQuote.sol/IPChainlinkOracleWithQuote.json +262 -0
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol/SDKErrorsDirectory.json +2 -27
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracle.sol/PendleChainlinkOracle.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracle.sol/PendleChainlinkOracle.json +274 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleBase.sol/PendleChainlinkOracleBase.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleBase.sol/PendleChainlinkOracleBase.json +253 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleFactory.sol/PendleChainlinkOracleFactory.json +289 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.dbg.json +4 -0
- package/build/artifacts/contracts/oracles/factory/PendleChainlinkOracleWithQuote.sol/PendleChainlinkOracleWithQuote.json +305 -0
- package/contracts/LiquidityMining/VotingController/PendleVotingControllerUpg.sol +6 -27
- package/contracts/LiquidityMining/VotingController/VotingControllerStorageUpg.sol +2 -3
- package/contracts/core/StandardizedYield/SYBaseWithoutPermitUpg.sol +1 -1
- package/contracts/core/StandardizedYield/implementations/GLP/PendleGlpSY.sol +2 -1
- package/contracts/interfaces/IPChainlinkOracle.sol +15 -0
- package/contracts/interfaces/IPChainlinkOracleFactory.sol +22 -0
- package/contracts/interfaces/IPChainlinkOracleWithQuote.sol +8 -0
- package/contracts/offchain-helpers/errors/SDKErrorsDirectory.sol +0 -5
- package/contracts/oracles/factory/PendleChainlinkOracle.sol +21 -0
- package/contracts/oracles/factory/PendleChainlinkOracleBase.sol +138 -0
- package/contracts/oracles/factory/PendleChainlinkOracleFactory.sol +99 -0
- package/contracts/oracles/factory/PendleChainlinkOracleWithQuote.sol +46 -0
- package/package.json +1 -1
- package/typechain-types/IPChainlinkOracle.ts +221 -0
- package/typechain-types/IPChainlinkOracleFactory.ts +123 -0
- package/typechain-types/IPChainlinkOracleWithQuote.ts +404 -0
- package/typechain-types/PendleChainlinkOracle.ts +299 -0
- package/typechain-types/PendleChainlinkOracleBase.ts +299 -0
- package/typechain-types/PendleChainlinkOracleFactory.ts +389 -0
- package/typechain-types/PendleChainlinkOracleWithQuote.ts +335 -0
- package/typechain-types/PendleVotingControllerUpg.ts +43 -135
- package/typechain-types/VotingControllerStorageUpg.ts +15 -34
- package/typechain-types/factories/IPChainlinkOracleFactory__factory.ts +110 -0
- package/typechain-types/factories/IPChainlinkOracleWithQuote__factory.ts +281 -0
- package/typechain-types/factories/IPChainlinkOracle__factory.ts +137 -0
- package/typechain-types/factories/PendleChainlinkOracleBase__factory.ts +272 -0
- package/typechain-types/factories/PendleChainlinkOracleFactory__factory.ts +351 -0
- package/typechain-types/factories/PendleChainlinkOracleWithQuote__factory.ts +389 -0
- package/typechain-types/factories/PendleChainlinkOracle__factory.ts +354 -0
- package/typechain-types/factories/PendleGlpSY__factory.ts +1 -1
- package/typechain-types/factories/PendleVotingControllerUpg__factory.ts +22 -66
- package/typechain-types/factories/SDKErrorsDirectory__factory.ts +1 -26
- package/typechain-types/factories/VotingControllerStorageUpg__factory.ts +6 -19
- package/typechain-types/hardhat.d.ts +72 -0
- package/typechain-types/index.ts +14 -0
- package/build/artifacts/contracts/core/StandardizedYield/SYBaseWithoutPermitUpg.sol/SYBaseWithoutPermitUpg.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleStkGHOSY.sol/PendleStkGHOSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/AaveV3/PendleStkGHOSY.sol/PendleStkGHOSY.json +0 -1160
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mantle/PendleCMETHSY.sol/PendleCMETHSY.dbg.json +0 -4
- package/build/artifacts/contracts/core/StandardizedYield/implementations/Mantle/PendleCMETHSY.sol/PendleCMETHSY.json +0 -1049
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveStkGHO.sol/IAaveStkGHO.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/AaveV3/IAaveStkGHO.sol/IAaveStkGHO.json +0 -116
- package/build/artifacts/contracts/interfaces/Angle/IAngleDistributor.sol/IAngleDistributor.dbg.json +0 -4
- package/build/artifacts/contracts/interfaces/Angle/IAngleDistributor.sol/IAngleDistributor.json +0 -39
- package/contracts/core/StandardizedYield/implementations/AaveV3/PendleStkGHOSY.sol +0 -130
- package/contracts/core/StandardizedYield/implementations/Mantle/PendleCMETHSY.sol +0 -82
- package/contracts/interfaces/AaveV3/IAaveStkGHO.sol +0 -17
- package/contracts/interfaces/Angle/IAngleDistributor.sol +0 -12
- package/deployments/1-markets/STKGHO-MAINNET-APR2025.json +0 -14
- package/deployments/42161-markets/DOLOMITE-USDC-ARBITRUM-JUN2025.json +0 -14
- package/deployments/42161-markets/DOLOMITE-WBTC-ARBITRUM-JUN2025.json +0 -14
- package/deployments/5000-markets/CMETH-MANTLE-FEB2025.json +0 -14
- package/deployments/56-markets/VENUS-BNB-BSC-JUN2025.json +0 -14
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "IAaveStkGHO",
|
|
4
|
-
"sourceName": "contracts/interfaces/AaveV3/IAaveStkGHO.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "address",
|
|
10
|
-
"name": "to",
|
|
11
|
-
"type": "address"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"internalType": "uint256",
|
|
15
|
-
"name": "amount",
|
|
16
|
-
"type": "uint256"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"name": "claimRewards",
|
|
20
|
-
"outputs": [],
|
|
21
|
-
"stateMutability": "nonpayable",
|
|
22
|
-
"type": "function"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"inputs": [],
|
|
26
|
-
"name": "getExchangeRate",
|
|
27
|
-
"outputs": [
|
|
28
|
-
{
|
|
29
|
-
"internalType": "uint216",
|
|
30
|
-
"name": "",
|
|
31
|
-
"type": "uint216"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"stateMutability": "view",
|
|
35
|
-
"type": "function"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"inputs": [
|
|
39
|
-
{
|
|
40
|
-
"internalType": "uint256",
|
|
41
|
-
"name": "shares",
|
|
42
|
-
"type": "uint256"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"name": "previewRedeem",
|
|
46
|
-
"outputs": [
|
|
47
|
-
{
|
|
48
|
-
"internalType": "uint256",
|
|
49
|
-
"name": "",
|
|
50
|
-
"type": "uint256"
|
|
51
|
-
}
|
|
52
|
-
],
|
|
53
|
-
"stateMutability": "view",
|
|
54
|
-
"type": "function"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"inputs": [
|
|
58
|
-
{
|
|
59
|
-
"internalType": "uint256",
|
|
60
|
-
"name": "assets",
|
|
61
|
-
"type": "uint256"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"name": "previewStake",
|
|
65
|
-
"outputs": [
|
|
66
|
-
{
|
|
67
|
-
"internalType": "uint256",
|
|
68
|
-
"name": "",
|
|
69
|
-
"type": "uint256"
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"stateMutability": "view",
|
|
73
|
-
"type": "function"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"inputs": [
|
|
77
|
-
{
|
|
78
|
-
"internalType": "address",
|
|
79
|
-
"name": "to",
|
|
80
|
-
"type": "address"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"internalType": "uint256",
|
|
84
|
-
"name": "amount",
|
|
85
|
-
"type": "uint256"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"name": "redeem",
|
|
89
|
-
"outputs": [],
|
|
90
|
-
"stateMutability": "nonpayable",
|
|
91
|
-
"type": "function"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"inputs": [
|
|
95
|
-
{
|
|
96
|
-
"internalType": "address",
|
|
97
|
-
"name": "to",
|
|
98
|
-
"type": "address"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"internalType": "uint256",
|
|
102
|
-
"name": "amount",
|
|
103
|
-
"type": "uint256"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"name": "stake",
|
|
107
|
-
"outputs": [],
|
|
108
|
-
"stateMutability": "nonpayable",
|
|
109
|
-
"type": "function"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"bytecode": "0x",
|
|
113
|
-
"deployedBytecode": "0x",
|
|
114
|
-
"linkReferences": {},
|
|
115
|
-
"deployedLinkReferences": {}
|
|
116
|
-
}
|
package/build/artifacts/contracts/interfaces/Angle/IAngleDistributor.sol/IAngleDistributor.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "IAngleDistributor",
|
|
4
|
-
"sourceName": "contracts/interfaces/Angle/IAngleDistributor.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "address[]",
|
|
10
|
-
"name": "users",
|
|
11
|
-
"type": "address[]"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"internalType": "address[]",
|
|
15
|
-
"name": "tokens",
|
|
16
|
-
"type": "address[]"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "uint256[]",
|
|
20
|
-
"name": "amounts",
|
|
21
|
-
"type": "uint256[]"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "bytes32[][]",
|
|
25
|
-
"name": "proofs",
|
|
26
|
-
"type": "bytes32[][]"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"name": "claim",
|
|
30
|
-
"outputs": [],
|
|
31
|
-
"stateMutability": "nonpayable",
|
|
32
|
-
"type": "function"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"bytecode": "0x",
|
|
36
|
-
"deployedBytecode": "0x",
|
|
37
|
-
"linkReferences": {},
|
|
38
|
-
"deployedLinkReferences": {}
|
|
39
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../SYBaseWithRewardsUpg.sol";
|
|
5
|
-
import "../../../../interfaces/AaveV3/IAaveStkGHO.sol";
|
|
6
|
-
import "../../../../interfaces/Angle/IAngleDistributor.sol";
|
|
7
|
-
|
|
8
|
-
contract PendleStkGHOSY is SYBaseWithRewardsUpg {
|
|
9
|
-
using PMath for uint256;
|
|
10
|
-
|
|
11
|
-
event ClaimedOffchainGHO(uint256 amountClaimed);
|
|
12
|
-
|
|
13
|
-
address public constant ANGLE_DISTRIBUTOR = 0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae;
|
|
14
|
-
address public constant STKGHO = 0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d;
|
|
15
|
-
address public constant GHO = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;
|
|
16
|
-
address public constant AAVE = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9;
|
|
17
|
-
bytes32 public constant ZERO_REWARD_ERROR = 0x33d2eb294587ef7b32eb48e48695ebfec45a9c8922ec7d1c444cfad1fb208e8d;
|
|
18
|
-
|
|
19
|
-
constructor() SYBaseUpg(STKGHO) {}
|
|
20
|
-
|
|
21
|
-
function initialize() external initializer {
|
|
22
|
-
__SYBaseUpg_init("SY stk GHO", "SY-stkGHO");
|
|
23
|
-
_safeApproveInf(GHO, STKGHO);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function _deposit(address tokenIn, uint256 amountDeposited) internal virtual override returns (uint256) {
|
|
27
|
-
if (tokenIn == STKGHO) {
|
|
28
|
-
return amountDeposited;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
uint256 preBalance = _selfBalance(STKGHO);
|
|
32
|
-
IAaveStkGHO(STKGHO).stake(address(this), amountDeposited);
|
|
33
|
-
return _selfBalance(STKGHO) - preBalance;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function _redeem(
|
|
37
|
-
address receiver,
|
|
38
|
-
address /*tokenOut*/,
|
|
39
|
-
uint256 amountSharesToRedeem
|
|
40
|
-
) internal virtual override returns (uint256) {
|
|
41
|
-
_transferOut(STKGHO, receiver, amountSharesToRedeem);
|
|
42
|
-
return amountSharesToRedeem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/*///////////////////////////////////////////////////////////////
|
|
46
|
-
EXCHANGE-RATE
|
|
47
|
-
//////////////////////////////////////////////////////////////*/
|
|
48
|
-
|
|
49
|
-
function exchangeRate() public view virtual override returns (uint256) {
|
|
50
|
-
return PMath.ONE.divDown(IAaveStkGHO(STKGHO).getExchangeRate());
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/*///////////////////////////////////////////////////////////////
|
|
54
|
-
REWARDS-RELATED
|
|
55
|
-
//////////////////////////////////////////////////////////////*/
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @dev See {IStandardizedYield-getRewardTokens}
|
|
59
|
-
*/
|
|
60
|
-
function _getRewardTokens() internal pure override returns (address[] memory) {
|
|
61
|
-
return ArrayLib.create(AAVE);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _redeemExternalReward() internal override {
|
|
65
|
-
try IAaveStkGHO(STKGHO).claimRewards(address(this), type(uint256).max) {} catch Error(
|
|
66
|
-
string memory errorString
|
|
67
|
-
) {
|
|
68
|
-
// StkGHO claim reverts when claimable amount = 0, meaning two sy transfers in diff block/same timestamp would revert.
|
|
69
|
-
// This is expected to not happen at all on ETH mainnet but just to be sure.
|
|
70
|
-
if (keccak256(abi.encodePacked(errorString)) != ZERO_REWARD_ERROR) {
|
|
71
|
-
revert(errorString);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function claimOffchainGHORewards(
|
|
77
|
-
address[] calldata users,
|
|
78
|
-
address[] calldata tokens,
|
|
79
|
-
uint256[] calldata amounts,
|
|
80
|
-
bytes32[][] calldata proofs
|
|
81
|
-
) external onlyOwner {
|
|
82
|
-
uint256 preBalance = _selfBalance(GHO);
|
|
83
|
-
IAngleDistributor(ANGLE_DISTRIBUTOR).claim(users, tokens, amounts, proofs);
|
|
84
|
-
uint256 amountClaimed = _selfBalance(GHO) - preBalance;
|
|
85
|
-
|
|
86
|
-
if (amountClaimed > 0) {
|
|
87
|
-
_transferOut(GHO, msg.sender, amountClaimed);
|
|
88
|
-
emit ClaimedOffchainGHO(amountClaimed);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/*///////////////////////////////////////////////////////////////
|
|
93
|
-
MISC FUNCTIONS FOR METADATA
|
|
94
|
-
//////////////////////////////////////////////////////////////*/
|
|
95
|
-
|
|
96
|
-
function _previewDeposit(
|
|
97
|
-
address tokenIn,
|
|
98
|
-
uint256 amountTokenToDeposit
|
|
99
|
-
) internal view override returns (uint256 amountSharesOut) {
|
|
100
|
-
if (tokenIn == STKGHO) return amountTokenToDeposit;
|
|
101
|
-
return IAaveStkGHO(STKGHO).previewStake(amountTokenToDeposit);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _previewRedeem(
|
|
105
|
-
address /*tokenOut*/,
|
|
106
|
-
uint256 amountSharesToRedeem
|
|
107
|
-
) internal view override returns (uint256 amountTokenOut) {
|
|
108
|
-
return amountSharesToRedeem;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
function getTokensIn() public view virtual override returns (address[] memory) {
|
|
112
|
-
return ArrayLib.create(GHO, STKGHO);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function getTokensOut() public view virtual override returns (address[] memory) {
|
|
116
|
-
return ArrayLib.create(STKGHO);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function isValidTokenIn(address token) public view virtual override returns (bool) {
|
|
120
|
-
return token == GHO || token == STKGHO;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function isValidTokenOut(address token) public view virtual override returns (bool) {
|
|
124
|
-
return token == STKGHO;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
128
|
-
return (AssetType.TOKEN, GHO, IERC20Metadata(GHO).decimals());
|
|
129
|
-
}
|
|
130
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
pragma solidity ^0.8.17;
|
|
3
|
-
|
|
4
|
-
import "../../SYBase.sol";
|
|
5
|
-
import "../../../../interfaces/IPExchangeRateOracle.sol";
|
|
6
|
-
|
|
7
|
-
contract PendleCMETHSY is SYBase {
|
|
8
|
-
using PMath for int256;
|
|
9
|
-
|
|
10
|
-
address public exchangeRateOracle = 0x1E2Ad9764cfAc60876486A7c714bc71f5b55f5C2;
|
|
11
|
-
address public constant CMETH = 0xE6829d9a7eE3040e1276Fa75293Bde931859e8fA;
|
|
12
|
-
address public constant WETH = 0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111;
|
|
13
|
-
|
|
14
|
-
constructor() SYBase("SY cmETH", "SY-cmETH", CMETH) {}
|
|
15
|
-
|
|
16
|
-
function setExchangeRateOracle(address newOracle) external onlyOwner {
|
|
17
|
-
exchangeRateOracle = newOracle;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/*///////////////////////////////////////////////////////////////
|
|
21
|
-
DEPOSIT/REDEEM USING BASE TOKENS
|
|
22
|
-
//////////////////////////////////////////////////////////////*/
|
|
23
|
-
|
|
24
|
-
function _deposit(address, uint256 amountDeposited) internal pure override returns (uint256 /*amountSharesOut*/) {
|
|
25
|
-
return amountDeposited;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function _redeem(
|
|
29
|
-
address receiver,
|
|
30
|
-
address tokenOut,
|
|
31
|
-
uint256 amountSharesToRedeem
|
|
32
|
-
) internal override returns (uint256 /*amountTokenOut*/) {
|
|
33
|
-
_transferOut(tokenOut, receiver, amountSharesToRedeem);
|
|
34
|
-
return amountSharesToRedeem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/*///////////////////////////////////////////////////////////////
|
|
38
|
-
EXCHANGE-RATE
|
|
39
|
-
//////////////////////////////////////////////////////////////*/
|
|
40
|
-
|
|
41
|
-
function exchangeRate() public view override returns (uint256) {
|
|
42
|
-
return IPExchangeRateOracle(exchangeRateOracle).getExchangeRate();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/*///////////////////////////////////////////////////////////////
|
|
46
|
-
MISC FUNCTIONS FOR METADATA
|
|
47
|
-
//////////////////////////////////////////////////////////////*/
|
|
48
|
-
|
|
49
|
-
function _previewDeposit(
|
|
50
|
-
address,
|
|
51
|
-
uint256 amountTokenToDeposit
|
|
52
|
-
) internal pure override returns (uint256 /*amountSharesOut*/) {
|
|
53
|
-
return amountTokenToDeposit;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function _previewRedeem(
|
|
57
|
-
address,
|
|
58
|
-
uint256 amountSharesToRedeem
|
|
59
|
-
) internal pure override returns (uint256 /*amountTokenOut*/) {
|
|
60
|
-
return amountSharesToRedeem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function getTokensIn() public view override returns (address[] memory res) {
|
|
64
|
-
return ArrayLib.create(yieldToken);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function getTokensOut() public view override returns (address[] memory res) {
|
|
68
|
-
return ArrayLib.create(yieldToken);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function isValidTokenIn(address token) public view override returns (bool) {
|
|
72
|
-
return token == yieldToken;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function isValidTokenOut(address token) public view override returns (bool) {
|
|
76
|
-
return token == yieldToken;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function assetInfo() external view returns (AssetType assetType, address assetAddress, uint8 assetDecimals) {
|
|
80
|
-
return (AssetType.TOKEN, WETH, 18);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
interface IAaveStkGHO {
|
|
6
|
-
function stake(address to, uint256 amount) external;
|
|
7
|
-
|
|
8
|
-
function redeem(address to, uint256 amount) external;
|
|
9
|
-
|
|
10
|
-
function claimRewards(address to, uint256 amount) external;
|
|
11
|
-
|
|
12
|
-
function getExchangeRate() external view returns (uint216);
|
|
13
|
-
|
|
14
|
-
function previewStake(uint256 assets) external view returns (uint256);
|
|
15
|
-
|
|
16
|
-
function previewRedeem(uint256 shares) external view returns (uint256);
|
|
17
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
-
|
|
3
|
-
pragma solidity ^0.8.0;
|
|
4
|
-
|
|
5
|
-
interface IAngleDistributor {
|
|
6
|
-
function claim(
|
|
7
|
-
address[] calldata users,
|
|
8
|
-
address[] calldata tokens,
|
|
9
|
-
uint256[] calldata amounts,
|
|
10
|
-
bytes32[][] calldata proofs
|
|
11
|
-
) external;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SY stkGHO",
|
|
3
|
-
"SY": "0xCC9eFBf580120676bFB3420FbD2cfc34019A1967",
|
|
4
|
-
"YT": "0xc5e62a939d2E85F9ebB6aEffc03B053DACF90140",
|
|
5
|
-
"PT": "0xf05312A0D01E5a0F9EBa87A539c37100fABf9B5e",
|
|
6
|
-
"market": "0xff81180a7f949ba1F940EAE6aA3B3CeB890b1912",
|
|
7
|
-
"expiry": 1745452800,
|
|
8
|
-
"scalarRoot": "31061108921000000000",
|
|
9
|
-
"initAnchor": "1059899074000000000",
|
|
10
|
-
"lnFeeRateRoot": "1998002662000000",
|
|
11
|
-
"deployTxHash": "0xa5b637f1b904930fab6f91f8a7cc6dac7383613cbc1ace46d747a53a2d1e6e99",
|
|
12
|
-
"deployBlockNumber": 21071107,
|
|
13
|
-
"reversedFee": 0.19999999993256523
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SY dUSDC",
|
|
3
|
-
"SY": "0x84e0efc0633041aac9d0196b7ac8af3505e8cc32",
|
|
4
|
-
"YT": "0xc617dAeE26F67edBEd5Bd978f4f8E02A1f8C9a6C",
|
|
5
|
-
"PT": "0x137f793505e7884CB70Ee5933c83447E85B1BD17",
|
|
6
|
-
"market": "0x0bD6890b3Bb15f16430546147734b254d0B03059",
|
|
7
|
-
"expiry": 1750896000,
|
|
8
|
-
"scalarRoot": "30443157640000000000",
|
|
9
|
-
"initAnchor": "1081737736000000000",
|
|
10
|
-
"lnFeeRateRoot": "1998002662000000",
|
|
11
|
-
"deployTxHash": "0x0151cdad7c724b4a3afa0e59453de655def51308842d4f18c882b0f21797f875",
|
|
12
|
-
"deployBlockNumber": 268865973,
|
|
13
|
-
"reversedFee": 0.19999999993256523
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SY Dolomite WBTC",
|
|
3
|
-
"SY": "0x3055A746e040bd05AD1806840cA0114d632Bc7e2",
|
|
4
|
-
"YT": "0x458DB433B74B1094c8282152500F6D5bdF062Eb0",
|
|
5
|
-
"PT": "0x98510Fbe752A97F97Abd7D971a1B3290DD62Ec4A",
|
|
6
|
-
"market": "0x8cAB5Fd029ae2FBF28c53E965E4194C7260aDF0C",
|
|
7
|
-
"expiry": 1750896000,
|
|
8
|
-
"scalarRoot": "80739473419000000000",
|
|
9
|
-
"initAnchor": "1021620181000000000",
|
|
10
|
-
"lnFeeRateRoot": "499875041000000",
|
|
11
|
-
"deployTxHash": "0xca5bf1b73e433e97f87479c7bbb0c6aa00d7baf8a218dcc78fd103835507192a",
|
|
12
|
-
"deployBlockNumber": 268953118,
|
|
13
|
-
"reversedFee": 0.04999999993486881
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SY cmETH",
|
|
3
|
-
"SY": "0x2aB88aC7458faeC2E952Bb79CC1be6577bF63E70",
|
|
4
|
-
"YT": "0x22bDbbeC06611cFca7bfe3a53e9e574771851176",
|
|
5
|
-
"PT": "0xEbf4ff21459fEcf96e36CF1dd00db01367254Bcd",
|
|
6
|
-
"market": "0x0B923F8039ae827E963fcC1b48aB5b903d01925B",
|
|
7
|
-
"expiry": 1739404800,
|
|
8
|
-
"scalarRoot": "83317216866000000000",
|
|
9
|
-
"initAnchor": "1018704133000000000",
|
|
10
|
-
"lnFeeRateRoot": "999500333000000",
|
|
11
|
-
"deployTxHash": "0x51ae41db1f61b1b986865b5accbf24fccf65c2e848f8f6bd75a40b9a66571b85",
|
|
12
|
-
"deployBlockNumber": 71035214,
|
|
13
|
-
"reversedFee": 0.09999999999164011
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SY VenusBNB",
|
|
3
|
-
"SY": "0x7b5a43070Bd97c2814f0D8b3b31ed53450375c19",
|
|
4
|
-
"YT": "0xFbEBe2d163ADD17Dc718fFC7b08880cA765a0Fab",
|
|
5
|
-
"PT": "0x5d1735B8E33BAe069708cEA245066dE1A12Cd38D",
|
|
6
|
-
"market": "0x0921CcC98956B1599003Fd9739d5e66BF319A161",
|
|
7
|
-
"expiry": 1750896000,
|
|
8
|
-
"scalarRoot": "29990594739000000000",
|
|
9
|
-
"initAnchor": "1049177063000000000",
|
|
10
|
-
"lnFeeRateRoot": "999500333000000",
|
|
11
|
-
"deployTxHash": "0x8e272926dbc80fd59608051afa6420fc1cd3a1499188b1c67a8c79e136a19ae6",
|
|
12
|
-
"deployBlockNumber": 43398243,
|
|
13
|
-
"reversedFee": 0.09999999999164011
|
|
14
|
-
}
|