Skip to content

fix: accrue interest with bps denominator - #1443

Closed
silentgeckoaudit3801 wants to merge 2 commits into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-interest-accrual-bps-denominator-1307
Closed

fix: accrue interest with bps denominator#1443
silentgeckoaudit3801 wants to merge 2 commits into
LabsCrypt:mainfrom
silentgeckoaudit3801:fix-interest-accrual-bps-denominator-1307

Conversation

@silentgeckoaudit3801

Copy link
Copy Markdown

Closes #1307

Summary:

  • Use the standard 10,000 basis-point denominator for interest accrual instead of 100,000.
  • Add a regression test for a 10,000 principal loan at 1,200 bps over one full default term, expecting 1,200 accrued interest.

Validation:

  • Static GitHub API/source inspection only; local Soroban/Rust toolchain commands were not run to avoid installing or executing project dependencies in this environment.

@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: loan_manager lib.rs:359 already accrues with the 10_000 bps denominator. 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] accrue_interest computes interest ten times too low

2 participants