Logo GH

Inter-chain analytics

(Section: Ecosystem and Network)

1) What is inter-chain analytics and why it is needed

Cross-chain analytics is a methodology and stack that combines telemetry and events from multiple chains, bridges, providers and applications into a single data model. Objectives:
  • Unified accounting of value and activity: volumes, liquidity, commissions, retention.
  • Observability of bridges and P2P connections: finalization, lags, reorg/challenge events.
  • Traffic and conversion attribution: cheyn→cheyn, kanal→produkt.
  • Risk and compliance: AML, sanctions, behavioral fraud, entity identification.
  • Decision making: OKR/budgets, limits, update and liquidity regulations.

2) Data sources and events (canonical list)

1. Chains/registers: blocks, transactions, event logs, states of smart contracts.
2. Bridges: applications, receipts, evidence (light/optimistic/ZK), finalization statuses.
3. Payment providers/CCS: passing checks, limits, payment statuses.
4. Product events: onboarding, deposits/bets/conclusions, gaming and behavioral metrics.
5. P2P transport: Pub/Sub receipts, RPC success, latency.
6. Reference books: networks, assets, decimals, chainId, contract addresses, SDK versions.

💡 For each source, fix: scheme, update log, "finalization window," owner, SLO.

3) Data architecture (streams and storages)

Ingest (streaming): connectors to nodes/indexes, webhooks bridges, CDC from operating databases.
Raw (Bronze/Raw): immutable batches labeled 'observed _ at' with source metadata.
Clearing/normalization (Silver): dedup, semantic enrichment, timezone alignment, asset mapping.
Kernel models (Gold/Core): unified facts' transfers', 'bridges', 'onchain _ events', 'kyc _ status', 'payouts'.
Marts: finance (GTV/TVL/Take Rate), product (retention/funnels), risk (scoring), operating system (SLO).
Cache/Serve: OLAP/HTAP for dashboards and APIs, and a separate search for/tx addresses.

Transport: Kafka/Pulsar (exactly-once semantics over idempotency), object storage for raw materials, parquet/column formats for analytics.

4) Finalization, reorgs and idempotence

Event states are 'observed' → 'confirmed (k)' → 'finalized' → 'invalidated (reorg)'.
K-confirmations rule - Configured by network/asset type.
Optimistic/Challenge windows: Support for "contested" status for bridges.
Idempotency: 'idempotency _ key = chainId' block 'tx' logIndex 'topic' (or payload hash).
Replay: scheduled backfill and index change recovery.

5) Entity resolution model

Address → Actor: addresses, keys, wallets ↔ account/organization/provider.
Cross-chain graph: address relationships by one owner (heuristics, signatures, onboarding data).
Confidence levels: hard-link (KYC, on-chain signature), soft-link (behavioral correlations).
Aliasing: Store stable identifiers (PIDs) instead of PII in analytics.

6) Unified event diagram (simplified)

yaml event:
id: string # global UUID observed_at: timestamp # when they saw chain_id: string # 'eth-mainnet', 'solana-mainnet',...
block_height: long tx_hash: string log_index: int event_type: string    # transfer    bridge. lock    bridge. mint    kyc. pass    payout. done...
status: string      # observed    confirmed    finalized    invalid actor_src: string # address/peer-id/source organization actor_dst: string # address/peer-id/destination organization asset: string # canonical symbol (e. g., USDC), + decimals amount: decimal usd_value: decimal # rate normalization at the observed_at bridge_ref: string # link with the application/receipt of the metadata bridge: object # network/contract/version/gac/fee, etc.
idempotency_key: string

7) Normalization of assets and prices

Canonical asset directory: symbol, decimals, chain mapping, contract addresses.
FX normalization: historical rates and asset prices at the 'observed _ at' timestamp.
Multi-active bundles: Group "wrapped" and native assets.

8) Key Metrics and Showcases

8. 1 Finance and liquidity

