Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Prosper #12950

wants to merge 3 commits into from

Conversation

prosper-fi
Copy link

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (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:
Prosper_Token_LightMode (1)
Prosper_Token_LightMode (1)

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

@llamabutler
Copy link

The adapter at projects/prosper exports TVL:

bsc                       59.66 M
bsc-staking               1.13 M
staking                   1.13 M

total                    59.66 M 

@prosper-fi
Copy link
Author

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({
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 use the staking contact balance instead of totalsupply?

Copy link
Author

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({
Copy link
Collaborator

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()

Copy link
Author

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;
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Author

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:

  1. 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.

  2. 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:
Copy link
Collaborator

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

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, will update!

@waynebruce0x waynebruce0x self-assigned this Jan 3, 2025
@waynebruce0x
Copy link
Collaborator

Is this TVL tradable? If not then we cant list this sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants