DeFi Applications

How to integrate Shield3 with a DeFi application to improve the compliance & security posture of the product.

Shield3 is a compliance and security automation tool that helps app devs enforce transaction policies for their apps to both protect users, and create audit trails for all transactions they facilitate to support their compliance and reporting needs. Whether the app uses an embedded wallet (ex. Dynamic, Privy ) or supports external wallets (ex. Metamask, Rabby ), Shield3 is easy to implement and usually requires little to no development effort.

For DeFi applications, while the core smart contracts are open and permissionless, it is often important to enforce policy based restrictions on the hosted application frontend like blocking sanctioned addresses, malicious actors, or enforcing geography specific rules for KYC & reporting.

In addition to satisfying compliance & reporting requirements, transaction policies are powerful ways to protect users from making mistakes like misconfiguration of slippage, or interacting with scam tokens.

This guide shows how to integrate Shield3 with a DeFi application to improve the compliance & security posture of the product.

1. Set up an account on Shield3

Visit the Shield3 App to create or log into an account

Choose the policies to enable

Navigate to workflows to fine tune the policy configurations and retrieve the network specific URLs

For custom policies submit a request via the Contact Shield3 Form or reach out to us directly in Telegram or Email. For example if you need to have policies that vary based on external KYC address lists or geographical restrictions.

2. Integrate the Shield3 RPC with the application

Option 1 - Embedded wallets

To automatically screen all transactions using an embedded wallet, configure the application with the Shield3 API key as shown in X Shield3 and Privy X Shield3.

Option 2 - React SDK

To ensure transactions are screened when using external wallets, integrate the Shield3 React SDK to add a pre-transaction hook to get the policy results for a transaction before prompting the user for a signature.

3. View & download reports

In the dashboard & reporting sections transactions can be exported for investigations & report filing