New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

EthCC 2: Liam Horne

Ethereum ParisWed, Oct 9, 2019, 12:00 AM

Speaker

EthCC 2 EthCC, the Ethereum Community Conference is created by the community, for the community. It brings together great minds and forethinkers, and allows the community to grow. Follow us : @AssethFR https://ethcc.io

Transcript

hello everyone hear me I was here put some talks earlier and like I couldn't really hear at the top so can the people the top just if you hearing me to say like some kind of positive signal all right great all right right on so what I'm going to talk about here is very briefly what is counterfactual I'm gonna explain what generalized eight channels are very quickly and then show you a cool demo of it working brief context on counterfactual it is as you see it's an open source initiative to make option applications much easier to build on aetherium the idea being layer 2 enables all kinds of phenomenal stuff but it's really hard to do because there's no engineering and no software that's been put to actually make that easy and so our goal is to do that as an open source project my name not the clicker broke no it's good my name is Liam Horne I'm the co-founder of a company called l4 we're essentially like a software engineering consultancy in a way but we also help out in this community in all kinds of ways with like eath global which is happening this weekend if Paris here and we work on you know state channels research plasma research and a bunch of other stuff basically we just really like aetherium and we want to help see this community grow so the goal of this talk I briefly mentioned it but I want to say what's counterfactual what are general a state channels should give you a demo explain how the demo worked and then let's do some Q&A and hopefully answer the questions that may have been confusing as I went through it so background as you may or may not already know state channels are basically the more generic version of payment channels lightning is starting to get very popular in Bitcoin because what it is done is said that hey instead of putting every transaction on the main chain what if we could lock up some capital in a channel that is kind of like an escrow between two parties and then update the balance is in the escrow so kind of like a bar tab in a sense and they turn that into a network to allow for off chain payments the same thing is basically true and a theorem that you can do that but because we have a generalized state machine you can do all kinds of more fancy stuff which is what state channels represent to me on aetherium by the way this side no I really like these type of talks to be very in interactive so if I say something that like you feel like you don't get and the people around you don't get just please just shout it out and I want to make sure they everyone's I said getting the information and I'm gonna put it across so speaking of information this is a paper that we wrote last year called counterfactual generalized state channels it explains in like all the full detail exactly what a state channel is how it how it should work from the most fundamental point of view and so if you're interested in like not just getting like the high level like it's a bar tab where you move money between people really quickly you want the full in depth view I recommend you check it out l4 dot ventures last eight channels dot PDF that will give you the full academic overview so what is a generalized state channel I told you in enlightening we have a bar tab you move money back and forth and in etherium you may have seen is raid in there's some other things that have basically enabled you to do off shame payments but what is it that what is this term generalized eight channel it's very specific and I can show you in a couple diagrams so basically a payment channel is this situation you got a blockchain it's a bunch of blocks being mined and at some point you decide the tape to put some money that you have in your aetherium account into a contract with someone else that stores the balances that you have put in and that someone else is put in and the idea is as time progresses not using the blockchain but off the blockchain like in person or over Facebook messenger over some messaging whatever it is doesn't matter you're exchanging signed messages between you and the other person saying I owe you this now and I owe you this now and you just update that between you and the other party right and then whenever you're done you feel like you've sufficiently incremented the balances between you and the counterparty you get to the situation where now you have a new set of updated balances that you have and they have that's different from what the initial one had because you've been signing messages and you put that on the chain and everyone gets their money back so that's a payment channel there's this term up there application specific state channel on my slide broke which is very similar the only did so an example of this is it may you may have seen like a tic-tac-toe and the blockchain and a state channel or you may have seen like in fun err they have this idea where you can put money in and you can play like a poker poker but it's too complicated but they can do like blackjack and roulette and a couple of games like that by putting money into a contract where you're not just updating the balances like a balance be balanced but arbitrary state objects and then this exact same set up you sign an update to the state back and forth and then whenever you've sufficiently gotten to that's end state you put that on chain and you have a little bit of logic this extra application logic to allow for the money they get paid out according to what the state says it is it's not just give a a bell give BB Bell it's taking this state compute what a bell and B values okay so that's an application-specific state channel in our paper in kind of factual generally say channels we introduce this concept of kind of them how the maximum you can go in terms of this technique using etherium and we call there's generalized a channels the same set up outputs money and Bob puts money and same set up but instead of updating a state object like some bytes array you actually sign different commitments over time that represent new applications entirely off chain so what this means is that you can put money in a contract and if you want to play tic-tac-toe you can play tic-tac-toe and the widow and get their money and if you want to play a second game or a third game or you want to do anything else update payments whatever you want to do with that money did deposit you put on chain whatever you want to do you do that using a protocol that defines these off chain applications so you can have one or you can have two or you can have three are you gonna for you can a five and the entire time there's no on chain transactions that's pretty cool right so I know that's useful so this has been discussed for a while this is like the researchy stuff as time goes on the same thing same situations are the ones you you put the latest date on for whatever individual application you want to eat your money out so the same basic idea but the main thing is you have multiple off-tune applications so so that's great so that's a generalized eight channel what is counterfactual the first thing before I dive into what we've built is I got to really just emphasize this point I think it's important is that we're an open source project there is no business called counterfactual Inc this is a project with multiple collaborators across the ecosystem funded by the etherion foundation at the moment basically to build this as a public good for all of us to build apps faster better so we can get to end-users kind of as a as a community it's a very simple mission I've already said it a couple times we're gonna make off ten applications the norm they should be there's a lot of powerful stuff there but we keep talking about it and conferences we don't get to actual end-users so the goal is build a framework that can enable that to be done so that's the mission of counterfactual but now the fun stuff so how do we actually build something to enable that technique yet it's described to be possible there's three core pieces or three-quarter layers rather there's a couple pieces but there's three core layers of the software and I'll kind of show you a really cool picture here I can talk about it basically I'll just say it first and I'll go through it we're building an easy-to-use application library for developers that are building DAPs to interact with layer two an application library or something like web 3 j/s or ether zjs or whatever it might be that you use to interact with a contract in the main chain it's a very useful abstraction for building your apps and you know truffle in these tools I've enabled web 3 to peripherally proliferate we're building a similar style library for layer two so the same way that you would use a simple JavaScript library to build a tap you can use a simple JavaScript library to build a layer 2 app additionally because what I just described with regards to having multiple off chain applications in the same state channel it's kind of complicated like you might be wondering like what do you sign and will order how do you actually do that we needed to devise a protocol that the two agents or the N agents if you go multiple people speak to each other to ensure that every time they're signing something to install a new application or uninstall an application or update the state of an application but that is actually secure so we've designed a protocol for that you need to be running software that implements the protocol and so that is what you would call the client node software this is something that we've kind of packaged up and that'll be shipping basically in you know it's kind of the behind-the-scenes internal code the same way that metamath drops a bunch of logic to enable your calls using web 3d just to work we have a bunch of internal code that we have that similarly want to run in your wallet to make sure you that you're following the protocol and of course because they channels as a layer 2 technique it's always possible that you may get into a dispute resolution scenario where you need to make sure that you get your money back and so we've built a very robust library of contracts and basically a flow for how you can get your money out if there is that dispute resolution that needs to be done I'm not gonna talk about the dispute resolution here that's interesting from like the you know the theoretical point of view and if you're actually designing that kind of that kind of system that's morally on chain logic I'm talking talk about the off chain logic during this talk so let's do it show you a demo I'll show you something working and then I'll talk about it while I'm kind of doing this whole switcheroo is there any questions anyone know okay so where's my demo I can't see it here that's open QuickTime time this is quick time okay I'm not gonna risk it alright so let's go so basically let me let me get this set up here and again as I'm going just feel free throw out questions it's a lot of detail here so what's going on so we have here two browsers brave and chrome and I have like the developer tools open you guys can just look at that but the setup here is that this is a website that is kind of that we've built as a demonstration of this whole technique that allows you to create an account with the website after you create an account what you're gonna see are multiple applications available to you to play against anyone else that's created an account that makes sense so you can play any number of applications against anyone else that has an account on this website all of which is a hundred percent trustless secured by the blockchain so you'll follow along I'm gonna make an account on the first the first users laptop and what's going on here is that you're basically signing a transaction so I'm signing a message with your wallet here to authenticate as this particular address that's on the website this so far is pretty standard stuff two users are gonna do this for the demo after you've signed in to kind of a chthonic it yourself you know the server than the backend I'll just talk about in a bit is kind of making sure that it knows who is who it asks you to deposit some amount of money so as I've just showed in the diagram earlier you need to deposit money in from the main chain into your lair to environment you're going to deposit some in here 0.1 0.1 and then what's going on here so now it's creating your state channel so in the dark-- i'm earlier where the Alice and Bob kind of switched in into this layer 2 environment this is the step that's happening here we actually are running an additional state channel user here that's it's just an additional user period that's absolutely applying a multi signature wallet on chain for you presently so it's creating the state channel for both the left user 1 and the right user to this part takes a while because robson is slow so I'm just going to go past it after it creates the state channel it prompts the user to actually make their deposit as a quick aside for folks that are in the know they're just new OpCo just got added to a theorem called create - which completely augments that past step so imagine if crate - is to implement it then this would have been instantly what you saw when you click register unfortunately if 3mg SVM has bugs and they have it implemented it yet and so you know that's the state of the ecosystem so you proceed to deposit some theory some eath into the state channel this is still all the setup phase both users are gonna do this and you know your sign message you sign the transaction that sends the money into the multi signature wallet on both and then what's happened is that you have put your money in to this multi signature wallet that's a bit of context this small distinction wall is between you and our server in the back so it's not between these two people it's between each individual window and the server in the back and after you put your money in the server because you authenticated earlier and it trusts you blindly at this point it says okay I'm gonna also put in money so the server is also putting in money so you have to multi signature wallets being created with the terminology for this is a hub but it's another user it's our user and I'll talk about what the tech looks like in a second and after a while after robson blocks get mined and it confirms the transaction and whatnot which takes a while cuz tests debts are slow at the moment at least this one is eventually the UI says great it's collateralized you have put your money in there the hub has put their money in there and you can now use this layer to generalise de channels demo and because I showed you in the slide earlier you can have multiple apps we have multiple apps available for people to play and it's very simple I have to add a quick dev parameter here to make sure that these two match makes and we just go past that you open up one of the applications it's very simple you put in your sub deposit so remember we just put in a deposit of real eath from the main chain into the multi-sig and now what it's asking you to do is put in a sub deposit and off chain deposit in this new application which is a layer 2 application see I say hey great I want to put in oo 1/8 you know one tenth of my total balance and I want to bet it against user two in a game of tic-tac-toe user two gets messaged and it says you know hey this guy wants to play with you you want to play him and he says yes and all of a sudden the game loads there's a weird bug there the UI will fix that so the the game loads and so what just happened neither of these two people have a state channel with each other on the main chain but they have a state channel with this hub which I'll show some slides in a second how it kind of works that's enabled them to play a game against each other off chain and so you know the same this this could work between any number of accounts so you know if you guys open up a laptop and make an account I could click I want to play against you and play against you as well and then obviously because the state channels all of these moves that are made these state updates that are happening in the application are kind of following the protocol where you sign the move that you're making you send it to the counterparty they get it they make sure it's the right thing if once they validate it they didn't render the new UI and this guy wins he's very happy the coins are drawn and you can see the balances get updated there so this guy just was essentially paid based on arbitrary turing-complete EVM logic in a application for which he has no relationship with this other guy at all so it's off chain layer to conditional payments all of which is 100% backed by real aetherium transactions that in any scenario malicious or just honest you can get your money out and it's yours that's pretty cool so yeah that's most of the demo I could I keep going here and I could play a bunch of other games and when we launched this in a couple days you'll be able to see you know you can play this dice rolling game as well and that one's pretty fun and yeah there you go so that's the demo any questions on the demo yeah yeah so the unchain transactions I think I have a slide which will kind of generally show it is that you deposit money I mean I can show you from second ago this one so the the filled lines are on chain transactions so what you did is you deposited money into this multi sitting from both sides Alice is the server that we're running the hub bob is the window the user right so it was the deposits there's one extra step that happened in the background you didn't notice it because it was happening on the server is that a multi signature wall was deployed which is how the content gets on chain in the first place by us the server and I was saying a bit of an aside earlier that that with create to a new opcode is now that step is gone because the contract is counterfactually instantiated which is a fancy term you guys can google and maybe will write about to clarify yep yeah thanks how have you verified that and how can we verify that yeah so we we have we so we haven't done like security audits yet but what what the two inches so first of all having to do this yet but what we've done is we've defined a very specific protocol all of which is documented I would say like a seven out of ten we're going to improve it over the next little while way on specs counterfactual comm and effectively there's each party like Alice and Bob in this case and the intermediary which is not shown in this slide sign particular commitments signed messages that are transactions to a particular contract we have and I mentioned earlier I don't wanna go in too much detail there cuz it gets that whole thing could be talking its own and basically as you sign these particular commitments every way every step along the way you always have something that is in your possession that could be put on chained to this contract we have it's called an app registry to get the money up maybe we can talk after because it does get pretty convoluted there's a bunch about all the code is open source you can see it all on a repo and I'll talk about that in a minute but um basically we did the protocol we designed is designed for that yeah good okay cool so that was the demo so what did you to see so I'm just playing it as I've been going along but this stuff can be complicated so I'm gonna kind of just be very explicit about it what it was so you saw this screen what it was was kind of a couple things a demo site for so it's a bit of a technical explanation of engineering explains if you want we have a demo site so I'm gonna highlight in this region because what you actually just saw was not one kind of monolithically built react app or anything this is actually engineered in such a way that the external environment here is its own software kind of similar to kind of a wallet like a meta mask that's running the state channel node that is the thing that is implementing all of the protocols that I just alluded to is that going to go and that thing itself is rendering iframes inside the window the iframes are implemented using you know your favorite front-end app of choice great react app or stencil or ember or whatever it is you want to use using an API that we've designed the developer library from the slide with the three you know triangle layers there that communicates to this wallet like environment the node to speak to the methods that it exposes to do things like install an app and update the state of the app and place your tic-tac-toe I take an action on the state so that's what's going on there and this is kind of what that looks like you install app after its installed you get an event that's given to your app and you update it and the point I'm making here is these are very separate components very easily separable that you can explore and if you want to build your own app is designed for that scenario you notice that I deposited and withdrew at one step that's because presently because literally this is an iframe container there's no way we have access to your private key we need to go to meta mask presently to go and say hey madam asked we want to deposit money can you assign this transaction to deposit money into the multi-sig does that make sense and the really cool thing here is that the whole thing has been designed with the expectation that wallets will eventually have a layer two compatibility and so I'll give me a second I'll go ahead a second and so what we're gonna eventually be doing very soon in fact we've already started the the spike work it is integrating this directly inside of meta maps so meta mask has a specular torii layer to environment that it's building right now we're kind of working very closely with them on that and you can imagine in the future you're gonna have these layer two apps that you can access to you know do whatever it is you want to do in layer 2 and this will be natively implemented within meta masks so anyone where the meta mask account also has the ability to use generalized eight channels any app anytime they want I want to make it very just quick quick thing here that one to add at the last minute this is what the code looks like when I'm saying developer API I literally mean like this this is a react handler so like you click on a button and that button executes some JavaScript this is that JavaScript it literally will take the coordinates on the tic-tac-toe board in this scenario and call this method the highlighted method an object that we have Estancia titlow Khalif or you to use kind of like a in ethers j/s and in web three have a contract object in this layer to environment we've an app instance object and you take your action and you literally give it an action like hey I want to play I want to place my X or o depending on the you know who you use you are in this coordinates and if I want to claim that I've won I can Clem everyone that's just the way this particular app has been designed this is an arbitrary action struct whatever just want to get that point across at it's literally developer library you plug into your application for this at this stuff and it's made specifically to be easy to use okay so great what about all this stuff I'm talking about producing signed commitments there's some representation of a state you know what is that presently in the demo we literally stored all of that in your local storage as a pluggable storage infrastructure as you probably expect but this is kind of what it looks like and here's a I think I have a quick example here's kind of what the data looks like I'm not gonna go in all the depth here but literally you're storing a state channel object and this is the array of app instances you have and you have all this useful information I see if I can mouse over you have all this useful information for example what is this app in this particular case this is this is not the Tic Tac Toe app this is a different app which is a two-party payment channel app and again this probably lot of questions into the specifics here but I want to get the main point across that this is a simple structure that we use for all arbitrary types of applications in this case payment channel we have Alice's address Bob's address how much Alice has how much Bob has and then you have the state of that as of now so in this case Bob seems I have a lot of money and so yeah this is the all the stuff is just stored locally and a very simple to read a mutable data structure that gets updated by our node and you have access to it in your application or your wallet if you want to build a wallet around this - so there you go so the final point this is all running on my laptop and I was playing against another window in this demo but in a future version of this talk I'll probably do like two laptops and I'll play against someone else remotely or maybe someone in the audience or something there's two laptops and they're communicating as you might back to some communication channel it doesn't need to be any particular one we could use limb p2p we could use WebSockets or if you're like very reckless you can use firebase and the main thing I think I kind of alluded to a second ago multiple times actually is that they played each other by using a hub and the way that kind of works is that we have two state channels my laptop through the laptop or my window the other window there's no channel between them and so we've a third node running that effectively collateralize --is by having a channel but with each of them already however I talked about most that's some kind going through but quickly here and it instantiate something called a meta channel which you can read about in a paper and it's also another thing called a virtual channel which is a much more formally specified version of this basically allowing me and Neema which is the example name of the other person to play this game of tic-tac-toe against each other so that's kind of how that works and the cool thing is that hub I've taken to the bit of detail here is literally running the exact same code as this laptop the other laptop and there's really no difference except instead of storing data in local storage and this demo specifically I think it stores did in firebase am i stored and in the file system I'm forget but it's the exact same code so if there's no special hub infrastructure and client if or charts or anything like that it's just different nodes so you can you can keep extending this they message you each other over the messaging protocol to propose the message there's no need to involve intermediary at this point and then when you want to install the virtual app you just send a simple message over to the intermediary saying I wanna tell this virtual app for this person the protocol which I alluded to earlier and spec star counterfactual comm if you want to read about it execute some particular way to make sure that everything's collateralized and you get to play tic-tac-toe so yeah that's that's the demo that's the talk [Applause] yeah hi thanks for the talk so can you go a little bit more in detail on what happens when they go from the state channel back on chain what happens with all the transactions and how does this yeah so you're a human so the way that layer 2 works is that you accumulate an enormous number of sign messages from particular people that could in the future be dishonest so that if they are dishonest in the future you can use those specific sign messages but if they're honest then there's usually a different type of exit mechanism to get the money out so in our case if you wanna I should have had the withdraw on the demo if you want to withdraw your money because these are just multi signature wallets you literally just say hey hub I want to I want to withdraw my money and he says ok and it's a mole the signature wallets end it's just a multi-state you just send the money out if he doesn't say ok well then that's when he gets into the the more detailed scenario like you mentioned we need to pull out the commitment that you previously had state saved and your DB from when he signed it earlier and then you put that on chain you wait some time because he might have a later commitment and you might be able to one line and then basically there's this resolution mechanism I don't really wanna go too much into that in this talk as I mentioned is it really is like the whole thing if you want to read about all the code is in our repo it's at github slash counterfactual the specific contract is called a predatory and you can you can read how that works we'll probably write about it maybe do a video about it and I'll put on YouTube later but yeah it's been just you put the you put the exciting cream on chain you wait for a timeout you know they might challenge you and say no I'm the one lying and then you bet there's a whole resolution scheme basically hi thank you for speech I am are two questions what do you think about what will be in scintillation of hubs and the second one is what do you think about future about growing of state channel networks will we I mean it will be going around hubs or like such as mesh networks in Internet the first question was what do I think about synchronization of hubs ya know in your sort will be any and some kind of its intimation of hubs or no well what I don't really the question he likes to say it clear what motivation of hub the motivation of hubs oh yeah so this is the same as any other thing right like any other state channel network is that usually if you're adding payments to them you would take a fee on the payment and you know if someone's offering a free service they'll just do that one but if there's no free service then you have to pick the lowest ones like a market right it's gotta pick whoever is gonna give you the lowest fee that the hub doesn't need to do this right so the idea is the same as lightning they pay a fee and it's a bit more complicated in this scenario cause I'm enlightening you just the only function you can apply is send right it's like it's instantaneous send but in this case it's there's more complicated functions and so the time is longer than instant for example in the tic-tac-toe game the hub is not just like doing a one-time payment the hub is holding money for the duration of the tic-tac-toe game so the time is like you know whatever that was 30 seconds and so what the hub will do is that will say okay I'm gonna loan you this money essentially and that's not really alone cuz it's it's trust us in noncustodial but I'm gonna quote unquote loan you the money for 30 seconds and you pay me this much per second something like that and you pay the hub through a state channel itself in the whole sync stuff we have built we haven't added in fifa sharks or anything that interesting enough actually you can be built on top of everything we've built as an additional app itself so yeah it's it's it's not really something that I I've some opinions but I think you know people who build apps and they'll be different types of mechanisms that are tried out yeah it was the other question there somewhere I is coming down with the mic Thanks I wanted to ask about the sort of unchain component so I guess if you write some app you want some sort of smart contract that can act as a sort of arbiter of last resort that there's a dispute could he speak a little bit to the API or how that looks yeah so almost how much time do we have every few minutes so in a previous version of some talk that was like this is a morphed version of I had some slides on that I might have it open in another tab so let me just see if I do still is this live live craziness here DEFCON yeah I do have it look at this okay so I'll give this apart really quickly so the basic idea behind the framework is that there are certain types of applications that work the sacks same way every single time regardless in generalized a channel use case and those set of applications are state machines which have pure deterministic state transitions with not with no conflicts between how those resolution how those two transitions can be made so that's kind of like state machines like this where you have a state that you're in a transition that you can go to based on some rule for example you might be in a state where you have it's X turn and if it's X's turn one of three things can happen X can go and then Zoe's turn or X can go and then to draw or X can go and then he won right it's a it's a pure deterministic finite state machine effectively we've that there's some subtleties there about like who can go and what order and there's known you can't have two people going at the same time but generally finite state machines is there's a category of applications for which this works and pure ones where there's no necessity to read on Shan State if you do read on Shan State you can't handle this but does he have to be aware there's a bit to some extra risk parameters and you have to add extra software for those cases in our deposit case we actually have a custom-built app that does do that but for most cases pure finite state machines will work and so I'll show you the code this is this is not tick-tock taro this is a different one which is even simpler it's a state machine where you have a number and the one function is update the number right so take a circle and you can update it so in this case you literally write your application like this it's a stateless contract that has no storage so we're simply using the contracts for the reason that it's easy to write solidity code developers know it and you know you can put it on chain use eath call they've generated transition but there's no storage on this contract it's just EVM logic using solidity so here's the contract there's this more detail here this this is the contract you define your app state using ABI in quarter view to Struck's like this one so in this case is player one to is what's the number and whose turn is it the action is increment or decrement and by how much so it's a little bit of extra stuff than just sin didn't just add it's like add or decrement by one or two to three yeah it's a function called apply action if you know Redux it's very similar to that the idea is you take the current state and in action and then you figure out what is the transition and this function can throw right you can throw errors and if it throws an error then you know it's in ballots transition but if it doesn't throw and it returns in your state then it's a valid state so this is what the developer writes of the application so you know it's like Redux literally like give it some state incremented decrement it do whatever the hell you want and give me a new state and if it doesn't throw that's that's your state machine you know this is the implementation detail using solidity you know plus one minus one or whatever so yeah the answer your question cool thank you I can relate the question to this so this state machine is executed on the client just so there is no proof that actually they are the game rules we're satisfied at the end of the channel right so can you prove that they played according to the rules yeah you can't so you can yeah so you you agree on the you agree on this ahead of time you agree on those rules there's two ways you can agree the first way that you can agree is you can agree on a contract address on chain that is this contract and you say if we're gonna play an application together we're playing this one and I say you okay with that you see I'm okay with that we sign a message saying that we're gonna install that specific contract address and so when I sign an update I use the code in this contract to generate my transition I send it to you and you say okay well we agreed on this contract earlier so I'm gonna I'm gonna run it myself to also my own way and if you get the same output and that's what I signed you know it's legit this the second little subtlety there is if it's not the address of an on chain contract it could be the hash of the byte code which you could also use and then in the case of a dispute if you do that then you also have to deploy the contract on chain but this is more of a subtle detail than anything more important is that you agree ahead of time on this logic and you literally sign a message saying that this is the logic we're going to use and you then locally verify that it was used yeah it's literally the same contract in the enforcement mechanism it's exactly the code that we'll get running up there do you really need the hubs are they more just there for scalability reasons and so like do I really need what sorry do you really need the hot the state channel hubs or are they more they're just for scalability reasons so that there doesn't have to be direct connections no I'd say they're more I mean I guess that's one reason I'd say scalability reasons lesser than usability reasons like if I wanted to if you and I happen to just meet each other and we want to do something that requires a state channel and we don't have any connection to anything anywhere then we have to go through this whole like open channel procedure where we deposit money and then we do the thing but if by hat by chance you know another person that I also know in the sense that we both have a state channel with them then we can just do the technique I showed with no on change transactions at all so it's way more usable it's the same reason why lightning network needs to be this massive network right if everyone had didn't have it if there weren't like some easy path between any other person then you have to do a deposit so it's usability right so the hub isn't necessarily like this dedicated thing that's a hot there could just be another yeah I just don't know it's just so we're running on Heroku the exact same software that's running on this laptop and it just so happens to be the case that the the website that you saw is also hosted by us and so we're hosting a web site and the node that conveniently with this UI we allow you to use for the purposes of playing these games okay thank you yeah I think I'm out of time am i or do I have more time five minutes okay do we have five more minutes of questions or okay so hey if if I have a channel open with you where do we store the signed data once we have liked it directed a partial times yeah it's a good question so I mean I did kind of answer in the sense that it depends where you're running the software like we've designed it to be modular in the case of it running in your laptop in a browser presently it's local storage as of the current demo website but it can literally be anywhere presumably if you run this in production and as we build out more examples and demo and default default options it'll be more production-ready environments we might offer a service you could choose to you just there's lots of ways you could store basically yeah like the easy answer is just like stored meta mask but it it's there's no hard requirement basically and and do you have a plan for services that help you solve disputes if you're a fine yeah so there's this cool project called Pisa which was funded by the EF they are a group of people that have done both interesting research on a full decentralized kind of Watchtower service but they're also just building like a useful service in the interim that might not be fully decentralized and so they're already engineering parts of this we might just use that this if it gets shipped quickly enough if not then we'll write like a simple service for this we're not really trying to build all the additional production level software immediately we're trying to incrementally just grow this project and maybe some others will choose to build a production service but as time goes on more production services for all of these things storage watch times all that will come about ideally for the end developer it's still just as simple as like write your app don't care about anything because there's really good sane defaults and move on cool thanks that's again the middle could you talk about maybe some future steps toward state channels without unchain deposits and withdrawals such as being round on the side chain or a plasma chain yeah so basically so you're kind of alluding to like using a plasma chain or a side chain there from the point of view of everything I just talked about it doesn't matter what the chain you're using is at all in the case of all the software we've written it's designed for an EVM compatible chain but it doesn't really care what the chain is as long as there's some way to describe using aetherium you know any EVM codes as long as there's some way to describe it then you can use that in this system so for example if you wanted to store a point on a plasma cash chain then instead of referencing in the state deposit as being on chain Ethan this address you would reference the state deposit as being a coin in this chain which is it's just a different it's a different different set of EVM code instead of doing address contract balance you would say plasma chain contract get my coin dis address this definition of the funds that you have in your state channel itself is arbitrary theorem transactions so and that's that's a whole other thing like you get into as well is that this is fully generalized not just for like ether tokens it's arbitrary transactions so you know you could be playing a game where the outcome is not you got eath if the outcome is that you get a signed message produced that said that you beat somebody at chess and that updates a leaderboard if you can produce the signed message in some you know IP FS server so there's all kinds of crazy stuff you can do anything you can do the theorem you can do the state channels between the finite sets of people just one question about the if two people start a game like this they open a deposit on a state channel and now let's say one of them they contact the main chain and takes out and bail out but but before it does it it continues to play with the other player so the other player still think the money is there so he continued for at least one block on the twenty seconds to play so anyway I can cheat and they steal you some money that I just well the question is there any way I can cheat and still lose money no if the software works that's the that's the initial answer the second answer is so basically you're wondering like what happens if you put on a challenge and you don't realize the challenge has been put on chain and you keep playing the game or the application and the state is somehow invalid because the challenge began on chain the first thing there to note is that if someone puts a challenge on chain a useful property is that that challenge is the time period let's say like seven days even if you don't notice for seven days you can keep using the application and as long as at some point within those seven days you take some latest sunstate and put that on chain you're good so what you need is just to make sure that if someone ever put the challenge on chain you at some point within the time at window put a rebuttal to the challenge unchain and for that you want software that does that for you that software is typically called watchtowers that's what pieces building and that we're also going to build probably some very simple MVPs for and if that software works and you can't lose money any more questions or we good all right cool I have two quick slides just for reference if you guys are curious so I mean it still works if you want to learn more you can go to our github get up calm slash counterfactual all the code is there you can audit it we have issues if you want to help out just you know add an issue we have a discord as well you can go to counterfactual coms last chat you know yell at us if something's broken or whatever it is that you want to yell at us for and there's a website which pretty pretty bare-bones but it gives you the general idea of what the projects about so that's us thank you [Applause]

Automatic transcript — names and jargon may be misspelled.