Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions src/content/data-feeds/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3718,6 +3718,9 @@ Data feeds are grouped into the following categories based on the level of marke
- [🆕 New Token Feeds](#-new-token-feeds)
- [🔵 Custom Feeds](#-custom-feeds)
- [⭕ Deprecating](#-deprecating)
- [⚪ Unrated](#-unrated)

If a feed does not display one of these categories, it has not yet been evaluated for market pricing risk. Treat it as unevaluated and use it at your own risk.

<Aside type="note">
For important updates regarding the use of Chainlink Data Feeds, users should join the official Chainlink Discord and
Expand Down Expand Up @@ -3814,6 +3817,10 @@ Known users of these feeds will be contacted directly about the feeds' deprecati
- `latestRoundData` will revert with no data available
</Aside>

### ⚪ Unrated

These feeds have not yet been evaluated for market pricing risk. Treat them as unevaluated and use them at your own risk.

## Market hours

In addition to categories, be aware that markets for several assets are actively traded only during certain hours. Listed data feeds include an attribute describing their market hours. Chainlink Labs recommends using these feeds only during their specified hours:
Expand Down
7 changes: 7 additions & 0 deletions src/content/data-feeds/selecting-data-feeds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Data feeds are grouped into the following categories based on the level of marke
- [🆕 New Token Feeds](#-new-token-feeds)
- [🔵 Custom Feeds](#-custom-feeds)
- [⭕ Deprecating](#-deprecating)
- [⚪ Unrated](#-unrated)

If a feed does not display one of these categories, it has not yet been evaluated for market pricing risk. Treat it as unevaluated and use it at your own risk.

<Aside type="note">
For important updates regarding the use of Chainlink Data Feeds, users should join the official Chainlink Discord and
Expand Down Expand Up @@ -120,6 +123,10 @@ Known users of these feeds will be contacted directly about the feeds' deprecati
- `latestRoundData` will revert with no data available
</Aside>

### ⚪ Unrated

These feeds have not yet been evaluated for market pricing risk. Treat them as unevaluated and use them at your own risk.

## Market hours

In addition to categories, be aware that markets for several assets are actively traded only during certain hours. Listed data feeds include an attribute describing their market hours. Chainlink Labs recommends using these feeds only during their specified hours:
Expand Down
13 changes: 13 additions & 0 deletions src/db/feedCategories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ export const FEED_CATEGORY_CONFIG = {
title: "Deprecating - These feeds are scheduled for deprecation.",
link: "/data-feeds/selecting-data-feeds#-deprecating",
},
unrated: {
key: "unrated",
name: "Unrated",
icon: "⚪",
title:
"Unrated - These feeds have not yet been evaluated for market pricing risk. Treat them as unevaluated and use them at your own risk.",
link: "/data-feeds/selecting-data-feeds#-unrated",
},
} as const

export type CategoryKey = keyof typeof FEED_CATEGORY_CONFIG
Expand All @@ -96,6 +104,7 @@ const TIER_ANCHOR_KEY: Record<CategoryKey, string> = {
new: "new-token",
custom: "custom",
deprecating: "deprecating",
unrated: "unrated",
}

const RISK_DOC_BASE_PATH: Record<MarketPricingRiskProduct, string> = {
Expand All @@ -110,6 +119,10 @@ export function getRiskCategoryLink(key: CategoryKey, product: MarketPricingRisk
return `${base}#-deprecating`
}

if (key === "unrated") {
return `${base}#-unrated`
}

return `${base}${tierAnchor(TIER_ANCHOR_KEY[key], getMarketPricingRiskTerms(product))}`
}

Expand Down
2 changes: 2 additions & 0 deletions src/features/feeds/components/MarketPricingRiskTiers.astro
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ function renderInlineMarkdown(text: string): string {
}
</ul>

<p set:html={renderInlineMarkdown(terms.categoriesUnratedNote)} />

<h2>Market pricing risk by category</h2>

<p
Expand Down
20 changes: 9 additions & 11 deletions src/features/feeds/components/Tables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const RISK_TIER_SHORT_LABELS: Record<string, string> = {
new: "New token",
custom: "Custom",
deprecating: "Deprecating",
unrated: "Unrated",
}

const normalizeRiskKey = (riskTier?: string | null) => riskTier?.toLowerCase().replace(/\s+/g, "") ?? ""
Expand Down Expand Up @@ -282,9 +283,14 @@ const RiskCell = ({
}) => {
const [tooltipPos, setTooltipPos] = useState<ReturnType<typeof getRiskTooltipPosition> | null>(null)
const normalizedKey = normalizeRiskKey(riskTier)
const category = normalizedKey ? FEED_CATEGORY_CONFIG[normalizedKey as CategoryKey] : undefined
const tooltipText = category ? getRiskTooltipText(normalizedKey as CategoryKey, product) : ""
const riskLink = category ? getRiskCategoryLink(normalizedKey as CategoryKey, product) : ""
// When no risk tier is available (e.g. no Supabase return), fall back to the
// "Unrated" category so the feed/stream is shown with the ⚪ circle instead of a dash.
const categoryKey = (normalizedKey ? FEED_CATEGORY_CONFIG[normalizedKey as CategoryKey] : undefined)
? (normalizedKey as CategoryKey)
: "unrated"
const category = FEED_CATEGORY_CONFIG[categoryKey]
const tooltipText = getRiskTooltipText(categoryKey, product)
const riskLink = getRiskCategoryLink(categoryKey, product)

useEffect(() => {
if (!tooltipPos || typeof document === "undefined") return
Expand Down Expand Up @@ -315,14 +321,6 @@ const RiskCell = ({
}
}, [tooltipPos, tooltipText])

if (!category) {
return (
<td className={tableStyles.riskCol}>
<span className={tableStyles.riskUnavailable}>—</span>
</td>
)
}

const showTooltip = (event: Event) => {
setTooltipPos(getRiskTooltipPosition(event.currentTarget as HTMLElement))
}
Expand Down
5 changes: 5 additions & 0 deletions src/features/feeds/content/marketPricingRiskTerms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type MarketPricingRiskTerms = {
categoriesHeading: string
categoriesIntro: string
categoriesListIntro: string
categoriesUnratedNote: string
sectionIntro: string
newTokenListLabel: string
customListLabel: string
Expand All @@ -27,6 +28,8 @@ const FEEDS_TERMS: MarketPricingRiskTerms = {
"This categorization is put in place to inform users about the intended use cases of feeds and help highlight some of the inherent market integrity risks surrounding the data quality of these feeds.",
categoriesListIntro:
"Data feeds are grouped into the following categories based on the level of market pricing risk, based on multiple factors, from lowest to highest:",
categoriesUnratedNote:
"If a feed does not display one of these categories, it has not yet been evaluated for market pricing risk. Treat it as unevaluated and use it at your own risk.",
sectionIntro:
"These subsections describe standard market price feeds at each pricing risk level and correspond to the [category list](#data-feed-categories) above.",
newTokenListLabel: "New Token Feeds",
Expand All @@ -48,6 +51,8 @@ const STREAMS_TERMS: MarketPricingRiskTerms = {
"This categorization is put in place to inform users about the intended use cases of streams and help highlight some of the inherent market integrity risks surrounding the data quality of these streams.",
categoriesListIntro:
"Data streams are grouped into the following categories based on the level of market pricing risk, based on multiple factors, from lowest to highest:",
categoriesUnratedNote:
"If a stream does not display one of these categories, it has not yet been evaluated for market pricing risk. Treat it as unevaluated and use it at your own risk.",
sectionIntro:
"These subsections describe standard market price streams at each pricing risk level and correspond to the [category list](#data-stream-categories) above.",
newTokenListLabel: "New Token Streams",
Expand Down
10 changes: 10 additions & 0 deletions src/features/feeds/content/marketPricingRiskTiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ export function getMarketPricingRiskTiers(terms: MarketPricingRiskTerms): Market
],
closingParagraphs: [],
},
{
id: "-unrated",
icon: "⚪",
title: "Unrated",
leadParagraphs: [
`These ${terms.productPlural} have not yet been evaluated for market pricing risk. Treat them as unevaluated and use them at your own risk.`,
],
closingParagraphs: [],
},
]
}

Expand All @@ -140,5 +149,6 @@ export function getCategoryListItems(terms: MarketPricingRiskTerms) {
{ icon: "🆕", label: terms.newTokenListLabel, href: tierAnchor("new-token", terms) },
{ icon: "🔵", label: terms.customListLabel, href: tierAnchor("custom", terms) },
{ icon: "⭕", label: "Deprecating", href: "#-deprecating" },
{ icon: "⚪", label: "Unrated", href: "#-unrated" },
]
}
Loading