Paper 2023/347
Programmable Payment Channels
Abstract
One approach for scaling blockchains is to create bilateral, offchain channels, known as payment/state channels, that can protect parties against cheating via onchain collateralization. While such channels have been studied extensively, not much attention has been given to programmability, where the parties can agree to dynamically enforce arbitrary conditions over their payments without going onchain. We introduce the notion of a programmable payment channel ($\mathsf{PPC}$) that allows two parties to do exactly this. In particular, our notion of programmability enables the sender of a (unidirectional) payment to dynamically set the terms and conditions for each individual payment using a smart contract. Of course, the verification of the payment conditions (and the payment itself) happens offchain as long as the parties behave honestly. If either party violates any of the terms, then the other party can deploy the smart contract onchain to receive a remedy as agreed upon in the contract. In this paper, we make the following contributions: -- we formalize $\mathsf{PPC}$ as an ideal functionality $\mathcal{F}_{\mathsf{PPC}}$ in the universal composable framework, and build lightweight implementations of applications such as hash timelocked contracts (HTLCs), "reverse HTLCs", and rock-paper-scissors in the $\mathcal{F}_{\mathsf{PPC}}$-hybrid model; -- we show how $\mathcal{F}_{\mathsf{PPC}}$ can be easily modified to capture the state channels functionality $\mathcal{F}_{\mathsf{SC}}$ (described in prior works) where two parties can execute dynamically chosen arbitrary two-party contracts (including those that take deposits from both parties) offchain, i.e., we show how to efficiently realize $\mathcal{F}_{\mathsf{SC}}$ in the $\mathcal{F}_{\mathsf{PPC}}$-hybrid model; -- we show an implementation of $\mathcal{F}_{\mathsf{PPC}}$ on blockchains supporting smart contracts (such as Ethereum), and provide several optimizations to enable concurrent programmable transactions---the gas overhead of an HTLC PPC contract is $<$ 100K, amortized over many offchain payments. We note that our implementations of $\mathcal{F}_{\mathsf{PPC}}$ and $\mathcal{F}_{\mathsf{SC}}$ depend on the CREATE2 opcode which allows one to compute the deployment address of a contract (without having to deploy it).
Metadata
- Available format(s)
- Category
- Applications
- Publication info
- Published elsewhere. Minor revision. ACNS 2024
- Keywords
- BlockchainLayer-2 Protocol
- Contact author(s)
-
yyang811 @ gatech edu
mominaei @ visa com - History
- 2024-02-12: last of 4 revisions
- 2023-03-09: received
- See all versions
- Short URL
- https://ia.cr/2023/347
- License
-
CC BY-NC-SA
BibTeX
@misc{cryptoeprint:2023/347, author = {Yibin Yang and Mohsen Minaei and Srinivasan Raghuraman and Ranjit Kumaresan and Duc V. Le and Mahdi Zamani}, title = {Programmable Payment Channels}, howpublished = {Cryptology {ePrint} Archive, Paper 2023/347}, year = {2023}, url = {https://eprint.iacr.org/2023/347} }