File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/adaptors/lombard-lbtc Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ const axios = require ( 'axios' ) ;
2+
3+ const token = '0x8236a87084f8B84306f72007F36F2618A5634494' ;
4+
5+ const apy = async ( ) => {
6+ const [ { data : apy } , { data : tvl } , { data : price } ] = await Promise . all ( [
7+ axios . get (
8+ 'https://mainnet.prod.lombard.finance/api/v1/analytics/estimated-apy?partner_id='
9+ ) ,
10+ axios . get (
11+ 'https://ledger-mainnet.lombard-fi.com:1317/lombard-finance/ledger/btcstaking/staking_vault_base_balance'
12+ ) ,
13+ axios . get ( `https://coins.llama.fi/prices/current/ethereum:${ token } ` ) ,
14+ ] ) ;
15+
16+ return [
17+ {
18+ pool : token ,
19+ project : 'lombard-lbtc' ,
20+ chain : 'bitcoin' ,
21+ symbol : 'lBTC' ,
22+ tvl :
23+ ( Number ( tvl . balance ) / 1e8 ) * price . coins [ `ethereum:${ token } ` ] ?. price ,
24+ apy : apy . lbtc_estimated_apy * 100 ,
25+ } ,
26+ ] ;
27+ } ;
28+
29+ module . exports = {
30+ apy,
31+ url : 'https://www.lombard.finance/app/stake/' ,
32+ } ;
You can’t perform that action at this time.
0 commit comments