Screen DeFi transactions for OFAC
The practical way to screen DeFi is at the front-end layer, before the transaction is signed.
TL;DR
TL;DR: Screen DeFi transactions by checking wallet addresses at the front-end layer. A one-call API check before the user signs the transaction catches blocked wallets early.
Why the front-end layer
Smart contracts are permissionless, so the realistic control point is the interface where a transaction is prepared. Screening the source and destination addresses before broadcast catches a blocked wallet while the operator can still stop the action.
A minimal integration flow
- The user connects a wallet.
- Before the swap or transfer, call sanctions_check on the address.
- If clean, ALLOW the transaction.
- If flagged, BLOCK and do not proceed.
How to build it
Use one HTTP call under 100 ms so the check does not slow the transaction. This follows the 4-Gate Agent Payment Protocol: SCREEN, SCORE, STOP, STAMP. sanctionsai.dev integrates with x402, MCP, and Base/USDC, and installs via pip install sanctions-mcp.