OFAC screening for smart contract developers

Smart contracts cannot screen on their own, so developers must add screening at the application layer before users interact with them.

TL;DR

TL;DR: Screen wallet addresses off-chain before a transaction is submitted to your contract, since on-chain code cannot reliably reach external sanctions data.

Why contracts need help

A deployed smart contract can check signatures and balances, but it cannot call a sanctions list the way an API can. That means screening belongs in the frontend, backend, or wallet flow that constructs the transaction. OFAC carries strict liability, so a contract that accepts a blocked wallet's funds still creates exposure for the operator.

Design patterns

The cleanest pattern is a pre-submission check: before your app builds or signs a transaction, call a screening API with the counterparty wallet address. If the result is flagged, block the interaction and tell the user why. A clean result lets the flow continue.

Testing and deployment

Add test cases that cover clean, flagged, and error responses so a failed check never silently becomes an allow. Use a tool like sanctions_check for the lookup and keep the call under 100 ms. SanctionsAI provides this as one HTTP call with tools such as risk_score and dispute_open for the full screening flow.

Screen your agent’s next payment

Free OFAC sanctions screening — 5 checks/day, no signup.

Check a wallet →