mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-04-29 13:25:30 +08:00
39 lines
990 B
JavaScript
39 lines
990 B
JavaScript
const {fetchURL} = require('../helper/utils')
|
|
|
|
// Pools in https://gateway.pylon.money/
|
|
async function tvl(){
|
|
const staked = await fetchURL(stakedEnpoint)
|
|
|
|
return {
|
|
'terrausd': staked.data.totalValueLockedUST - staked.data.liquidityInfo.ustReserve
|
|
}
|
|
}
|
|
|
|
const stakedEnpoint = "https://api.pylon.money/api/mine/v1/overview"
|
|
async function pool2(){
|
|
const staked = await fetchURL(stakedEnpoint)
|
|
|
|
return {
|
|
"pylon-protocol": staked.data.liquidityInfo.tokenReserve,
|
|
"terrausd": staked.data.liquidityInfo.ustReserve,
|
|
}
|
|
}
|
|
|
|
async function staking(){
|
|
const staked = await fetchURL(stakedEnpoint)
|
|
|
|
return {
|
|
"pylon-protocol": staked.data.totalStaked,
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
timetravel: false,
|
|
methodology: 'TVL counts the UST that has been deposted to the Protocol. Data is pulled from the Pylon API:"https://api.pylon.money/api/launchpad/v1/projects/mine".',
|
|
terra:{
|
|
pool2,
|
|
staking,
|
|
tvl
|
|
}
|
|
}
|