Problem Statement
Every state-changing function panics on errors rather than returning
Result. There is no documentation for: (a) when a function panics
vs when it succeeds silently, (b) what clients should expect when a
panicked call's transaction is rolled back.
Why it matters
Soroban treats panic as a transaction failure — rolled back storage
and emitted events. Clients that "fire-and-forget" tips without waiting
for confirmation may double-spend if they re-call after a panic.
Expected Outcome
docs/panic-policy.md documenting the contract's panics and the
TX-rollback semantics, with worked examples for each error variant.
Acceptance Criteria
Files/Modules Likely Affected
docs/panic-policy.md (new)
src/lib.rs — add /// # Errors rustdoc sections
Difficulty Easy. Estimated Effort S.
Labels
area:documentation, area:smart-contract-safety,
priority:medium
Imported from docs/open-issues-draft.md as draft issue #26 (commit 7becd4b). Original draft-order cross-references in this body have been remapped to current GitHub issue numbers at import time.
Problem Statement
Every state-changing function panics on errors rather than returning
Result. There is no documentation for: (a) when a function panicsvs when it succeeds silently, (b) what clients should expect when a
panicked call's transaction is rolled back.
Why it matters
Soroban treats
panicas a transaction failure — rolled back storageand emitted events. Clients that "fire-and-forget" tips without waiting
for confirmation may double-spend if they re-call after a panic.
Expected Outcome
docs/panic-policy.mddocumenting the contract's panics and theTX-rollback semantics, with worked examples for each error variant.
Acceptance Criteria
TipErrorvariant, the function it can beraised from, and the recovery recommended for the client.
Files/Modules Likely Affected
docs/panic-policy.md(new)src/lib.rs— add/// # Errorsrustdoc sectionsDifficulty Easy. Estimated Effort S.
Labels
area:documentation,area:smart-contract-safety,priority:mediumImported from
docs/open-issues-draft.mdas draft issue #26 (commit7becd4b). Original draft-order cross-references in this body have been remapped to current GitHub issue numbers at import time.