Skip to content

fix: apply decrease_score floor as lower bound - #1433

Closed
silentgeckoaudit3801 wants to merge 1 commit into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-decrease-score-floor-bound
Closed

fix: apply decrease_score floor as lower bound#1433
silentgeckoaudit3801 wants to merge 1 commit into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-decrease-score-floor-bound

Conversation

@silentgeckoaudit3801

Copy link
Copy Markdown

Fixes #1317.

This corrects decrease_score so the score floor is applied as a lower bound with max(MIN_CREDIT_SCORE). The previous min(MIN_CREDIT_SCORE) capped every real decrease at the floor, turning a normal 500 -> 450 penalty into 300.

I added focused coverage for reducing a score above the floor while keeping the existing floor-at-300 regression intact.

Validation: static GitHub API/source inspection only; I did not run the contract test suite locally because this environment is avoiding dependency/toolchain execution.

@ogazboiz

ogazboiz commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

thanks for the PR. this was a real bug when you branched, but the same fix already landed on main: remittance_nft lib.rs:762 already applies decreased.max(MIN_CREDIT_SCORE). since the change is now redundant, closing this one to keep the queue clean. please branch from current main before your next fix PR, and feel free to reopen if I misread anything. if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0

@ogazboiz ogazboiz closed this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contracts] decrease_score uses the minimum as a ceiling, raising low scores

2 participants