Skip to content

Commit f1a069a

Browse files
authored
Merge pull request #42 from zeriontech/updated-curve-pool
Added sUSD curve pool
2 parents f30794e + 7d7de17 commit f1a069a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

contracts/adapters/curve/CurveTokenAdapter.sol

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ contract CurveTokenAdapter is TokenAdapter {
4444
address internal constant COMPOUND_POOL_TOKEN = 0x845838DF265Dcd2c412A1Dc9e959c7d08537f8a2;
4545
address internal constant Y_POOL_TOKEN = 0xdF5e0e81Dff6FAF3A7e52BA697820c5e32D806A8;
4646
address internal constant BUSD_POOL_TOKEN = 0x3B3Ac5386837Dc563660FB6a0937DFAa5924333B;
47+
address internal constant SUSD_POOL_TOKEN = 0xC25a3A3b969415c80451098fa907EC722572917F;
4748

4849
/**
4950
* @return TokenMetadata struct with ERC20-style token info.
@@ -52,7 +53,7 @@ contract CurveTokenAdapter is TokenAdapter {
5253
function getMetadata(address token) external view override returns (TokenMetadata memory) {
5354
return TokenMetadata({
5455
token: token,
55-
name: string(abi.encodePacked(ERC20(token).symbol(), " pool")),
56+
name: getPoolName(token),
5657
symbol: ERC20(token).symbol(),
5758
decimals: ERC20(token).decimals()
5859
});
@@ -87,8 +88,24 @@ contract CurveTokenAdapter is TokenAdapter {
8788
return (stableswap(0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51), 4, "YToken");
8889
} else if (token == BUSD_POOL_TOKEN) {
8990
return (stableswap(0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27), 4, "YToken");
91+
} else if (token == SUSD_POOL_TOKEN) {
92+
return (stableswap(0xA5407eAE9Ba41422680e2e00537571bcC53efBfD), 4, "ERC20");
9093
} else {
9194
return (stableswap(address(0)), 0, "");
9295
}
9396
}
97+
98+
function getPoolName(address token) internal pure returns (string memory) {
99+
if (token == COMPOUND_POOL_TOKEN) {
100+
return "Compound pool";
101+
} else if (token == Y_POOL_TOKEN) {
102+
return "Y pool";
103+
} else if (token == BUSD_POOL_TOKEN) {
104+
return "bUSD pool";
105+
} else if (token == SUSD_POOL_TOKEN) {
106+
return "sUSD pool";
107+
} else {
108+
return "Unknown pool";
109+
}
110+
}
94111
}

0 commit comments

Comments
 (0)