diff --git a/frontend/src/components/common/MarketEvidenceNote.tsx b/frontend/src/components/common/MarketEvidenceNote.tsx new file mode 100644 index 0000000..0a588ba --- /dev/null +++ b/frontend/src/components/common/MarketEvidenceNote.tsx @@ -0,0 +1,37 @@ +import { formatRelativeAge, formatTimestamp } from '@/utils/format' + +function formatSource(source?: string | null): string { + switch (source) { + case 'token-aggregation': + return 'token aggregation API' + case 'blockscout': + return 'Blockscout index' + case 'derived': + return 'derived from indexed supply and price inputs' + case 'mission-control': + return 'mission-control liquidity inventory' + default: + return source || 'source unavailable' + } +} + +export default function MarketEvidenceNote({ + source = 'token-aggregation', + lastUpdated, + method = 'DEX route and pool aggregation; visible liquidity only where indexed.', + compact = false, +}: { + source?: string | null + lastUpdated?: string | null + method?: string + compact?: boolean +}) { + const freshness = lastUpdated ? `${formatRelativeAge(lastUpdated)} (${formatTimestamp(lastUpdated)})` : 'timestamp unavailable' + const text = `Source: ${formatSource(source)}. Updated: ${freshness}. Method: ${method}` + + return ( +
+ {text} +
+ ) +} diff --git a/frontend/src/components/explorer/LiquidityOperationsPage.tsx b/frontend/src/components/explorer/LiquidityOperationsPage.tsx index beaab0a..a70d6c4 100644 --- a/frontend/src/components/explorer/LiquidityOperationsPage.tsx +++ b/frontend/src/components/explorer/LiquidityOperationsPage.tsx @@ -20,6 +20,7 @@ import { statsApi, type ExplorerStats } from '@/services/api/stats' import { summarizeChainActivity } from '@/utils/activityContext' import ActivityContextPanel from '@/components/common/ActivityContextPanel' import FreshnessTrustNote from '@/components/common/FreshnessTrustNote' +import MarketEvidenceNote from '@/components/common/MarketEvidenceNote' import SubsystemPosturePanel from '@/components/common/SubsystemPosturePanel' import { resolveEffectiveFreshness } from '@/utils/explorerFreshness' import { @@ -318,6 +319,12 @@ export default function LiquidityOperationsPage({