Payment Channels
There are so many privacy techniques, lets take a brief look at how each of them works from a higher level, looking at Zcash, Monero, Dash, Mixers (General)
Get the project source code below, and follow along with the lesson material.
Download Project Source CodeTo set up the project on your local machine, please follow the directions provided in the README.md
file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.
This lesson preview is part of the newline's Introduction to Privacy on Ethereum course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.
Get unlimited access to newline's Introduction to Privacy on Ethereum, plus 70+ \newline books, guides and courses with the \newline Pro subscription.
[00:00 - 00:15] In this lesson, we are going to look at how state channels and payment channels work and how they provide privacy. So in a normal setting, if others want to send some currency to Bob, she will send a transaction to the blockchain, which will get mined and Bob will eventually receive the money.
[00:16 - 00:31] Now imagine that Leslie actually wants to send the money in many, many, many different transactions. So every minute, every second, she wants to give Bob like a fraction of the money instead of giving it all together or paying late.
[00:32 - 00:40] So instead, what she can do is she can use a payment channel. And how a payment channel works is by locking up funds in a contract.
[00:41 - 00:50] So what Alice will do is lock up the funds in a contract using a transaction. So let's say she locks up 10 currency.
[00:51 - 01:07] And now once the funds are locked, Bob is satisfied that he will get at least the amount that's locked in the contract. So Alice can now send sign messages to Bob as many as many as they are.
[01:08 - 01:14] And she can send them directly. So it doesn't actually interact with the blockchain in any way.
[01:15 - 01:23] So first of all, it's completely private. No one ever finds out how much money did Alice send to Bob or how many times they send it.
[01:24 - 01:36] They just know that some communication must have happened outside the blockchain. And if any of that is amelicious, the contract actually enforces that by time locks.
[01:37 - 01:59] And she can send as many sign messages to Bob and it's up to Bob when Bob wants to take the money out from the contract. So what Bob can do once he is satisfied and he doesn't want to wait any longer is he sends a transaction to the contract using the messages that he received.
[02:00 - 02:06] And the only thing that he needs to send is the latest message. He does not need to keep track of all the messages.
[02:07 - 02:13] He just needs to keep track of the latest message. Because in every message, the amount that he received gets increased.
[02:14 - 02:29] And therefore, he can send a transaction to the contract and claim the funds that is his. And this is very efficient because in terms of storage, he only has to keep the latest sign message from Alice.
[02:30 - 02:43] And if Alice tries to betray him and go to the contract, he can always use the message M and show that it's actually owned to Bob. And the contract will give them money to Bob and not to Alice.
[02:44 - 02:55] So this works fairly, fairly well and it provides very good privacy in terms that you never reveal the actual transactions, only the amount that you're taking out. But of course, it's not perfect.
[02:56 - 03:13] Okay. [ Silence ]