Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Grant Proposal for Optimized Nitro State Channel Protocol #253

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

andrewgordstewart
Copy link
Contributor

@andrewgordstewart andrewgordstewart commented Jun 25, 2021

A couple of months ago, during the EthGlobal hackathon, we got clued into the Filecoin Retrieval Market roadmap. Coincidentally, we were exploring some optimizations to the Nitro state channel protocol that seem well-suited to the strict latency requirements of the Retrieval Market. We'd therefore like to present one means of accelerating the pace of the payments-related milestones in the Filecoin retrieval roadmap — after optimizing Nitro protocol, it can be incorporated in the retrieval market through a few different strategies. Thus, we'd like to optimize and formally verify Nitro protocol, and update our existing EVM implementation.

We have also been investigating a more practical approach towards scaling Filecoin payments, through an FIP to add a new type of "Express Lane":

  1. Alice opens a lane with Irene, where vouchers are signed by Alice.
  2. Irene opens a lane with Bob, where vouchers are also signed by Alice.
  3. Alice sends a stream of vouchers directly to Bob.
  4. Finally, Bob redeems one voucher in his lane with Irene.
  5. Irene redeems the voucher from (4) in her lane with Alice.

This approach may be less risky in the short-term, and we aim to spend some time evaluating this option in more detail. However, we are not yet familiar enough with Filecoin payment channels to understand how much work this project would take, so we are currently unprepared to submit a proposal to do this project.

Furthermore, each strategy comes with its own natural tradeoffs:

  • Using a wrapped FIL token in an EVM state channel implementation increases the complexity of the retrieval market architecture, by depending on more than one blockchain.

  • But, a wrapped FIL token allows the flexibility to

    • take advantage of Ethereum layer 2s to reduce operational costs
    • introduce novel cryptoeconomic incentives by deploying new state channel rules
  • The current payment channel implementation on Filecoin appears to have a few drawbacks:

    • It is storage-heavy, increasing the operational cost of the happy path.
    • There is (apparently?) a limit on the number of lanes that can be opened. [e. apparently the limit has since been removed]
    • It appears to us as though Filecoin wallets may need to keep the latest voucher issued for every lane opened to prevent a double-spend vulnerabilities.
    • The challenge path does not appear to be optimized — the receiver must redeem lanes one by one in the case where the payer does not wish to merge lanes.

    Addressing these issues may require a significant rewrite of payment channels. If this is the case, it may be preferable to implement an optimized and formally verified generalized state channel protocol. It is then possible to implement lanes in a Nitro app, taking advantage of the optimized Nitro protocol.

  • An application-agnostic intermediary can enable more flexible payment structures between Alice & Bob, providing flexibility for novel incentives, at the consequence of some protocol complexity. This unlocks the ability to:

    • use flexible rules for minimizing the latency required to open a virtually funded channel
    • use novel cryptoeconomic incentives where it makes sense in the Filecoin protocol (eg. content discovery), and use optimized payment channel rules on the critical path.

Therefore, we are currently promoting a more generalized approach, towards integration strategies such as:

  • implementing optimized Nitro for the Filecoin blockchain; or
  • utilizing our existing Nitro wallet for wrapped-FIL state channels in an EVM environment

We look forward to discussions on these ideas from the Filecoin team!

@andrewgordstewart andrewgordstewart changed the title Add grant proposal for optimized nitro protocol Open Grant Proposal for Optimized Nitro State Channel Protocol Jun 25, 2021
@realChainLife realChainLife added category:technical-design Proposals for technical design work (protocol, cryptoeconomics, more) wave-8 labels Jun 26, 2021
@realChainLife realChainLife reopened this Apr 19, 2022
@realChainLife realChainLife merged commit 4e482d0 into filecoin-project:master Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:technical-design Proposals for technical design work (protocol, cryptoeconomics, more) wave-8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants