-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
ariworks-online
wants to merge
1
commit into
DefiLlama:main
Choose a base branch
from
ariworks-online:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ | ||
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'], | ||
], | ||
} |
Oops, something went wrong.
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.
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.
what does total IP value mean? How is this valued? What backs it?
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.
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
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.
How is the IP value calculated? This sounds like a measure of mcap and not tvl
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.
You have identified an important distinction that I need to clarify:
IP Value vs TVL: Two different concepts
IP Value (Analytical Metric):
TVL (Token Backing):
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.
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 for the clarification - how can we each YREC is backed by at least 1 USD work of stock? Have you got documentation or something?
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.
How is the equity committed to YREC? This is what we need to see
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.
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?
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.
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
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 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
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.
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?