A few times now, I have in my explorations of SAFE come back to safecoin and transactions.
I thought I’d offload my thinking here, put it to print, and hopefully get some new angles.
The differences between representing a coin with a data object, and as the result of ledger entries, seems to result in some differences in what we can do. Maybe my appreciation of the issue is disproportionate, maybe I am seeing a very small slice of the problem (well, more than likely that would be the case). But anyway, let’s see what we can arrive at.
If we look for example at a concept called event sourcing, it enables us to do things which we cannot do in an application architecture based on the traditional implementation of OO and another db structure than ES.
Accounting for example is event sourcing. It is a practice with millennia of use. When implementing event sourcing, I can represent a transaction between n different accounts, with the persistence of 1 event. This event either exists, or does not exist. There can be no inconsistencies. Like a ledger entry. (And this is the source of truth. Everything else is just a projection off of it, your account balance for example i.e. the number of safecoins you have.)
Trying to do this with a monetary value represented as a data object would not be possible. When you do the operation of mutating the state in one place, you also need to mutate state in some other place, for this transaction to be complete. It will always be a 2-phase commit, which inevitably will always be less robust than a 1-phase commit.
And something makes me think that this practice of accounting has shown to be very very robust as to survive for such a long time. It is as old as civilization itself. Now, this is not ants-old . But it is one of the older parts of the things humans has invented.
And there are some other things resulting from this, I believe.
I have been thinking about smart contracts on SAFENet, and I still need to do more research on the SAFE technology to open up my views on how this could be implemented.
If monetary value is represented as valid ledger entries, and a valid ledger entry is one with sufficient number of signatures, I see the process of transferring monetary value within SAFENet as a much more trivial task, than if the monetary value is represented as a data object.
Because, the actual signing of the ledger entry (the last one needed) is what ultimately will materialize the fact that it is now a transaction. It either is, or is not valid. And there are no additional actions needed but the signing.
That is not the case when working with a data object - as far as I see it at least. First something has to gather enough signatures, then this something has to act on that information.
Yes, a smart contract protocol on SAFENet could be constructed much like the disjoint groups, and a node with higher trust (age) would carry out the actions that the group has decided on. But I cannot wrap my head around how this is not a vulnerability. This is still 1 node, that supposedly uses legit source code when making the decision. But it has the power to carry out the operation regardless. … … … That is basically what I do not understand, how to safely let one node have this power.
It might very well be that I’m here just showing a fundamental lack of understanding this (how a safecoin transaction would be made for example), especially since I have not yet delved down deep enough in the system, the documentation and the discussions, as to be able to answer this for myself.
(And of course, the safecoin implementation is still very much subject for R&D for what I can see.)
Now all of this is without regards to the brilliant idea of the recycling of safecoin, and how this is enabled just because it is represented as a data object.