UTXO SuiteWeb3 security
UTXO Security Core

The local engine that explains, never decides.

A pure-function analysis kernel that decodes wallet requests and classifies risk on-device. Every UTXO product that touches signatures inherits the same six-step pipeline.

Pipeline

Six steps from request to user warning

01

Intercept

Wallet provider request enters the page — Guard's injected script wraps window.ethereum.request and posts a copy to the isolated-world content script. The original request keeps flowing untouched.

02

Decode

Security Core kernel parses the call: ABI selector (approve / setApprovalForAll / permit / transfer), typed-data primary type (PermitSingle / PermitBatch / EIP-712), or raw eth_sign payload. Pure functions, no I/O.

03

Classify

Risk signals are computed locally: unlimited allowance (≥ 2^160), collection-wide NFT approval, off-chain Permit signatures, raw-hash eth_sign, deep-subdomain or punycode domain, Levenshtein typosquat of a curated 50+ list.

04

Score

Weighted accumulator → 0-100 score with discrete bands: safe / low / medium / high / critical. Score and per-signal explanations are stored in chrome.storage.local, never sent off-device.

05

Surface

Popup renders the score and signals. High and critical events also trigger an in-page slide-down banner so users see the warning before clicking the wallet popup.

06

User confirms

Security Core never signs, never broadcasts, never blocks the request. The actual approval still happens in the user's wallet — Guard's role ends at the explanation.

Signal catalogue

What gets flagged, and why

PHISH_PATTERN
Known phishing pattern

Domain matches a curated regex list (metamask-*, *-claim.*, *-verify.*, etc.) that has been associated with active wallet drainers.

critical
TYPOSQUAT
Lookalike domain

Domain is within Levenshtein distance 1-2 of a legitimate dApp (uniswap.org, metamask.io, opensea.io, ledger.com, …). A single character difference is the most reliable drainer signal.

critical
APPROVE_UNLIMITED
Unlimited token approval

ERC-20 approve(spender, amount) where amount ≥ 2^160. The spender can drain every coin you hold of that token at any time, forever, until you revoke.

critical
NFT_APPROVE_ALL
Collection-wide NFT approval

setApprovalForAll(operator, true). The operator can transfer ANY NFT you own in that collection. Common drainer technique.

critical
PERMIT_UNLIMITED
Unlimited Permit signature

EIP-2612 Permit with value ≥ 2^160. Off-chain approvals don't show up in wallet history but are equally powerful.

critical
RAW_SIGN
eth_sign request

eth_sign signs an arbitrary hash. Modern dApps don't use it. Likely an attempt to disguise a transaction signature.

critical
PUNYCODE
Punycode / IDN domain

Domain uses internationalized characters that visually mimic Latin letters. Easy to spoof — verify spelling carefully.

high
HTTP
Not HTTPS

Never sign or connect a wallet on a plain HTTP page.

high
PERMIT
Off-chain Permit

Bounded value Permit signature. Legitimate when the dApp explains the allowance; suspicious otherwise.

medium
TYPED_DATA
EIP-712 typed signature

Structured off-chain data. Make sure the rendered fields match what the dApp claims you're authorizing.

medium
TLD
Uncommon TLD

Top-level domain is overrepresented in scams (.xyz, .click, .top, .monster). Not a guarantee — just a flag.

low
Boundaries

What Security Core does — and doesn't

Reads requests in flight
Modifies them
Explains what you're signing
Decides for you
Stores activity locally
Sends anything to any server
Works with any wallet
Replaces your wallet
Surfaces risk to the user
Blocks transactions
Open analysis kernel
Custodies funds
Architecture

Where it lives in the codebase

Security Core is a single pure-function module at apps/guard-extension/src/shared/risk.ts. It exports tokenizers and analyzers for domains, calldata and typed data, and a weighted scoring function. The same module is consumed by:

Guard popup (React) — renders the score and signals on the active tab
Guard content script — runs analysis on every intercepted request, draws in-page banners
Guard service worker — aggregates the activity log, computes the per-tab badge count
Future UTXO Wallet — same kernel will gate its confirmation modals when released
Get UTXO