Despite the massive potential of the blockchain technology, bitcoin’s blockchain protocol has rather limited transaction throughput and latency rates. Throughout the past few years, massive efforts have been focused on addressing bitcoin’s scalability problem to boost adoption of the currency. Creating off-chain payment channels has appealed many researchers as convenient means for improving the transaction throughput rate and the low latency of bitcoin’s network. However, implementation of off-chain payment channels securely on top of the bitcoin protocol is an extremely difficult task, especially that secure deployment of such payment channels necessitates modification of the underlying protocol.
A group of researchers from Cornell University, London, published a paper that presented a framework for a full duplex off-chain payment channel that make full use of trusted execution environments that they named “Teechan”. The great thing about Teechan is that it can be securely implemented on the current bitcoin blockchain without having to do any changes to the bitcoin protocol.
As compared to other proposed solutions, Teechan can achieve higher transaction throughput rates with reduced transaction latency. It is also designed to allow limitless full duplex payments provided that the balance is not higher than the payment channel’s credit. Only one message is required to be sent for each transaction whatever its direction is. Teechan adds only 2 transactions to the blockchain within the context of any execution scenario; a setup transaction and a terminating transaction.
The researchers implemented Teechan onto bitcoin’s blockchain via Intel SGX. Their experiments showed that Teechan’s framework can enable the blockchain to handle 2,480 transactions per second via utilization of a single payment channel with latency below a millisecond. These represent impressive results given the fact that the blockchain now handles no more than 7 transactions per second.
An Overview of Teechan:
An efficient off-chain payment channel is created using a “setup transaction” that takes place on the blockchain, throughout which each contributing party deposits a credit amount. Whenever the payment channel is open, payments can be made between contributing parties via means of transaction messages that are sent by the payer and received by the payee. Only payments that have been granted by a contributing party can be claimed, which renders theft and fraud impossible. Whenever the channel is open, it will carry a balance that equals the difference between the amount of bitcoins spent in either direction. At any given time, the channel balance can never be greater than the credit of either of the channel’s contributing parties. Either contributing parties can terminate the payment channel and settle its balance via a terminating transaction that would be recorded on the blockchain. The terminating transaction will always mirror the balance that collectively represents all payments sent by the terminator and those received by him/her from the other contributing party. In such way, failures will only be reflected on the contributing party who failed to complete the payment channel’s set of transactions.
Parties engaging in a Teechan payment channel would only have to synchronize with bitcoin’s network during the period when the establishment of the payment channel takes place and also during its point of settlement. In other words, contributing parties needn’t monitor the blockchain throughout the whole lifetime of the payment channel.
As we mentioned earlier, Teechan is designed to make full use of trusted execution environments TEE to represent a third party between two parties within a payment channel. As the setup transaction is created, each contributing party is presented, in a secure manner, with mutual secrets that correspond to both contributing parties. The presented secrets can settle the payment channel at any given time whenever the payment channel is open, without the need for any cooperation from the other contributing party. While the Teechan payment channel is open, the contributing parties will maintain its state internally, and the TEE acts to ensure it is always free from tampering. Payment updates are executed using a secure interface. Teechan payment channels leverage the contributing parties’ secure execution of transactions which ensures that the payment channel will be successfully settled whenever termination is initiated. During termination, the terminator party will generate a bitcoin transaction that will be included in a block and recorded on the blockchain.