Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added bitcoin #12560

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion projects/fluidtokens/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,19 @@ async function tvl() {
const boosted_tvl= await get("https://api.fluidtokens.com/get-ft-stats");

const boosted=parseInt(boosted_tvl.bs_available_volume)+parseInt(boosted_tvl.bs_active_volume);

//Bitcoin TVL since now we launched staking on Bitcoin layer 1
const btc_staking = await get("https://api2.fluidtokens.com/get-staking-stats");
const btc_satoshi=parseInt(btc_staking.totalTvl)

return {
// cardano: (SC_offers_tvl+repay_tvl+pools_tvl+boosted) / 1e6,
cardano: (SC_offers_tvl+pools_tvl+boosted) / 1e6,
bitcoin: btc_satoshi / 1e8,
};
}


async function staking() {
const data = await get("https://api.fluidtokens.com/get-ft-stats");
let staking = parseInt(data.staking_tvl);
Expand Down Expand Up @@ -92,13 +98,16 @@ async function borrowed() {


module.exports = {
methodology: "Count active loaned out ADA as tvl",
methodology: "Count active liquidity as TVL",
timetravel: false,
cardano: {
tvl,
borrowed,
staking
},
bitcoin:{
tvl,
},
hallmarks: [
[Math.floor(new Date("2023-01-01") / 1e3), "Count only active loans"],
[Math.floor(new Date("2023-06-27") / 1e3), "ADA loaned out is counted under borrowed"],
Expand Down
Loading