Review and safety
Review before signing
Section titled “Review before signing”The job: before the key is used, show what will happen in words the user understands: “You send 100 USDC, you get at least 0.03 ETH”, “This site asks to spend ALL your USDT”.
In the kit:
tx-preview-evmdecodes the calls and approvals, simulates the balance changes, and returns named checks (approval-unlimited,simulation-reverted,recipient-foreign…) that your app words its own way. See Transaction preview.kitpolicies call yourconfirmstep before every signature and broadcast, and refuse by fee cap, allowlist or blocklist. Wire the preview intoconfirmand nothing reaches the key unseen.- Swap modules hand the exact plan to
reviewExecutionbefore the first approval. See Swaps → Show a review screen.
You bring: an RPC that serves eth_simulateV1 (see
Networks and RPC). Where a network
lacks it, the preview says so instead of guessing; show that state honestly.
Design the sheet around three questions: what leaves, what arrives, who gets permission. Put the fee and the raw details below that.
Safety
Section titled “Safety”The job: protect users from the most common losses.
| Threat | What happens | In the kit |
|---|---|---|
| Unlimited approvals | A contract the user approved once can drain the token later | Approvals: find and revoke; tx-preview-evm warns before granting one |
| Permit / Permit2 phishing | A “free” signature authorizes a transfer | Policies treat Permit and Permit2 typed data as approvals: confirm sees the spender, the amount and unlimited |
| Known drainers | The recipient or spender is a scam address | Policies blocklist, checked for every recipient and spender |
| Address poisoning | The user copies a look-alike address from history | Spam flags in History; warn on first sends |
| Fake tokens | Airdropped tokens with phishing names | Hide unknown tokens (Balances) |
| Wrong network | Funds sent on a network the recipient doesn’t watch | Say the network on receive and review screens |
You bring: blocklist data. Examples: MetaMask eth-phishing-detect (phishing domains for dApp connections), ScamSniffer (scam addresses and domains), Chainalysis sanctions screening. A risk-screening module for the SDK is planned.