Skip to content

Commit

Permalink
Revert "add ck aggregator (#11619)"
Browse files Browse the repository at this point in the history
This reverts commit 5435936.
  • Loading branch information
Define101 committed Sep 20, 2024
1 parent 5435936 commit 9bef2f3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
27 changes: 0 additions & 27 deletions projects/chain-fusion/index.js

This file was deleted.

16 changes: 16 additions & 0 deletions projects/ckbtc/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { get } = require('../helper/http')

async function tvl(ts) {
var end = ts.timestamp
let start = end - 24 * 60 * 60;
const { data } = await get(`https://icrc-api.internetcomputer.org/api/v1/ledgers/mxzaz-hqaaa-aaaar-qaada-cai/total-supply?start=${start}&end=${end}&step=1`);
let [_, bal] = data.pop()
return {
'coingecko:bitcoin': bal / 1e8
};
}

module.exports = {
methodology: `We count the BTC as the collateral for the ckBTC`,
bitcoin: { tvl: tvl },
}
21 changes: 21 additions & 0 deletions projects/cketh/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { sumTokens2, nullAddress } = require("../helper/unwrapLPs");
// const { get } = require('../helper/http')
const ADDRESSES = require('../helper/coreAssets.json')

const contract = "0xb25eA1D493B49a1DeD42aC5B1208cC618f9A9B80";

async function tvl(api) {
// var end = api.timestamp
// let start = end - 24 * 60 * 60;
// const { data } = await get(`https://icrc-api.internetcomputer.org/api/v1/ledgers/xevnm-gaaaa-aaaar-qafnq-cai/total-supply?start=${start}&end=${end}&step=1`);
// let [_, bal] = data.pop()
// api.add(ADDRESSES.ethereum.USDC, bal/1e2)
return sumTokens2({ tokens: [nullAddress, ADDRESSES.ethereum.USDC], owner: contract, api });
}

module.exports = {
methodology: `We count the ETH on ${contract} as the collateral for the ckETH`,
ethereum: {
tvl,
},
};

0 comments on commit 9bef2f3

Please sign in to comment.