Skip to content

Cross-chain announcement schema conformance audit #12

@truthixify

Description

@truthixify

Labels: Stellar Wave, stellar, audit, interop, drips, help-wanted
Tier: M (2–4 days)
Type: audit

Context

Wraith's whole multichain model assumes the SDK can interpret announcements emitted by any chain's contract using the same scanning algorithm. If the event schemas drift — say, Stellar emits a Bytes where EVM emits a fixed-length array, or scheme_id is u32 on one chain and u64 on another — the SDK has to special-case forever.

We need an audit confirming the schemas are actually congruent and document them in one place.

Scope

Audit and produce a single document contracts/ANNOUNCEMENT_SCHEMA.md that:

  1. For each chain (EVM, Stellar, Solana, CKB), specifies:
    • Field name
    • On-chain encoded type
    • Off-chain logical type (what the SDK sees post-decode)
    • Source-of-truth file path
  2. Surfaces every divergence as a finding with severity (e.g., "Stellar metadata is Bytes, EVM bytes, Solana Vec<u8>, CKB embedded in lock args — divergent encoding but logically the same; SDK normalizes").
  3. Recommends a canonical normalized form (the type the SDK exposes via Announcement).
  4. Recommends contract-side changes to reduce divergence where harmless.

Comparison framework

Build a table like:

Field EVM Stellar Solana CKB Diverges?
schemeId uint256 u32 u32 n/a (script identity) Yes
stealthAddress address(20) Address Pubkey(32) blake160(20) Yes
...

For each divergence, document whether the SDK normalizes correctly today (link to the SDK code).

Acceptance criteria

  • ANNOUNCEMENT_SCHEMA.md committed at repo root with the full table.
  • At least one SDK-side correctness test per chain proving the contract emission round-trips through the SDK decoder.
  • List of "harmless to align" divergences with proposed contract PRs.
  • List of "intentional" divergences with the rationale (e.g., CKB cell-model fundamentally differs).

Why this matters

This is the foundation for adding a 5th chain. If we don't have an explicit cross-chain schema, the SDK becomes an unmaintainable patchwork the first time someone tries to add Sui or Aptos.

Files to start with

  • contracts/evm/contracts/ERC5564Announcer.sol (canonical reference, ERC-5564)
  • contracts/stellar/stealth-announcer/src/lib.rs
  • contracts/solana/programs/wraith-announcer/src/lib.rs
  • contracts/ckb/contracts/wraith-stealth-lock/src/main.rs
  • sdk/src/chains/*/announcements.ts (consumer side)

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programauditProduces a written report as primary deliverabledripsFunded via Drips Networkhelp wantedExtra attention is neededinteropCross-chain / interoperabilitystellarTouches Stellar / Soroban code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions