Right, so mostly yes, although I have some comments.
The best way to think about this in my experience is as accounting: you don’t commit your balance or the number of credits you have, but rather only the amounts of each transaction (ala bitcoin’s UTXO). Then, transactions have in their validation rules something like:
- Get all transactions that this agent has made and aggregate the balance
- Check against the limit they have at the moment of making the transaction (in the case of mutual credit, this is a negative credit limit). If the transaction amount violates the limit, reject the transaction.
I’ve never thought about “minting tokens” in a holochain context, but I guess you can achieve the same result by hardcoding in the validation rules that everyone started with some amount of credits, and aggregate the amounts from there.
The “decayment” of credits I would also encode in the validation rules, relying on the transactions being counter-signed and thus preventing someone from cheating about their timestamp. And yes, this counter-signature is the handshake protocol that the agents do p2p.
The easiest way to achieve this is to have the transaction history public inside the currency’s DHT, since if they are private the validation rules can’t access that data and we may be adding attack vectors. And yes, outside people can’t observe it if there is a membrane, but the participants can always choose to share it with the outside world.
If I’m understanding the pools correctly, I think it looks more like one agent (or multiple) having installed the DNAs for the two currencies, and thus being able to swap one for the other. Then, these agents can be managed by some authority; the point here is that in holochain you can’t “call a DNA” in abstract, you are always executing an action as an agent inside that DNA. Also, sending credits from one DNA to another is really tricky since validation rules do not cross DNA boundaries.
Is this making sense?