Skip to content
Open
Changes from all 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
18 changes: 18 additions & 0 deletions projects/stroom/index.js
Original file line number Diff line number Diff line change
@@ -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: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we please track the BTC collateral held on bitcoin instead?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proof of reserves oracle is coming in a month, pending oracle integration. Integration is not straightforward since our BTC reserves are stored in a Lightning Network node.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cant count this on ethereum or use the adapter in its current state. Please reopen a PR when the reserves are tracked

tvl,
},
}
Loading