Skip to content

Commit bd1f5e7

Browse files
authored
Add Makina Finance TVL (#16912)
1 parent a9c029e commit bd1f5e7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

projects/makina-finance/index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// https://docs.makina.finance/
2+
// https://app.makina.finance/
3+
4+
// Makina Finance TVL Adapter - External Pricing Version
5+
const DUSD_TOKEN = '0x1e33e98af620f1d563fcd3cfd3c75ace841204ef';
6+
const DETH_TOKEN = '0x871ab8e36cae9af35c6a3488b049965233deb7ed';
7+
const DBIT_TOKEN = '0x972966bcc17f7d818de4f27dc146ef539c231bdf';
8+
9+
async function tvl(api) {
10+
const [dusdSupply, dethSupply, dbitSupply] = await Promise.all([
11+
api.call({ abi: 'erc20:totalSupply', target: DUSD_TOKEN }),
12+
api.call({ abi: 'erc20:totalSupply', target: DETH_TOKEN }),
13+
api.call({ abi: 'erc20:totalSupply', target: DBIT_TOKEN }),
14+
]);
15+
return {
16+
[DUSD_TOKEN]: dusdSupply,
17+
[DETH_TOKEN]: dethSupply,
18+
[DBIT_TOKEN]: dbitSupply,
19+
};
20+
}
21+
22+
module.exports = {
23+
methodology: "TVL counts the total supply of share tokens of the protocol",
24+
start: 23428036,
25+
ethereum: { tvl },
26+
};

0 commit comments

Comments
 (0)