Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

lending: Fix obligation interest accrual #1068

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

jstarry
Copy link
Contributor

@jstarry jstarry commented Jan 14, 2021

Problem

Obligation interest calculation is overcomplicated and untested

Changes

  • Simplify obligation interest calculation
  • Add tests for obligation repayment

@jstarry jstarry requested a review from joncinque January 14, 2021 12:09
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great test, and much easier to understand -- nice! It might be worth adding a proptest for interest accrual to make sure it's behaving properly.

@jstarry
Copy link
Contributor Author

jstarry commented Jan 14, 2021

It might be worth adding a proptest for interest accrual to make sure it's behaving properly.

Totally, I have one in the checked math PR. Will follow up there

@jstarry jstarry merged commit 2859fbe into solana-labs:master Jan 14, 2021
@jstarry jstarry deleted the fix-obligation branch January 14, 2021 23:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants