5

The Lightning Network of micropayment channels is a concept first conceived by Joseph Poon and Thaddeus Dryja. It requires a few features of bitcoin that are not available yet.

  • OP_CHECKLOCKTIMEVERIFY - to make scriptPubKeys which cannot be spent until some predefined time.
  • OP_CHECKSEQUENCEVERIFY - to make scriptPubKeys which cannot be spent until some set time after the original transaction. (Also called OP_RELATIVECHECKLOCKTIMEVERIFY)
  • Segregated Witness - Referencing which output you are spending by (TXID, n) should not reference the malleable signatures of the transaction with the output.

Does Ethereum support these, or equivalent, features?

5

They don't need to support those. As mentioned by Roman you could build the entire LN in one contract. You can even implement the LN Relative OP_CHECKLOCKTIMEVERIFY requirement in a much better way.

In fact you can add more functionality than is possible with the Bitcoin LN, you could allow people to add more Ether to their side of the channel with offchain transactions.

Tx malleability also doesn't need to be solved (a very difficult probelm in Bitcoin) because it doesn't pertain. A LN contract wouldn't have to chain offchain transactions in any way, just passing signed offchain 'notes' of a sort that contain information relating to amounts, blocknumber for available release, etc...

It is also somewhat trivial to add the hub and spokes part where a random value R is hashed to create H and allow payments to hop through multiple parties (but in Ethereum you could do it without the problem of locking up funds that they need an extra OP CODE to solve).

Disclosure: I'm actually working on this in my spare time.

  • 1
    regarding your work, how far did you get? – Janus Troelsen Jun 13 '17 at 13:50
  • Any cons? E.g. would Etherium be fast enough to make micropayments practical? – Aleksandr Levchuk Mar 16 at 23:02
0

In Ethereum world it's a very simple solidity contract:

for time you will check the block.number

and you can pre-define what amount you want to spent for some special arbitrary condition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.