(This relates to the problem domain I have previously elaborated on here - though the exact details are not that important for this question)
I'm writing an analysis application for Blockchain (DeFi) smart contracts to help me learn DDD.
The source of truth for data and state is in fact the blockchain. I can always go to a blockchain node and query it for the latest up-to-date state. I parse this state into domain objects to perform my analysis.
I now have two related questions
1) Given I have no need to mutate or track the state of my objects then should they just be value-objects?
All I need is to query the blockchain and build objects that reference each other from memory. I can at any point go back to the source of truth to construct the current state of them.
What confuses me is that in the domain of Blockchain and smart contract the business domain is the technology domain, and every "thing (deliberately not saying entity" yet) has an intrinsic unique ID namely it's address. And while the blockchain needs to most definitely track state/life-cycle of these "things" my app really doesn't care and can just record this contract address as yet another attribute/property.
2) What happens if I want to cache/store calculation results persistently?
Now although I can just go back to source the computation and parsing is "expensive". If I wanted to persist the model and calculation results in my own data store does the answer change?
In this case I'm thinking I'd almost create another model which I use to capture/freeze and store computed state at a point in time. It wouldn't make much sense to persist the entire complex data structure as all that is needed is some base properties and meta-information computed about them.