On this forum we’ve talked before about having ledgers/chains per asset on SAFE, to get some of the benefits that the blockchain offers while being very fast and more scalable (because every asset has it’s own ledger). The idea relies on deterministic addressing and immutability of data, together preventing double spending. There was just the spam problem, everyone would be able to append invalid entries to the ledger, possibly making validation of such ledger an incredibly resource intensive task.
This morning an idea popped in my head. What if the deterministic address of the next entry can only be calculated by the latest owner of the asset, but which can be proven to be correct to everyone else once the entry has been made? I then proceeded to realize that that is exactly what cryptographic signatures offer.
So rather than a simple rule that for example the next entry’s address is the hash of the previous one, we change it so that the next entry’s address is the hash of the current owner’s signature over the previous entry.
Executing a valid transaction would be composed of the following steps (by current owner):
- Calc your signature over last ledger entry (which transferred the asset to you)
- Post new ledger entry under address SHA512(signature) containing:
- Signature of previous owner over second to last ledger entry
- Public key of the next recipient
- Change owner of this new ledger entry to some invalid value (making it immutable)
- Send your signature to the next recipient
Now the ball is completely in the recipient’s court, that person is now the only one able to append a new entry to the ledger. Using the received signature, that person can back-track and validate the entire ledger’s history to make sure no double spending took place.
There’s even a degree of privacy, as long as the previous owner and the current owner don’t tell anyone what the previous owner’s signature was, none else would be able to find the latest ledger entry.
It’s also possible to do this opt-in/opt-out style for SD assets, like SafeCoins. Then the actual SD should be transferred along with any new entries. The SD’s data field could be updated to the latest signature, removing the need to message this signature to the next recipient, and if left there, making the ledger publicly readable.
Using this system, we can have ledgers for all kinds of assets that operate at network speed, are very scalable, cannot be spammed, and that stay incredibly small compared to blockchains.