GTV (Gross Transaction Volume) over networks/assets/bridges.
TVL and Net Flow over bridges and pools.
Take Rate/Volume Fee; Cost-to-Serve to transfer.
Payout SLA Hit Rate, Finality p50/p95, Pending Backlog.

8. 2 Product and user

Cross-chain MAU/DAU (dedup по PID),

Retention D1/D7/D30 taking into account multi-chain activity,

Funnel: input network → bridge → target product → action.
QoT (traffic quality): traffic validation after anti-fraud.

8. 3 Risk and compliance

Fraud/Dispute Rate, High-Risk Score%, Sanctions Hit%.
Anomaly rate by translation patterns, velocity-check, clustering.
KYB/KYC Pass% and timings.

8. 4 Operating system and SLO

Bridge Success-Rate, p95 Finality, Relay Availability,

Reorg/Challenge events, Error budget burn.

9) SQL/Pseudo Query Examples

GTV by circuit pairs

sql
SELECT src. chain_id AS src_chain,
dst. chain_id AS dst_chain,
date_trunc('day', e. observed_at) AS d,
SUM(e. usd_value) AS gtv_usd
FROM events e
JOIN bridges b ON e. bridge_ref = b. id
JOIN networks src ON b. src_chain_id = src. id
JOIN networks dst ON b. dst_chain_id = dst. id
WHERE e. status = 'finalized' AND e. event_type IN ('bridge. lock','bridge. mint','transfer')
GROUP BY 1,2,3;

Cross-chain retention D7

sql
WITH first_touch AS (
SELECT pid, MIN(observed_at) AS t0
FROM product_events
WHERE event IN ('signup','first_deposit')
GROUP BY pid
),
week_activity AS (
SELECT DISTINCT pid
FROM product_events pe
JOIN first_touch ft USING(pid)
WHERE pe. observed_at BETWEEN ft.t0 + INTERVAL '1 day'
AND ft.t0 + INTERVAL '7 day'
)
SELECT 100. 0 COUNT() / (SELECT COUNT() FROM first_touch) AS d7_retention_pct
FROM week_activity;

SLO Bridge Showcase

sql
SELECT date_trunc('hour', observed_at) AS h,
100. 0 SUM(CASE WHEN status='finalized' THEN 1 END)/COUNT() AS success_rate,
percentile_cont(0. 95) WITHIN GROUP (ORDER BY (finalized_at - observed_at)) AS p95_finality_min,
SUM(CASE WHEN challenge_event THEN 1 END) AS challenges
FROM bridge_events
WHERE observed_at >= now() - INTERVAL '7 days'
GROUP BY 1;

10) Attribution and multi-channel path

last-touch/position-based model with weights for network source, bridge and product.
UTM→On -chain: associate clicks/referrals with the onchain address when onboarding (with consent).
Associative models: Shapley/Markov for complex set→most→produkt paths.

11) Anti-fraud and behavioral signals

Graph features: common counterparties, circular transfers, quick turnover.
Velocity limits and anomalies: bursts, "splitting" of amounts, night clusters.
Bridge fraud schemes: resubmission, KYC bypass attempts, sandwich patterns with liquidity.
Models: gradient boosting/graph-embeddings; teach on incident marking.

12) Privacy and compliance (privacy-by-design)

PII minimization: PID instead of direct identifiers, tokenization.

Data residency: partitioning by region, encryption "at rest/on the road."

Right to delete: tombstone/redaction events with provability.
Access and auditing: role ACLs, read logs, signed reports for checks.

13) SLI/SLO for Analytical Pipelines

SLI (example):
  • Freshness (median lag from 'observed _ at' to appearance in Gold),
  • Completeness (% of events without holes as expected by K-confirmations),
  • Correctness (% of events validated by schemes/rules),
  • Reorg handling success
  • Serve latency (p95 requests to storefronts/dashboards).
