From 03f0ef46f4fb4687ed57e933ba5cd00283605a8b Mon Sep 17 00:00:00 2001 From: AleksDemian Date: Thu, 14 Aug 2025 18:09:35 +0300 Subject: [PATCH] Add Stroom adapter: TVL = totalSupply(strBTC)/1e8 as bitcoin --- projects/stroom/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/stroom/index.js diff --git a/projects/stroom/index.js b/projects/stroom/index.js new file mode 100644 index 0000000000..600e574ac3 --- /dev/null +++ b/projects/stroom/index.js @@ -0,0 +1,18 @@ +const STRBTC = '0xb2723d5df98689eca6a4e7321121662ddb9b3017' + +async function tvl(api) { + const supply = await api.call({ + abi: 'erc20:totalSupply', + target: STRBTC, + }) + // supply in satoshi → convert to BTC + api.addCGToken('bitcoin', Number(supply) / 1e8) +} + +module.exports = { + methodology: 'TVL equals the BTC backing strBTC. We read strBTC totalSupply (in satoshis) on Ethereum, divide by 1e8 to get BTC, and value it using the BTC price.', + start: 23045877, + ethereum: { + tvl, + }, +} \ No newline at end of file