-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add Prosper #12950
base: main
Are you sure you want to change the base?
Add Prosper #12950
Conversation
The adapter at projects/prosper exports TVL:
|
Hi DefiLlama team! We're looking to understand if our proposed methodology above could work / make sense to you. If so, we can actually further enhance the adapter to use a dynamic number for the valuation multiple from an API that we host (rather than the current static number). Looking forward to your feedback! |
// ------------------------------ | ||
async function stakingOnly(api) { | ||
// Just do the staking logic | ||
const totalSupply = await api.call({ |
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.
can we use the staking contact balance instead of totalsupply?
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.
We use the totalSupply of the "receipt" token (rePROS) here as it should be the most accurate reflection of how many tokens are currently staked. The staking contract balance of PROS may be slightly higher than how many are staked because we have an unbonding period of 72h. That is, once a user unstakes their PROS, that balance would still be in the contract until after the unbonding period and after they claim their tokens—however, the rePROS balance would already have decreased.
|
||
// PART B: Staking | ||
// => treat the total supply of the receipt token as the "original token" balance | ||
const totalSupply = await api.call({ |
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.
this logic should only be in stakingOnly()
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.
We included staking again here as well so the total TVL would be the hashrate + staking value. We actually had it initially as just hashrate and then just staking, but then the total TVL given by the testing function would only include the hashrate TVL and exclude the staking portion.
Would you suggest to use a different function name / category for the hashrate portion?
// Convert PH/s => EH/s | ||
const hashrate1 = (parseFloat(res1?.data?.data?.hsLast1D) || 0) / 1000; | ||
const hashrate2 = (parseFloat(res2?.data?.data?.hsLast1D) || 0) / 1000; | ||
const totalHashrate = hashrate1 + hashrate2; |
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.
can this be calculated using on chain methods opposed to a proprietary 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.
The Antpool API would be the most accurate source of how much hashrate the protocol currently has live, as Antpool is the mining pool provider / operator.
The part that we look into making on-chain is the valuation multiple—we'll check to see if any of the oracles provide the relevant data.
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 @waynebruce0x , we've looked further into the valuation multiple calculation. We would propose the below. Let us know your thoughts before we proceed with implementation:
-
Protocol's hashrate - source from Antpool API. This is the most accurate source of how much hashrate the protocol currently has live, as Antpool is the mining pool provider / operator. This data does not appear to be available via Chainlink or similar.
-
Valuation multiple - source from a public Google Sheet via Google Sheets API. On the publicly accessible sheet, list of publicly listed mining companies is compiled, together with enterprise value data and hashrate data from reputable sources (https://sheetsfinance.com/ for enterprise value and https://data.hashrateindex.com/stocks API). The compiled data is used to calculate the valuation multiple, which can be then returned finally using the Google Sheets API. Unfortunately, this data does not appear to be available on Chainlink or similar either.
Let us know what you think of this approach!
// Module Exports | ||
// ------------------------------ | ||
module.exports = { | ||
methodology: |
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.
if this adapter is exporting a USDC amount, misrepresentedTokens: true
should be added here
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.
Thanks, will update!
Is this TVL tradable? If not then we cant list this sorry |
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):
Prosper
Twitter Link:
https://x.com/Prosperfi_BTC
List of audit links if any:
https://docs.prosper-fi.com/app-overview/security
Website Link:
https://www.prosper-fi.com/
Logo (High resolution, will be shown with rounded borders):
SVG (https://drive.google.com/file/d/11vJAvqm5dbu4KEMGOR0XnkeoucqyBG__/view?usp=drive_link);
PNG (https://drive.google.com/file/d/11bqFzkyhs3n7oyBfobEsY3dp_CakXLSc/view?usp=drive_link); also attached:
Current TVL:
59.94M
Treasury Addresses (if the protocol has treasury)
Will be added in the future
Chain:
Token is currently on BSC, ETH;
staking is currently on BSC;
soon to do token upgrade to LayerZero OFT standard to add more chains and create unified token supply
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
prosper
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)
8255
Short Description (to be shown on DefiLlama):
Prosper is pioneering tokenization of institutional-grade BTC hashrate as omnichain RWA and building a flywheel around its token with both hashrate and BTC treasury.
Token address and ticker if any:
BNB Smart Chain (BSC): 0xed8c8aa8299c10f067496bb66f8cc7fb338a3405
Ethereum: 0x8642a849d0dcb7a15a974794668adcfbe4794b56
Category (full list at https://defillama.com/categories) *Please choose only one:
RWA
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
n/a
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):
n/a
methodology (what is being counted as tvl, how is tvl being calculated):
TVL combines the estimated value (represented as USDC) of tokenized RWA hashrate by multiplying the protocol's live hashrate amount (in EH/s) × valuation multiple ($119.8M per EH/s) + value of staked PROS tokens.
The valuation multiple is estimated as follows: for the top 17 listed BTC mining companies in the US and Canada, 1/ gather their enterprise value and amount of live hashrate; 2/ calculate the multiple for each company as EV / hashrate; 3/ finally, take the average of these multiples, excluding the max and min values.
The protocol's live hashrate amount comes from Antpool's API for the protocol's accounts.
Github org/user (Optional, if your code is open source, we can track activity):
n/a