Maximizing Off-chain Throughput With The Teechain

During Devcon3’s initial day, associate professor at Cornell University Emin Gün Sirer spoke to a packed room about the future of the Ethereum blockchain.

 On the topic of “Challenges Ahead for Smart Contracts,” Sirer said, “Writing protocols where everybody gets access to the same thing at about the same time without giving some kind of advantage to the bigger miners is difficult.” He affirmed that this difficulty is what has given rise to the rift taking place within the bitcoin mining community. He said that a block size that is too large creates an advantage for big miners, forcing smaller miners to collate resources into collectives. If the block size is too small, it will limit throughput, which is not good for transaction efficiency.

 Sirer quipped a comparison of the current pace of transaction throughput to “Ikea on a Saturday” or “a few transactions per second,” to which the crowd responded with laughter. In order to tackle the scaling dilemma facing blockchain platforms, Sirer and his team began by looking at swapping protocols.

Teechan is one such solution that Sirer looked at. It was developed on a type of technology that is already built into the microchips that Intel produces, which contain a conclave of embedded code. When a hash of that code is provided to another machine, it allows that machine to predict all the future behaviors from the microchip. Every possible move made by the chip that generated that hash code can be predicted by another system that contains the same code. Its trustworthiness is based on Intel’s reputation and the company has a huge stake in the performance of its chips. Sirer calls it a “Trusted Execution Environment” (TEE) and this is the value transfer protocol that his team based Teechan’s design on.

 Simply put, Teechan allows for the safe transfer of a private key between two parties with the guarantee that the receiving party cannot decrypt it. In turn, the verified private key transfer allows individuals to sign transactions without exposing the encrypted data, allowing for an arbitrage of information.

 Using the example of Alice and Bob, Sirer explained the process: “In the initial establishment phase, Alice and Bob securely swap keys with each other after they find that both of them are operating on top of TEEs. So this seems like an anathema, it’s like, I just gave my key to someone else, but no. I can do so securely knowing that she can’t get my key out. She can only do things that I authorize her to do.” Then the protocol makes a copy of the contract state into the keys, so that both contracts are locked inside both TEEs. On the actual chain, those contracts are frozen to keep them from being modified. In this case, individuals can authorize off-chain transactions until settlement takes place, at which point one of the parties updates the chain with the latest state, and after a multi-signature agreement, it can be verified.

 In the above example, two parties made off-chain transactions with guaranteed privacy. An expanded version of this protocol was developed further into Teechain, which Sirer called a generalized form of a Teechan, except that it allows for parties to interact with one another without sending messages directly; other parties form the links in the chain with the same guaranteed privacy. He said, “Alice and Bob are not directly communicating with each other. They might have other parties in mind ... and the payments go across multiple parties, and they are guaranteed to be atomic. That is, a transaction will not get stuck in the middle of, let’s say, of the countryside. [If] I want to pay from New York to San Francisco, my money will not be stuck in some contract in Ohio; it either happens or it doesn’t happen. It’s atomic [or instant swap].”

 Sirer said Teechain has been fully implemented across the Atlantic, having obtained the keys from Intel to perform signing, and that the types of numbers he’s seeing with this setup are in excess of 100,000 transactions per second per channel.

In response to ETHNews’ query regarding whether this technology could be used by medical providers as a means of governing their data with a blockchain-based system, Sirer responded, “Absolutely.” He went on to say the protocol would fall in line with HIPAA requirements, which say that data must be kept under strict custody rules.

 This tool isn’t completely developed and while it solves many problems, it also might create others. It will take time to fine-tune Teechain protocols to meet various use cases.