1

Is there any payment channel on Ethereum blockchain to support ex. Micro-payments ? Similar to the payment channels listed here : https://en.bitcoin.it/wiki/Payment_channels

Such that we are able to use these payment channels using Smart Contracts.

  • 2
    I've written a few blog posts about how to do this. programtheblockchain.com/posts/2018/02/23/… is the most introductory. – user19510 Jun 10 '18 at 0:50
  • @smarx Thank you for your code. In fact one of my questions is that in case we do not call selfdestruct(sender); (apparently to kill the contract) then what may happen ? Thanks again. – Questioner Jun 27 '18 at 10:08
  • You could do sender.transfer(address(this).balance); instead and just leave the contract alive. – user19510 Jun 27 '18 at 12:14
  • @smarx Thank you. So in this case we do not have any security (or other type of ) problems ? if we leave the contract alive ? and in case of function claimTimeout() is it possible to use sender.transfer(address(this).balance); instead of selfdestruct(sender); ? It seems that both does the same thing, isn't it? Thanks – Questioner Jun 27 '18 at 13:05
  • No, I don't think there's any problem keeping the contract alive. Yes, you could make that change in claimTimeout(). Both do mostly the same thing, but using selfdestruct also destroys the contract and gives you a gas refund, so it saves a little of the transaction cost. – user19510 Jun 27 '18 at 13:12
1

Connext is working on this exact use case, code examples are below. They have built multi-hop channels using a hub and are integrating with SpankChain currently:

https://github.com/ConnextProject

Please reach out if you have any questions!

0

There is working example ( It's being used on Ropsten testnet only ) - https://github.com/orinocopay/orinoco/wiki

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.