You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MaintenancePoolService.assignReward never checks MaintenancePool.status, so a PAUSED or CLOSED pool can still be drained #276
deposit() explicitly enforces pool lifecycle state at src/maintenance-pool/maintenance-pool.service.ts:54-56:
if(pool.status!==MaintenancePoolStatus.ACTIVE){thrownewBadRequestException(`Pool ${id} is not ACTIVE`);}
MaintenancePoolStatus (src/common/enums) has three values: ACTIVE, PAUSED, CLOSED. But assignReward (lines 87-133) never reads pool.status at all — it only checks escrowId, the repository match, and the balance. As long as a pool has escrowId set and balance > 0, a MAINTAINER can keep calling POST /:id/assign-reward against it regardless of whether the pool has been explicitly PAUSED (e.g. because of a suspected compromise or a sponsor dispute) or CLOSED (e.g. the sponsor stopped funding it and expects remaining balance to be refunded, not spent).
This is a real, verified inconsistency between the two mutating methods on the same entity, and defeats the entire purpose of the status field for one of its two write paths — a pool an admin believes they've "paused" can continue paying out until its balance hits zero.
Fix: add the same pool.status !== MaintenancePoolStatus.ACTIVE guard (or a narrower one that also allows a PAUSED pool to be read but not spent from) to assignReward before the balance check.
I would like to take on and implement this issue: MaintenancePoolService.assignReward never checks MaintenancePool.status, so a PAUSED or CLOSED pool can still be drained.
Technical Implementation Roadmap:
Deep Codebase Audit: Inspect current architecture and data flows in MergeFi/backend to design an optimal, idiomatic solution.
Core Modular Implementation: Implement MaintenancePoolService.assignReward never checks MaintenancePool.status, so a PAUSED or CLOSED pool can still be drained with clean separation of concerns and robust error handling.
Comprehensive Automated Test Matrix: Add end-to-end integration and unit tests covering positive execution and edge failure modes.
Production CI Verification: Ensure all linters, formatting checks, and GitHub Actions workflows pass with 100% green status.
I am ready to begin implementation immediately upon assignment and will deliver a high-quality, fully-tested PR. Please assign this issue to me!
@wonderfulmarv01 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
I have solid development experience, deliver tasks on time, and take ownership of my work. I’m confident I can make consistent, high-quality contributions to Drips.
@Saibot1310 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Hello maintainer,
I would like to apply to this issue. I can update assignReward to ensure that rewards can only be assigned from pools with an ACTIVE status, keeping its behavior consistent with deposit(). I will also add or update the relevant tests for ACTIVE, PAUSED, and CLOSED pools and keep the changes scoped to this issue.
Congratulations, @boys-cyberhub! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
🧑💻 @boys-cyberhub: 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.
😎 @boys-cyberhub: You earned 200 Points for completing this issue! After the current Wave ends, 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.
Activity
Ranjeet2063 commentedon Sep 20, 2026
Hi maintainers,
I would like to take on and implement this issue:
MaintenancePoolService.assignReward never checks MaintenancePool.status, so a PAUSED or CLOSED pool can still be drained.Technical Implementation Roadmap:
MergeFi/backendto design an optimal, idiomatic solution.MaintenancePoolService.assignReward never checks MaintenancePool.status, so a PAUSED or CLOSED pool can still be drainedwith clean separation of concerns and robust error handling.I am ready to begin implementation immediately upon assignment and will deliver a high-quality, fully-tested PR. Please assign this issue to me!
wonderfulmarv01 commentedon Sep 23, 2026
@wonderfulmarv01 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @wonderfulmarv01 to this issue.
Saibot1310 commentedon Sep 23, 2026
@Saibot1310 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Saibot1310 to this issue.
boys-cyberhub commentedon Sep 23, 2026
@boys-cyberhub has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @boys-cyberhub to this issue.
drips-wave commentedon Sep 23, 2026
Congratulations, @boys-cyberhub! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
🧑💻 @boys-cyberhub: 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 🌊
fix: critical bugs #276 #277 #278 #279
Merge pull request #420 from boys-cyberhub/fix/critical-bugs-276-279
grantfox-oss commentedon Sep 23, 2026
🎉 This issue has been marked as completed on GrantFox!
@boys-cyberhub's PR #420 was approved and merged by @chonilius.
🏆 @boys-cyberhub: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (958 total points). Track your full progress on GrantFox.
👏 Great work, @boys-cyberhub! Keep contributing to MergeFi.
drips-wave commentedon Sep 23, 2026
This issue has been completed by @boys-cyberhub as part of the Stellar Wave Program's 9th Wave 🥳
😎 @boys-cyberhub: You earned 200 Points for completing this issue! After the current Wave ends, 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.