Skip to content

feat(feeds): OFAC SDN sanctioned crypto-address feed#156

Merged
rinjanianalytics merged 2 commits into
masterfrom
feat/ofac-sanctioned-crypto-feed
Jun 17, 2026
Merged

feat(feeds): OFAC SDN sanctioned crypto-address feed#156
rinjanianalytics merged 2 commits into
masterfrom
feat/ofac-sanctioned-crypto-feed

Conversation

@rinjanianalytics

Copy link
Copy Markdown
Owner

What

Adds the OFAC SDN sanctioned cryptocurrency address feed — the #1 free, authoritative on-chain source we agreed to build. Every digital-currency address on the US Treasury OFAC SDN list is ground-truth "this wallet belongs to a sanctioned entity." It's the attribution signal we'd otherwise pay Arkham for (~$1K/yr post-trial) — but free and structured.

Why a custom connector

The crypto addresses live only in sdn.xml (the CSV export drops the <idList> digital-currency entries), and the declarative feed-engine is JSON/CSV/text-only. So this is a hand-written connector parsing XML via fast-xml-parser, matching the existing apps/worker/src/feeds/* pattern.

Dual sink (one pass)

Sink Shape Purpose
iocs type=crypto-address, tags [ofac, sanctioned, ofac-sdn, <chain>, ofac:<program>], confidence 100 Surfaces in the Feeds Landscape shift tag band + Indicators + graph
wallets entityType=sanctioned, confidence 100, attributionSource=ofac The free on-chain attribution layer (Arkham stand-in)

iocs.type is a plain text column, so crypto-address needs no migration. Both upserts are idempotent (iocs.value / wallets.ref_id).

Wiring

  • apps/worker/src/feeds/ofac.ts — connector (syncOFAC / runOFACSync)
  • additionalFeeds.tsfeedRegistry.ts (ofac key)
  • scheduler.ts JOB_REGISTRY — daily 03:00 UTC (OFAC only republishes on designation actions; daily is ample)
  • OFAC_SDN_XML_URL env override for testing

Verification

  • tsc --noEmit clean on worker, api, and gateway (strict CI gate)
  • Extraction smoke-tested against a realistic multi-entry SDN sample: multi-program entity yields all its addresses, no-crypto entries are skipped, non-crypto IDs (email) excluded, XBT→btc chain mapping correct

Notes

🤖 Generated with Claude Code

rinjanianalytics and others added 2 commits June 17, 2026 07:48
The one free, authoritative on-chain attribution source. Every digital-
currency address on the US Treasury OFAC SDN list is ground-truth "this
wallet belongs to a sanctioned entity" — the signal we'd otherwise pay
Arkham for ($1K/yr post-trial), but free and structured.

Custom connector (apps/worker/src/feeds/ofac.ts): the crypto addresses
live only in sdn.xml (the CSV export drops the <idList> digital-currency
entries) and the declarative feed-engine is JSON/CSV/text only, so this
parses XML via fast-xml-parser.

Dual-sink in one pass:
  - iocs   — type `crypto-address`, tagged `sanctioned` → surfaces in the
             Feeds "Landscape shift" tag band + Indicators + graph.
  - wallets — entityType `sanctioned`, confidence 100, attributionSource
             `ofac` → the free on-chain attribution layer.

Wired through additionalFeeds → feedRegistry (`ofac`) and scheduled daily
at 03:00 UTC in JOB_REGISTRY (OFAC republishes only on designation
actions; the upsert is idempotent on iocs.value / wallets.ref_id).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The feed-registry test pins the exact FEED_REGISTRY key set; adding the
ofac feed took it 13 → 14. Keep the list in lock-step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rinjanianalytics rinjanianalytics merged commit 2d43741 into master Jun 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant