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 refinance_loan returns InsufficientScore for an insufficient-collateral condition #6
In loan_manager/src/lib.rs refinance_loan, the check if loan.collateral_amount < new_amount { return Err(LoanError::InsufficientScore); } returns the wrong error variant. A dedicated InsufficientCollateral = 26 variant already exists in the LoanError enum but is unused here, so callers receive a misleading error and cannot distinguish a credit-score failure from a collateral shortfall.
Acceptance criteria
Return LoanError::InsufficientCollateral for the collateral coverage check in refinance_loan
Audit other LoanError returns for similarly misused variants
Add a test asserting refinance with insufficient collateral returns InsufficientCollateral
Confirm InsufficientCollateral is actually exercised somewhere after the fix
Activity
Godbrand0 commentedon Jun 17, 2026
hello, i would like to work on this issue
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 — @Godbrand0 has been assigned to this issue as part of the Official Campaign campaign!
Next steps:
Closes #6)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Jun 23, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign campaign!
@Godbrand0's PR #43 was approved and merged by @ogazboiz.
🏆 @Godbrand0: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (83 total points). Track your full progress on GrantFox.
👏 Great work, @Godbrand0! Keep contributing to LabsCrypt.