Skip to content

Commit 095eaf9

Browse files
authored
Merge pull request #1822 from RichuAK/master
add kaito pool to degenprime
2 parents b67f9f4 + bf7c65b commit 095eaf9

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

Diff for: src/adaptors/degenprime/index.js

+24-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const AERO_POOL_TUP_CONTRACT = '0x4524D39Ca5b32527E7AF6c288Ad3E2871B9f343B';
6464
const BTC_POOL_TUP_CONTRACT = '0xCA8C954073054551B99EDee4e1F20c3d08778329';
6565
const ETH_POOL_TUP_CONTRACT = '0x81b0b59C7967479EC5Ce55cF6588bf314C3E4852';
6666
const BRETT_POOL_TUP_CONTRACT = '0x6c307F792FfDA3f63D467416C9AEdfeE2DD27ECF';
67+
const KAITO_POOL_TUP_CONTRACT = '0x293E41F1405Dde427B41c0074dee0aC55D064825';
6768

6869
// Token Addresses
6970
const AERO_TOKEN_ADDRESS = '0x940181a94A35A4569E4529A3CDfB74e38FD98631';
@@ -72,6 +73,7 @@ const BRETT_TOKEN_ADDRESS = '0x532f27101965dd16442E59d40670FaF5eBB142E4';
7273
const BTC_TOKEN_ADDRESS = '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf';
7374
const ETH_TOKEN_ADDRESS = '0x4200000000000000000000000000000000000006';
7475
const DEGEN_TOKEN_ADDRESS = '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed';
76+
const KAITO_TOKEN_ADDRESS = '0x98d0baa52b2D063E780DE12F615f963Fe8537553';
7577

7678
const getPoolTVL = async (poolAddress, chain = 'base') => {
7779
return (
@@ -120,6 +122,9 @@ const getBrettPoolDepositRate = async () => {
120122
const getAeroPoolDepositRate = async () => {
121123
return (await getPoolDepositRate(AERO_POOL_TUP_CONTRACT)) / 1e16;
122124
};
125+
const getKaitoPoolDepositRate = async () => {
126+
return (await getPoolDepositRate(KAITO_POOL_TUP_CONTRACT)) / 1e16;
127+
};
123128

124129
const getBtcPoolTVL = async () => {
125130
const supply = await getPoolTVL(BTC_POOL_TUP_CONTRACT);
@@ -135,6 +140,13 @@ const getEthPoolTVL = async () => {
135140
return (supply * price) / 1e18;
136141
};
137142

143+
const getKaitoPoolTVL = async () => {
144+
const supply = await getPoolTVL(KAITO_POOL_TUP_CONTRACT);
145+
146+
const price = await getTokenPrice(KAITO_TOKEN_ADDRESS);
147+
return (supply * price) / 1e18;
148+
};
149+
138150
const getBrettPoolTVL = async () => {
139151
const supply = await getPoolTVL(BRETT_POOL_TUP_CONTRACT);
140152

@@ -210,7 +222,18 @@ const getPoolsAPYs = async () => {
210222
underlyingTokens: [ETH_TOKEN_ADDRESS],
211223
};
212224

213-
return [usdcPool, brettPool, aeroPool, btcPool, ethPool];
225+
const kaitoPoolTvl = await getKaitoPoolTVL();
226+
const kaitoPool = {
227+
pool: `dgp-${KAITO_TOKEN_ADDRESS}-base`,
228+
chain: utils.formatChain('base'),
229+
project: 'degenprime',
230+
symbol: utils.formatSymbol('KAITO'),
231+
tvlUsd: kaitoPoolTvl,
232+
apyBase: await getKaitoPoolDepositRate(),
233+
underlyingTokens: [KAITO_TOKEN_ADDRESS],
234+
};
235+
236+
return [usdcPool, brettPool, aeroPool, btcPool, ethPool, kaitoPool];
214237
};
215238

216239
module.exports = {

0 commit comments

Comments
 (0)