Blockchain protocols exchange payment transactions securely, but their performance is limited by the need to achieve global consensus. Payment networks, as a second layer on top of blockchains, allow more efficient payments between parties. Existing payment networks, however, are fundamentally insecure: they assume synchronous blockchain access, i.e., that participants can write transactions to the blockchain within bounded time. As shown recently, attackers can delay transactions with current blockchains, which only offer best-effort write latencies, and thus steal funds. We describe Teechain, the first layer-two payment network that only requires asynchronous blockchain access. Teechain exploits trusted execution environments (TEEs) in modern CPUs: Teechain constructs a decentralised network of TEEs and uses TEEs to secure collateral funds in payment channels without further interaction with the blockchain. Since TEEs provide no availability guarantees and may be compromised themselves, Teechain mitigates against Byzantine TEE failures through a novel combination of chain replication and threshold secret sharing. Teechain achieves at least 33x higher transaction throughput than the Lightning Network with similar latencies, while placing 75% fewer transactions on the blockchain in the common case. A Teechain deployment with 30 machines can handle over 1 million Bitcoin transactions per second.
View on arXiv