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
[Contracts] LoanManager uses raw panics for user-facing failures instead of typed LoanError returns #8
Several user-reachable paths in loan_manager/src/lib.rs panic with strings rather than returning LoanError: repay does panic!("repayment amount below minimum"), set_min_repayment_amount panics on negative input, and adjust_total_outstanding does panic!("total outstanding underflow"). Panics produce untyped traps that clients cannot match on, unlike the existing structured LoanError enum used elsewhere.
Acceptance criteria
Replace user-reachable panics in repay and set_min_repayment_amount with typed LoanError variants (adding a variant such as RepaymentBelowMinimum if needed)
Keep internal invariant panics (truly-unreachable underflow) but document why they cannot be triggered by inputs
Add tests asserting the typed errors are returned for below-minimum repayment and negative min repayment
Audit the lending_pool withdrawal_cooldown panic for the same treatment
I’d like to work on this issue because it aligns closely with the kind of engineering problems I enjoy solving — building reliable, maintainable, and user-focused software. I’m particularly interested in contributing to real-world systems where code quality, scalability, and thoughtful implementation matter.
Activity
BigJohn-dev commentedon Jun 17, 2026
I’d like to work on this issue because it aligns closely with the kind of engineering problems I enjoy solving — building reliable, maintainable, and user-focused software. I’m particularly interested in contributing to real-world systems where code quality, scalability, and thoughtful implementation matter.
Dopezapha commentedon Jun 20, 2026
Hey maintainer, I would love to work on this issue. Kindly assign me the issue. Thanks
grantfox-oss commentedon Jun 20, 2026
🦊 GrantFox — @BigJohn-dev has been assigned to this issue as part of the Official Campaign campaign!
Next steps:
Closes #8)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jun 20, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign campaign!
@BigJohn-dev's PR #37 was approved and merged by @ogazboiz.
🏆 @BigJohn-dev: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (83 total points). Track your full progress on GrantFox.
👏 Great work, @BigJohn-dev! Keep contributing to LabsCrypt.