SLO (landmarks):
  • Freshness p95 ≤ 3 min (streaming), ≤ 15 min (batch).
  • Completeness ≥ 99. 7%, Correctness ≥ 99. 9%.
  • Reorg handling success ≥ 99. 9%.
  • Serve p95 ≤ 500 ms (main showcases).

14) Observability and lineage

Data Lineage: from dashboard to raw event (column-level).
Quality signals: completeness, uniqueness, referential integrity, schema drift.
Alerts: "quiet failures" (no new data), distribution jumps, growth of'unknown' fields.

15) Dashboards (templates)

A. Cross-Chain Ops (real-time/hour):
  • Success-Rate, p95 Finality, Relay Availability, Challenge/Reorg, backlog, error budget burn.
B. Liquidity & Cost (day/week):
  • TVL, Net Flow per chain, cost-per-transfer, utilization, insurance fund.
C. Product & Growth (week/month):
  • MAU/DAU (dedup), cross-chain retention, channel funnels, QoT.
D. Risk & Compliance (week):
  • Fraud/Dispute Rate, sanctions hits, high-risk share, speed of proceedings.

16) Operating regulations and playbook

Incident: Freshness Lag> SLO

Check connectors/indexers, switch to backup, enable degradation mode (showcases show "last finalized"), eskalate to the source owner.

Incident: reorg/challenge surge

Enlarge K-confirmations/dispute window, enable "delayed finalization" for large amounts, notify bridge/operators.

Incident Currency/Asset Divergence

Freeze affected pairs, roll back the directory, recalculate USD normalization, publish a report.

Incident: Fraud/Dispute jump

Tighten the limits/scoring, turn on the manual high-risk review, finish training the model on a fresh pattern.

17) Configuration Example (Pseudo-YAML)

Finalization windows by networks

yaml finality:
eth-mainnet: 12  # блоков polygon: 256 solana: "optimistic: 32 slots"
optimistic-bridge: { challenge_minutes: 20 }
zk-bridge: { proof_time_sla: 180 }

Idempotency and deduplication rules

yaml dedup:
key_template: "${chain_id}    ${block_height}    ${tx_hash}    ${log_index}    ${event_type}"
ttl_hours: 48

Pipeline SLO

yaml pipelines:
ingest_stream:
freshness_p95_min: 3 completeness_min_pct: 99. 7 gold_build:
correctness_min_pct: 99. 9 reorg_success_min_pct: 99. 9

18) Implementation checklist

1. Capture sources, schemes, finalization windows and owners.
2. Enable idempotency and reorg-handling (states + replay).
3. Build a kernel of models (transfers/bridges/onchain_events/kyc/payouts).
4. Set up asset directories and FX normalization.
5. Define the pipeline SLI/SLO and dashboards.
6. Implement entity resolution and privacy-by-design.
7. Include anti-fraud scoring and incident regulations.
8. Run backfill and tests on historical reorg/challenge cases.
9. Regularly review schemas, metric weights, and sources.

19) Glossary

Finality - irreversibility of the state/event.
Reorg - reassembly of the chain, leading to the cancellation of part of the blocks.
Challenge period - a challenge window in optimistic models.
Entity resolution - mapping of addresses/accounts of a single entity.
GTV/TVL - transaction volume/blocked value.
Completeness/Freshness/Correctness - basic data quality metrics.

Bottom line: inter-chain analytics is not just a summary of metrics, but a manageable discipline: a single scheme of events, correct finalization, stable pipelines, privacy, anti-fraud and understandable showcases. By following this framework, the ecosystem gets a truly "end-to-end" view of value, risk and growth - from raw block to business solution.

Contact

Get in Touch

Reach out with any questions or support needs.We are always ready to help!

Start Integration

Email is required. Telegram or WhatsApp — optional.

Your Name optional
Email optional
Subject optional
Message optional
Telegram optional
@
If you include Telegram — we will reply there as well, in addition to Email.
WhatsApp optional
Format: +country code and number (e.g., +380XXXXXXXXX).

By clicking this button, you agree to data processing.