7e3e555. Each statement names the file that proves it.
bun run check:docs fails the build when a file, symbol or invariant id cited here no longer exists, when an API
source file loads a secret key that Keys the service holds does not cite, and when the
operation types listed under What verify() accepts differ from the ones the verifier
handles. It checks names, not meaning: whether the cited code still does what the sentence says stays a review
question.
Trust model
- The API builds, the browser checks. The API reads the ledger and builds every unsigned transaction. The web
app builds none: it parses, verifies, signs and submits what the API built, and a lint rule refuses
transaction-building code in it (INV-18,
apps/web/eslint.config.mjs). - Every transaction is checked before it is signed. The browser decodes each transaction and runs
verify()on it (apps/web/lib/stellar/verify.ts#verifyCloseTransaction, called fromapps/web/hooks/useCloseExecution.ts). The destination, the memo and the user’s choice for each asset come from the user’s own inputs, never from the API’s answer (INV-04), and an operation the verifier cannot describe is refused (INV-03). The same verifier is published as@lumenwipe/verifyfor integrators. - Keys stay with the user. Signing happens in the browser or in the user’s wallet. LumenWipe does not store, log or transmit the user’s secret key; the secret-key mode holds it in memory only (INV-22). The API never signs for a user’s account.
- Exchange closes pass through a relay inside one transaction. An exchange credits a payment with a memo, not a
merge, so an exchange close merges the account into a shared relay account and, in the same transaction, the
relay forwards the balance to the exchange.
verify()accepts that hand-off only as one atomic merge and forward to the address and memo the user confirmed (INV-15,apps/web/lib/stellar/verify.ts#assertMergeShape). - Nothing is submitted on its own. A destructive choice reaches the API only as the user’s acknowledgement for that exact destination or account, and the tool never submits without the user’s confirmation (INV-24).
Keys the service holds
The API holds two signing keys per network that can sign a transaction, and one that signs only the sign-in challenge of a contract account, each read from its own environment variable and nothing else. The two transaction keys’ public addresses are listed in the monitoring plan’s inventory. The secrets live only in the API’s environment and never reach the browser (INV-17). Every loader reads its variable throughapps/api/src/lib/stellar/secret-keypair.ts#keypairFromEnv, which trims the value and treats an empty one
as unset. A value that is not a valid secret seed leaves the key unconfigured, so its route answers with its
not-configured 503, and the log names the variable, never its value.
The kill switches are read per network by
apps/api/src/config/kill-switches.ts#readKillSwitches, and the limits
are defined in apps/api/src/config/constants.ts.
What verify() accepts
verify() accepts a transaction only when every operation in it is one of the types below and passes that type’s
rule (apps/web/lib/stellar/verify.ts#assertCloseIntent). Each operation must be sourced from the account being
closed, except the relay’s forward (INV-06).
Any other operation, including one the verifier cannot decode, is refused (INV-03). Integrators can run the same
checks with
@lumenwipe/verify.
Hard invariants
The invariant register lists each invariant with the code that enforces it and the test or CI job that proves it. The ones this page rests on:
The register’s status column says which of these a test fully proves and which carry a stated residual.
Implemented and planned controls
In place today:- The checks above on every transaction before it is signed, and the limits on both service keys.
- A kill switch per network for the relay forward and for fee sponsorship (
apps/api/src/config/kill-switches.ts). - A strict Content Security Policy and security headers on every web route (
apps/web/proxy.ts#proxy,apps/web/config/security-headers.mjs). - Log redaction applied where lines are written (
apps/api/src/common/log-privacy.ts#scrubValue). - Rate limits per API key and client in the API (
apps/api/src/auth/rate-limiter.ts), and per visitor on the web server’s proxy routes (apps/web/lib/api/rate-limit.ts#rateLimitProxy). - Contract and exchange registries that fail closed once past their validity date (INV-14).
- In CI on every pull request: a dependency advisory gate (
.github/workflows/ci.yml#audit), static analysis (.github/workflows/ci.yml#codeql,.github/workflows/ci.yml#semgrep), a secret scan over the full history (.github/workflows/ci.yml#gitleaks), and the documentation claim check (.github/workflows/ci.yml#docs-claims). - On-chain monitors for the two service accounts and the contract registry, and a daily check of the data providers (see Dependencies and monitoring).
- Two monitors that decode each transaction the relay or the fee sponsor signs and judge its shape, and an alert on the sponsor’s usage rate once real usage sets a baseline. The monitoring plan lists them as Planned and says what each waits on.
Security reviews
Every review so far was performed by the project’s maintainers. No third-party audit has been performed (remediation plan, Section 1).
A change to a security-sensitive path also needs the closer review described in the
security scope, also self-assessed.
Accepted residual risks
The threat model, Section 11 lists each accepted risk with its surface and the reasoning for accepting it. By category:- Values
verify()takes from the API. Some inputs to the browser’s checks, such as balances, signers, DeFi positions and conversion quotes, come from the API’s own reads rather than from the user. - The relay forward. The relay is protected by its code checks together with an operational policy on its own balance and an on-chain monitor.
- Fee sponsorship. The sponsor’s rules bound what it pays for by operation shape, account and budget; they do not re-derive each close’s choices.
- Soroban conversions and DeFi exits. These are bounded by the contract registry, the exit function and the accepted floor, not by every contract a route passes through.
- Third-party data. Ledger providers, quote sources and the DeFi position provider are relied on for availability and for the values they report, which are checked against the ledger where it allows.
- Completion status. A close is reported complete from the API’s confirmed lookup of the hash the browser computed.
- Integrator signing paths. Two signing guards live in the web app; an integrator with its own signing path applies them itself.
- Integrator access. Short windows apply to key revocation across instances and to sign-in sessions.
Dependencies and monitoring
- Dependencies: Renovate opens one pull request with every update each week, plus lockfile maintenance
(
renovate.json). A high or critical advisory fails CI unless it is allowlisted with a reason and an expiry (scripts/audit-gate.ts,scripts/audit-allowlist.json, INV-27). - On-chain monitors: the service-account checks and the registry comparison are scheduled every hour
(
.github/workflows/onchain-monitors.yml). GitHub runs schedules on a best-effort basis: measured on 2026-11-27, 21 percent of the expected hourly runs happened over the previous five weeks, so a finding can wait hours. An external scheduler is planned to start the same workflow hourly; it does not exist yet. A finding opens an issue and alerts the maintainers, and a check that did not run counts as a finding (monitoring plan). - Data providers: each configured Horizon-compatible provider is checked daily for the routes and fields the API
reads (
.github/workflows/provider-contract.yml). - Infrastructure: a read-only check of the API’s hosting, run after any project or permission change
(
.github/workflows/migration-check.yml,scripts/migration-check.sh).