Skip to content

Security audit of stealth-registry Soroban contract #2

Description

@truthixify

Labels: Stellar Wave, stellar, audit, security, drips, help-wanted
Tier: L (1–2 weeks)
Type: audit

Context

contracts/stellar/stealth-registry/ stores the (registrant, scheme_id) → 64-byte meta-address mapping. It is Wraith's analogue to ERC-6538 on EVM. Unlike the announcer, it has persistent storage and arbitrary user input flowing into DataKey::MetaAddress, so the attack surface is substantially larger.

We need an independent security review.

Scope

Same severity framework and report format as the announcer audit. Focus areas specific to the registry:

  • Storage key collisions — can two distinct registrants produce the same DataKey? Inspect the Symbol / Address / u32 packing.
  • Meta-address length validation — the 64-byte constraint is checked in register_keys(); verify there's no path that bypasses it (overloads, raw set() calls).
  • Authorization — Soroban's require_auth() must cover both first-time and replacement writes. Confirm an attacker can't squat a victim's registry slot before the victim registers.
  • Scheme ID forward compatibility — what happens if a client passes an unknown scheme_id? Document the intended behavior; flag if the contract silently writes garbage.
  • State exposure — does stealth_meta_address_of return data for unauthorized callers? (It should — registry is public — but confirm there's no privileged-only side channel.)
  • Storage rent / TTL — Soroban entries have TTL; verify extend_ttl semantics align with "permanent registration" UX expectations. A user shouldn't lose their registry entry to expiry.
  • Replacement & nonce semantics — if the contract allows overwriting an existing registration, is there replay-protection across the write boundary?

Acceptance criteria

  • Audit report at contracts/stellar/stealth-registry/audits/2026-XX-author.md.
  • Repro tests in tests/audit.rs.
  • Special section "Storage rent strategy" with concrete recommendations for the protocol team (we will turn this into a follow-up issue).
  • Findings shared privately with security@usewraith.xyz for any Critical/High before publication.

Files to start with

  • contracts/stellar/stealth-registry/src/lib.rs
  • Companion EVM contract: contracts/evm/contracts/ERC6538Registry.sol (for behavioral parity check)
  • ERC-6538 spec: https://eips.ethereum.org/EIPS/eip-6538

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programauditProduces a written report as primary deliverabledripsFunded via Drips Networkhelp wantedExtra attention is neededsecuritySecurity-sensitive workstellarTouches Stellar / Soroban code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions