In this document, we explain how the standardized exit format facilitates a Nitro protocol optimization. Before explaining the optimization, we'll guide the reader through the complicated part of a virtual channel construction. Now, virtual channels are a meaty construct, so we first motivate virtual channels by considering how we could build payments for file torrenting.
Say Alice opens Web3Torrent, and wants to download a file. There are many (untrusted) peers that each have a piece of the file. Alice will establish a short-term relationship with each of these peers to download and pay for the peer's piece. To pay for each piece, Alice will stream micro payments to a seeder, Bob, in return for small sections of a file piece. After a piece is downloaded and paid for, Alice may never need to interact with the peer again.
How can Alice use Ethereum to pay for a torrent? Using L1 transactions is non-starter due to speed and cost. Rollups are still relatively slow and expensive for this use case since every Alice-to-peer micro payment will need to be sent to a sequencer and every transaction is included in L1 calldata. Basic state channels are a good start, but, for Alice to start paying a peer, Alice needs to submit a transaction to L1 (and the peer will need to submit another transaction to L1 to claim the final amount after the exchange is completed).
Virtually-funded channels are a novel state channel construction that uniquely enables paid file torrenting with a good user experience, as well as interesting use cases like decentralized Graph query payments, Filecoin content retrieval, incentivized state provider networks, etc.
In the various blockchain ecosystems, state channels are known as a way for a few participants to:
At statechannels.org, we have previously described the fundamentals of how to construct a channel, and how to fund one channel via another channel with a construction called ledger channels. These constructions have the limitation that channel participants must establish a direct relationship on-chain. In other words, if Alice and Bob have never interacted before and now would like to open a channel, Alice and Bob must sign an (off-chain) agreement and deposit funds into a contract.
Enter virtually-funded channels. Virtual state channels allow the following scenario:
For the paid torrenting scenario, Alice makes one L1 transaction to establish a channel with intermediary Irene. She can then connect with any number of peers, "virtually", as long as they also have a on-chain relationship with Irene. Once connected, she can stream payments in exchange for data.