Refactor: Split InterestAccrual
trait: interest & debt
#1231
Labels
crcl-cross-chain
Circle cross-chain related.
I6-refactoring
Code needs refactoring.
P2-nice-to-have
Issue is worth doing.
Which part of the code is the issue addressing?
Description
Analyzing
interest-accrual
pallet and talking with @branan. It seems like its main purpose is accumulating interest (no big discovery here 😆), but without any knowledge of what debt is or it is computed. In fact, the debt logic does not make use of the storage and is built on top of the accumulated rates. So we have two things:We could divide it into two layers:
How will this affect the code base
What are forseen obstacles or hurdles to overcome?
No migration is needed. Storage remains without change.
The text was updated successfully, but these errors were encountered: