Skip to content

Commit b733d4c

Browse files
authored
Merge pull request #278 from Define101/master
BlackRock USD adapter and listing
2 parents 8dde04a + 2e139c6 commit b733d4c

File tree

3 files changed

+81
-1
lines changed

3 files changed

+81
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
const sdk = require("@defillama/sdk");
2+
import { sumSingleBalance } from "../helper/generalUtil";
3+
import {
4+
ChainBlocks,
5+
PeggedIssuanceAdapter,
6+
Balances,
7+
} from "../peggedAsset.type";
8+
9+
type ChainContracts = {
10+
[chain: string]: {
11+
[contract: string]: string[];
12+
};
13+
};
14+
15+
const chainContracts: ChainContracts = {
16+
ethereum: {
17+
issued: [
18+
"0x7712c34205737192402172409a8F7ccef8aA2AEc",
19+
],
20+
},
21+
};
22+
23+
async function chainMinted(chain: string, decimals: number) {
24+
return async function (
25+
_timestamp: number,
26+
_ethBlock: number,
27+
_chainBlocks: ChainBlocks
28+
) {
29+
let balances = {} as Balances;
30+
for (let issued of chainContracts[chain].issued) {
31+
const totalSupply = (
32+
await sdk.api.abi.call({
33+
abi: "erc20:totalSupply",
34+
target: issued,
35+
block: _chainBlocks?.[chain],
36+
chain: chain,
37+
})
38+
).output;
39+
sumSingleBalance(
40+
balances,
41+
"peggedUSD",
42+
totalSupply / 10 ** decimals,
43+
"issued",
44+
false
45+
);
46+
}
47+
return balances;
48+
};
49+
}
50+
51+
const adapter: PeggedIssuanceAdapter = {
52+
ethereum: {
53+
minted: chainMinted("ethereum", 6),
54+
unreleased: async () => ({}),
55+
},
56+
};
57+
58+
export default adapter;

src/adapters/peggedAssets/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ import fxusd from "./fxusd";
170170
import euro3 from "./euro3";
171171
import hai from "./let-s-get-hai";
172172
import usdbblast from "./usdb"
173+
import buidl from "./blackrock-usd"
173174

174175
export default {
175176
tether,
@@ -343,5 +344,6 @@ export default {
343344
"f-x-protocol-usd": fxusd,
344345
euro3, //since its the real coingecko id + same symbol we good with this. I think no need to "euro3": euro3
345346
"let-s-get-hai": hai,
346-
"usdb": usdbblast
347+
"usdb": usdbblast,
348+
"blackrock-usd-institutional-digital-liquidity-fund": buidl
347349
};

src/peggedData/peggedData.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3465,4 +3465,24 @@ export default [
34653465
twitter: "https://twitter.com/Blast_L2",
34663466
wiki: null,
34673467
},
3468+
{
3469+
id: "173",
3470+
name: "BlackRock USD",
3471+
address: "0x7712c34205737192402172409a8F7ccef8aA2AEc",
3472+
symbol: "BUIDL",
3473+
url: "https://www.blackrock.com/",
3474+
description:
3475+
"The BlackRock USD Institutional Digital Liquidity Fund is represented by the blockchain-based BUIDL token, is fully backed by cash, U.S. Treasury bills, and repurchase agreements, and will provide yield paid out via blockchain rails every day to token holders, according to a press release.",
3476+
mintRedeemDescription:
3477+
"BUIDL seeks to offer a stable value of $1 per token and pays daily accrued dividends directly to investors' wallets as new tokens each month. The Fund invests 100% of its total assets in cash, U.S. Treasury bills, and repurchase agreements, allowing investors to earn yield while holding the token on the blockchain. Investors can transfer their tokens 24/7/365 to other pre-approved investors. Fund participants will also have flexible custody options allowing them to choose how to hold their tokens.",
3478+
onCoinGecko: "true",
3479+
gecko_id: "blackrock-usd-institutional-digital-liquidity-fund",
3480+
cmcId: null,
3481+
pegType: "peggedUSD",
3482+
pegMechanism: "fiat-backed",
3483+
priceSource: "coingecko",
3484+
auditLinks: [],
3485+
twitter: "https://twitter.com/BlackRock",
3486+
wiki: null,
3487+
},
34683488
] as PeggedAsset[];

0 commit comments

Comments
 (0)