-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e20334
commit a3d4b88
Showing
8 changed files
with
40 additions
and
30 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const utils = require('../utils'); | ||
|
||
const getPools = async () => { | ||
const tdotApr = await utils.getData( | ||
'https://api.taigaprotocol.io/rewards/apr?network=acala&pool=0' | ||
); | ||
const tdotStats = await utils.getData( | ||
'https://api.taigaprotocol.io/tokens/tdot/stats' | ||
); | ||
|
||
const priceKey = 'coingecko:polkadot'; | ||
|
||
const { coins: prices } = await utils.getData( | ||
`https://coins.llama.fi/prices/current/${priceKey}` | ||
); | ||
const dotUsd = prices[priceKey].price; | ||
|
||
const tdot = { | ||
pool: 'acala-sa0-taiga', | ||
chain: utils.formatChain('acala'), | ||
project: 'taiga-acala', | ||
symbol: 'tDOT', | ||
tvlUsd: tdotStats.total * dotUsd, | ||
apyBase: Number(tdotApr['sa://0']) * 100, | ||
}; | ||
|
||
return [tdot]; | ||
}; | ||
|
||
module.exports = { | ||
timetravel: false, | ||
apy: getPools, | ||
url: 'https://app.taigaprotocol.io/', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters