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

Extend state/snapshot architecture to include epoch data #22

Closed
6 tasks done
sandford-ch opened this issue May 18, 2022 · 0 comments
Closed
6 tasks done

Extend state/snapshot architecture to include epoch data #22

sandford-ch opened this issue May 18, 2022 · 0 comments
Assignees
Labels
Story Issue covering a requirement as user story

Comments

@sandford-ch
Copy link

sandford-ch commented May 18, 2022

User story

As (who?)
As a backend engineer
I want (what?)
I want to save and aggregate epoch data and access it easily
So that (why?)
I can provide high quality data for the dashboards

Acceptance criteria

  • Given a new snapshot, when the snapshot is saved, the corresponding periodStart must be saved as well.
  • Given a new pool created event, when the pool is initialized, a first Epoch must be created
  • Given a epoch closed event, the epoch should be closed, the time updated and a new epoch must be initialised
  • Given a Epoch executed event, the corresponding epoch executed timestamp must be updated
  • Given a epoch executed event, the token prices for different tranches should be saved in the epoch
  • Given the progression of epochs, the references in the pool model must be kept up to date.
@sandford-ch sandford-ch added the Story Issue covering a requirement as user story label May 18, 2022
@filo87 filo87 changed the title Extend state/snapshot architecture to epochs Extend state/snapshot architecture to use epoch data epochs May 27, 2022
@filo87 filo87 changed the title Extend state/snapshot architecture to use epoch data epochs Extend state/snapshot architecture to use epoch data from epochs May 27, 2022
@filo87 filo87 changed the title Extend state/snapshot architecture to use epoch data from epochs Extend state/snapshot architecture to use epoch data May 30, 2022
@filo87 filo87 changed the title Extend state/snapshot architecture to use epoch data Extend state/snapshot architecture to include epoch data Jun 1, 2022
@filo87 filo87 closed this as completed Jun 1, 2022
hieronx pushed a commit that referenced this issue Dec 22, 2022
* 74 index loanentity data types (#86)

* feat: create loanService

* refactor: improved service getters

* feat: increase outstandingDebt on borrowings

* feat: basics for handle loan prices

* feat: save priced loans

* feat: activate loan when priced

* feat: handle writeoffs

* feat: handle loan closed and write offs

* fix: loan.repay() should increase totalRepaid

* fix: invest execution decimals and avoid empty transactions (#87)

* 82 add prices to all investortransaction types (#88)

* chore: update chain data

* feat: extend InvestorTransaction decoration and refactor

* feat: use rpc prices from trancheTokenPrices() when investor transactions are processed (#89)

* feat: improved loans and borrower transactions (#90)

* 63 convert outflows to dai (#91)

* feat: add currency value for redeem fields

* fix: currency conversion should support null prices

* 98 failing poolservicegettranchetokenprices causes period to be skipped for remaining pools (#99)

* ci: fix deployment version

* fix: handle missing price updates from RPC

* fix: throw errors on missing prices

* feat: aggregate total investments and repayments for epoches (#100)

* feat: index accounts and tranche balances (#101)

* docs: add deployment status badge

* Update README.md

docs: fix badge link to deployment workflow

* feat: tracking loans history with state snapshot (#102)

* 56 handle updates to pool information poolsupdated event (#106)

* chore: upgraded packages

* feat: track pool updates

* 103 totalinvested  and totalredeemed  are missing in poolsnapshot (#107)

* fix: add missing properties to snapshot

* deploy: update node and query versions

* fix: pool investment and redemptions totals

* feat: indexing missing values (#108)

* ci: updated deployment

* ci: upgraded packages

* feat: paginated getters for snapshots and models (#109)

* chore: upgrade packages

* 104 track currency balances for accounts (#111)

* feat: add data model for currency balances

* feat: track endowments withdrawals and deposits of currency

* feat: get initial balance on currency balance init

* ci: revert subql/node version

* 112 develop suitable unit testing approach (#117)

* test: fundamental approach

* test: poolHandlers testing

* test: run pools and tranche tests in CI

* test: include generation of entities

* ci: execute testing in correct order

* docs: updated data model diagram (#118)

* 115 extend kpis as from spreadsheet (#119)

* feat: aggregate loan writeoffs and total overdue

* feat: index additional data

* chore: remove unnecessary imports

* feat: parse and index loanSpecs

* fix: indexing of overdue amount

Co-authored-by: Timon <timon@embrio.tech>
filo87 added a commit that referenced this issue Nov 3, 2023
* 74 index loanentity data types (#86)

* feat: create loanService

* refactor: improved service getters

* feat: increase outstandingDebt on borrowings

* feat: basics for handle loan prices

* feat: save priced loans

* feat: activate loan when priced

* feat: handle writeoffs

* feat: handle loan closed and write offs

* fix: loan.repay() should increase totalRepaid

* fix: invest execution decimals and avoid empty transactions (#87)

* 82 add prices to all investortransaction types (#88)

* chore: update chain data

* feat: extend InvestorTransaction decoration and refactor

* feat: use rpc prices from trancheTokenPrices() when investor transactions are processed (#89)

* feat: improved loans and borrower transactions (#90)

* 63 convert outflows to dai (#91)

* feat: add currency value for redeem fields

* fix: currency conversion should support null prices

* 98 failing poolservicegettranchetokenprices causes period to be skipped for remaining pools (#99)

* ci: fix deployment version

* fix: handle missing price updates from RPC

* fix: throw errors on missing prices

* feat: aggregate total investments and repayments for epoches (#100)

* feat: index accounts and tranche balances (#101)

* docs: add deployment status badge

* Update README.md

docs: fix badge link to deployment workflow

* feat: tracking loans history with state snapshot (#102)

* 56 handle updates to pool information poolsupdated event (#106)

* chore: upgraded packages

* feat: track pool updates

* 103 totalinvested  and totalredeemed  are missing in poolsnapshot (#107)

* fix: add missing properties to snapshot

* deploy: update node and query versions

* fix: pool investment and redemptions totals

* feat: indexing missing values (#108)

* ci: updated deployment

* ci: upgraded packages

* feat: paginated getters for snapshots and models (#109)

* chore: upgrade packages

* 104 track currency balances for accounts (#111)

* feat: add data model for currency balances

* feat: track endowments withdrawals and deposits of currency

* feat: get initial balance on currency balance init

* ci: revert subql/node version

* 112 develop suitable unit testing approach (#117)

* test: fundamental approach

* test: poolHandlers testing

* test: run pools and tranche tests in CI

* test: include generation of entities

* ci: execute testing in correct order

* docs: updated data model diagram (#118)

* 115 extend kpis as from spreadsheet (#119)

* feat: aggregate loan writeoffs and total overdue

* feat: index additional data

* chore: remove unnecessary imports

* feat: parse and index loanSpecs

* fix: indexing of overdue amount

Co-authored-by: Timon <timon@embrio.tech>
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

When branches are created from issues, their pull requests are automatically linked.

2 participants