diff --git a/src/content/data-feeds/llms-full.txt b/src/content/data-feeds/llms-full.txt index c765170f2f1..4fa204ee3ad 100644 --- a/src/content/data-feeds/llms-full.txt +++ b/src/content/data-feeds/llms-full.txt @@ -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. +### ⚪ 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: diff --git a/src/content/data-feeds/selecting-data-feeds.mdx b/src/content/data-feeds/selecting-data-feeds.mdx index 493162f4db8..7900eeb69ec 100644 --- a/src/content/data-feeds/selecting-data-feeds.mdx +++ b/src/content/data-feeds/selecting-data-feeds.mdx @@ -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. +### ⚪ 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: diff --git a/src/db/feedCategories.ts b/src/db/feedCategories.ts index c0e5877b092..d5bda96d9b4 100644 --- a/src/db/feedCategories.ts +++ b/src/db/feedCategories.ts @@ -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 @@ -96,6 +104,7 @@ const TIER_ANCHOR_KEY: Record = { new: "new-token", custom: "custom", deprecating: "deprecating", + unrated: "unrated", } const RISK_DOC_BASE_PATH: Record = { @@ -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))}` } diff --git a/src/features/feeds/components/MarketPricingRiskTiers.astro b/src/features/feeds/components/MarketPricingRiskTiers.astro index c05038ca4ea..31dfbe451cc 100644 --- a/src/features/feeds/components/MarketPricingRiskTiers.astro +++ b/src/features/feeds/components/MarketPricingRiskTiers.astro @@ -36,6 +36,8 @@ function renderInlineMarkdown(text: string): string { } +

+

Market pricing risk by category

= { new: "New token", custom: "Custom", deprecating: "Deprecating", + unrated: "Unrated", } const normalizeRiskKey = (riskTier?: string | null) => riskTier?.toLowerCase().replace(/\s+/g, "") ?? "" @@ -282,9 +283,14 @@ const RiskCell = ({ }) => { const [tooltipPos, setTooltipPos] = useState | 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 @@ -315,14 +321,6 @@ const RiskCell = ({ } }, [tooltipPos, tooltipText]) - if (!category) { - return ( - - — - - ) - } - const showTooltip = (event: Event) => { setTooltipPos(getRiskTooltipPosition(event.currentTarget as HTMLElement)) } diff --git a/src/features/feeds/content/marketPricingRiskTerms.ts b/src/features/feeds/content/marketPricingRiskTerms.ts index 736c2ecf390..8f2bec132e4 100644 --- a/src/features/feeds/content/marketPricingRiskTerms.ts +++ b/src/features/feeds/content/marketPricingRiskTerms.ts @@ -7,6 +7,7 @@ export type MarketPricingRiskTerms = { categoriesHeading: string categoriesIntro: string categoriesListIntro: string + categoriesUnratedNote: string sectionIntro: string newTokenListLabel: string customListLabel: string @@ -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", @@ -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", diff --git a/src/features/feeds/content/marketPricingRiskTiers.ts b/src/features/feeds/content/marketPricingRiskTiers.ts index 59751e22f1a..456956edeb5 100644 --- a/src/features/feeds/content/marketPricingRiskTiers.ts +++ b/src/features/feeds/content/marketPricingRiskTiers.ts @@ -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: [], + }, ] } @@ -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" }, ] }