Security model

GhostLink limits what a spending session can authorize. It does not make an untrusted page safe to receive your master identity, make deposits private, or replace backend authentication. These are the source-level controls and the assumptions they rely on.

Invariants (program-enforced; test-covered except where noted)

What an attacker gets

AttackerConsequenceControl and assumptions
App holding only a software sessionCan spend within policy limits and cause losses through trades until expiry or revocationDaily cap, priced-output floor, passkey threshold and home-only direct withdrawals; market risk remains
Stolen software session keySame as above, until you revokeCaps, expiry and passkey threshold; owner recovery can authorize revoke or sweep if the secret and submission access remain available
Compromised relayer or indexerDowntime and request linkage; a trusted off-chain root source can also lie about accepted rootsOn-chain programs enforce their root rings. Backends must trust their configured indexer or read rings from a trusted RPC
Rogue solverCan refuse service or execute a signed trade that satisfies its boundsUnder-delivery reverts the transaction; the reference solver separately refuses uneconomic intents to protect its own inventory
Secret thief proposing a new homeCan take the pocket's funds if an unauthorized home change completesA timelock allows cancellation or sweep before execution. Detection requires an available, configured watcher or active monitoring
Phishing page that gets you to sign the sign-in messageWithout a factor: the identity secret. With a factor: the signature alone cannot reconstruct that secretThe message names the identity domain, but wallet warnings vary. The passkey factor helps only while the factor and derived secret remain protected
App or injected script given the raw identityCan derive identities for every domain and generate owner proofsThe SDK is not an origin sandbox. Keep secrets and wallet witnesses in a separately trusted host; no isolated broker ships in this SDK
Captured off-chain login payloadCan be replayed if the backend treats a proof as a bearer credentialVerify the proof-bound session, verify its signature over loginChallengeDigest, and atomically consume the server's nonce once
Compromised Actions endpointCan return a malicious deposit transaction after serving correct metadataverifyFunding checks metadata only; validate the actual transaction or trust its provider before signing

Assumptions

What we refuse to claim

GhostLink is not a mixer: pocket activity, deposits and sweeps are public on-chain. Per-domain IDs avoid directly disclosing the wallet in a proof, but transaction trails, identifying requests, a small registration set or a leaked secret can link activity. The census proves a balance existed at a moment, not exclusivity of funds.

Process

Public source and passing tests are not an independent audit or proof of a deployment's configuration. The mainnet release plan calls for two independent audits, a public proving-key ceremony, verifiable builds and removal of upgrade authority. These are planned gates, not completed guarantees. A future incompatible program requires an explicit migration; existing deployments must not be assumed to include every source change.