Skip to content

HTLC across two Hydra Heads #2080

@noonio

Description

@noonio

Why

We would like to demonstrate transfer of fungible assets between Hydra heads. Notably, this should be able to be done without decommiting/commiting it (i.e. without passing via L1.) This is the "tried and true" method of all payment channel networks (e.g. Bitcoin Lightning.)

What

Scenario:

  1. Two two-party Hydra Heads
  2. One party participates in both heads
  3. I.e. Head 1 = Alice <-> Ida and, Head 2 = Ida <-> Bob
  4. Alice has some ada (in Head 1), Ida has (at least) that much ada in Head 2. We want to send Ada from Alice to Bob and have Ida not put any Ada at risk.

To build:

Image

  • Hydra-node must not change to accomodate this functionality (should already work!)
  • A process-compose setup (like the #demo),
  • A UI for Alice that allows Alice to specify they want to send Xyz Ada to Bob (or, in theory, any recipient they have a "path" to),
  • A similar UI for Bob to see that they are expecting monies (or at least to see their balance),
  • An Aiken plutus script which implements the HTLC logic, (running on L2) (see picture)
  • An offchain piece for Ida to observe her state
  • (All the same frontend application, as much as possible)

How

  • No Haskell
  • No fees for now.
  • Aiken to get CBOR for the contracts
  • Use one of the known client libraries
  • TypeScript!
    • Can connect to the hydra-node via the WebSockets

Related links

Sub-issues

Metadata

Metadata

Labels

amber ⚠️Medium complexity or partly unclear featureappAn application or tool built on top of Hydra HeaddemoWork contributing to demos, workshops, conferences, talks...

Type

Projects

Status

Done ✔

Status

Now

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions