Skip to content

Load OFAC lists directly and show only positive matches (follow-up to #699) - #700

Merged
liangping merged 1 commit into
ping-pub:masterfrom
presendapp:fix/ofac-badge-direct-lists
Sep 28, 2026
Merged

liangping merged 1 commit into
ping-pub:masterfrom
presendapp:fix/ofac-badge-direct-lists

Conversation

@presendapp

Copy link
Copy Markdown
Contributor

Disclosure: I'm the developer of Presend and the author of #699. This is a follow-up to my own PR, which I'd like to correct.

What changes

  • The account page no longer calls Presend's API. It reads the OFAC lists directly from their source, 0xB10C/ofac-sanctioned-digital-currency-addresses, once per browser session (new src/libs/ofac.ts, 45 lines, no dependency).
  • It reads all six lists that contain EVM addresses today: ETH, USDT, USDC, ARB, BSC and ETC. OFAC files some 0x addresses under the token or chain they were used with, not only under ETH.
  • Only a positive match is shown. The "Not OFAC sanctioned" badge is removed: a list that fails to load could hide a match, so the page never states that an address is clean.

Why

  1. Visitor privacy. With Add OFAC sanctions check badge for EVM addresses #699, every visit to an EVM account page sent the visitor's IP and the address being viewed to my service, which nothing on the page tells them. The lists are public and small (124 distinct EVM addresses today), so there is no reason to route them through a third party.
  2. A gap in what Add OFAC sanctions check badge for EVM addresses #699 described. Until 2026-09-26, Presend's endpoint only read the ETH, BSC and ARB lists. For the four sanctioned 0x addresses that were only listed under USDT, USDC or ETC, the badge could have shown "Not OFAC sanctioned" between the merge of Add OFAC sanctions check badge for EVM addresses #699 (2026-09-21) and that fix. It's fixed on Presend's side, but it is also why I think a negative verdict shouldn't be displayed at all.

Trade-off

Visitors' browsers now fetch six small text files from raw.githubusercontent.com (CORS allowed, 5 min CDN cache) instead of calling Presend. If you'd rather have no runtime request at all, the lists could be fetched at build time instead, at the cost of being only as fresh as the last deploy. Happy to switch to that if you prefer it. If 0xB10C starts publishing a new list that contains EVM addresses, it needs to be added to EVM_ASSET_LISTS (a comment says so).

Testing

  • vue-tsc --noEmit and a full vite build: clean.
  • The module, run against the live lists: a sanctioned address listed only under USDT (0x175d44451403Edf28469dF03A9280c1197ADb92c) is found, also when written in upper case; a made-up address is not.
  • As with Add OFAC sanctions check badge for EVM addresses #699, I couldn't check the badge visually in the running app, since chain configs live in ping-pub/mainnet.

Sorry for the extra round trip on this one.

Follow-up to ping-pub#699. The account page no longer calls the Presend API: it reads the six 0xB10C OFAC lists that contain EVM addresses (ETH, USDT, USDC, ARB, BSC, ETC) once per session from raw.githubusercontent.com, and only shows a badge when the address is listed. The 'Not OFAC sanctioned' badge is removed.
@liangping
liangping merged commit 39a010d into ping-pub:master Sep 28, 2026
1 check 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.

2 participants