Skip to main content
This guide shows how to integrate Risk API into a Solana wallet or dApp to protect users from malicious addresses and risky transactions. The flow screens recipients before sending and simulates transactions before signing.
Prerequisites: You need a Risk API key and familiarity with the Address Risk Score and Transaction Simulator endpoints.

Integration Flow

A typical wallet integration adds two risk gates to the send flow:

Step 1: Screen the Recipient

Before the user constructs a transaction, check the recipient address for connections to known malicious actors.

What to Show the User

Check the attribution field - when present, it means the address is a verified non-malicious entity (like a system program or major exchange). You can display the entity name to reassure the user.

Step 2: Simulate the Transaction

After the user constructs but before they sign the transaction, simulate it to preview the effects and check for exploit risks.

Key Response Fields to Display

For detailed response parsing with code examples, see the Transaction Simulation Guide.

Exploit Risk Warnings

The simulator detects exploit patterns like address poisoning. If exploit_risks_detected is non-empty, display a warning:

Step 3: Display Risk Information

Combine the address screening and simulation results into a confirmation screen. The goal is to give users enough information to make an informed decision without overwhelming them.

Best Practices

  • Don’t block silently. Always explain why a transaction is flagged. Show the reasoning field.
  • Let users override with warning. Even high-risk transactions should be possible to send if the user explicitly confirms - they may know something the scoring doesn’t.
  • Show entity attribution. If the recipient is a known entity (exchange, protocol), display its name.
  • Cache address risk cautiously. Risk scores change as new intelligence is incorporated. For high-value transfers, always query fresh.

Step 4: Handle Edge Cases

Network Errors and Timeouts

Rate Limits

If you hit rate limits (429 responses), show a degraded state rather than blocking the user. See Rate Limits & Plans for retry strategies.

Unsupported Networks

Address Risk Score returns results for 18+ supported networks. For unsupported networks, partial results may be available through direct attribution or cross-chain propagation.

Complete Send Flow

For SDK-specific transaction building and encoding examples using @solana/kit or @solana/web3.js, see the Transaction Simulation Guide.

What’s Next

Transaction Simulation Guide

Deep dive into simulation response interpretation and debugging.

Compliance Pipeline

Add sanctions screening and payment risk for full compliance coverage.
Last modified on July 17, 2026