flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[fix] Use indexed protocol fees in accounting exports

Open K1NGD4VID opened this issue 1 month ago • 7 comments

Labels: bug, backend, high-priority, points: 150 File/location: backend/src/services/export.service.ts:61

Description: Exports invent a fixed 0.5% fee on WITHDRAWN events, whereas the contract charges configurable fees on create/top-up. This changes reported net payouts and fees even when protocol fee is zero.

Acceptance Criteria:

  • [ ] Derive reported fees and net payouts from indexed fee events and actual contract semantics, without imposing a fixed withdrawal fee.
  • [ ] Verify zero-fee and nonzero configurable-fee create/top-up/withdrawal lifecycles in both export formats.

Notes: Executed the mapper: a 10000000-unit withdrawal reported a fabricated 50000-unit fee and net 0.9950000.

Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1191. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.

K1NGD4VID avatar Oct 21 '26 17:10 K1NGD4VID

@AminMG044 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello, I examined the issue and believe the required changes are well within scope. I have an implementation approach in mind and can provide a clean, properly tested PR

ℹ️ Repo Maintainers: To accept this application, review their application or assign @AminMG044 to this issue.

AminMG044 avatar Oct 21 '26 20:10 AminMG044

@d3vobed has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

i can resolve this issue please assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @d3vobed to this issue.

d3vobed avatar Oct 21 '26 21:10 d3vobed

@Rampop01 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 understand the assignment and the requirements, and I’m confident in the approach needed to deliver the best solution. Kindly assign this task to me.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Rampop01 to this issue.

Rampop01 avatar Oct 21 '26 22:10 Rampop01

@intelliDean has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I'd like to work on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @intelliDean to this issue.

intelliDean avatar Oct 21 '26 22:10 intelliDean

Congratulations, @Rampop01! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @Rampop01: 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 🌊

drips-wave[bot] avatar Oct 21 '26 22:10 drips-wave[bot]

Hi @LabsCrypt team, I have completed the fix for this issue in branch https://github.com/Rampop01/flowfi/tree/fix/issues-1698-1699-1700-1701. However, opening a pull request to LabsCrypt/flowfi is currently restricted with 'must be a collaborator'. Could you please send a repository collaboration invite or lift the restriction so I can submit the PR? Thanks!

Queenode avatar Oct 21 '26 23:10 Queenode

This issue has been completed by @Rampop01 as part of the Stellar Wave Program's 10th Wave 🥳

😎 @Rampop01: 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.

drips-wave[bot] avatar Oct 22 '26 05:10 drips-wave[bot]