From d4b199f0205bace49e9888bd05d5add0c3f50a1b Mon Sep 17 00:00:00 2001 From: AleksDemian Date: Thu, 6 Nov 2025 16:19:54 +0200 Subject: [PATCH] Stroom: TVL on bitcoin via PoR oracle (getCombinedReserveValue) --- projects/stroom/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 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 00000000000..90908d3b89c --- /dev/null +++ b/projects/stroom/index.js @@ -0,0 +1,22 @@ +const sdk = require('@defillama/sdk') + +const POR_ORACLE = '0x12DB8fcA6AAA29E922bFAD8a7771aE11F17a1811' +const abi = { + getCombinedReserveValue: 'function getCombinedReserveValue() view returns (uint256)', +} + +async function tvl() { + const ethApi = new sdk.ChainApi({ chain: 'ethereum' }) + const satoshis = await ethApi.call({ + abi: abi.getCombinedReserveValue, + target: POR_ORACLE + }) + const btc = Number(satoshis) / 1e8 + return { 'coingecko:bitcoin': btc } +} + +module.exports = { + timetravel: false, + methodology: 'TVL equals BTC reserves tracked on Bitcoin. We read the aggregated reserve value from Stroom\'s on-chain PoR oracle on Ethereum (denominated in satoshis), divide by 1e8 to get BTC, and report it as bitcoin (USD pricing from BTC).', + bitcoin: { tvl }, +}