A different take on blockchain with encrypted functions

While blockchain remains highly volatile, both as a technology and as assets tied to them, I’d like to take a step back and review the approach.

What is a blockchain? It’s a linked list of events, linked together through some cryptographic hashing mechanism, that forever ties one block to another. And such a blockchain is helpful because it removes the need for a third-party to orchestrate the process.

This construct is sequential in nature, and hence practically single threaded. While there are many very nice attributes tied to something which is single threaded, like the ease of reasoning on its current state, there’s also a lot of drawbacks. And while I think we’d all like to keep the benefits of having one smart contract call another, hence allowing for “DeFi Legos” and similar, it doesn’t allow us to solve for the scaling issues.

When trying to solve for these scaling issues, L2s (layer 2s) have been proposed as a good approach. An L2 will remove some of that sequential blockchain nature by introducing another blockchain of some kind, and linking this blockchain through some method to the L1 blockchain. This can solve a lot of issues for sure, but it does remove that nice property of “single threaded reasoning” as mentioned above.

Can we maintain “single threaded reasoning” while still scaling the system?

What if we break it down to interactions between agents managing wallets? You want to send me $100? Let your agent speak to my agent. The agent is of course an app, for example running on your phone, and any transfer or interaction is a point-to-point action, requiring only the parties involved.

This scales very nicely, and if you send me $100, I can then pass these on afterwards, keeping the logic “single threaded” at the temporary pairing of our agents.

But how can this be done in practice? What stops my agent from lying and saying I’ve got $100 when I don’t? This is the problem blockchains solve for, as they maintain that single source of truth. And an agent model like above wouldn’t represent a single source, but instead an infinite number of sources, some very questionable.

We need a few new tools to solve for this.

Firstly, we’ll need encrypted functions, providing mobile code privacy.

View these encrypted functions much like the smart contracts of today. They represent some immutable code, encrypted in such a manner that they can’t be abused to produce any unexpected output given some input. And they can achieve this on untrusted hardware, like your phone.

The source of encrypted functions is some tamper resistant storage like a blockchain or IPFS, and you trust these functions as much as you trust smart contracts on Ethereum to do what they claim.

But these encrypted functions only solve one problem: Trusting the functionality of the encrypted code to function as described on all hardware.

It does not solve for other issues, like replay attacks. If I give it the same input (say, I still have $100 in my wallet) over and over, I’m allowed to double spend this as new output (say, me transferring this to party A, B, and C, over and over).

This is where blockchains remain in the loop, as a single source of truth. Because at each iterative and functionally verified state of my wallet, it hashes to a distinct value. And if I publish this value to a blockchain, either directly or through some L2 system, the other party I’m currently interacting with can be certain that they are in fact viewing the latest and greatest version of my wallet. Two agents interacting, tangle their wallets, pushing both their individual hashes forward in predictable manners.

What other benefits would this solve, other than computational scalability issues with current blockchain smart contract platforms?

It also solves for privacy. While today, the data on a blockchain is either public, or made private through some very complex mechanisms, with encrypted functions operating on local wallets, only the hash (or some other comparable proof) of these wallets are made public. The wallets themselves are only shown (in part or in full) to those I’d like to share it with, and keeping it private remains simple. What I keep secret remains secret.