I have a sample loan use case, where I have two states:
- Invoice State, and
- Loan State.
Loan State is created by passing Invoice State as input.
Now as Corda follows UTXO model, when I do the default vault query, the Invoice state is not showed as it's consumed now.
To solve this, there are two possible ways:
- Either, I query on all states i.e consumed and unconsumed.
- Or, I can maintain a status at Invoice state and mark the status to something as Invoice paid after consuming it to create Loan State (So this is more like evolving state, something like bitcoin where balance is always getting transferred.). Something like this:
Can anybody please recommend what would be the correct architecture decision?