[Docs] ARCHITECTURE.md's Action Signing Model omits Cancel, wrongly implies only Top-up is custodial
Labels: docs, backend, security, third-wave-audit File/location: docs/ARCHITECTURE.md:251-262 ; backend/src/controllers/stream/cancel.ts:90-96
Description:
docs/ARCHITECTURE.md's 'Action Signing Model' section lists only Top-up, Withdraw, Pause/Resume, and Create, states 'Only top-up is intentionally custodial. All other mutating actions must be wallet-signed by the user,' and does not mention Cancel at all. In actual code, backend/src/controllers/stream/cancel.ts reads process.env.KEEPER_SECRET_KEY and calls sorobanService.cancelStream(parsedStreamId, secretKey), i.e. the backend signs and submits the on-chain cancel transaction server-side with the same custodial keeper key used for top-up — cancel is just as custodial as top-up, not wallet-signed. A contributor or security reviewer relying on this table to reason about which endpoints hold custodial risk would be misled about a second fully custodial, fund-moving action.
Acceptance Criteria:
- [ ] docs/ARCHITECTURE.md's Action Signing Model table adds a Cancel row reflecting that it is server/custodial-signed via KEEPER_SECRET_KEY, matching cancel.ts.
- [ ] The prose 'Only top-up is intentionally custodial...' is corrected to also name Cancel, or generalized to describe the actual set of custodial vs wallet-signed actions.
- [ ] A quick grep of backend/src/controllers/stream/*.ts for KEEPER_SECRET_KEY usage confirms the corrected table matches which handlers actually sign server-side.
Notes: Verified by reading cancel.ts in full: it fetches KEEPER_SECRET_KEY, 500s if unset, and calls sorobanService.cancelStream with it — the same secret and pattern top-up uses. This is distinct from the already-closed #545 (env var naming ambiguity between SOROBAN_SECRET_KEY and KEEPER_SECRET_KEY) and from #566 (auth middleware inconsistency); this is specifically about the documented signing-custody model being incomplete/incorrect about which mutating action is custodial.
I reviewed docs/ARCHITECTURE.md:251-262 against backend/src/controllers/stream/cancel.ts:90-96. The Action Signing Model table only lists top-up as custodial, but cancel.ts reads KEEPER_SECRET_KEY and calls sorobanService.cancelStream server-side with it, the same custodial pattern as top-up. My fix adds a Cancel row to the table marking it server/custodial-signed via KEEPER_SECRET_KEY, corrects the "only top-up is intentionally custodial" prose to name both actions, and greps backend/src/controllers/stream/*.ts for KEEPER_SECRET_KEY usage to confirm the corrected table matches every handler that actually signs server-side. This is a scoped, verifiable docs fix, I can turn it around quickly.
Hi! I’d like to work on this issue if it’s still available. I have experience building web applications with React, Next.js, and NestJS, and I’m comfortable working with Git and collaborative development workflows. I’m confident I can implement a clean, maintainable solution while following the project’s contribution guidelines.
Hi,
I have experience with similar implementations and would like to take this on.
Implementation approach:
- Audit storage layout and state invariants ensuring strict auth guards.
- Implement deterministic state transitions with safe checked arithmetic.
- Add hermetic unit and regression tests covering authorized, unauthorized, and boundary edge cases.
- Profile instruction and CPU/gas limits under Soroban host environment.
Please assign this to me if the plan looks good. Thanks!
@Starkid591 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Please give me a chance to fix this issue I won't disappoint please 🥺
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Starkid591 to this issue.
@CHKM001 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello Chief I have gone through the task and can implement within a few hours of work. Please assign for successful completion within 4-6 hours of work
ℹ️ Repo Maintainers: To accept this application, review their application or assign @CHKM001 to this issue.
@codedbytejas has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hi! I’d like to take ownership of #1547 in FlowFi also #1828. I’ll update the Action Signing Model documentation to accurately reflect custodial signing for both Top-up and Cancel, verify the relevant handlers, and keep the changes focused and consistent with the implementation. Could you please assign this issue to me? though i have good connection with boss oladele banjo!!Thank you!
ℹ️ Repo Maintainers: To accept this application, review their application or assign @codedbytejas to this issue.
@helenahelenavanbeek-png has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
I would like to work on this issue. I have experience with Rust and Soroban smart contract development. I will follow the acceptance criteria and add tests. Excited to contribute. Kindly assign.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @helenahelenavanbeek-png to this issue.
@fadesany has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello maintainer, i would like to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @fadesany to this issue.
Congratulations, @fadesany! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @fadesany: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been completed by @fadesany as part of the Stellar Wave Program's 10th Wave 🥳
😎 @fadesany: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.