Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Extend loan to time series with state snapshot model #95

Closed
2 tasks done
sandford-ch opened this issue Sep 8, 2022 · 2 comments · Fixed by #102
Closed
2 tasks done

Extend loan to time series with state snapshot model #95

sandford-ch opened this issue Sep 8, 2022 · 2 comments · Fixed by #102
Assignees
Labels
Story Issue covering a requirement as user story

Comments

@sandford-ch
Copy link

sandford-ch commented Sep 8, 2022

Acceptance criteria

@sandford-ch sandford-ch added the Story Issue covering a requirement as user story label Sep 8, 2022
@sandford-ch sandford-ch self-assigned this Sep 8, 2022
@filo87 filo87 changed the title index loan data types Extend loan to time series wit state snapshot model Sep 14, 2022
@filo87 filo87 changed the title Extend loan to time series wit state snapshot model Extend loan to time series with state snapshot model Sep 14, 2022
@filo87
Copy link

filo87 commented Sep 15, 2022

Info for reconstructing outstanding debt:

https://github.com/centrifuge/centrifuge-chain/blob/parachain/pallets/loans/src/lib.rs#L192

https://github.com/centrifuge/centrifuge-chain/blob/parachain/pallets/loans/src/lib.rs#L203

https://github.com/centrifuge/centrifuge-chain/blob/parachain/pallets/loans/src/lib.rs#L212

In loans, you get per loan the normalized_debt. To get the total outstanding debt, you need to get accumulated_rate from https://github.com/centrifuge/centrifuge-chain/blob/parachain/pallets/interest-accrual/src/lib.rs#L155 for the interest rate of the loan, and outstanding debt = normalized_debt * accumulated_rate

@filo87
Copy link

filo87 commented Sep 27, 2022

Here only the

  • indexing of outstandingDebt

is still pending

@filo87 filo87 linked a pull request Sep 28, 2022 that will close this issue
sophialittlejohn pushed a commit that referenced this issue Jan 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Story Issue covering a requirement as user story
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants