-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: adjust pumpbtc adapter #11482
base: main
Are you sure you want to change the base?
feat: adjust pumpbtc adapter #11482
Conversation
The adapter at projects/pumpbtc exports TVL:
|
projects/pumpbtc/index.js
Outdated
} | ||
|
||
try { | ||
const res = await axios.get(`https://api.dune.com/api/v1/query/${queryId}/results?limit=1000`, {headers: { |
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.
hi @xianshui
total minted - burned will be supply right? We might as we read token supply.I guess the issue here, is no easy way to get babylon staking balance?
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.
hi @g1nt0ki , thanks for this reply. Yes, (total minted - burned) counts as the total supply in our system. It is definitely no easy way to get babylon staking balance when querying. In this PR, it gets the total staked WBTC/FBTC amount which equal to the total supply of PumpBTC. We still want to know that can we calculating the total supply to represent the TVL?
hi @g1nt0ki , thanks for this reply. Yes, (total minted - burned) counts as the total supply in our system. It is definitely no easy way to get babylon staking balance when querying. In this PR, it gets the total staked WBTC/FBTC amount which equal to the total supply of PumpBTC. We still want to know that can we calculating the total supply to represent the TVL? |
hi @xianshui |
on second thought, would it be possible to get babylon staking addresses via api call? then we can query the balance on bitcoin network and count it as tvl |
@g1nt0ki do you mean an API that from our own PumpBTC staking system? |
yeah, or a json file in a git repo controlled by your team that you update periodically and we read to get bitcoin address list |
@g1nt0ki Sorry that currently it is no not possible to return the babylon staking addresses via api call. The reason is that this system is a restaking system, how the coins staked in Babylon is a core strategy of the system which is not suitable to published publicly(it would be analyzed and copied by the industry competitor). |
returning list of btc adddreses is dangerous? |
Understanding your concern. Actually we provide a transparency board site every user can access, it show all the asset on the platform. Its url is: https://dashboard.pumpbtc.xyz/ . How do you think that we change the query method and get the data from this site as another way, is that ok? |
but in your dashboard, most of it is in the native BTC whose backing we cant check |
Lombard is a similar product right?t they just provided an api to pull btc address list |
@g1nt0ki Seems it is a similar product. But as mentioned before, our platform will not release the staking addresses publicly currently, so this solution will not work for us. |
@g1nt0ki So can we just counting the total supply of PumpBTC instead ? |
@xianshui no. If you cant provide /release the btc wallets we are not able to track it . |
The adapter at projects/pumpbtc exports TVL:
|
The adapter at projects/pumpbtc exports TVL:
|
The adapter at projects/pumpbtc exports TVL:
|
hi @g1nt0ki @Define101 After discussion in the team, we released the staking BTC address list and return it through an API, but currently it is still not able to get the BTC balance with its address in Defillama executing platform, could we return this part of amount through our API? Or is there any other better suggested method to do this? |
The adapter at projects/pumpbtc exports TVL:
|
…into feat/adjust-pumpbtc-adapter
The adapter at projects/pumpbtc exports TVL:
|
The adapter at projects/pumpbtc exports TVL:
|
The adapter at projects/pumpbtc exports TVL:
|
projects/pumpbtc/index.js
Outdated
|
||
const btcAddresses = res.data.data.details.btc.details.filter(i => +i.amount > 0).map(d => d.address) | ||
const babylonAddresses = res.data.data.details.babylon.details.filter(i => +i.amount > 0).map(d => d.address) | ||
return [... new Set(btcAddresses.concat(babylonAddresses))] |
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.
hi @xianshui I noticed that addresses are duplicated between btc & babylon, so refactored to remove duplicates.
Checked a few addresses randomly, the value match the one returned by our api?
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.
hi @g1nt0ki, thanks for the modification. I checked some addresses both in btc address list and babylon address list, the values for the btc address list match. But the values for the babylon address list does not match, for instance the actual balance of an address is 0.05, but the platform api sumTokens returns 0, that made us can not count the balance staked in babylon chain. This is the point we need to handle, could we return the total amount of the babylon part through our API? Or is there any other better suggested method to do this?
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.
@xianshui sorry, missed this comment, sorry to keep bothering you but can you update the api to return the babylon addresses as well?
We are caching api response, so, would be fine even if api goes down. but if rely on number from api, we are lost if api becomes inaccessible
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.
hi @g1nt0ki , we update the api to return the babylon addresses, please have a check and merge the PR, thanks.
The adapter at projects/pumpbtc exports TVL:
|
hi @g1nt0ki, thanks for the modification. I checked some addresses both in btc address list and babylon address list, the values for the btc address list match. But the values for the babylon address list does not match, for instance the actual balance of an address is 0.05, but the platform api sumTokens returns 0, that made us can not count the balance staked in babylon chain. This is the point we need to handle, could we return the total amount of the babylon part through our API? Or is there any other better suggested method to do this? |
@xianshui are the babylon addresses correct? because right now, it is the same as bitcoin addresses |
like babylon has this address: bc1pl2q2qa6pne4549psz3aaq34trxa5y44ahyhppqcnc4dny7udap7qhkcnzu but maybe it should be bc1p07t86u5qfsulvd4a86j27a62qqhqaqldwypfaugwhthphzr2f8fqye02dj? |
@g1nt0ki yes, we noticed that. The BTC is not on the staker address after staking in babylon. I would like to know that if it is not able to get the addresses with btc stored in babylon, can we count all of the staked BTC in babylon (this data is recored) and return it in the API? |
The adapter at projects/pumpbtc exports TVL:
|
hi @g1nt0ki, we have update the BTC Staking addresses through a new API, please have a look and merge the PR, thanks. |
NOTE
Please enable "Allow edits by maintainers" while putting up the PR.
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):
PumpBTC
Twitter Link:
https://x.com/Pumpbtcxyz
List of audit links if any:
https://drive.google.com/file/d/1kUmOPM8J63JmzM20H1Cg38oAfPRBJwLy/view?pli=1
Website Link:
https://pumpbtc.xyz/
Logo (High resolution, will be shown with rounded borders):
https://drive.google.com/file/d/1jIj9IwhrEsnMI4BFBF8TYGxQO_uCZ3-s/view?usp=drive_link
Current TVL:
1.14 M
Treasury Addresses (if the protocol has treasury)
Chain:
ETH/BSC/Mantle
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
pumpbtc
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):
PumpBTC serves as a Liquid Restaking Solution for Babylon. PumpBTC aims to help BTC holders maximize yields through Babylon's liquid staking - essentially rebuilding WBTC with native yield.
Token address and ticker if any:
ETH: 0xf469fbd2abcd6b9de8e169d128226c0fc90a012e
BSC: 0xf9C4FF105803A77eCB5DAE300871Ad76c2794fa4
Mantle: 0xC75D7767F2EdFbc6a5b18Fc1fA5d51ffB57c2B37
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.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
TVL for pumpBTC is calculated based on the total value of WBTC, FBTC staked in the contract that were utilized in the minting process of pumpBTC.
Github org/user (Optional, if your code is open source, we can track activity):
https://github.com/pumpbtc/pumpBTC-contract