[Audit] Fee-collection events are the only handler not wrapped in a transaction, and worker inconsistency compounds UX-visible drift
Filed from the second-wave repository audit (issue 37/100). See the audit summary for full category context.
- Location:
backend/src/workers/soroban-event-worker.ts:1000-1060(handleFeeCollected) - Problem: Unlike every other event handler in the file, this one performs its dedup check and its upsert as two separate top-level
prismacalls instead of oneprisma.$transaction, reopening a TOCTOU window the rest of the file was clearly designed to avoid. - Evidence: No
$transactionwrapper, in contrast to sibling handlers in the same file. - Suggested implementation: Wrap the dedup-check + upsert in
prisma.$transaction, matching the other handlers. - Acceptance criteria: A test simulating two near-simultaneous fee-collected events for the same tx confirms exactly one
StreamEventrow is created. - Difficulty: S
- Expected impact: Closes a duplicate-fee-event race visible to anyone reconciling fee revenue from the API.
Hello and good day. I'm experienced and would love to resolve your issues in no time. Thank you
@abimbolaalabi has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Please assign this to me!
ℹ️ Repo Maintainers: To accept this application, review their application or assign @abimbolaalabi to this issue.
@michealross has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Let me work on this.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @michealross to this issue.
@iyanukid2008-pixel has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
Hello maintainer, after reviewing this issue and it requirements, it falls under my section, and I'll like to solve this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @iyanukid2008-pixel to this issue.
@d1a-m3n has applied to work on this issue as part of the Stellar Wave Program's 8th wave.
pls assign me to this task, i can work on it
ℹ️ Repo Maintainers: To accept this application, review their application or assign @d1a-m3n to this issue.
Congratulations, @d1a-m3n! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on August 31, 2026.
🧑💻 @d1a-m3n: 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 removed from the Stellar Wave Program by the repository maintainers.
@d1a-m3n, you have been unassigned from this issue. If you have any questions, please reach out to the repo maintainers.
@Raheemah2k26 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
Hi maintainer, I can get this issue fixed quickly. Please assign it to me
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Raheemah2k26 to this issue.
Congratulations, @Raheemah2k26! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.
🧑💻 @Raheemah2k26: 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 @Raheemah2k26 as part of the Stellar Wave Program's 11th Wave 🥳
😎 @Raheemah2k26: 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.