-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Stroom: TVL on bitcoin via PoR oracle (getCombinedReserveValue) #17037
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
base: main
Are you sure you want to change the base?
Conversation
|
The adapter at projects/stroom exports TVL: |
| } | ||
|
|
||
| async function tvl() { | ||
| const ethApi = new sdk.ChainApi({ chain: 'ethereum' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
projects/helper/bitcoin-book/index.js and a list of bitcoin wallets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List of Bitcoin wallets is not possible to provide. Our solution is based on Lightning Network, which is off-chain L2. Bitcoins that we have locked in Stroom are storred inside Lightnign payment channels. We can try to provide a list of payment channels with corresponding multisig addresses, but that list will be changing frequently due to normal operations of Lightning Network node, moreover that list will not be representative, since inside the channel the balance distribution is constantly changing.
You can find the info about our Lightning node here: https://amboss.space/node/03fe47fdfea0f25fad0013498e8d6cec348ae3d673841ec25ee94f87c21af16ed8
You also can contact our oracle provider DIA (whitelisted on Defilama) about PoR calculation implementation
details. They have direct read-only access to Lightning Network node with BTC so they can query off-chain and on-chain balance of the node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AleksDemian in your UI the available token to convert is WBTC, so things are happening on ETH
We need all the WBTC wallets on the ethereum side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Define101 We have two converters that will store wBTC and cbBTC:
WBTCConverter - https://etherscan.io/address/0x56192f14c1d84e41db3d5d4c5d407efdb5cb1352
CBBTCConverter - https://etherscan.io/address/0xe7b4c44adb17147ad877eb8607eeb1e95adf2cd0
This is only part of the reserves; most of them are bitcoins stored in the Lightning Network Node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Define101 Is it enough for you?
The addresses of the converters are also included in the documentation verifying oracle usage.

NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
package-lock.jsonfile as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CIName (to be shown on DefiLlama):
Stroom
Twitter Link:
https://x.com/StroomNetwork
List of audit links if any:
https://github.com/TheArcadiaGroup/publications/blob/main/audits/stroom-audit-final.pdf
Website Link:
https://stroom.network/
Logo (High resolution, will be shown with rounded borders):
https://drive.google.com/file/d/1rXSDuacFU617c1I8qUcxoDURQ4dhBvuY/view?usp=sharing
Current TVL:
~$30.2M
Treasury Addresses (if the protocol has treasury)
Chain:
Bitcoin, Ethereum
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):
Stroom is an economically secured yield-bearing BTC protocol, designed to solve two major BTC bridge problems: counterparty risk and opportunity cost. strBTC (Stroom BTC) is a wrapped Bitcoin asset, 1:1 backed by Bitcoin, created by Stroom to provide both native BTC yield generation and economic security.
Token address and ticker if any:
strBTC — 0xb2723d5df98689eca6a4e7321121662ddb9b3017
wstrBTC — 0xa3ca88cfb7bbe9cfbd47df053ffa2130c7e6f770
Category (full list at https://defillama.com/categories) *Please choose only one:
Liquid Staking
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
we use DIA https://www.diadata.org/
Implementation Details: Briefly describe how the oracle is integrated into your project:
Oracle is querying Lightning Network node that stores BTC, aggregating both on-chain and off-chain balances. In addition to that, portion of collateral is storred on Ethereum chain in a form of WBTC and cbBTC. Those values are extracted from the smart contracts and added to lightning network node balance.
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
https://docs.google.com/document/d/1CooM513_nJHTZhDF3NCLXbptlOya0wsY3AMbllJMB5s/edit?tab=t.0#heading=h.e29ryp9qtwct
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
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).
Github org/user (Optional, if your code is open source, we can track activity):
https://github.com/stroomnetwork/stroom-contracts-rebase