Problem
Interest rate calculation currently happens off-chain
in the API. This means the API can charge any interest
rate regardless of what the parameters and reputation
contracts say.
What To Build
- On-chain interest calculation in create_loan()
- Store monthly_payment, interest_rate_bps, total_repayment
- Update repay_installment() to use stored values
Files To Touch
- contracts/creditline-contract/src/lib.rs
- contracts/creditline-contract/src/types.rs
- contracts/creditline-contract/src/tests.rs
Acceptance Criteria
Mandatory Checks Before PR
Problem
Interest rate calculation currently happens off-chain
in the API. This means the API can charge any interest
rate regardless of what the parameters and reputation
contracts say.
What To Build
Files To Touch
Acceptance Criteria
Mandatory Checks Before PR