Skip to content

Commit 3f21309

Browse files
authored
[Bucket - TVL update] add new supported collaterals (DefiLlama#12005)
1 parent 4be9e7f commit 3f21309

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

projects/bucket-protocol/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ const sui = require("../helper/chain/sui");
33

44
const MAINNET_PROTOCOL_ID =
55
"0x9e3dab13212b27f5434416939db5dec6a319d15b89a84fd074d03ece6350d3df";
6-
const SUI = ADDRESSES.sui.SUI;
6+
// Token
7+
const SUI = ADDRESSES.sui.SUI;
78
const BUCK = ADDRESSES.sui.BUCK;
89
const USDC = ADDRESSES.sui.USDC;
910
const USDT = ADDRESSES.sui.USDT;
1011
const USDC_CIRCLE= ADDRESSES.sui.USDC_CIRCLE
12+
const SCALLOP_swUSDC = "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC"
13+
const SCALLOP_sUSDC = "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC"
1114

1215
const AF_LP_IDs = [
1316
"0xe2569ee20149c2909f0f6527c210bc9d97047fe948d34737de5420fab2db7062",
@@ -141,7 +144,11 @@ async function tvl(api) {
141144
for (const bucket of bucketList) {
142145
//AF_LP doesn't have price, need to split the tokens
143146
if (bucket.type.includes("AF_LP")) continue;
144-
const coin = bucket.type.split("<").pop()?.replace(">", "") ?? "";
147+
let coin = bucket.type.split("<").pop()?.replace(">", "") ?? "";
148+
149+
/// Since we're unable to fetch the price of Scallop's sCOIN, we'll regard sCOIN as underlying assets
150+
if(coin === SCALLOP_swUSDC) coin = ADDRESSES.sui.USDC
151+
if(coin === SCALLOP_sUSDC) coin = ADDRESSES.sui.USDC_CIRCLE
145152
api.add(coin, bucket.fields.collateral_vault);
146153
}
147154

0 commit comments

Comments
 (0)