This story was originally published on HackerNoon at:
https://hackernoon.com/your-ledger-stores-balances-i-built-one-that-stores-intentions.
A blockchain ledger records who owns what. I built one that records what each unit was given for, as a consensus rule, with spending gated by on-chain proof
Check more stories related to web3 at:
https://hackernoon.com/c/web3.
You can also check exclusive content about
#blockchain,
#web3,
#formal-verification,
#distributed-systems,
#smart-contracts,
#fintech,
#protocol-design,
#philanthropy, and more.
This story was written by:
@whysasha. Learn more about this writer by checking
@whysasha's about page,
and for more stories, please visit
hackernoon.com.
TL;DRIn the account model, a blockchain ledger is a map from Address to Amount. It knows who holds how much and nothing about what the money is for. When money is given for a fixed purpose, that missing field is the whole problem. So I made the state key (Address, Purpose), made non-reassignability a rule of the transition function, and put disbursement behind on-chain verification. Here is how it works, how it differs from ERC-1155 and colored coins, and where it still falls short.