Background
From the 2026-08-05 external security assessment, finding M3, still open.
contracts/factory/src/validation.rs gates on-curve public-key validation behind #[cfg(test)], so it runs in tests and is compiled out of production builds. The check passes in CI and does not exist on chain.
docs/MAINNET_READINESS.md lists it as one of three blockers before real funds:
- M3: on-curve pubkey validation compiled out of prod (
#[cfg(test)] in contracts/factory/src/validation.rs). Flip it on before mainnet.
Sized honestly: the fix itself is small — flip the gate and make it compile. It is listed here because it is a mainnet blocker, not because it is large. The care is in confirming it still builds within budget and that the WASM hash change is handled properly.
What to build
- Remove the
#[cfg(test)] gate so validation runs in production.
cargo test — all contract tests pass.
- Confirm an invalid (off-curve) key is actually rejected by a deployed build, not only in a unit test.
- Check the WASM size delta. Validation costs bytes and the contract has a size budget — see
docs/wasm-size-optimization.md.
- The WASM hash changes. Update
contracts/expected-hashes.json from the CI log, per the repo convention.
Acceptance criteria
Notes
- A unit test passing is not evidence here: the tests are what the
#[cfg(test)] gate already satisfies. The load-bearing evidence is a deployed contract rejecting a bad key.
- Do not update
expected-hashes.json by running a local build; take the hash from the CI log, which is the reproducible one.
Drips Wave · Complexity: Intermediate · 100 points
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Background
From the 2026-08-05 external security assessment, finding M3, still open.
contracts/factory/src/validation.rsgates on-curve public-key validation behind#[cfg(test)], so it runs in tests and is compiled out of production builds. The check passes in CI and does not exist on chain.docs/MAINNET_READINESS.mdlists it as one of three blockers before real funds:Sized honestly: the fix itself is small — flip the gate and make it compile. It is listed here because it is a mainnet blocker, not because it is large. The care is in confirming it still builds within budget and that the WASM hash change is handled properly.
What to build
#[cfg(test)]gate so validation runs in production.cargo test— all contract tests pass.docs/wasm-size-optimization.md.contracts/expected-hashes.jsonfrom the CI log, per the repo convention.Acceptance criteria
cargo testpassescontracts/expected-hashes.jsonupdated from the CI logdocs/MAINNET_READINESS.mdupdated — M3 moves out of the blocker listNotes
#[cfg(test)]gate already satisfies. The load-bearing evidence is a deployed contract rejecting a bad key.expected-hashes.jsonby running a local build; take the hash from the CI log, which is the reproducible one.Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk