Skip to content

Add YREC adapter for Plume network (on-chain TVL, DeFiLlama compliant) #15525

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions projects/yrec/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const { getLogs } = require('../helper/cache/getLogs')
const { sumTokens2 } = require('../helper/unwrapLPs')

// YREC Token Contract Address on Plume Network
const YREC_CONTRACT = '0x9b88F393928c7B5C6434bDDc7f6649a1a0e02FaE'

// YREC Token ABI - only the functions we need for TVL calculation
const YREC_ABI = [
'function getTotalIPValue() external view returns (uint256)',
'function getIPValuePerToken() external view returns (uint256)',
'function totalSupply() external view returns (uint256)',
'function name() external view returns (string)',
'function symbol() external view returns (string)',
'function decimals() external view returns (uint8)'
]

module.exports = {
methodology: 'TVL is calculated by reading the total IP value backing all YREC tokens directly from the smart contract. Each YREC token represents exactly $1 USD of intellectual property value.',
misrepresentedTokens: false,
plume: {
tvl: async (_, _b, _c, { api }) => {
// Read total IP value directly from the YREC contract
const totalIPValue = 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.

what does total IP value mean? How is this valued? What backs it?

Copy link
Author

Choose a reason for hiding this comment

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

what does total IP value mean?
Total IP Value represents the aggregate USD value of intellectual property (IP) assets that back YREC tokens.

How is this valued?
The IP value is calculated using a market cap-based methodology:
IP Exposure Calculation: Each S&P 500 company's IP value is calculated as a percentage of their total market capitalization, representing the portion of their value attributable to intellectual property (patents, trademarks, copyrights, trade secrets, etc.)
Portfolio Aggregation: The system maintains a portfolio of IP exposure values across multiple S&P 500 companies, with each company having a specific dollar amount of IP value assigned.
Real-time Updates: IP values are updated weekly using Friday closing prices from Financial Modeling Prep (FMP) API to ensure consistency and reduce volatility. (https://site.financialmodelingprep.com/)

What backs it?
YREC tokens are backed 1:1 by USD value of IP assets:
Each YREC token represents exactly $1 USD worth of intellectual property exposure
The backing comes from the calculated IP values of S&P 500 companies in the portfolio
Only minted tokens are counted in TVL (no over-counting of unminted assets)
The system maintains transparency through regular reconciliation and audit trails

Copy link
Collaborator

Choose a reason for hiding this comment

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

How is the IP value calculated? This sounds like a measure of mcap and not tvl

Copy link
Author

Choose a reason for hiding this comment

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

You have identified an important distinction that I need to clarify:

IP Value vs TVL: Two different concepts
IP Value (Analytical Metric):

  • this is calculated as a percentage of market cap for analytical purposes
  • it represents an estimate of what portion of a company's value comes from intellectual property
  • this is used for portfolio analysis and reporting, but is NOT the token backing

TVL (Token Backing):

  • YREC tokens are actually backed 1:1 by portfolio values (shares × stock price)
  • each YREC token represents $1 USD worth of actual stock holdings
  • the getTotalIPValue() function returns the total token supply, which equals the total portfolio value

Our contract function getTotalIPValue() is actually returning the total token supply, which represents the total USD value of stock positions held. The function name is misleading - it should be called getTotalPortfolioValue().

Corrected Understanding
What backs YREC tokens: actual stock portfolio values (shares × price)
What IP calculations represent: analytical metrics for portfolio analysis
What the contract function returns: total portfolio value (via total supply)
The IP value calculations you referenced are separate analytical tools used for portfolio management, not the actual collateral backing the tokens. The real TVL is the total value of stock positions held.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the clarification - how can we each YREC is backed by at least 1 USD work of stock? Have you got documentation or something?

Copy link
Collaborator

Choose a reason for hiding this comment

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

How is the equity committed to YREC? This is what we need to see

Copy link
Author

Choose a reason for hiding this comment

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

How is equity committed to Centrifuge versus Anemoy?
How is equity committed to Ondo versus Ondo USDY LLC?
How does your methodology work in these cases?
If an SPV receives funds to buy assets and records transactions on-chain, do you differentiate SPV-owned value related to projects versus independent SPVs?
Do you certify protocols or SPVs or both?
For transparency, can you share your methodology?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Centrifuge has clear 1:1 tokenisation of custodied assets. USDY is highly liquid, redeemable, and produces a daily attestation report detailing the RWAs backing the stablecoin which is owned by Ondo. You can see the methodologies in this repo https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/centrifuge/index.js

Copy link
Collaborator

Choose a reason for hiding this comment

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

If I'm not mistaken its a different case because YREC has no claim on any underlying shares or IP, we need to see evidence of this

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, we will carefully review. To help us understand the 1:1 concept better and the relationship protocol/SPV, can you explain the logic behind listing Anemoy’s TVL separately versus Centrifuge’s aggregate TVL, which includes the Anemoy pool per the app?

target: YREC_CONTRACT,
abi: 'function getTotalIPValue() external view returns (uint256)',
})

// Convert from wei to USD (18 decimals)
const tvl = totalIPValue / 1e18

return {
'usd': tvl
}
}
},
hallmarks: [
[Math.floor(new Date('2025-07-15')/1000), 'YREC Token Launch'],
],
}
Loading