File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 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+ } ;
You can’t perform that action at this time.
0 commit comments