Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE
package-lock.json
file 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):
AnyHedge (v0.11)
Twitter Link:
https://twitter.com/AnyHedge
List of audit links if any:
Website Link:
https://anyhedge.com/
Logo (High resolution, preferably in .svg and .png, for application on both white and black backgrounds. Will be shown with rounded borders):
https://anyhedge.com/assets/svg/logo.svg
Current TVL:
5871 BCH
Treasury Addresses (if the protocol has treasury)
N/A
Chain:
Bitcoin Cash (BCH)
Coingecko ID (so your TVL can appear on Coingecko): (https://api.coingecko.com/api/v3/coins/list)
bitcoin-cash
Coinmarketcap ID (so your TVL can appear on Coinmarketcap): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
1831
Short Description (to be shown on DefiLlama):
AnyHedge allows users to take leveraged long or short positions against main-chain BCH.
It is permissionless, non-custodial, and on-chain.
The contracts are fully funded on creation and have no counterparty risk.
The risks are early liquidation, slippage, and oracle risks.
Token address and ticker if any:
N/A
Category (full list at https://defillama.com/categories) *Please choose only one:
Derivatives
Oracle used (Chainlink/Band/API3/TWAP or any other that you are using):
Oracle library: https://gitlab.com/GeneralProtocols/priceoracle/library
Oracle dashboard: https://oracles.cash/
forkedFrom (Does your project originate from another project):
N/A
methodology (what is being counted as tvl, how is tvl being calculated):
Data is fully reproducible using this: https://gitlab.com/0353F40E/anyhedge-stats
The repo contains scripts that do this:
.csv
hosted on the repoThe adapter downloads the
.csv
and looks up the "current_date - 30d" row. The TVL data lags because of nature of these contracts. When they're created, their information will be hidden, they will look like any other P2SH BCH UTXO. We can only detect opened contracts that have been already closed. Fundamentally, these contracts are much similar to Lightning Network channels. When you open a LN channel, anyone looking at the blockchain can't tell it's a LN channel. Only when the channel closes is the HTLC contract revealed and can be detected and on-chain data scraped to produce stats.