Skip to content

Conversation

ximinez
Copy link
Collaborator

@ximinez ximinez commented Oct 1, 2025

High Level Overview of Change

Do uncertain stuff over here to avoid messing up the main PR.

@ximinez ximinez added the DraftRunCI Normally CI does not run on draft PRs. This opts in. label Oct 1, 2025
@ximinez ximinez force-pushed the ximinez/lending-periodicpayment branch 3 times, most recently from c0efc3d to 5aa6e19 Compare October 3, 2025 02:10
- Will add those back later as the appropriate helpers are updated.
- Tests are not expected to pass.
- Tests are not expected to pass
@ximinez ximinez force-pushed the ximinez/lending-periodicpayment branch from 5aa6e19 to 6ea76df Compare October 3, 2025 02:12
- Loan tests are not expected to pass.
- Refactor Number to put rounding logic into reusable functions.
- Add Number tests to explicitly test rounding - may be redundant, but
  easy to reason about.  Verifies that the default rounding matches
  banker's rounding.
- Enable LoanManage. Apparently any remaining issues were fixed by the
  previous commit's cleanups.
- Partially enabled LoanPay.
@ximinez ximinez force-pushed the ximinez/lending-periodicpayment branch from b3aad53 to f8e4d98 Compare October 4, 2025 00:25
- Enable the rest of LoanPay.
- Start updating the helper functions.
- Tests are not expected to pass.
@ximinez ximinez force-pushed the ximinez/lending-periodicpayment branch from 893b4cb to fe8b184 Compare October 4, 2025 06:36
ximinez added 10 commits October 4, 2025 18:11
- Builds, but tests are not expected to pass
- Check "simple" loanMakePayment failure conditions early
- Ensure principal part is not bigger than whole payment.
- Add some documentation.
- Primarily updating tests, and fixing stuff that didn't work.
- Tests still not expected to pass.
- Add Json::Value::isMember(StaticString) so SFields can be used.
- Validate more fields in ValidLoan Invariant
- Tests not expected to pass.
- Check in LoanSet if a loan with interest actually has interest.
  tecPRECISION_LOSS if not.
- Add checks in LoanPay for deep froze broker owner and pseudoaccount.
- Fix management fee calculations in LoanPay and associated LoanBroker
  and Vault data updates.
- Make state tracking next payment due date optional.
- Add a test case showing multiple payments combined.
- Update more tests to work with the new fields.
- Implement AccountSendMulti
- Document the derivations of loan components.
- Add "loanPrincipalFromPeriodicPayment" helper.
- Removed sfReferencePrincipal
- LoanSet and LoanPay can create MPTokens as a side effect
- LoanPay will send the fee to cover if the broker owner is deep frozen,
  and fail if both of them are deep frozen.
- LoanPay will check auth for the receivers, or create holdings for the
  submitting account if needed.
- LoanSet will fail if principal requested is not positive
- Handle overpayment in a separate function
- Add a test helper to check that balance changes went as expected
- Fix more tests
@ximinez ximinez force-pushed the ximinez/lending-periodicpayment branch from 82ebffd to b5227f8 Compare October 9, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DraftRunCI Normally CI does not run on draft PRs. This opts in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant