{"id":"NLYKh8L5NMM","title":"Whiteboard Series with NEAR | Ep: 13 Tom Close from Magmo |","description":"We had Tom Close (  / tomclse  ) from Magmo (  / magmohq  ) speak about State Channels with our Co-Founder, Alex Skidanov (  / alexskidanov  )  \n\nLearn more about Magmo here: https://magmo.com/\n\nLocation: NEAR Protocol HQ, San Francisco, CA\n\nDownload the video here: https://near.ai/e33dc\n\n\n------ About Whiteboard Series --------\n\nThe Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain.  We deep dive into their story, what they're developing and how it is helping the ecosystem. \n\nFollow the latest from NEAR Protocol on, \n\nDiscord: https://near.ai/discord\nMedium: https://near.ai/medium\nTwitter: https://near.ai/twitter\nGitHub: https://near.ai/github\n\n\n#WhiteboardSeries #Blockchain #FutureIsNEAR","channel_name":"NEAR Protocol","published_at":"2019-04-02T00:00:00.000Z","thumbnail_url":"https://img.youtube.com/vi/NLYKh8L5NMM/hqdefault.jpg","transcript_text":"hi everyone this is Alex from near and with me today is come close from magma we will talk a lot about state channels today Tom would you like to introduce yourself yes so I'm Tom close I am the founder and CEO of magma magma is a state channel research and development team and that's what we're gonna be talking about today well yeah that's high-level over a guess wish I start what a stay channel is right okay Oh how about I start by giving a I guess like a toy example of a state channel interaction so as you probably we're like state channels or an interplay between like unchain stuff and off train behavior so let's start let's suppose we have Alice and Bob now we're gonna suppose Alice and Bob want to do a lot of transactions with each other and these transactions are going to be done very quickly and maybe they're going to be very small in value so basically it wouldn't make sense to put all of these transactions on the blockchain so how do I listen Bob do this in a state channel like this so they start off by exchanging a message with each other so these messages are going to be numbered so it's gonna be message zero and Alice is gonna say five and Bob five let me explain what this means in a second Alice sends that to Bob and it's signed by Alice I'm just gonna say anything that Alice sends to Bob is signed by Alice and anything Bob signs to Alice is signed by Bob okay so this is like an opening statement so what this is saying is we are going to start a state channel alice is going to put in 5 Bob is going to put in 5 and then Bob will echo that back so he then send agreement number 1 Alice 5 Bob 5 okay so at this point they're both holding a signed agreement that they've signed and a signed agreement that the other person has signed saying that they're gonna open this state channel with conditions so I'm going to use red for Unchained stuff so at this point they're in a safe state to deposit some money on chain and I'll go through that a little bit more why that's a safe state later so there's this contract on chain we call it the adjudicator so this contract is going to hold their funds for the duration in the state Channel and it's also going to I guess implement the rules the protocol about how those funds can be released so in this situation what happens first is Alice deposits five the other thing is I'm just going to talk in terms of like abstract coins throughout the whole of this so we can do this with like different ERC 20 tokens eath or whatever but for the whole of this discussion we'll just talk in terms of coins because that's right so Alice puts in five and then Bob can also put in five so there's now ten coins in the adjudicator and it's going to be split according to the outcome of their state Channel so now Alice and Bob can get going like with their interaction so say Alice wants to send one coin to Bob she doesn't update she decrements her balance increases Bob's balance and then Bob sends something back and so on actually what always needs to confirm and not quite that we can get into that later so it for the purpose of this toy example I'm going to suppose that Bob always needs to confirm but yeah and so so let's go through a few ordinary cases yeah what happens if first of all does it matter in which order they put money into the contract yes it does so it has to be Alice who's on the initial message yeah I mean so probably good to get into that later because you'll see exactly how that works when I explain like so what this I guess to give a little bit of sneak peek of that now what this actually means is of the money in the contract first Alice gets five then Bob gets five so this this this list here this like thing here actually encodes a precedence order this I guess the other thing is like I should probably say is some of this is like general state channel stuff some of this is specific to nitro protocol which is our protocol for doing state channel networks so not all not all networks have this precedence thing the reason we have it is allow it allows you to just store 10 here in other state channel frameworks you'll see in the adjudicator things like so they'll track the actual balances and stuff I'm just gonna stick with doing it this way it has a couple of other nice properties we should get into so yeah so Alice has to deposit first Bob can only deposit when he sees Alice's deposited otherwise it's not safe Alice could steal his money and there are other things you can do around that to avoid the time delay which I can talk about later as well okay so they do this many many times they're limited only by the speed in which they can send messages to each other to each other and sign them say they finish off in stage I don't know like to say 98 where Alice now has 9 and Bob has 1 now they decide that they want to stop the state channel there what do they do so they take the final state and they present that to the adjudicator so that goes into some like slot on the adjudicator and it's like 98 a 9 1 and it starts a timer so this is like a pending thing the reason this is pending is because it gives the other person a chance to challenge with a higher state it's like you think about it like this state is not favorable to Bob Bob would prefer this state so like Bob could try and put this state in there if you did Alice would have some time to present the 98 and they saying what can't put it before okay I guess I'm let me let me get back on track I'm jumping ahead so in the happy case and this is you can also optimize this which I'll talk about later - Alice puts this up here there is no higher state and so at some point it will time out when it times out then the adjudicator sends the money back so it sends nine - LS 1 - Bob this becomes zero and this is like done so that's the happy case the reason the time out there as I've seen before is to protect against one person cheating it's obviously the chain doesn't know how many states there are off chain how many like of these commitments they've sent back and forwards so like Bob here could be like our I've only got one coin here but I've got six here so maybe I could try and check out in this state so he would put this in eg Decatur and then Alice would have the time out to respond with this state and say actually there's a later stage and that will cancel with challenge and then they could continue and and if if Ellis challenges does she get nine or she gets everything so the way it works in our stuff is that Alice will get nine in fact it's not even that Alice will cancel the challenge and then Alice can put this in the adjudicator separately so like basically she's just like refuting Bob's claim that this was the latest date what the contract will not allow Bob to exhibit this again right and probably not you can you can we're now into like optimization details so do you store do you store the highest number that's been challenged or like the highest number you've seen an adjudicator probably yes because it allows you to get rid of some states and avoid some griefing but then that yeah you don't have to like I mean you could you could live in a world where the adjudicator doesn't do that and every time Bob presents this Alex presents that and they're just locked in this game so you probably would want that optimization it's not part of the protocol so this is like this is the basic pattern that you see with state channels and with payment channels you lock up some funds on chain you send new exchanges and signed agreements off chain and then at the end there's some challenge period and after the challenge period you split the funds according to according to the final outcome of the channel and and Bob can also initiate messages right yes it's not like every even message has to come from Ellis so actually is like that I guess we're getting into the details now a bit so maybe that would be a good thing to do so I guess one of the one of the things I wanted to do was try and split the state channel into two parts basically the off chain part which I think of as getting to an outcome so like here Alice and Bob got to this outcome by exchanging messages off chain and then the second part is like actually withdrawing the funds so we try and separate at least in my tree protocol we try and separate the funding step you know everything up to do with like depositing money and claiming money from the operation step they get into an outcome and the reason we do that is because that allows us you swap out the funding so a weakness of the thing I presented here so far is that this operation started this operation let's start with the weakness yeah yeah the weakness so the weakness of this obviously is okay Alison Bob got to do a hundred transactions off chain but they had to start this operation with each doing an on chain transaction and they have to finish it with an untrained transaction so like this and this is actually kind of quite an unusual use case if you think about the transactions you do every day like you do a couple of transactions with a wide number of people rather than hundreds run transactions with one person and so like this currently has a big limitation in terms of like a scalability solution but as I'll show you later we can actually fund some channels with other channels if we separate out the funding step from the operation step but I wanted to probably go over the operation step first and on to some of your questions about like you know do they always have to apply to each other does Bob always have to confirm that stuff if you happy starting sure yeah isn't that okay cool and so yeah so the first question is so so you're saying that every even message comes from Ellis and every owed comes from Bob right so what if Bob wants to send money to Ellis but but it's not his turn so there are a couple of ways around that let me let me first go into the state format and then you can kind of begin to see how some of this stuff works yourself because the that question of like I mean I guess to answer that question a little bit now in some sense is it doesn't matter if Bob wants to send money to Alice this is like off chain collaborative behavior so Bob wants to money to Alice he's like hey Alice M your message so it's my turn and I can send money to you so you could do things like that they're also actually other ways you can optimize that as well within the rules so let me start by digging into this state format because this is a cartoon version you can't see everything that's happening from this version so the state format is like pretty simple in some ways so let me just write it out so you have participants which is an array of addresses so this in this case this would be like hmm I'm gonna run out of space can I can I switch this off the Bix I'd like to keep that can I borrow that sure can I borrow this thing okay thank you sorry I was just gonna say you have pens see how participants which is an array of addresses and this would just be like Alice and Bob then we have a nonce which is you ain't and this could just be like one no this is a number that is used to identify the channel in a way that I can explain in a second so like Alice and Bob have multiple channels open this is a number they use to distinguish channel number one from channel number two this fits a requirement on Alice and Bob they kind of have to remember how many channels have had open between each other so they don't repeat it's not though they come up with the nonce or the contract the size they come up with the nonce and it's in their interest like obviously they could open a new channel with the same nonce but then states from the previous channel will apply to the new channel and nobody's going to know what the hell's going on so it's in their interest to jointly choose this number and each of them can like say I'm not using that number nobody can be forced into using a number they don't want got the nonce then we've got the next thing which is the turn number also you ain't and that's this thing so like we start with zero that's the thing that's gonna label the states we go along and this is this is all the state of a particular channel from perspective or particular person this is what I'm what I'm writing out here it's a message format there's a messages you sent from one to the other person so you can think of it as like the message format or you can think of it as like the state you can think of this as like we're transitioning from this state to this state to this state to this state we transition from state when a message is sent turn number what should I do next it's final false so this is something I haven't spoken about yet the as you'll see later the purpose of this is to allow collaborative closes without the timeout so this means that like you know I said here that they go here they have to wait this is a way that they can both sign off and avoid waiting you have to be a little bit careful with this once you sign one of these messages there's no going back the channels kind of over and you say yeah obviously because then challenger the script and it's yeah okay then you have the default outcome and this thing is weird we're going to start off with this being just like a mapping of addresses to you int and it's like an array of those basically this is what this default outcome says and I guess this is going to be like a 5v5 know example so this is like saying like if the channel was a stop at this point he would get what and this format this is the format for a certain type of channel when you come to building state channel networks as far as I can tell you need a different format you need to add one more format and a new set of rules and I'm not entirely sure that's true but it seems to be true from everything I've done this isn't quite enough to do everything default outcome okay then we've got an app definition which is an address and then we have app data which is bytes and then finish off with signature which is whatever signatures are like you int 8 bytes 32 this is a bi it's 32 so this is the classic VRS started playing and this is the signature the person who's signing it and so if it's just let's say just payment channels yeah now we don't need AB definition lab data right and because the default outcome is yeah so the default outcome is almost enough but you do need some rules about how you transition from default outcomes to another Depot but if it's a payment channel those rules could be assumed right yes they could the way we do it is they're not so like for a payment channel there are different ways you can code up a payment channel which is what I was coming to here a little bit so one rule for a payment channel might be on my turn I can only decrease my balance and increase your balance so I can't like and that when that would mean I can send you stuff without you confirming back to me they would mean I can't unilaterally steal your money so that would be a sensible that would be a sensible like definition for payment channel another thing would be a satellite consensus there's this thing which will come on to later which is that the consensus game where like I proposed a new outcome and you accept the new outcome and then the outcome moves into this slot so there are there is a little bit of logic there it's not quite as simple you have to you have to like think about what transitions you cannot allow and what transitions you're not going to allow and that's like part of like building these apps and so default outcome that's the outcome if if like later down the road I'm trying to exit yeah so this one of the things about payment channels is and state channels it's a little bit risky right that you've looked up some funds up here and the way you unlock those funds is by doing some stuff off chain with an opponent or a partner maybe maybe an opponent I don't let's talk about it as an opponent is a slightly adversarial relationship so at any point my opponent could stop so what happens if like Bob just stopped here maybe Bob doesn't want to play anymore maybe Bob's in like a position where like it's not advantageous to him to continue maybe Bob has computers crash and he's lost his signing keys and he can't continue maybe Bob died I don't know what perfect for every reason like some of them some of them malicious some of them not malicious Bob might not be able to sign another update and at that point there has to be a way to get this money back and the way that we've seen the way that that works is exactly how it's seen already so Alice can launch a challenge and then they can split the funds but that means that each state needs to have a concept of like if we stopped at this point in time what would be the split of the funds and we write that into the state and designing how this moves is an important part of designing a state channel application and so even if it's generally State Channel so it's not as payment Channel right yeah the the resolution on the chin is still just some sort of money split yes so it's not so if a general state channel it's only the communication that is now arbitrary yes but it's not like we can arbitrarily state change some state of some contract exactly yeah I mean like this this is the only state the only thing that happens on chain is these things are stored on there and I guess I ought to say that this I'm not convinced whether this this restriction that a state channel always involves a fixed set of assets and the outcome is always letting those assets is generally true I know there are some tricks you can play where like you can I know you can trade off chain the ability to set a value in a contract on chain or something and it might trip rhotuka we rule out those things where as one of the aims of counterfactual is to do those things to be able to do these more general things to be able to yeah basically off chain trade the right to change the chain in some arbitrary ways that yeah we just decided to like simplify that down and notice I'm also kind of I think there's a like wider philosophical question there about whether those things actually make sense which I haven't been able to convince myself of like one way or the other anyway back to this state format so this is the state so let me let's suppose instead of this that's that's actually looking at example of tic-tac-toe so this here I'm gonna have so this represents the address of some contract unchain the this library that defines the rules for tic-tac-toe we can talk about that in a minute and then this app data is gonna be the format that you need for tic-tac-toe so it's probably going to be like a stake and maybe we're going to pay for two coins and it's going to be the current state of the board maybe and then the signature it's just like analysis signature but signature so this is it this is the state format and so now when we do communication so let's say L is right so we have L is here Bob here yeah so I guess the is to initiate the same way right there working money yeah and and then he responds with the same so at this point let's say that was successfully settled on chain not settle but started yeah set up and chain now this point Ellis says okay you know I'm going to go here yeah that's Bob first confirmed that that happened or Bob Bob can immediately respond Bob can immediately respond so this is and this is like complete dependent on how this contract is written but it makes sense like and and it hope and that's nice because you can kind of like you don't have to deal with a case like what happens if Alice moves there and Bob doesn't confirm it and like basically moment Alice has moved Alice has moved so let me let me talk about but I can only exit I can only exit with the message that was sent to me right so Bob to exit has to send Alice's message and yes and no so anyone could provide any of these messages if I exit with my message then there's always a chance that you will provide another message like you have the power to do the next message but like there are interesting games you can play with like providing other people's messages and stuff so yeah I mean and it also depends how you kind of think about these challenges as well and so the this thing that I'm just explaining here with nitro Protocol nitro is an extension of for smooth which is basically this this framework for building these little games like the set of rules I'm about to describe you're basically forced move rules and enforce move you think about the challenge as forcing someone to move it's sort of saying that the only thing that can happen in this chant in these channels that can go wrong is that you fail to move and then the idea is like I launched this challenge on chain I'm forcing you to move if you don't move the game is over with the default outcome and that's how all these games kind of work and I think so the specific mechanics here are specific to nitro protocol and force move but like the overall pattern is the same in any state channel application I think has to be the same in any state channel on location you always need a now if someone stops responding you always need that out really needs to provide the data you need as well so the nice thing here is like by providing the next state I'm providing you exactly the data that I would have given to you I've changed can continue I'm I'm jumping around a bit but so you're saying so let's say that we're playing tic-tac-toe right and so Alice made it made a move Bob made a move and then Alice disappeared yeah so you're saying at this point Bob all that all the Bob can do is to force Ellis to make a move yes by unchain yeah but that means but let's say that it will take like thousand more moves before the game is over so that that means one thousand transactions won't you know say the way that would work is so you're getting into the grieving scenario now I think so the way this could work is Bob puts this unchain either Alice responds or she doesn't if she doesn't respond the game's over and Bob gets the default outcome at that point which hopefully the game designer has designed so that Bob doesn't lose out if Alice goes away if Alice does respond Alice responds by putting the next move on chain so then Alice and Bob can continue off chain so by responding on chain Alice has given Bob the exact information they need to continue collaborative chain if they want of course Alice can continue to be an and challenge Bob every single time and we can like deal with that scenario later there are a few things you can do there but that is just kind of like a limitation of state channels like basically your worst case scenario is you play everything out and chain and there's not really a lot of getting away from that now there's an example of tic-tac-toe what would it be like at every particular moment what would be the default outcome which is meaningful so that so yeah we can we can write what would be the best thing so let me answer your question quickly so in tic-tac-toe one way you could design it is so that failing to move is like default in the game resigning from the game the other person gets the entire stake that would be like one deeper outcome and so that what that would look like is as Alice and Bob are sending them across like Alice sets the default outcome to be four six sorry 64 so like she wins if Bob doesn't respond Bob sets it to be 46 when he responds and these hobbies change as specified by the rules of the game so maybe I should go into that a bit and now because like obviously a lot of this is about like what are the valid updates between here and here and then that bit all feeds into like yeah how you can update things on one chain and like the Unchained methods you can call and how that all sort of works maybe can they can the camera see down here I mean kind of see there anyway or okay cool all right here then so what determines valid transition the way the framework does this is there's a single function called valid transition and it takes a pair of states and this says like is a to be a valid transition obviously and what are the rules for something being a valid transition so there are some things that have to stay the same so the participants the nonce and the app definition have to be constant so like a dot participants equals B dot participants etc we need the B dot turn equals a dot and plus 1 so the turn number must increase we need that a dot müber equals a dot signer okay so what does that mean so it has to be signed by the person who's making the move how do you calculate the person that's making the move so for that we specify that people must take turns so that a dot mover is equal to a dot participants and and we take the index of the turn and the mod and we're and it's the number of people in the channel so this says that Alice signs all the or even ones Bob signs all the odd ones this this also extends everything I'm doing here extends to n players and and participant channels if there are three of us we just go around in a in a three so do we enforce that a is final is false not yet I was I'm gonna come on I'm still going so he then same to be okay what else do I need so then I think we are into the bits where we look at differences of stages of the channel so say if the turn number no let me thanks okay if the is final so transitions into its final states can't change the default outcome and I haven't talked about its final yet but we can come on to that in a minute it's basically the collaborative clothes default outcome is the same let me just so I think that's all you need else so this is like the conclusion step of the channel like this is the end the end game of the channel is this a little bit here else if the turn number is smaller than equal to B's 10 number is smaller than equal to 2n this is like a setup phase I'll talk about why it's 2n but basically like the first two steps of the channel I set up and that's weird because in that cartoon version I didn't show you to n I only talked showed you one in but like we actually need an echoing back after that I think so a dot default outcome equals V dot you fold outcome a dot the updater can't change in that thing either and we also need that we can't go back so I also need not a is final so once you've gone from a final set you can't transition back into another one in the first two n steps in any so in fact I'm gonna have that condition in the final else as well basically like yeah I mean maybe there's a better way to write this and then otherwise what we need is B dot app definition dot valid transition A to B and not a is final so so yeah we've got three stages this is like the end this is like setup and this is like the running step and in the running step most of what we do like obviously these things have to hold whatever then you know in the running step most of what we do is we delegate valid transition to the app definition which in this case would be the rock sorry the um tic-tac-toe contract with another definition it only verifies that AB data was transitioned properly and the default outcome yeah so this is interesting we're not quite sure at the moment we just passed in the whole state so it could actually which means you could write games that have different rules depending on what turn them you're on and I'm not sure if that's a good thing or a bad thing we also thought about like housing some of this off so that this only looks at the default outcome and the updater but then we found out that actually with with tic-tac-toe is useful to have the turn number because you can tell who the mover is from the turn number and then like sometimes you want to do stuff depending on the participants so anyway for the moment it's just like but this the quadric can delay the turn number right they can just put it in the app data yes yeah obviously yeah good point yeah I don't know I mean at the moment it's just we just Chuck in the whole state and the contract has to understand this and so what's the intuition behind having two echoes so I'm trying to think what then what bits I need to explain to explain that so you need to know something about how challenges work to expand that and so let me can I come over and grab your board real estate so like what is so let's look a little bit more in depth at the adjudicator so this is the adjudicator so the adjudicator is basic like a system of balances so it has a dress so I haven't talked about addresses yet so we calculate a channel address so channel address is equal to the hash of the participants and the nonce so we have the address and say like the address of this is like tic-tac-toe number 1 or something so it will store an address a balance I guess the number of coins it will store an outcome and then it will have some way of doing a challenge like the challenge time out and stuff so here we might have like tic-tac-toe number 1 no balance no outcome at the moment so this is what was I trying to get to I was trying to get to the setup so how do you launch a challenge so you launch a challenge by providing two states and what the challenge does is it checks at these two states or a valid transition and then if it is it like makes the default outcome from be pending and then you have some time so you can respond in fact let's just see you reply you provide a state so challenge will store this state in the contract I guess really I should have an extra column here for challenges so like it actually stores the state and then to respond you provide the next the next state here so only if n is equal to torrid yes if n is equal to three yeah so that's the vent that's the general pattern and this stuff breaks down pretty quickly if n gets reasonably large but then state channels break down pretty quickly if n gets reasonably large so I think it's okay so why do we need why do we need this initial set up so you need this initial set up because at this point this point is like a special point so like I guess the way this looks is that you have two states special point two states more states and these things here we call a pre-fund setup and these things here the post fund set up as a post one is effectively acknowledging the fact that the contract was created it's acknowledging the fact that you see the money up there so it's to stop anyone from being forced into playing a game imagine I put my money in you don't put your money in and then went to the game and if I don't play I lose because that's how the rules of games are set up so and so and so that's why all this puts when you're first because she sends the first confirmation that exactly yeah I mean okay so there are a couple of things interacting here they need these ones before anyone puts any money in because this is exactly what you need to launch a challenge so like before you've got two states you're not safe to put any money in the contract because if your person doesn't give you the other state then you've lost your money all right so that's so effective for Ellis to exit yeah she needs this state from from Bob technically Alice doesn't use Core State but but but she's upstate and the reason Alice goes first is because if the outcome stopped here she will get the money back first so it's like slightly different like I think we always do it this way around I think maybe works it around I'm not exactly sure but like pretty much like this is the way to do it and then the nice so the actual thing about this state here is that you have we're now beginning to get into the theory of like why this works and one of the things that's important is knowing what the states hold to hold you're holding mean and really what that means is from this state what outcome can I get on chain like what what outcomes were what outcome is finalized well based on what I hold and this this point is a slightly magical point because both participants have a finalized abour outcome at this point because like Alice is holding two states she knows that the outcome can't change without her sense signing another state Bob can have the same like the same logic and this is actually like really important when you start building up state channel networks the logic of like at what point can I guarantee that the things I'm holding allow me to put something particular on chain so like Bob can also Bob knows that by withholding his signature at this point the this outcome no other outcome than this outcome is possible so this like funding point and these like set up things here make this funding point a universally finalized for outcome the other point you have that is is when you've got a finalized state again I haven't told you how that works yet but like if you hold a final state and I hold in this final state so I'm by the other person then we also have a universally finalized for outcome the reasons under some assumptions but like that can't go wrong but if you follow the protocol account so question yeah so here Bob Bob is only putting money into the contract yes when they see message number three right no when he sees message number two at this point everyone can put money in but how would Bob like imagine Bob one is his message number two yeah he puts money and he puts his five and then Ellis never responds how does he exit what the charities day and just with this two and then the worst thing islets can do is respond with this one maybe that's what he wanted maybe Alice's now alive and they can continue or if that's not what he wanted he can then challenge again with these two because he's now got this one and my so what you're saying let's go through the example right so so example number one Bob has put money Alice hasn't right so we're assuming that breaks I'm pretty sure yeah so let's see let's say let's I guess we also need shall we try we assume that this is the outcome at this point yes is the starting out there so so let's say so let's say so this this has to be 5s right yes yeah okay yeah yeah if we're doing the proper protocol yeah this is this is driving right into the seventies now I can convince myself that if Bob is waiting for Alice to post a message yeah and it seems to be safe what you think Bob doesn't need to wait before he deposits money so Bob is holding this and he sent that and saying at this point it's it for both of them to put my name it's safe Alice put in money first and then to Bob to payment also what was waiting for others to put money yeah not necessarily for her deposit and I said I guess yes so they do these messages then Alice pits in money when Bob sees that's definitely gone through Bob can put in money and actually probably what you'd want to do is make Bob's Bob's transfer in conditional on there being a certain amount of money from Alice in there so that you can't get like real problems where like Bob because if you end up with five in the contract which is Bob's then Bob is screwed and like Alice can just take his money because Alice gets the money first so it's in it's important for Bob yeah so when they're holding these things and the reason it's safe when they're holding these things is they can challenge either than can challenge they know that like both of them by withholding this message and because of these rules they can tell that the default outcome never changes but Alice sends this message when she observes everybody depositing money yes okay yes so Alice shouldn't Alice shouldn't send that message until she's seen everyone runs money in there that's Alice saying like I am okay for this game to proceed after she sent Miss Alice's into the game but because Alice has the right to withdraw first yes that she has anything to loose if she only waits for herself to deposit probably not but what if the first rule of the game was for Bob to take all the money like you know Alice could be forced into that and like I don't know I mean I'm I think it's important to have these because you don't know what the game developer what the application rules are going to be right I said so by the step to M affects a lot who knows that everybody recognized that the money were deposited yes and everyone is happy to proceed okay that that I guess makes sense too and I wonder what I should talk about next maybe you should do the final finalized stuff so you've got another another thing here finalize a B and I'm going to put stars here do you say that these estates with its finalists true so like what this does if you call finalize with two states where this is about a transition and they both have its final true then your your outcome goes straight into the outcomes column without any time out or anything and again it's as many arguments as many participate as many arguments is there are participants so yeah that's how you get things into this this stuff so like I guess so if I go if a plane kicked octo and the game is over yeah I will if I'm a good actor I will sign this final yes yeah and then it settles makes it so another question I have is when a challenge does much does my challenge have to have a higher turn number or it could be the same to a number so when you challenge so I guess this is was the thing that I was talking about earlier like do we also store here the highest successful I mean it's really the highest successful response that you want to but let's say so my question is so imagine I'm Bob and I'm playing some game with you and they're making it turn but but then they realize it was a bad turn for example yes alright so I'm making another one and I'm exiting with that one yeah okay so you come right into these other things there's another method so this is a general problem like what happens with alternative moves and any protocol any state general protocol has to handle that you know I could always like send you turn number three and then send your alternative ten number three and the way that works in this protocol is that you get to choose so you can choose whether you go from three or from alternative three and this is actually pretty useful in a payment channel say like say in this exactly this very example Alice send I mean this is not the payment channel anymore but like if I send you six six four and then I send you seven three and I send you eight - I can rely on you achiely picking eight - out of that so like you can get like you can actually use this alternative turn number stuff to your advantage when designing protocols so yeah so if I give you multiple turns you get to choose we have to have that here as well so like there's actually another method which is respond with alternative and here you have to provide so like say you challenged with say this was like number four I'm even if all it's not a good number because that's too low but like say this was number seven and this was number eight so how do I respond with an alternative well I'm like okay I was I think what you do is you do be primed C so I give something else this is like a little bit hazy we're getting into like that's it but basically you need something like this and so this has number eight and this has number nine so it's like so this is you saying you were at seven I moved to eight now I want you to move tonight and this is me saying but you also gave me this other eight and I want to move on from that so from this perspective for I shall always if a challenge is an exit right challenge could be an exit right and so for me it's always I should always challenge with B being my message right because if it's one if it's not my message you mean your challenge with this first like like you make it so let's say that I'm Ellis yes right and so in the channel Bob sends me a message and Bob says I'm giving you all the money it's all yours now yeah and then I go to the - here yeah well it's only worth of these also Carol yeah so let's so let's say I'm Ellis yeah he's also hoping these Carol yeah no I think it should be fine so what I'm trying to see if I can get screwed if I'm exiting B which was a state on which I acted upon already someone else yeah someone else can wait create an alternative state and something on top of that but then that got it then she should be someone who's not me yes but then if she sounds something that's not me then why why did they act upon the state which was not yeah like in each at each point if it branches out you have the ability to bring it back to a single thing and but this this this would be either stay that I sent or state which was sent directly to me right if I'm sending if I challenge for the state which was in between so this is this is kind of interesting I think it works but like I mean say say we're like in I mean say you're in a in a channel challenge in a channel with both like Allison Carroll and you went then Alice went now Carol hasn't gone you have to be able to challenge with the like Carol's previous state your state and analysis state because otherwise Alice could grief you by not launching that challenge so there are some situations like any person might need to challenge at any point to force the next thing in the line cause I guess my argument is rather is that if this is Alice Bob and Carol playing right so L goes further than Bob's and Carol so if Carol sent me some message yeah and so let's say we also doing some other actions so let's hit the payment Channel and Carol sent me money yeah I gave her her Lottie yes right then I know that that money is mine yeah because I can exit what what I should not be doing is imagine that some action by Bob so Bob sends message to Carol it's a message from Bob to Carol yeah which in some way tells me that I'm that that is good for me now to provide the service Yeah right so that is dangerous because now if Bob and Carol are colluding they can they can sort of remove that message right because Bob can then say oh that's actually not message I wanted to send and Carol can immediately respond to his challenge saying yes yeah so like this we I guess we're getting back into that like when of things finalized but when do you know about things so like the question of like when I said this was a universally finalized Abul state at each point it various points in the channel you have a final I school state you have a finalized Abul state exactly before you send out your next state because at that point you could not sign anything else and you could ensure that the channel finish and that's also where the and because that's always a possibility that you can always exit in your state that's why we allow this transition to its final any state so like instead of just you know if you can achieve an outcome by just like stopping and griefing everyone until the timeout goes we let you do that outcome without doing that so like the other thing you can also do when it's your turn is just to decide to like bail out the algorithm and take the deeper outcome by signing in its final stage but but signing his file is not exactly the same as as as going a flam because if I go offline yeah if they if they try to exit and I challenge I send them the new state they can use that state how to proceed right yeah like that can unblock yes I cannot stall the system once you've signed its final and send that to people then I know what you're saying is that if if I choose not to respond they can finalize this date yes makes sense yeah mm-hmm so yeah we've got this responible alternative as well so this is - you need to have this like in the adjudicator to allow the possibility that like yeah basically to enforce the thing that if I send you multiple to States you get to choose so yeah okay so I feel like I feel like we've covered most of the valid transition stuff I don't know if it's useful to actually think about Tic Tac Toe I mean if you think about what the rules are for something like tic-tac-toe you can kind of like figure it out like I mean I guess one of the way to think about this yeah maybe I should draw this like actually can we get back to university for analyzable State for a second so okay so let's say observe certain states right universe might follow - analyzable means that either this state will be finalized or some state which is strictly better for me right yeah okay so all right I misspoke when I said universally finalized will state what I meant was universally finalized for outcome so you know it's going to be exactly that outcome and like before your turn you have a finalized abort outcome it's not universally finalized well it's quite unusual in the state channel to actually have universally finalized of all states but we can actually design a game called the consensus game which is like just a game like tic-tac-toe which has the property that you transition from one University finalized Ball State to another and that turns out to be very important when building networks so you can get that property if you want to but you have to like design that into the game in most games like you don't really want that and that's one of the strengths of having this like flexibility to design your transition function and like not have to have everyone double sign anything what's the definitive universally finalized about that means that that state and no other state will be finalized effectively right and finalized Abel means that that state can be finalized but so you hold a finalized for outcome if you have a strategy for getting that outcome into the judicata and no one can stop you so like if it's your turn if it and you haven't signed anything and send it to anyone yet your one strategy to finalizing that outcome would be to challenge yourself and not respond to that challenge another strategy would be to sign a conclude state and then release that to the world because after you've signed a seclude state everyone should not collude conclude state or its final state then everyone knows that you're not going to sign it or you shouldn't sign anything else that's you saying I'm out you guys can give us final or we can just challenge on chain or whatever like there's no way to change the outcome once you're in its final state and so like realisable means that everyone holds that property for that for that particular outcome yeah I'm like if you think about like the definition so like this unbeatable strategy bit you're in one of two situations either like one person holds multiple one or more fine lines will outcomes so like it's possible for you to have to finalize outcomes if I've given you multiple moves all of those outcomes to you are finalized but at that point in time it might also be that you're the last person basically having multiple final answer outcomes is like having an option you know like I've given you this thing and you can like you can do it yeah so like you can have multiple finalized poor outcomes but or everyone can hold the same finalized outcome it's impossible to have two different people holding to finalize of outcomes because it a is finalized ball for Bob and if a and B if I might say Bob and a and B if ionizable for Alice then either of them can choose either at them and they could make sense yeah so yeah that and I think that is like in some ways that's the key logic underneath state channels what outcomes are finalized well given the states you hold and that's the bit that we like developed a lot in the Nitra protocol paper like how do you reason about when you can finalize an outcome one chain which is obviously like yeah important cool so that's most of it for two participants right yeah and multiple participants isn't really that much different so I guess what we've done here so I said there are two parts the first bit is how these things trying to transition off chain and that's the bit that I guess we've just done here like the one bit that we haven't looked into is this app definition but like you can you can probably like figure out what the app definition is for something like this it's like you know you you think of these apps as state machines I guess so like with tic-tac-toe you're doing something like you're moving from X turn to zero turn and then you can transition from X turn to like x1 you can transition from like 0 1 or we can transition to draw and in fact I think only X just because there are odd number of moves only X can actually transition to the draw only oh can transition 201 these can obviously transition up you start you have like a starting state that like that's what you would put in like initial things you would start with like the empty board here has a stake so you can you can basically you basically have the way you write these apps is you think of these different states you have to figure out how to encode those in your like arbitrary bytes up to you to pick how to do that then you have to enforce these things you have to say that like from oz turn to exes turn you have to change the balances according to this rule so that like the person who stops forfeits if you want to encode that rule you might you might actually want to make this dependent like you might want to say that like at the beginning of the game stopping isn't too bad like this is kind of really interesting because because at that point that you brought up and in fact so the PISA team so Patrick McCrory and Chris Buckland wrote a paper about playing battleships on the blockchain and how it was really bad because or in a state channel because in the worst case I can make you do every single move on chain and so like that's kind of bad but I think there are some ways around that by like designing your incentives properly the problem here is like if I don't respond to you on chain it's like I've lost everything whereas if you get to a point like with tic-tac-toe this isn't such of a problem because like it's it's where like the value of the game it's where my perceived value of the game is different from these outcomes that I'm compelled to continue and you can like almost grief me infinitely unchain it like it get you into bad situations but if you can get two points where everyone agrees on the same on the fair value like in this payment channel you can't grieve someone it's like if I if you if you grief me and you force me to be volunteen like I can always just be like I'll just take the money like I'll just take the first split and so like deeds but that effectively requires you to have a value function for the game right yeah it's like if you're playing go yeah like tic-tac-toe is easy but if you're playing go you know the value functionally pretty complex yes and chess as well it's like but you can if you can kind of like get it a little bit closer then you kind of lose some maximum loss and for something like chest you could imagine for the first ten moves it's fairly cheap to exit because most games are not decided in the first 10 moves of course that's a problem if you like into one of those situations where you actually get checked mate in the feel like first three moves and then so it's kind of complicated designing these but for these long-running games it's pretty complicated figuring out what the what they like default outcomes should be but a lot of games don't have this anything you do multiple rounds on like tic-tac-toe we want to pay ten rounds of tic-tac-toe after any round there's a fair stopping thing so you can't be grief that much you're limited like for most little applications you want to run an estate channel like so you want to trade you're gonna trade some X going to Y coin or whatever again like there's like you can't be infinitely group there they're like three moves to something if we're playing like Rock Paper Scissors like there's a commit reveal there you have to be careful about the the incentives to make sure that if I don't reveal they know it's like I've lost that of it in there there's like four states that you go round and every time you come back to the to the start again and that's a fair place to end the game so like I think that's kind of like some interesting research to be done here around that notion of like when the game has a fair value that is easily calculated bull when can you stop when you get an out if not how long it is it to that point because that's not your like griefing danger I said well anyway so I think that's probably enough about these games because I guess you can probably like figure out how these things work in their examples and so we've actually we've actually got this tic tac toe game working so you can actually play it in the browser and look at the contracts and stuff right and is doing anything else we want to cover so we this is like everything about like how the off chain stuff works you want to cover of the which one do you so let me see so what I was going to talk about next was how we can go from these like off chains rules to know to state channel networks so breaking the link between like one deposit to one state channel interaction so it's actually a lot to do with how this on chain stuff works so say I've got this tic tac toe game here and it's got ten in it you know like alice deposit and deposited and somehow I've got this outcome which is like Alice gets to Bob gets eight okay so how do we actually get this to Alison Bob so there's another method on the adjudicator called transfer how to write and it's transfer I guess like from to a known amount okay so I called transfer on this so like starting off like once this stuff means that you can only able to get one outcome per channel once the channel has an outcome it's done there's no way to put another outcome on chain so once this has an outcome we can start operating on it so like I can call transfer from tic-tac-toe to Bob the mount 8se and the algorithm here is like I go to tic-tac-toe does it have 10 in it that goes to - does it have 8 in it that goes to Bob so like if this was only like 8 the answer to that would be no because the first two of this goes to Alice and the next six goes to Bob but Bob's in luck because like there is 10 in it so when I call this the following thing happens Bob's address gets 8 in it this goes down to 2 that changes to 0 mm-hmm so Bob can just extract it from there and then we have like the withdraw function from and then like destination or something which allows Bob to withdraw this from his like adjudicative balance into his aetherium address you have to be a little bit careful about like that has to be signed by Bob's key and all that sort of stuff also so does so that serves transfer function right I know transfer function anyone can quality yeah anyone can call the transfer function it just moves around balances in this like thing here so that's how that works obviously like Anna's can do the same thing we end up with zero Alice to zero and then Alice and Bob can we draw these these addresses are interesting because like these addresses is different to that address and the difference is that someone knows the private key to this address which means that somebody can we draw from this address through this address somebody knows the part of the channel such that the hash of the participants and the nonce go to this address which means that people can put outcomes in this address so you have channel addresses and people addresses so don't like something similar school like contracts and the counts on the city yes yeah exactly yeah and that's kind of interesting that we all kind of recreate really creating if there him in a theorem in some way but like so the question now is like what if these weren't participants like there's nothing that says these have to be participants like what if for example this had been you know like 10 Alice gets to and no rock-paper-scissors gets eight where rock-paper-scissors is another channel so then like rock-paper-scissors could get eight could get eight out of this and then like maybe at some point in the future this becomes a to be six or something so like the key I guess this is the key insight that like the outcome of channel can allocate to another channel and that can allow you to build up state all networks but initially want if Dokdo address was created right there was balance but there was also the initial outcome yes so how does the initial outcome so the initial outcome remember is not on chain and if this allocates to to RPS eight then you better hope that Alice and Bob hold the initialization for that RPS contract and so like you're beginning to see how this might work so like if I can I get another different color so got a way of drawing diagrams for this this is the adjudicator this would be like tic-tac-toe and then this would allocate so this would be a 2 this would be PS 8 and then like this would eventually be a - and like be 6 so you can but what's the value so why Krause is fundamentally better than just having like RP s to be a part of that of the of the state transition for tic-tac-toe so like you know you just have one which is tic-tac-toe and RP s so this is a stupid example in actual fact this wouldn't be rope a tic-tac-toe this would be something called ledger channel and a ledger channel it's just one of these things looks exactly the same but its default outcome allocates default balances to Alice and Bob and then things to other channels so imagine if at this point so think the whole thing we're trying to get away from is having to do an on chain transaction to fund this channel so imagine that imagine that Alice and let me just but so far it is Unchained transaction right so this transfer call it is on chain right yes the transfer call is on chain so we didn't get rid of doing chain connection but we don't need the transfer call okay so imagine you start in this situation that's the adjudicator this is a ledger Channel and it gives like five let's say let's say it gives ten to Alice and ten to Bob and it's funded with twenty on chain it has to be so Alice and Bob set this up like at the beginning the month whatever they now want to play tic-tac-toe so they a tic-tac-toe Channel and these are actually diagrams for outcomes so this is like tic-tac-toe and the initial state is 5 to Alice and 5 to Bob okay so they've set this up there at the I'm just just there at their funding point though this is two things in this is a university finalizing outcome for them we'll assume that this is also University finalized out because these ledger channels are going to use the consensus game they talked about earlier which moves you from one University financed finalized without coming to another one so what can they do now so we want to fund this off chain so this is just like one of these things so I can sign an update to that which takes it to five to Alice five to Bob and ten to tic-tac-toe okay so this is like the outcome thing at any point here that the due to the rules of how state channels work at any point here like if I challenge on tic-tac-toe that would look like this you could end up with all these things work independently so to tighters balance of zero but it could still have a challenge and it could still have an outcome of a a for b6 which when I at some point in the future challenge with this one would like and then I feel like then over there we'll just transfer - first from from ledger to tic-tac-toe and then from tic-tac-toe to book and the fact that there's a threat of this happening means you don't have to do it all the time so like let me just quickly show you how that works so like we're in this situation where we've got a ledger channel a is still got a balance held there B has still got a balance of five we've got this tic tac toe thing here this is now look this is like while we're playing the game this is no longer in a university final outcome like it's it's oscillating between arts and Bob and then imagine it comes to an outcome so like I've been got this just and then tic-tac-toe is now it finished like H to Alice to to Bob five five I can then close this channel off chain by defunding it and just like absorbing those into the to the getting off to the rails here so and then so Alice gets five plus eight which is 13 it looks like a B and then Bob gets two plus seven so what I've done here is I've got two state channels one running the ledger channel one running tic-tac-toe we had the money in the ledger channel I've managed to open this tic-tac-toe game fund it off chain do everything close it off chain as well and why and come to your other question like why do you even need to do this why not just have the rules of tic-tac-toe in the ledger channel well you can have multiple channels working independently yeah yeah so I could have tic-tac-toe a rock-paper-scissors a head of chess or operating with independent updates and independent challenges hence the ledger channel that's a channel that that is operated by some centralized entity no it's just it sure yeah I would still Ellison Bachmann attending the channel forefront other yes yes so basically this thing is the job that this is playing is deciding of this money that's held up on chain how should it be split up and we can like change that off chain and then the really interesting bit it's like this still has a weakness like if I want to translate with you I still need and on ten deposit with you but you can play this same game with virtual channels so like I have a connection to a hub you have a connection to hub we can create a tic-tac-toe game we can put agreements in our arms with the hub to fund that tic-tac-toe game we can play it and then we can absorb those back in again and it's supported by this stuff at any point if we stop we can resolve everything off chain and that's what allows these to happen trust lessly and so when you say happy it's it's effectively the way for two people yeah okay virtuous yes intermediary it's better it's maybe a different word so it's a favor someone Coryell lays messages between the other sandbox signed by Ellison Bob know so in a the thing that the hub so say this is like a hub and this is Alice and this is Bob and they have these channels this is really bad because this means something different to those things but like now if Alice and Bob want to play a game between them the thing the hub is doing is providing the funding so it's a bit like it's a bit like you're doing things with the hub instead of the chain that's ultimately still Alice and Bob sending message today sending messages directly to each other the hub doesn't know the only thing the hub sees is the opening balances and the closing balances much like what the chain would see in the initial things so well then there's also some mechanism to challenge hub if the hub does not cooperate with the updating balances yes the the challenge of the hub is just exactly the same challenges you've seen here so this is just a ledger channel you have with the hub so there's effectively some sort of AB definition which you have with the which lab to consensus game which is like I've I proposed an update you you give me that date the hub could not play ball but if the hub doesn't pay ball then we just put these things on chain and let it play out and the adjudicator and that that's always a threat that's why this stuff is safe the thing that I haven't shown you which I won't show you is the fact that you actually need something a little bit different than just these allocation outcomes you need something called a guarantee outcome to be able to open and close these safely with the hub under some well to open and close virtual channels you need this extra sort of outcome which goes beyond this but like that that really does begin to get a little bit subtle to see why this at first you might think that this is enough but it's not I think well let's go through the attack so let's say this is all we have what what can what can go wrong so one so we need this is enough everything I've shown you here I think this is not enough for us to do a virtual channel to do that I would have to probably show you the virtual channel construction which is going to take a while so I don't know if you want okay I mean I be this is where it begins to get really interesting but we've come out of time okay so we go through this at different time or something there the I guess to give you like a little bit insight into why that happens one of the rules are state channels if you can only depend on a result of state channel if you're a party to that state channel like if if Alice and Bob so the things the place where this gets complicated Alice and Bob have their outcome from Tic Tac Toe and they send that to the hub and the hub's got to update these things independently the hub sort of can't trust what Allison bothers telling them kids like Alice and Bob could like give one outcome to one arm and one outcome to the other arm and it could be that these two arms are forced into resolving so the way this is work of it I haven't said this but they would each put in five and if this came out as eight - then the hub would be balanced eight to eight - so the hub still has their ten but it's like moved around and Alice and Bob we've got their eight - so like the hub the danger for the hub is that like it's forced to resolve that and it doesn't maintain its ten so that's the safety property you need for the hub and that's difficult when the hub can't trust anything that comes out of Alice and Bob channel like in its final state sure they kept it on chain and then the cub can trust it cuz it knows it's never going to find lies somewhere else but like yeah you need so they end up having to have like a joint so in virtual channels you actually need a joint like ABC channel you need a three-person channel to have the updates from it and then you need to there are actually sort of ways you can do it with this but it go this is too high level till I can make me interesting that I it's it's all in the night robe chapter on the paper if you're interested in this stuff cool okay that's quite a bit of stuff so so then let's let's mine like one minute on non technical stuff so this is all life right and the the basic games alive we're currently working on this ledge of a now after that we'll work on this virtual stuff okay so virtual stuff is in life the virtual stuff is not like the legislature it I mean a lot of the complexity and stuff is building the off chain software to support it so like yeah it just inherently gets pretty complex and kind of think through all the different stuff is but the product is is like an SDK on top of future building games or there is some sort of so we're really just developing a protocol and the other people can use for this various stuff like you can already write these games like tic-tac-toe on it there'll be like direct channels they will need to do it doesn't support this legend all stuff yet but they soon will do the stuff that we're actually building is a wallet so your wallet will run in the browser to play the game to play the game so like we need the way it works at the moment is like if you wanted to make one of these games like tic-tac-toe you create the on train smart contract you'd write the front end and then you'd import our wallet and the thing that wallet does for you is it stores the states it does the signing in the future it will check that the valid transition function is true so it can like emulate some solidity code that it pulls down and checks that your wallet is not signing things it responds to challenges it allows you to launch challenges it does like basically the protocol part of it so that you can just focus on like this the the game part of it and that wallet and then the other thing that we're building is like we already have some bots that support that protocol but like the other thing we'll be building is the hub the intermediary that talks that wallet so like from you as an application developer you won't notice whether your app is running in a virtual channel or in a ledger tablet or channel or in a direct channel and the way you code your app you know at some point in the future you imagine you get an upgrade where your your state channel application will run completely off chain without you making any changes to it you'll just let import an updated version the wallet and the wallet will speak to a hub and it will work cool okay awesome so that's concludes the video thanks for watching","transcript_synced_at":"2026-11-04T04:31:39.205Z","segments":[{"start_seconds":2,"text":"hi everyone this is Alex from near and with me today is come close from magma we will talk a lot about state channels today Tom would you like to introduce","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2s"},{"start_seconds":10,"text":"yourself yes so I'm Tom close I am the founder and CEO of magma magma is a state channel research and development","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=10s"},{"start_seconds":19,"text":"team and that's what we're gonna be talking about today well yeah that's high-level over a guess wish I start","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=19s"},{"start_seconds":26,"text":"what a stay channel is right okay Oh how about I start by giving a I guess","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=26s"},{"start_seconds":33,"text":"like a toy example of a state channel interaction so as you probably we're like state channels or an interplay between like unchain stuff and off train","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=33s"},{"start_seconds":43,"text":"behavior so let's start let's suppose we have Alice and Bob","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=43s"},{"start_seconds":50,"text":"now we're gonna suppose Alice and Bob want to do a lot of transactions with each other and these transactions are going to be done very quickly and maybe","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=50s"},{"start_seconds":58,"text":"they're going to be very small in value so basically it wouldn't make sense to put all of these transactions on the blockchain so how do I listen Bob do","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=58s"},{"start_seconds":66,"text":"this in a state channel like this so they start off by exchanging a message","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=66s"},{"start_seconds":75,"text":"with each other so these messages are going to be numbered so it's gonna be message zero","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=75s"},{"start_seconds":81,"text":"and Alice is gonna say five and Bob five let me explain what this means in a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=81s"},{"start_seconds":89,"text":"second Alice sends that to Bob and it's signed by Alice I'm just gonna say","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=89s"},{"start_seconds":97,"text":"anything that Alice sends to Bob is signed by Alice and anything Bob signs to Alice is signed by Bob okay so this is like an opening statement so what","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=97s"},{"start_seconds":105,"text":"this is saying is we are going to start a state channel alice is going to put in 5 Bob is going to put in 5 and then Bob","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=105s"},{"start_seconds":113,"text":"will echo that back so he then send","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=113s"},{"start_seconds":117,"text":"agreement number 1 Alice 5 Bob 5 okay so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=117s"},{"start_seconds":125,"text":"at this point they're both holding a signed agreement that they've signed and a signed agreement that the other person has signed saying that they're gonna","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=125s"},{"start_seconds":132,"text":"open this state channel with conditions so I'm going to use red for Unchained stuff so at this point they're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=132s"},{"start_seconds":142,"text":"in a safe state to deposit some money on chain and I'll go through that a little bit more why that's a safe state later","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=142s"},{"start_seconds":149,"text":"so there's this contract on chain we call it the adjudicator so this contract","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=149s"},{"start_seconds":158,"text":"is going to hold their funds for the duration in the state Channel and it's also going to I guess implement the rules the protocol about how those funds","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=158s"},{"start_seconds":166,"text":"can be released so in this situation what happens first is Alice deposits five the other thing is I'm just going","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=166s"},{"start_seconds":174,"text":"to talk in terms of like abstract coins throughout the whole of this so we can do this with like different ERC 20","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=174s"},{"start_seconds":182,"text":"tokens eath or whatever but for the whole of this discussion we'll just talk in terms of coins because that's right so Alice puts in five and then Bob can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=182s"},{"start_seconds":192,"text":"also put in five so there's now ten coins in the adjudicator and it's going to be split according to the outcome of their state Channel","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=192s"},{"start_seconds":201,"text":"so now Alice and Bob can get going like with their interaction so say Alice wants to send one coin to Bob she","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=201s"},{"start_seconds":208,"text":"doesn't update she decrements her balance increases Bob's balance and then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=208s"},{"start_seconds":218,"text":"Bob sends something back and so on actually what always needs to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=218s"},{"start_seconds":229,"text":"confirm and not quite that we can get into that later so it for the purpose of this toy example I'm going to suppose","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=229s"},{"start_seconds":236,"text":"that Bob always needs to confirm but yeah and so so let's go through a few","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=236s"},{"start_seconds":244,"text":"ordinary cases yeah what happens if first of all does it matter in which order they put money into the contract yes it does so it has to be Alice who's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=244s"},{"start_seconds":253,"text":"on the initial message yeah I mean so probably good to get into that later because you'll see exactly how that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=253s"},{"start_seconds":262,"text":"works when I explain like so what this I guess to give a little bit of sneak peek of that now what this actually means is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=262s"},{"start_seconds":269,"text":"of the money in the contract first Alice gets five then Bob gets five so this this this list here this like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=269s"},{"start_seconds":278,"text":"thing here actually encodes a precedence order this I guess the other thing is like I should probably say is some of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=278s"},{"start_seconds":286,"text":"this is like general state channel stuff some of this is specific to nitro protocol which is our protocol for doing","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=286s"},{"start_seconds":293,"text":"state channel networks so not all not all networks have this precedence thing","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=293s"},{"start_seconds":301,"text":"the reason we have it is allow it allows you to just store 10 here in other state channel frameworks you'll see in the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=301s"},{"start_seconds":307,"text":"adjudicator things like so they'll track","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=307s"},{"start_seconds":315,"text":"the actual balances and stuff I'm just gonna stick with doing it this way it has a couple of other nice properties we","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=315s"},{"start_seconds":323,"text":"should get into so yeah so Alice has to deposit first Bob can only deposit when","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=323s"},{"start_seconds":330,"text":"he sees Alice's deposited otherwise it's not safe Alice could steal his money and there are other things you can do around that to avoid the time delay which I can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=330s"},{"start_seconds":337,"text":"talk about later as well okay so they do this many many times they're limited","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=337s"},{"start_seconds":344,"text":"only by the speed in which they can send messages to each other to each other and sign them","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=344s"},{"start_seconds":350,"text":"say they finish off in stage I don't know like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=350s"},{"start_seconds":356,"text":"to say 98 where Alice now has 9 and Bob","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=356s"},{"start_seconds":363,"text":"has 1 now they decide that they want to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=363s"},{"start_seconds":371,"text":"stop the state channel there what do they do so they take the final state and they present that to the adjudicator so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=371s"},{"start_seconds":378,"text":"that goes into some like slot on the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=378s"},{"start_seconds":382,"text":"adjudicator and it's like 98 a 9 1 and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=382s"},{"start_seconds":391,"text":"it starts a timer so this is like a pending thing the reason this is pending","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=391s"},{"start_seconds":399,"text":"is because it gives the other person a chance to challenge with a higher state it's like you think about it like this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=399s"},{"start_seconds":406,"text":"state is not favorable to Bob Bob would prefer this state so like Bob could try and put this state in there if you did","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=406s"},{"start_seconds":414,"text":"Alice would have some time to present the 98 and they saying what can't put it before okay I guess I'm let me let me","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=414s"},{"start_seconds":423,"text":"get back on track I'm jumping ahead so in the happy case and this is you can also optimize this which I'll talk about","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=423s"},{"start_seconds":430,"text":"later - Alice puts this up here there is no higher state and so at some point it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=430s"},{"start_seconds":437,"text":"will time out when it times out then the adjudicator sends the money back so it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=437s"},{"start_seconds":443,"text":"sends nine - LS 1 - Bob this becomes zero and this is like done so that's the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=443s"},{"start_seconds":450,"text":"happy case the reason the time out there as I've seen before is to protect against one person cheating it's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=450s"},{"start_seconds":458,"text":"obviously the chain doesn't know how many states there are off chain how many like of these commitments they've sent back and forwards so like Bob here could","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=458s"},{"start_seconds":467,"text":"be like our I've only got one coin here but I've got six here so maybe I could try and check out in this state so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=467s"},{"start_seconds":474,"text":"he would put this in eg Decatur and then Alice would have the time out to respond with this state and say actually there's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=474s"},{"start_seconds":482,"text":"a later stage and that will cancel with challenge and then they could continue and and if if Ellis challenges does she get nine or she gets","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=482s"},{"start_seconds":490,"text":"everything so the way it works in our stuff is that Alice will get nine in fact it's not even that Alice will","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=490s"},{"start_seconds":497,"text":"cancel the challenge and then Alice can put this in the adjudicator separately so like basically she's just like refuting Bob's claim that this was the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=497s"},{"start_seconds":506,"text":"latest date what the contract will not allow Bob to exhibit this again right and probably not you can you can we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=506s"},{"start_seconds":514,"text":"now into like optimization details so do you store do you store the highest number that's been challenged or like the highest number you've seen an adjudicator probably yes because it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=514s"},{"start_seconds":522,"text":"allows you to get rid of some states and avoid some griefing but then that yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=522s"},{"start_seconds":529,"text":"you don't have to like I mean you could you could live in a world where the adjudicator doesn't do that and every time Bob presents this Alex presents that and they're just locked in this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=529s"},{"start_seconds":537,"text":"game so you probably would want that optimization it's not part of the protocol so this is like this is the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=537s"},{"start_seconds":547,"text":"basic pattern that you see with state channels and with payment channels you lock up some funds on chain you send new exchanges and signed agreements off","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=547s"},{"start_seconds":556,"text":"chain and then at the end there's some challenge period and after the challenge","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=556s"},{"start_seconds":563,"text":"period you split the funds according to according to the final outcome of the channel and and Bob can also initiate messages right yes it's not like every","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=563s"},{"start_seconds":572,"text":"even message has to come from Ellis so actually is like that I guess we're getting into the details now a bit so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=572s"},{"start_seconds":581,"text":"maybe that would be a good thing to do so I guess one of the one of the things I wanted to do was try and split the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=581s"},{"start_seconds":588,"text":"state channel into two parts basically the off chain part which I think of as","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=588s"},{"start_seconds":594,"text":"getting to an outcome so like here Alice and Bob got to this outcome by exchanging messages off chain and then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=594s"},{"start_seconds":603,"text":"the second part is like actually withdrawing the funds so we try and separate at least in my tree protocol we try and separate the funding step you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=603s"},{"start_seconds":612,"text":"know everything up to do with like depositing money and claiming money from the operation step they get into an","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=612s"},{"start_seconds":619,"text":"outcome and the reason we do that is because that allows us you swap out the funding so a weakness","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=619s"},{"start_seconds":626,"text":"of the thing I presented here so far is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=626s"},{"start_seconds":629,"text":"that this operation started this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=629s"},{"start_seconds":640,"text":"operation let's start with the weakness yeah yeah the weakness so the weakness of this obviously is okay Alison Bob got to do a hundred transactions off chain","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=640s"},{"start_seconds":649,"text":"but they had to start this operation with each doing an on chain transaction and they have to finish it with an","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=649s"},{"start_seconds":656,"text":"untrained transaction so like this and this is actually kind of quite an unusual use case if you think about the transactions you do every day like you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=656s"},{"start_seconds":664,"text":"do a couple of transactions with a wide number of people rather than hundreds run transactions with one person and so like this currently has a big limitation","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=664s"},{"start_seconds":672,"text":"in terms of like a scalability solution but as I'll show you later we can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=672s"},{"start_seconds":678,"text":"actually fund some channels with other channels if we separate out the funding","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=678s"},{"start_seconds":685,"text":"step from the operation step but I wanted to probably go over the operation step first and on to some of your","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=685s"},{"start_seconds":692,"text":"questions about like you know do they always have to apply to each other does Bob always have to confirm that stuff if","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=692s"},{"start_seconds":700,"text":"you happy starting sure yeah isn't that okay cool and so yeah so the first","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=700s"},{"start_seconds":706,"text":"question is so so you're saying that every even message comes from Ellis and every owed comes from Bob right so what if Bob wants to send money to Ellis but","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=706s"},{"start_seconds":714,"text":"but it's not his turn so there are a couple of ways around that let me let me first go into the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=714s"},{"start_seconds":722,"text":"state format and then you can kind of begin to see how some of this stuff works yourself because the that question","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=722s"},{"start_seconds":729,"text":"of like I mean I guess to answer that question a little bit now in some sense is it doesn't matter if Bob wants to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=729s"},{"start_seconds":737,"text":"send money to Alice this is like off chain collaborative behavior so Bob wants to money to Alice he's like hey Alice M your message so it's my turn and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=737s"},{"start_seconds":745,"text":"I can send money to you so you could do things like that they're also actually other ways you can optimize that as well within the rules so let me start by","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=745s"},{"start_seconds":753,"text":"digging into this state format because this is a cartoon version you can't see everything that's happening from this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=753s"},{"start_seconds":760,"text":"version so the state format is like pretty simple in some ways so let me","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=760s"},{"start_seconds":768,"text":"just write it out so you have participants which is an array of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=768s"},{"start_seconds":781,"text":"addresses so this in this case this would be like hmm I'm gonna run out of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=781s"},{"start_seconds":788,"text":"space can I can I switch this off the Bix I'd like to keep that can I borrow that sure can I borrow this thing okay","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=788s"},{"start_seconds":798,"text":"thank you sorry I was just gonna say you have pens","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=798s"},{"start_seconds":810,"text":"see how participants which is an array","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=810s"},{"start_seconds":819,"text":"of addresses and this would just be like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=819s"},{"start_seconds":821,"text":"Alice and Bob then we have a nonce which","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=821s"},{"start_seconds":833,"text":"is you ain't and this could just be like one no this is a number that is used to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=833s"},{"start_seconds":841,"text":"identify the channel in a way that I can explain in a second so like Alice and Bob have multiple channels open this is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=841s"},{"start_seconds":848,"text":"a number they use to distinguish channel number one from channel number two this fits a requirement on Alice and Bob they kind of have to remember how many","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=848s"},{"start_seconds":856,"text":"channels have had open between each other so they don't repeat it's not though they come up with the nonce or the contract the size they come up with","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=856s"},{"start_seconds":865,"text":"the nonce and it's in their interest like obviously they could open a new channel with the same nonce but then states from the previous channel will","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=865s"},{"start_seconds":874,"text":"apply to the new channel and nobody's going to know what the hell's going on so it's in their interest to jointly choose this number and each of them can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=874s"},{"start_seconds":883,"text":"like say I'm not using that number nobody can be forced into using a number they don't want got the nonce then we've got the next","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=883s"},{"start_seconds":890,"text":"thing which is the turn number also you ain't and that's this thing so like we","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=890s"},{"start_seconds":899,"text":"start with zero that's the thing that's gonna label the states we go along and this is this is all the state of a particular channel from perspective or","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=899s"},{"start_seconds":907,"text":"particular person this is what I'm what I'm writing out here it's a message format there's a messages you sent from","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=907s"},{"start_seconds":914,"text":"one to the other person so you can think of it as like the message format or you can think of it as like the state you can think of this as like we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=914s"},{"start_seconds":922,"text":"transitioning from this state to this state to this state to this state we transition from state when a message is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=922s"},{"start_seconds":927,"text":"sent turn number what should I do next","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=927s"},{"start_seconds":937,"text":"it's final false so this is something I haven't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=937s"},{"start_seconds":946,"text":"spoken about yet the as you'll see later the purpose of this is to allow collaborative closes without the timeout","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=946s"},{"start_seconds":954,"text":"so this means that like you know I said here that they go here they have to wait this is a way that they can both sign","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=954s"},{"start_seconds":963,"text":"off and avoid waiting you have to be a little bit careful with this once you sign one of these messages there's no going back the channels kind of over and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=963s"},{"start_seconds":973,"text":"you say yeah obviously because then challenger the script and it's yeah okay","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=973s"},{"start_seconds":981,"text":"then you have the default outcome and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=981s"},{"start_seconds":987,"text":"this thing is weird we're going to start off with this being just like a mapping","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=987s"},{"start_seconds":994,"text":"of addresses to you int and it's like an","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=994s"},{"start_seconds":1003,"text":"array of those basically this is what this default outcome says and I guess this is going to be like a 5v5 know","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1003s"},{"start_seconds":1012,"text":"example so this is like saying like if the channel was a stop at this point he would get what and this format","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1012s"},{"start_seconds":1022,"text":"this is the format for a certain type of channel when you come to building state channel networks as far as I can tell","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1022s"},{"start_seconds":1029,"text":"you need a different format you need to add one more format and a new set of rules and I'm not entirely sure that's true but it seems to be true from","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1029s"},{"start_seconds":1038,"text":"everything I've done this isn't quite enough to do everything default outcome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1038s"},{"start_seconds":1044,"text":"okay then we've got an app definition which is an address and then we have app","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1044s"},{"start_seconds":1053,"text":"data which is bytes and then finish off","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1053s"},{"start_seconds":1060,"text":"with signature which is whatever","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1060s"},{"start_seconds":1065,"text":"signatures are like you int 8 bytes 32 this is a bi it's 32 so this is the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1065s"},{"start_seconds":1075,"text":"classic VRS started playing and this is the signature the person who's signing it and so if it's just let's say just payment channels yeah now we don't need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1075s"},{"start_seconds":1082,"text":"AB definition lab data right and because the default outcome is yeah so the default outcome is almost enough but you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1082s"},{"start_seconds":1090,"text":"do need some rules about how you transition from default outcomes to another Depot but if it's a payment channel those rules could be assumed","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1090s"},{"start_seconds":1097,"text":"right yes they could the way we do it is they're not so like for a payment channel there are different ways you can code up a payment channel which is what","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1097s"},{"start_seconds":1106,"text":"I was coming to here a little bit so one rule for a payment channel might be on my turn I can only decrease my balance and increase your balance so I can't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1106s"},{"start_seconds":1114,"text":"like and that when that would mean I can send you stuff without you confirming back to me they would mean I can't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1114s"},{"start_seconds":1120,"text":"unilaterally steal your money so that would be a sensible that would be a sensible like definition for payment channel another thing would be a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1120s"},{"start_seconds":1128,"text":"satellite consensus there's this thing which will come on to later which is that the consensus game where like I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1128s"},{"start_seconds":1135,"text":"proposed a new outcome and you accept the new outcome and then the outcome moves into this slot so there are there","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1135s"},{"start_seconds":1143,"text":"is a little bit of logic there it's not quite as simple you have to you have to like think about what transitions you cannot allow and what transitions you're not going to allow and that's like part","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1143s"},{"start_seconds":1152,"text":"of like building these apps and so default outcome that's the outcome if if like later down","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1152s"},{"start_seconds":1158,"text":"the road I'm trying to exit yeah so this one of the things about payment channels is and state channels it's a little bit","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1158s"},{"start_seconds":1167,"text":"risky right that you've looked up some funds up here and the way you unlock those funds is by doing some stuff off","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1167s"},{"start_seconds":1176,"text":"chain with an opponent or a partner maybe maybe an opponent I don't let's talk about it as an opponent is a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1176s"},{"start_seconds":1183,"text":"slightly adversarial relationship so at any point my opponent could stop so what","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1183s"},{"start_seconds":1190,"text":"happens if like Bob just stopped here maybe Bob doesn't want to play anymore maybe Bob's in like a position where","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1190s"},{"start_seconds":1199,"text":"like it's not advantageous to him to continue maybe Bob has computers crash and he's lost his signing keys and he","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1199s"},{"start_seconds":1206,"text":"can't continue maybe Bob died I don't know what perfect for every reason like some of them some of them malicious some of them not malicious Bob might not be","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1206s"},{"start_seconds":1214,"text":"able to sign another update and at that point there has to be a way to get this money back and the way that we've seen","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1214s"},{"start_seconds":1223,"text":"the way that that works is exactly how it's seen already so Alice can launch a challenge and then they can split the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1223s"},{"start_seconds":1230,"text":"funds but that means that each state needs to have a concept of like if we stopped at this point in time what would","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1230s"},{"start_seconds":1238,"text":"be the split of the funds and we write that into the state and designing how this moves is an important part of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1238s"},{"start_seconds":1247,"text":"designing a state channel application and so even if it's generally State Channel so it's not as payment Channel right yeah the the resolution on the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1247s"},{"start_seconds":1254,"text":"chin is still just some sort of money split yes so it's not so if a general state channel it's only the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1254s"},{"start_seconds":1263,"text":"communication that is now arbitrary yes but it's not like we can arbitrarily state change some state of some contract exactly yeah I mean like this this is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1263s"},{"start_seconds":1271,"text":"the only state the only thing that happens on chain is these things are stored on there and I guess I ought to say that this I'm not convinced whether","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1271s"},{"start_seconds":1282,"text":"this this restriction that a state channel always involves a fixed set of assets and the outcome is always","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1282s"},{"start_seconds":1289,"text":"letting those assets is generally true I know there are some tricks you can play where like you can I know you can trade","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1289s"},{"start_seconds":1299,"text":"off chain the ability to set a value in a contract on chain or something and it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1299s"},{"start_seconds":1307,"text":"might trip rhotuka we rule out those things where as one of the aims of counterfactual is to do those things to be able to do these more general things","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1307s"},{"start_seconds":1316,"text":"to be able to yeah basically off chain trade the right to change the chain in some arbitrary ways that yeah we just","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1316s"},{"start_seconds":1324,"text":"decided to like simplify that down and notice I'm also kind of I think there's a like wider philosophical question there about whether those things","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1324s"},{"start_seconds":1333,"text":"actually make sense which I haven't been able to convince myself of like one way or the other anyway back to this state format so this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1333s"},{"start_seconds":1342,"text":"is the state so let me let's suppose instead of this that's that's actually looking at example of tic-tac-toe so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1342s"},{"start_seconds":1350,"text":"this here I'm gonna have so this represents the address of some contract","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1350s"},{"start_seconds":1357,"text":"unchain the this library that defines the rules for tic-tac-toe we can talk about that in a minute and then this app","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1357s"},{"start_seconds":1365,"text":"data is gonna be the format that you need for tic-tac-toe so it's probably going to be like a stake and maybe we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1365s"},{"start_seconds":1373,"text":"going to pay for two coins and it's going to be the current state of the board maybe and then the signature it's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1373s"},{"start_seconds":1383,"text":"just like analysis signature but signature so this is it this is the state format and so now when","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1383s"},{"start_seconds":1391,"text":"we do communication so let's say L is right so we have L is here Bob here yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1391s"},{"start_seconds":1398,"text":"so I guess the is to initiate the same way right there working money yeah and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1398s"},{"start_seconds":1406,"text":"and then he responds with the same so at this point let's say that was successfully settled on chain not settle","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1406s"},{"start_seconds":1414,"text":"but started yeah set up and chain now this point Ellis says okay you know I'm going to go","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1414s"},{"start_seconds":1422,"text":"here yeah that's Bob first confirmed that that happened or Bob Bob can immediately respond Bob can immediately respond so this is and this is like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1422s"},{"start_seconds":1432,"text":"complete dependent on how this contract is written but it makes sense like and and it hope and that's nice because you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1432s"},{"start_seconds":1440,"text":"can kind of like you don't have to deal with a case like what happens if Alice moves there and Bob doesn't confirm it and like basically moment Alice has","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1440s"},{"start_seconds":1447,"text":"moved Alice has moved so let me let me talk about but I can only exit","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1447s"},{"start_seconds":1456,"text":"I can only exit with the message that was sent to me right so Bob to exit has to send Alice's message and yes and no","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1456s"},{"start_seconds":1465,"text":"so anyone could provide any of these messages if I exit with my message then there's always a chance that you will provide another message like you have","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1465s"},{"start_seconds":1474,"text":"the power to do the next message but like there are interesting games you can play with like providing other people's messages and stuff so yeah I mean and it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1474s"},{"start_seconds":1483,"text":"also depends how you kind of think about these challenges as well and so the this thing that I'm just explaining here with","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1483s"},{"start_seconds":1490,"text":"nitro Protocol nitro is an extension of for smooth which is basically this this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1490s"},{"start_seconds":1500,"text":"framework for building these little games like the set of rules I'm about to describe you're basically forced move rules and enforce move you think about the challenge as forcing someone to move","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1500s"},{"start_seconds":1508,"text":"it's sort of saying that the only thing that can happen in this chant in these channels that can go wrong is that you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1508s"},{"start_seconds":1513,"text":"fail to move and then the idea is like I launched this challenge on chain I'm","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1513s"},{"start_seconds":1521,"text":"forcing you to move if you don't move the game is over with the default outcome and that's how all these games kind of work and I think so the specific","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1521s"},{"start_seconds":1530,"text":"mechanics here are specific to nitro protocol and force move but like the overall pattern is the same in any state","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1530s"},{"start_seconds":1538,"text":"channel application I think has to be the same in any state channel on location you always need a now if someone stops responding you always need that out really needs to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1538s"},{"start_seconds":1547,"text":"provide the data you need as well so the nice thing here is like by providing the next state I'm providing you exactly the data that I would have given to you I've","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1547s"},{"start_seconds":1555,"text":"changed can continue I'm I'm jumping around a bit but so you're saying so let's say","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1555s"},{"start_seconds":1563,"text":"that we're playing tic-tac-toe right and so Alice made it made a move Bob made a move and then Alice disappeared yeah so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1563s"},{"start_seconds":1571,"text":"you're saying at this point Bob all that all the Bob can do is to force Ellis to make a move yes by unchain yeah but that means but","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1571s"},{"start_seconds":1580,"text":"let's say that it will take like thousand more moves before the game is over so that that means one thousand transactions won't you know say the way","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1580s"},{"start_seconds":1588,"text":"that would work is so you're getting into the grieving scenario now I think so the way this could work is Bob puts","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1588s"},{"start_seconds":1596,"text":"this unchain either Alice responds or she doesn't if she doesn't respond the game's over and Bob gets the default","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1596s"},{"start_seconds":1603,"text":"outcome at that point which hopefully the game designer has designed so that Bob doesn't lose out if Alice goes away","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1603s"},{"start_seconds":1610,"text":"if Alice does respond Alice responds by putting the next move on chain so then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1610s"},{"start_seconds":1619,"text":"Alice and Bob can continue off chain so by responding on chain Alice has given Bob the exact information they need to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1619s"},{"start_seconds":1627,"text":"continue collaborative chain if they want of course Alice can continue to be an and challenge Bob every single time and we can like deal with","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1627s"},{"start_seconds":1635,"text":"that scenario later there are a few things you can do there but that is just kind of like a limitation of state channels like basically your worst case","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1635s"},{"start_seconds":1643,"text":"scenario is you play everything out and chain and there's not really a lot of getting away from that now there's an example of tic-tac-toe what would it be like at every","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1643s"},{"start_seconds":1651,"text":"particular moment what would be the default outcome which is meaningful so that so yeah we can we can write what","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1651s"},{"start_seconds":1661,"text":"would be the best thing so let me answer your question quickly so in tic-tac-toe one way you could","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1661s"},{"start_seconds":1668,"text":"design it is so that failing to move is like default in the game resigning from the game the other person gets the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1668s"},{"start_seconds":1676,"text":"entire stake that would be like one deeper outcome and so that what that would look like is as Alice and Bob are sending them across like Alice sets the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1676s"},{"start_seconds":1684,"text":"default outcome to be four six sorry 64 so like she wins if Bob doesn't respond","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1684s"},{"start_seconds":1693,"text":"Bob sets it to be 46 when he responds and these hobbies change as specified by","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1693s"},{"start_seconds":1700,"text":"the rules of the game so maybe I should go into that a bit and now because like obviously a lot of this is about like what are the valid updates between here","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1700s"},{"start_seconds":1709,"text":"and here and then that bit all feeds into like yeah how you can update things on one chain and like the Unchained","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1709s"},{"start_seconds":1717,"text":"methods you can call and how that all sort of works maybe can they can the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1717s"},{"start_seconds":1726,"text":"camera see down here I mean kind of see there anyway or okay cool all right here","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1726s"},{"start_seconds":1733,"text":"then so what determines valid transition the way the framework does this is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1733s"},{"start_seconds":1741,"text":"there's a single function called valid transition and it takes a pair of states","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1741s"},{"start_seconds":1752,"text":"and this says like is a to be a valid transition obviously and what are the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1752s"},{"start_seconds":1761,"text":"rules for something being a valid transition so there are some things that have to stay the same so the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1761s"},{"start_seconds":1768,"text":"participants","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1768s"},{"start_seconds":1774,"text":"the nonce and the app definition have to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1774s"},{"start_seconds":1785,"text":"be constant so like a dot participants equals B dot participants etc we need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1785s"},{"start_seconds":1793,"text":"the B dot turn equals a dot and plus 1","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1793s"},{"start_seconds":1803,"text":"so the turn number must increase","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1803s"},{"start_seconds":1807,"text":"we need that a dot müber equals a dot","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1807s"},{"start_seconds":1816,"text":"signer okay so what does that mean so it has to be signed by the person who's making the move how do you calculate the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1816s"},{"start_seconds":1825,"text":"person that's making the move so for that we specify that people must take turns so that a dot mover is equal to a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1825s"},{"start_seconds":1835,"text":"dot participants and and we take the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1835s"},{"start_seconds":1842,"text":"index of the turn and the mod and we're and it's the number of people in the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1842s"},{"start_seconds":1850,"text":"channel so this says that Alice signs all the or even ones Bob signs all the odd ones this this also extends","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1850s"},{"start_seconds":1857,"text":"everything I'm doing here extends to n players and and participant channels if there are three of us we just go around","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1857s"},{"start_seconds":1863,"text":"in a in a three so do we enforce that a is final is false not yet I was I'm gonna come on I'm","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1863s"},{"start_seconds":1871,"text":"still going so he then same to be","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1871s"},{"start_seconds":1882,"text":"okay what else do I need so then I think we are into the bits where we look at","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1882s"},{"start_seconds":1890,"text":"differences of stages of the channel so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1890s"},{"start_seconds":1898,"text":"say if the turn number no let me thanks","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1898s"},{"start_seconds":1909,"text":"okay if the is final so transitions into","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1909s"},{"start_seconds":1917,"text":"its final states can't change the default outcome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1917s"},{"start_seconds":1929,"text":"and I haven't talked about its final yet but we can come on to that in a minute it's basically the collaborative clothes","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1929s"},{"start_seconds":1938,"text":"default outcome is the same let me just so I think that's all you need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1938s"},{"start_seconds":1944,"text":"else so this is like the conclusion step of the channel like this is the end the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1944s"},{"start_seconds":1952,"text":"end game of the channel is this a little bit here else if the turn number is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1952s"},{"start_seconds":1961,"text":"smaller than equal to B's 10 number is smaller than equal to 2n this is like a setup phase I'll talk about why it's 2n","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1961s"},{"start_seconds":1969,"text":"but basically like the first two steps of the channel I set up and that's weird because in that cartoon version I didn't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1969s"},{"start_seconds":1976,"text":"show you to n I only talked showed you one in but like we actually need an echoing back after that I think so a dot","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1976s"},{"start_seconds":1986,"text":"default outcome equals V dot you fold","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1986s"},{"start_seconds":1993,"text":"outcome a dot the updater can't change","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1993s"},{"start_seconds":1998,"text":"in that thing either and we also need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=1998s"},{"start_seconds":2005,"text":"that we can't go back so I also need not","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2005s"},{"start_seconds":2011,"text":"a is final so once you've gone from a final set you can't transition back into","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2011s"},{"start_seconds":2018,"text":"another one in the first two n steps in any so in fact I'm gonna have that condition in the final else as well","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2018s"},{"start_seconds":2025,"text":"basically like yeah I mean maybe there's a better way to write this and then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2025s"},{"start_seconds":2032,"text":"otherwise what we need is B dot app","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2032s"},{"start_seconds":2038,"text":"definition dot valid transition A to B","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2038s"},{"start_seconds":2046,"text":"and not a is final","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2046s"},{"start_seconds":2053,"text":"so so yeah we've got three stages this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2053s"},{"start_seconds":2058,"text":"is like the end this is like setup and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2058s"},{"start_seconds":2064,"text":"this is like the running step and in the running step most of what we do like obviously these things have to hold whatever then you know in the running","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2064s"},{"start_seconds":2073,"text":"step most of what we do is we delegate valid transition to the app definition which in this case would be the rock","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2073s"},{"start_seconds":2081,"text":"sorry the um tic-tac-toe contract with another definition it only verifies that AB data was transitioned properly and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2081s"},{"start_seconds":2088,"text":"the default outcome yeah so this is interesting we're not quite sure at the moment we just passed in the whole state so it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2088s"},{"start_seconds":2097,"text":"could actually which means you could write games that have different rules depending on what turn them you're on and I'm not sure if that's a good thing","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2097s"},{"start_seconds":2105,"text":"or a bad thing we also thought about like housing some of this off so that this only looks at","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2105s"},{"start_seconds":2111,"text":"the default outcome and the updater but then we found out that actually with with tic-tac-toe is useful to have the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2111s"},{"start_seconds":2120,"text":"turn number because you can tell who the mover is from the turn number and then like sometimes you want to do stuff depending on the participants so anyway for the moment it's just like but this the quadric can delay the turn number","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2120s"},{"start_seconds":2128,"text":"right they can just put it in the app data yes yeah obviously yeah good point yeah I don't know I mean at the moment","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2128s"},{"start_seconds":2136,"text":"it's just we just Chuck in the whole state and the contract has to understand this and so what's the intuition behind","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2136s"},{"start_seconds":2142,"text":"having two echoes so I'm trying to think","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2142s"},{"start_seconds":2151,"text":"what then what bits I need to explain to explain that so you need to know","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2151s"},{"start_seconds":2159,"text":"something about how challenges work to expand that and so let me can I come","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2159s"},{"start_seconds":2166,"text":"over and grab your board real estate so like what is so let's look a little bit","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2166s"},{"start_seconds":2173,"text":"more in depth at the adjudicator so this is the adjudicator so the adjudicator is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2173s"},{"start_seconds":2182,"text":"basic like a system of balances so it has a dress so I haven't talked","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2182s"},{"start_seconds":2192,"text":"about addresses yet so we calculate a channel address so channel address is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2192s"},{"start_seconds":2203,"text":"equal to the hash of the participants","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2203s"},{"start_seconds":2208,"text":"and the nonce so we have the address and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2208s"},{"start_seconds":2216,"text":"say like the address of this is like tic-tac-toe number 1 or something so it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2216s"},{"start_seconds":2225,"text":"will store an address a balance I guess","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2225s"},{"start_seconds":2232,"text":"the number of coins it will store an outcome and then it will have some way","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2232s"},{"start_seconds":2240,"text":"of doing a challenge like the challenge time out and stuff so here we might have like tic-tac-toe number 1 no balance no","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2240s"},{"start_seconds":2249,"text":"outcome at the moment so this is what was I trying to get to I was trying to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2249s"},{"start_seconds":2257,"text":"get to the setup so how do you launch a challenge so you launch a challenge by","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2257s"},{"start_seconds":2266,"text":"providing two states and what the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2266s"},{"start_seconds":2276,"text":"challenge does is it checks at these two states or a valid transition and then if it is it like makes the default outcome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2276s"},{"start_seconds":2283,"text":"from be pending and then you have some time so you can respond in fact let's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2283s"},{"start_seconds":2294,"text":"just see you reply you provide a state so challenge will store this state in the contract I guess really I should","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2294s"},{"start_seconds":2304,"text":"have an extra column here for challenges so like it actually stores the state and then to respond you provide the next the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2304s"},{"start_seconds":2313,"text":"next state here so only if n is equal to torrid yes if n is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2313s"},{"start_seconds":2322,"text":"equal to three yeah so that's the vent that's the general pattern and this stuff breaks down pretty quickly","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2322s"},{"start_seconds":2330,"text":"if n gets reasonably large but then state channels break down pretty quickly if n gets reasonably large so I think","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2330s"},{"start_seconds":2337,"text":"it's okay so why do we need why do we need this initial set up so you need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2337s"},{"start_seconds":2345,"text":"this initial set up because at this point this point is like a special point","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2345s"},{"start_seconds":2353,"text":"so like I guess the way this looks is that you have two states special point","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2353s"},{"start_seconds":2361,"text":"two states more states and these things","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2361s"},{"start_seconds":2369,"text":"here we call a pre-fund setup and these things here the post fund set up as a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2369s"},{"start_seconds":2377,"text":"post one is effectively acknowledging the fact that the contract was created it's acknowledging the fact that you see the money up there so it's to stop","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2377s"},{"start_seconds":2386,"text":"anyone from being forced into playing a game imagine I put my money in you don't put your money in and then went to the game and if I don't play I lose because","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2386s"},{"start_seconds":2393,"text":"that's how the rules of games are set up so and so and so that's why all this puts when you're first because she sends the first confirmation that exactly yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2393s"},{"start_seconds":2400,"text":"I mean okay so there are a couple of things interacting here they need these ones before anyone puts any money in because this is exactly what you need to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2400s"},{"start_seconds":2409,"text":"launch a challenge so like before you've got two states you're not safe to put any money in the contract because if your person doesn't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2409s"},{"start_seconds":2416,"text":"give you the other state then you've lost your money all right so that's so effective for Ellis to exit yeah she needs this state from from Bob","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2416s"},{"start_seconds":2424,"text":"technically Alice doesn't use Core State but but but she's upstate and the reason Alice goes first is because if the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2424s"},{"start_seconds":2434,"text":"outcome stopped here she will get the money back first so it's like slightly different like I think we always do it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2434s"},{"start_seconds":2441,"text":"this way around I think maybe works it around I'm not exactly sure but like pretty much like this is the way to do","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2441s"},{"start_seconds":2447,"text":"it and then the nice so the actual thing about this state here is that you have we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2447s"},{"start_seconds":2458,"text":"now beginning to get into the theory of like why this works and one of the things that's important is knowing what the states hold to hold you're holding","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2458s"},{"start_seconds":2466,"text":"mean and really what that means is from this state what outcome can I get on","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2466s"},{"start_seconds":2472,"text":"chain like what what outcomes were what outcome is finalized well based on what I hold and this this point is a slightly","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2472s"},{"start_seconds":2481,"text":"magical point because both participants have a finalized abour outcome at this point because like Alice is holding two","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2481s"},{"start_seconds":2490,"text":"states she knows that the outcome can't change without her sense signing another state Bob can have the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2490s"},{"start_seconds":2497,"text":"same like the same logic and this is actually like really important when you start building up state channel networks the logic of like at what point can I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2497s"},{"start_seconds":2506,"text":"guarantee that the things I'm holding allow me to put something particular on chain so like Bob can also Bob knows","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2506s"},{"start_seconds":2513,"text":"that by withholding his signature at this point the this outcome no other","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2513s"},{"start_seconds":2520,"text":"outcome than this outcome is possible so this like funding point and these like set up things here make this funding","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2520s"},{"start_seconds":2528,"text":"point a universally finalized for outcome the other point you have that is is when you've got a finalized state","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2528s"},{"start_seconds":2535,"text":"again I haven't told you how that works yet but like if you hold a final state and I hold in this final state so I'm by the other person then we also have a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2535s"},{"start_seconds":2543,"text":"universally finalized for outcome the reasons under some assumptions but like that can't go wrong but if you follow","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2543s"},{"start_seconds":2551,"text":"the protocol account so question yeah so here Bob Bob is only putting money into the contract yes when they see message","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2551s"},{"start_seconds":2559,"text":"number three right no when he sees message number two at this point everyone can put money in but how would Bob","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2559s"},{"start_seconds":2567,"text":"like imagine Bob one is his message number two yeah he puts money and he puts his five and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2567s"},{"start_seconds":2574,"text":"then Ellis never responds how does he exit what the charities day and just with this two and then the worst thing islets can do is respond with this one","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2574s"},{"start_seconds":2583,"text":"maybe that's what he wanted maybe Alice's now alive and they can continue or if that's not what he wanted he can then challenge again with these two because he's now","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2583s"},{"start_seconds":2591,"text":"got this one and my so what you're saying let's go through the example right so so example number one Bob has put money Alice hasn't right so we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2591s"},{"start_seconds":2600,"text":"assuming that breaks I'm pretty sure yeah so let's see let's say let's I guess we also need shall we try we assume that this is the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2600s"},{"start_seconds":2609,"text":"outcome at this point yes is the starting out there so so let's say so let's say so this this has to be 5s","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2609s"},{"start_seconds":2616,"text":"right yes yeah okay yeah yeah if we're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2616s"},{"start_seconds":2623,"text":"doing the proper protocol yeah this is this is driving right into the seventies now I can convince myself that if Bob is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2623s"},{"start_seconds":2631,"text":"waiting for Alice to post a message yeah and it seems to be safe what you think Bob doesn't need to wait before he deposits money so Bob is holding this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2631s"},{"start_seconds":2640,"text":"and he sent that and saying at this point it's it for both of them to put my name it's safe Alice put in money first","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2640s"},{"start_seconds":2648,"text":"and then to Bob to payment also what was waiting for others to put money yeah not necessarily for her deposit and I said I guess yes so they do these messages then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2648s"},{"start_seconds":2656,"text":"Alice pits in money when Bob sees that's definitely gone through Bob can put in money and actually probably what you'd want to do is make Bob's Bob's transfer","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2656s"},{"start_seconds":2665,"text":"in conditional on there being a certain amount of money from Alice in there so that you can't get like real problems where like Bob because if you end up","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2665s"},{"start_seconds":2674,"text":"with five in the contract which is Bob's then Bob is screwed and like Alice can just take his money because Alice gets","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2674s"},{"start_seconds":2682,"text":"the money first so it's in it's important for Bob yeah so when they're holding these things and the reason it's safe when they're holding these things","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2682s"},{"start_seconds":2689,"text":"is they can challenge either than can challenge they know that like both of them by withholding this message and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2689s"},{"start_seconds":2698,"text":"because of these rules they can tell that the default outcome never changes but Alice sends this message when she","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2698s"},{"start_seconds":2705,"text":"observes everybody depositing money yes okay yes so Alice shouldn't Alice shouldn't send that message until she's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2705s"},{"start_seconds":2714,"text":"seen everyone runs money in there that's Alice saying like I am okay for this game to proceed after she sent Miss Alice's into the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2714s"},{"start_seconds":2721,"text":"game but because Alice has the right to withdraw first yes that she has anything to loose if she only waits for herself","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2721s"},{"start_seconds":2729,"text":"to deposit probably not but what if the first rule of the game was for Bob to take all the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2729s"},{"start_seconds":2738,"text":"money like you know Alice could be forced into that and like I don't know I mean I'm I think it's important to have","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2738s"},{"start_seconds":2746,"text":"these because you don't know what the game developer what the application rules are going to be right I said so by","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2746s"},{"start_seconds":2753,"text":"the step to M affects a lot who knows that everybody recognized that the money were deposited yes and everyone is happy","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2753s"},{"start_seconds":2759,"text":"to proceed okay that that I guess makes sense too and I wonder what I should","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2759s"},{"start_seconds":2769,"text":"talk about next maybe you should do the final finalized stuff so you've got","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2769s"},{"start_seconds":2776,"text":"another another thing here finalize a B","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2776s"},{"start_seconds":2785,"text":"and I'm going to put stars here do you say that these estates with its finalists true so like what this does if","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2785s"},{"start_seconds":2795,"text":"you call finalize with two states where this is about a transition and they both","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2795s"},{"start_seconds":2802,"text":"have its final true then your your outcome goes straight into the outcomes column without any time out or anything","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2802s"},{"start_seconds":2811,"text":"and again it's as many arguments as many participate as many arguments is there are participants so yeah that's how you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2811s"},{"start_seconds":2821,"text":"get things into this this stuff so like I guess so if I go if a plane kicked octo and the game is over","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2821s"},{"start_seconds":2829,"text":"yeah I will if I'm a good actor I will sign this final yes yeah and then it settles makes it so another question I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2829s"},{"start_seconds":2837,"text":"have is when a challenge does much does my challenge have to have a higher turn number or it could be the same to a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2837s"},{"start_seconds":2844,"text":"number so when you challenge so I guess this is was the thing that I was talking about earlier like do we also store","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2844s"},{"start_seconds":2853,"text":"here the highest successful I mean it's really the highest successful response that you want to but let's say so my","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2853s"},{"start_seconds":2860,"text":"question is so imagine I'm Bob and I'm playing some game with you and they're making it turn but but then they realize","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2860s"},{"start_seconds":2867,"text":"it was a bad turn for example yes alright so I'm making another one and I'm exiting with that one yeah okay so you come right into these other things","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2867s"},{"start_seconds":2875,"text":"there's another method so this is a general problem like what happens with","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2875s"},{"start_seconds":2882,"text":"alternative moves and any protocol any state general protocol has to handle that you know I could always like send you turn number three and then send your","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2882s"},{"start_seconds":2890,"text":"alternative ten number three and the way that works in this protocol is that you get to choose so you can choose whether","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2890s"},{"start_seconds":2898,"text":"you go from three or from alternative three and this is actually pretty useful in a payment channel say like say in this exactly this very example Alice","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2898s"},{"start_seconds":2907,"text":"send I mean this is not the payment channel anymore but like if I send you six six four and then I send you seven three and I send you eight - I can rely","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2907s"},{"start_seconds":2916,"text":"on you achiely picking eight - out of that so like you can get like you can actually use this alternative turn","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2916s"},{"start_seconds":2924,"text":"number stuff to your advantage when designing protocols so yeah so if I give","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2924s"},{"start_seconds":2931,"text":"you multiple turns you get to choose we have to have that here as well so like there's actually another method which is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2931s"},{"start_seconds":2938,"text":"respond with alternative and here you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2938s"},{"start_seconds":2948,"text":"have to provide so like say you challenged with say this was like number four I'm even if all it's not a good","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2948s"},{"start_seconds":2957,"text":"number because that's too low but like say this was number seven and this was number eight so how do I respond with an","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2957s"},{"start_seconds":2963,"text":"alternative well I'm like okay I was I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2963s"},{"start_seconds":2969,"text":"think what you do is you do be primed C","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2969s"},{"start_seconds":2975,"text":"so I give something else this is like a little bit hazy we're getting into like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2975s"},{"start_seconds":2982,"text":"that's it but basically you need something like this and so this has number eight and this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2982s"},{"start_seconds":2990,"text":"has number nine so it's like so this is you saying you were at seven I moved to eight now I want you to move tonight and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2990s"},{"start_seconds":2997,"text":"this is me saying but you also gave me this other eight and I want to move on from that so from this perspective for I shall always if a challenge is an exit right","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=2997s"},{"start_seconds":3005,"text":"challenge could be an exit right and so for me it's always I should always challenge with B being my message right because if it's one if it's not my","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3005s"},{"start_seconds":3014,"text":"message you mean your challenge with this first like like you make it so let's say that I'm Ellis yes right and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3014s"},{"start_seconds":3022,"text":"so in the channel Bob sends me a message and Bob says I'm giving you all the money it's all yours now","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3022s"},{"start_seconds":3026,"text":"yeah and then I go to the - here yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3026s"},{"start_seconds":3034,"text":"well it's only worth of these also Carol yeah so let's so let's say I'm Ellis","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3034s"},{"start_seconds":3040,"text":"yeah he's also hoping these Carol yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3040s"},{"start_seconds":3046,"text":"no I think it should be fine so what I'm trying to see if I can get screwed if","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3046s"},{"start_seconds":3053,"text":"I'm exiting B which was a state on which I acted upon already someone else yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3053s"},{"start_seconds":3061,"text":"someone else can wait create an alternative state and something on top of that but then that got it then she should be someone who's not me yes but","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3061s"},{"start_seconds":3068,"text":"then if she sounds something that's not me then why why did they act upon the state which was not yeah like in each at","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3068s"},{"start_seconds":3076,"text":"each point if it branches out you have the ability to bring it back to a single thing and but this this this would be","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3076s"},{"start_seconds":3083,"text":"either stay that I sent or state which was sent directly to me right if I'm sending if I challenge for the state which was in between so this is this is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3083s"},{"start_seconds":3093,"text":"kind of interesting I think it works but like I mean say say we're like in I mean","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3093s"},{"start_seconds":3101,"text":"say you're in a in a channel challenge in a channel with both like Allison Carroll and you went then Alice went now","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3101s"},{"start_seconds":3110,"text":"Carol hasn't gone you have to be able to challenge with the like Carol's previous state your state and analysis state","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3110s"},{"start_seconds":3117,"text":"because otherwise Alice could grief you by not launching that challenge so there are some situations like any","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3117s"},{"start_seconds":3124,"text":"person might need to challenge at any point to force the next thing in the line cause I guess my argument is rather is that if this is Alice Bob and Carol","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3124s"},{"start_seconds":3133,"text":"playing right so L goes further than Bob's and Carol so if Carol sent me some message yeah and so let's say we also doing some","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3133s"},{"start_seconds":3142,"text":"other actions so let's hit the payment Channel and Carol sent me money yeah I gave her her Lottie yes right then I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3142s"},{"start_seconds":3151,"text":"know that that money is mine yeah because I can exit what what I should not be doing is imagine that some action by Bob so Bob sends message to Carol","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3151s"},{"start_seconds":3160,"text":"it's a message from Bob to Carol yeah which in some way tells me that I'm that that is good for me now to provide the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3160s"},{"start_seconds":3169,"text":"service Yeah right so that is dangerous because now if Bob and Carol are colluding they can they can sort of remove that message right","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3169s"},{"start_seconds":3177,"text":"because Bob can then say oh that's actually not message I wanted to send and Carol can immediately respond to his challenge saying yes yeah so like this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3177s"},{"start_seconds":3185,"text":"we I guess we're getting back into that like when of things finalized but when do you know about things so like the question of like when I said this was a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3185s"},{"start_seconds":3193,"text":"universally finalized Abul state at each point it various points in the channel you have a final I school state you have a finalized Abul state exactly before","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3193s"},{"start_seconds":3201,"text":"you send out your next state because at that point you could not sign anything else and you could ensure that the channel finish and that's also where the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3201s"},{"start_seconds":3211,"text":"and because that's always a possibility that you can always exit in your state that's why we allow this transition to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3211s"},{"start_seconds":3217,"text":"its final any state so like instead of just you know if you can achieve an outcome by just like stopping and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3217s"},{"start_seconds":3224,"text":"griefing everyone until the timeout goes we let you do that outcome without doing that so like the other thing you can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3224s"},{"start_seconds":3231,"text":"also do when it's your turn is just to decide to like bail out the algorithm and take the deeper outcome by signing","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3231s"},{"start_seconds":3239,"text":"in its final stage but but signing his file is not exactly the same as as as going a flam because if I go offline","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3239s"},{"start_seconds":3246,"text":"yeah if they if they try to exit and I challenge I send them the new state they can use that state","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3246s"},{"start_seconds":3254,"text":"how to proceed right yeah like that can unblock yes I cannot stall the system once you've signed its final and send that to people then I know what you're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3254s"},{"start_seconds":3263,"text":"saying is that if if I choose not to respond they can finalize this date yes makes sense yeah mm-hmm so yeah we've","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3263s"},{"start_seconds":3272,"text":"got this responible alternative as well so this is - you need to have this like in the adjudicator to allow the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3272s"},{"start_seconds":3280,"text":"possibility that like yeah basically to enforce the thing that if I send you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3280s"},{"start_seconds":3288,"text":"multiple to States you get to choose so yeah okay so I feel like I feel like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3288s"},{"start_seconds":3297,"text":"we've covered most of the valid transition stuff I don't know if it's useful to actually think about Tic Tac","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3297s"},{"start_seconds":3306,"text":"Toe I mean if you think about what the rules are for something like tic-tac-toe you can kind of like figure it out like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3306s"},{"start_seconds":3315,"text":"I mean I guess one of the way to think about this yeah maybe I should draw this like actually can we get back to university for analyzable State for a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3315s"},{"start_seconds":3322,"text":"second so okay so let's say observe certain states right universe might follow - analyzable means that either this state will be finalized or some","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3322s"},{"start_seconds":3330,"text":"state which is strictly better for me right yeah okay so all right I misspoke when I said universally finalized will","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3330s"},{"start_seconds":3339,"text":"state what I meant was universally finalized for outcome so you know it's going to be exactly that outcome and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3339s"},{"start_seconds":3346,"text":"like before your turn you have a finalized abort outcome it's not universally finalized well it's quite","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3346s"},{"start_seconds":3353,"text":"unusual in the state channel to actually have universally finalized of all states but we can actually design a game called","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3353s"},{"start_seconds":3361,"text":"the consensus game which is like just a game like tic-tac-toe which has the property that you transition from one University finalized Ball State to another and that turns out to be very","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3361s"},{"start_seconds":3370,"text":"important when building networks so you can get that property if you want to but you have to like design that into the game in most games like you don't really","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3370s"},{"start_seconds":3377,"text":"want that and that's one of the strengths of having this like flexibility to design your transition function and like not have to have","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3377s"},{"start_seconds":3385,"text":"everyone double sign anything what's the definitive universally finalized about that means that that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3385s"},{"start_seconds":3393,"text":"state and no other state will be finalized effectively right and finalized Abel means that that state can be finalized but so you hold a finalized","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3393s"},{"start_seconds":3403,"text":"for outcome if you have a strategy for getting that outcome into the judicata","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3403s"},{"start_seconds":3410,"text":"and no one can stop you so like if it's your turn if it and you haven't signed anything and send it to anyone yet","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3410s"},{"start_seconds":3418,"text":"your one strategy to finalizing that outcome would be to challenge yourself and not respond to that challenge","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3418s"},{"start_seconds":3427,"text":"another strategy would be to sign a conclude state and then release that to the world because after you've signed a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3427s"},{"start_seconds":3435,"text":"seclude state everyone should not collude conclude state or its final state then everyone knows that you're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3435s"},{"start_seconds":3442,"text":"not going to sign it or you shouldn't sign anything else that's you saying I'm out you guys can give us final or we can just challenge on chain or whatever like there's no way to change the outcome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3442s"},{"start_seconds":3451,"text":"once you're in its final state and so like realisable means that everyone holds that property for that for that particular outcome yeah I'm like if you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3451s"},{"start_seconds":3459,"text":"think about like the definition so like this unbeatable strategy bit you're in","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3459s"},{"start_seconds":3467,"text":"one of two situations either like one person holds multiple one or more fine lines will outcomes so like it's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3467s"},{"start_seconds":3476,"text":"possible for you to have to finalize outcomes if I've given you multiple moves all of those outcomes to you are finalized but at that point in time it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3476s"},{"start_seconds":3485,"text":"might also be that you're the last person basically having multiple final answer outcomes is like having an option you know like I've given you this thing","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3485s"},{"start_seconds":3493,"text":"and you can like you can do it yeah so like you can have multiple finalized poor outcomes but or everyone can hold","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3493s"},{"start_seconds":3502,"text":"the same finalized outcome it's impossible to have two different people holding to finalize of outcomes because","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3502s"},{"start_seconds":3509,"text":"it a is finalized ball for Bob and if a and B if I might say Bob and a and B if ionizable for Alice then either of them","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3509s"},{"start_seconds":3517,"text":"can choose either at them and they could make sense yeah so yeah that and I think","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3517s"},{"start_seconds":3527,"text":"that is like in some ways that's the key logic underneath state channels what outcomes are finalized well given the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3527s"},{"start_seconds":3535,"text":"states you hold and that's the bit that we like developed a lot in the Nitra protocol paper like how do you reason","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3535s"},{"start_seconds":3542,"text":"about when you can finalize an outcome one chain which is obviously like yeah","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3542s"},{"start_seconds":3549,"text":"important cool so that's most of it for two participants right yeah and multiple","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3549s"},{"start_seconds":3558,"text":"participants isn't really that much different so I guess what we've done here so I said there are two parts the first bit is how these things trying to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3558s"},{"start_seconds":3565,"text":"transition off chain and that's the bit that I guess we've just done here like the one bit that we haven't looked into is this app definition but like you can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3565s"},{"start_seconds":3574,"text":"you can probably like figure out what the app definition is for something like this it's like you know you you think of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3574s"},{"start_seconds":3582,"text":"these apps as state machines I guess so like with tic-tac-toe you're doing something like you're moving from X turn","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3582s"},{"start_seconds":3591,"text":"to zero turn and then you can transition","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3591s"},{"start_seconds":3597,"text":"from X turn to like x1 you can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3597s"},{"start_seconds":3603,"text":"transition from like 0 1 or we can transition to draw and in fact I think","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3603s"},{"start_seconds":3613,"text":"only X just because there are odd number of moves only X can actually transition to the draw only oh can transition 201","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3613s"},{"start_seconds":3622,"text":"these can obviously transition up you start you have like a starting state","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3622s"},{"start_seconds":3630,"text":"that like that's what you would put in like initial things you would start with like the empty board here has a stake so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3630s"},{"start_seconds":3639,"text":"you can you can basically you basically have the way you write these apps is you think of these different states you have to figure out how to encode those in","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3639s"},{"start_seconds":3646,"text":"your like arbitrary bytes up to you to pick how to do that then you have to enforce these things you have to say that like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3646s"},{"start_seconds":3654,"text":"from oz turn to exes turn you have to change the balances according to this rule so that like the person who stops","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3654s"},{"start_seconds":3663,"text":"forfeits if you want to encode that rule you might you might actually want to make this dependent like you might want to say that like at the beginning of the game stopping isn't too bad like this is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3663s"},{"start_seconds":3672,"text":"kind of really interesting because because at that point that you brought up and in fact so the PISA team so Patrick McCrory and Chris Buckland wrote","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3672s"},{"start_seconds":3681,"text":"a paper about playing battleships on the blockchain and how it was really bad because or in a state channel because in","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3681s"},{"start_seconds":3688,"text":"the worst case I can make you do every single move on chain and so like that's kind of bad but I think there are some","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3688s"},{"start_seconds":3696,"text":"ways around that by like designing your incentives properly the problem here is like if I don't respond to you on chain","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3696s"},{"start_seconds":3702,"text":"it's like I've lost everything whereas if you get to a point like with tic-tac-toe this isn't such of a problem","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3702s"},{"start_seconds":3710,"text":"because like it's it's where like the value of the game it's where my","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3710s"},{"start_seconds":3717,"text":"perceived value of the game is different from these outcomes that I'm compelled to continue and you can like almost grief me infinitely unchain it like it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3717s"},{"start_seconds":3725,"text":"get you into bad situations but if you can get two points where everyone agrees on the same on the fair value like in this payment channel you can't grieve someone it's like if I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3725s"},{"start_seconds":3734,"text":"if you if you grief me and you force me to be volunteen like I can always just be like I'll just take the money like I'll just take the first split and so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3734s"},{"start_seconds":3742,"text":"like deeds but that effectively requires you to have a value function for the game right yeah it's like if you're playing go yeah like tic-tac-toe is easy","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3742s"},{"start_seconds":3750,"text":"but if you're playing go you know the value functionally pretty complex yes and chess as well it's like but you can if you can kind of like get it a little","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3750s"},{"start_seconds":3759,"text":"bit closer then you kind of lose some maximum loss and for something like chest you could imagine for the first ten moves it's fairly cheap to exit","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3759s"},{"start_seconds":3766,"text":"because most games are not decided in the first 10 moves of course that's a problem if you like into one of those situations where you actually get checked mate in the feel like first","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3766s"},{"start_seconds":3774,"text":"three moves and then so it's kind of complicated designing these but for these long-running games it's pretty complicated figuring out what the what","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3774s"},{"start_seconds":3782,"text":"they like default outcomes should be but a lot of games don't have this anything you do multiple rounds on like tic-tac-toe we want to pay ten rounds of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3782s"},{"start_seconds":3791,"text":"tic-tac-toe after any round there's a fair stopping thing so you can't be grief that much you're limited like for most little applications you want to run","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3791s"},{"start_seconds":3799,"text":"an estate channel like so you want to trade you're gonna trade some X going to Y coin or whatever again like there's like you can't be infinitely group there","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3799s"},{"start_seconds":3808,"text":"they're like three moves to something if we're playing like Rock Paper Scissors like there's a commit reveal there you have to be careful about the the incentives to make sure that if I don't","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3808s"},{"start_seconds":3816,"text":"reveal they know it's like I've lost that of it in there there's like four states that you go round and every time you come back to the to the start again","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3816s"},{"start_seconds":3825,"text":"and that's a fair place to end the game so like I think that's kind of like some interesting research to be done here around that notion of like when the game","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3825s"},{"start_seconds":3834,"text":"has a fair value that is easily calculated bull when can you stop when you get an out if not how long it is it to that point because that's not your","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3834s"},{"start_seconds":3842,"text":"like griefing danger I said well anyway so I think that's probably enough about","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3842s"},{"start_seconds":3851,"text":"these games because I guess you can probably like figure out how these things work in their examples and so we've actually we've actually got this tic tac toe game working so you can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3851s"},{"start_seconds":3860,"text":"actually play it in the browser and look at the contracts and stuff right and is doing anything else we want to cover so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3860s"},{"start_seconds":3869,"text":"we this is like everything about like how the off chain stuff works you want to cover of the which one do you so let","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3869s"},{"start_seconds":3878,"text":"me see so what I was going to talk about next was how we can go from these like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3878s"},{"start_seconds":3886,"text":"off chains rules to know to state channel networks so breaking the link","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3886s"},{"start_seconds":3893,"text":"between like one deposit to one state channel interaction so it's actually a lot to do with how this on chain stuff","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3893s"},{"start_seconds":3899,"text":"works so say I've got this tic tac toe game here and it's got ten in it you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3899s"},{"start_seconds":3908,"text":"know like alice deposit and deposited and somehow I've got this outcome which is like Alice gets to Bob gets eight","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3908s"},{"start_seconds":3918,"text":"okay so how do we actually get this to Alison Bob so there's","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3918s"},{"start_seconds":3926,"text":"another method on the adjudicator called transfer how to write and it's transfer","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3926s"},{"start_seconds":3939,"text":"I guess like from to a known amount okay","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3939s"},{"start_seconds":3950,"text":"so I called transfer on this so like starting off like once this stuff means","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3950s"},{"start_seconds":3960,"text":"that you can only able to get one outcome per channel once the channel has an outcome it's done there's no way to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3960s"},{"start_seconds":3966,"text":"put another outcome on chain so once this has an outcome we can start operating on it so like I can call","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3966s"},{"start_seconds":3974,"text":"transfer from tic-tac-toe to Bob the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3974s"},{"start_seconds":3982,"text":"mount 8se and the algorithm here is like I go to tic-tac-toe does it have 10 in","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3982s"},{"start_seconds":3991,"text":"it that goes to - does it have 8 in it that goes to Bob so like if this was only like 8 the answer to that would be","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=3991s"},{"start_seconds":4000,"text":"no because the first two of this goes to Alice and the next six goes to Bob but Bob's in luck because like there is 10","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4000s"},{"start_seconds":4007,"text":"in it so when I call this the following thing happens Bob's address gets 8 in it this goes","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4007s"},{"start_seconds":4016,"text":"down to 2 that changes to 0 mm-hmm so Bob can just extract it from there and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4016s"},{"start_seconds":4024,"text":"then we have like the withdraw function from and then like destination or","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4024s"},{"start_seconds":4035,"text":"something which allows Bob to withdraw this from his like adjudicative balance into his aetherium address you have to be a little bit careful about like that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4035s"},{"start_seconds":4043,"text":"has to be signed by Bob's key and all that sort of stuff also so does so that serves transfer function right I know transfer function anyone can","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4043s"},{"start_seconds":4051,"text":"quality yeah anyone can call the transfer function it just moves around balances in this like thing here so that's how","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4051s"},{"start_seconds":4060,"text":"that works obviously like Anna's can do the same thing we end up with zero Alice to zero","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4060s"},{"start_seconds":4067,"text":"and then Alice and Bob can we draw these these addresses are interesting because","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4067s"},{"start_seconds":4074,"text":"like these addresses is different to that address and the difference is that someone knows the private key to this address which means that somebody can we","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4074s"},{"start_seconds":4082,"text":"draw from this address through this address somebody knows the part of the channel such that the hash of the participants and the nonce go to this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4082s"},{"start_seconds":4090,"text":"address which means that people can put outcomes in this address so you have channel addresses and people addresses so don't like something similar school","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4090s"},{"start_seconds":4098,"text":"like contracts and the counts on the city yes yeah exactly yeah and that's kind of interesting that we all kind of recreate really creating if there him in a theorem in some way but like so the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4098s"},{"start_seconds":4108,"text":"question now is like what if these weren't participants like there's nothing that says these have to be","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4108s"},{"start_seconds":4114,"text":"participants like what if for example this had been you know like 10 Alice","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4114s"},{"start_seconds":4125,"text":"gets to and no rock-paper-scissors gets eight where rock-paper-scissors is","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4125s"},{"start_seconds":4133,"text":"another channel so then like rock-paper-scissors could get eight could get eight out of this and then","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4133s"},{"start_seconds":4141,"text":"like maybe at some point in the future this becomes a to be six or something so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4141s"},{"start_seconds":4148,"text":"like the key I guess this is the key insight that like the outcome of channel can allocate to another channel and that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4148s"},{"start_seconds":4155,"text":"can allow you to build up state all networks but initially want if Dokdo address was created right there was","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4155s"},{"start_seconds":4163,"text":"balance but there was also the initial outcome yes so how does the initial outcome so the initial outcome remember is not","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4163s"},{"start_seconds":4170,"text":"on chain and if this allocates to to RPS","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4170s"},{"start_seconds":4179,"text":"eight then you better hope that Alice and Bob hold the initialization for that RPS contract and so like you're","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4179s"},{"start_seconds":4187,"text":"beginning to see how this might work so like if I can I get another different color so got a way of drawing diagrams","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4187s"},{"start_seconds":4196,"text":"for this this is the adjudicator this would be like tic-tac-toe and then this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4196s"},{"start_seconds":4204,"text":"would allocate so this would be a 2 this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4204s"},{"start_seconds":4209,"text":"would be PS 8 and then like this would","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4209s"},{"start_seconds":4216,"text":"eventually be a - and like be 6 so you","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4216s"},{"start_seconds":4222,"text":"can but what's the value so why Krause","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4222s"},{"start_seconds":4229,"text":"is fundamentally better than just having like RP s to be a part of that of the of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4229s"},{"start_seconds":4237,"text":"the state transition for tic-tac-toe so like you know you just have one which is tic-tac-toe and RP s so this is a stupid","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4237s"},{"start_seconds":4244,"text":"example in actual fact this wouldn't be rope a tic-tac-toe this would be something called ledger channel and a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4244s"},{"start_seconds":4252,"text":"ledger channel it's just one of these things looks exactly the same but its default outcome allocates default","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4252s"},{"start_seconds":4259,"text":"balances to Alice and Bob and then things to other channels so imagine if at this point so think the whole thing we're trying to get away from is having","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4259s"},{"start_seconds":4267,"text":"to do an on chain transaction to fund this channel so imagine that imagine that Alice and let me just but so far it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4267s"},{"start_seconds":4277,"text":"is Unchained transaction right so this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4277s"},{"start_seconds":4285,"text":"transfer call it is on chain right yes the transfer call is on chain so we didn't get rid of doing chain connection but we","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4285s"},{"start_seconds":4294,"text":"don't need the transfer call okay so imagine you start in this situation that's the adjudicator this is a ledger","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4294s"},{"start_seconds":4300,"text":"Channel and it gives like five let's say let's say it gives ten to Alice and ten","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4300s"},{"start_seconds":4310,"text":"to Bob and it's funded with twenty on chain it has to be so Alice and Bob set this up like at the beginning the month","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4310s"},{"start_seconds":4317,"text":"whatever they now want to play tic-tac-toe so they a tic-tac-toe Channel and these are","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4317s"},{"start_seconds":4325,"text":"actually diagrams for outcomes so this is like tic-tac-toe and the initial","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4325s"},{"start_seconds":4331,"text":"state is 5 to Alice and 5 to Bob okay so they've set this up there at the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4331s"},{"start_seconds":4341,"text":"I'm just just there at their funding point though this is two things in this is a university finalizing outcome for them we'll assume that this is also","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4341s"},{"start_seconds":4349,"text":"University finalized out because these ledger channels are going to use the consensus game they talked about earlier which moves you from one University","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4349s"},{"start_seconds":4357,"text":"financed finalized without coming to another one so what can they do now so we want to fund this off chain so this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4357s"},{"start_seconds":4365,"text":"is just like one of these things so I can sign an update to that which takes","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4365s"},{"start_seconds":4371,"text":"it to five to Alice","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4371s"},{"start_seconds":4376,"text":"five to Bob and ten to tic-tac-toe okay","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4376s"},{"start_seconds":4389,"text":"so this is like the outcome thing at any point here that the due to the rules of how state channels work at any point","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4389s"},{"start_seconds":4397,"text":"here like if I challenge on tic-tac-toe that would look like this you could end up with all these things work","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4397s"},{"start_seconds":4404,"text":"independently so to tighters balance of zero but it could still have a challenge and it could still have an outcome of a a for b6 which when I at some point in","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4404s"},{"start_seconds":4415,"text":"the future challenge with this one would like and then I feel like then over there we'll just transfer - first from","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4415s"},{"start_seconds":4422,"text":"from ledger to tic-tac-toe and then from tic-tac-toe to book and the fact that there's a threat of this happening means you don't have to do it all the time so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4422s"},{"start_seconds":4431,"text":"like let me just quickly show you how that works so like we're in this situation where we've got a ledger channel a is still got a balance held","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4431s"},{"start_seconds":4441,"text":"there B has still got a balance of five we've got this tic tac toe thing here this is now look this is like while","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4441s"},{"start_seconds":4450,"text":"we're playing the game this is no longer in a university final outcome like it's it's oscillating between arts and Bob and then imagine it comes to an outcome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4450s"},{"start_seconds":4459,"text":"so like I've been got this just and then tic-tac-toe is now it finished like H to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4459s"},{"start_seconds":4468,"text":"Alice to to Bob five five I can then close this channel off chain","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4468s"},{"start_seconds":4474,"text":"by defunding it and just like absorbing those into the to the getting off to the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4474s"},{"start_seconds":4482,"text":"rails here so and then so Alice gets five plus eight which is 13 it looks","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4482s"},{"start_seconds":4491,"text":"like a B and then Bob gets two plus seven so what I've done here is I've got","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4491s"},{"start_seconds":4500,"text":"two state channels one running the ledger channel one running tic-tac-toe we had the money in the ledger channel","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4500s"},{"start_seconds":4506,"text":"I've managed to open this tic-tac-toe game fund it off chain do everything","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4506s"},{"start_seconds":4514,"text":"close it off chain as well and why and come to your other question like why do you even need to do this why not just","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4514s"},{"start_seconds":4522,"text":"have the rules of tic-tac-toe in the ledger channel well you can have multiple channels working independently yeah yeah so I could have tic-tac-toe a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4522s"},{"start_seconds":4531,"text":"rock-paper-scissors a head of chess or operating with independent updates and independent challenges hence the ledger channel that's a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4531s"},{"start_seconds":4538,"text":"channel that that is operated by some centralized entity no it's just it sure yeah I would still Ellison Bachmann attending the channel forefront other","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4538s"},{"start_seconds":4546,"text":"yes yes so basically this thing is the job that this is playing is deciding of this money that's held up on chain how","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4546s"},{"start_seconds":4555,"text":"should it be split up and we can like change that off chain and then the really interesting bit it's like this still has a weakness like if I want to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4555s"},{"start_seconds":4563,"text":"translate with you I still need and on ten deposit with you but you can play this same game with virtual channels so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4563s"},{"start_seconds":4571,"text":"like I have a connection to a hub you have a connection to hub we can create a tic-tac-toe game we can put agreements in our arms with the hub to fund that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4571s"},{"start_seconds":4580,"text":"tic-tac-toe game we can play it and then we can absorb those back in again and it's supported by this stuff at any point if we stop we can resolve","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4580s"},{"start_seconds":4588,"text":"everything off chain and that's what allows these to happen trust lessly and so when you say happy it's it's effectively the way for two people","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4588s"},{"start_seconds":4597,"text":"yeah okay virtuous yes intermediary it's better it's maybe a different word so it's a favor someone Coryell lays messages between the other sandbox","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4597s"},{"start_seconds":4605,"text":"signed by Ellison Bob know so in a the thing that the hub so say this is like a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4605s"},{"start_seconds":4614,"text":"hub and this is Alice and this is Bob and they have these channels this is really bad because this means something","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4614s"},{"start_seconds":4623,"text":"different to those things but like now if Alice and Bob want to play a game between them the thing the hub is doing is providing the funding so it's a bit","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4623s"},{"start_seconds":4631,"text":"like it's a bit like you're doing things with the hub instead of the chain that's ultimately still Alice and Bob sending","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4631s"},{"start_seconds":4639,"text":"message today sending messages directly to each other the hub doesn't know the only thing the hub sees is the opening balances and the closing balances much like what the chain would see in the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4639s"},{"start_seconds":4647,"text":"initial things so well then there's also some mechanism to challenge hub if the hub does not cooperate with the updating","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4647s"},{"start_seconds":4656,"text":"balances yes the the challenge of the hub is just exactly the same challenges you've seen here so this is just a","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4656s"},{"start_seconds":4664,"text":"ledger channel you have with the hub so there's effectively some sort of AB definition which you have with the which lab to consensus game which is like I've","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4664s"},{"start_seconds":4672,"text":"I proposed an update you you give me that date the hub could not play ball but if the hub doesn't pay ball then we","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4672s"},{"start_seconds":4680,"text":"just put these things on chain and let it play out and the adjudicator and that that's always a threat that's why this stuff is safe the thing that I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4680s"},{"start_seconds":4688,"text":"haven't shown you which I won't show you is the fact that you actually need something a little bit different than just these allocation outcomes you need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4688s"},{"start_seconds":4697,"text":"something called a guarantee outcome to be able to open and close these safely with the hub under some well to open and","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4697s"},{"start_seconds":4705,"text":"close virtual channels you need this extra sort of outcome which goes beyond this but like that that really does","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4705s"},{"start_seconds":4713,"text":"begin to get a little bit subtle to see why this at first you might think that this is enough but","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4713s"},{"start_seconds":4722,"text":"it's not I think well let's go through the attack so let's say this is all we have what what can what can go wrong so","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4722s"},{"start_seconds":4731,"text":"one so we need this is enough everything I've shown you here I think this is not enough for us to do a virtual channel to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4731s"},{"start_seconds":4739,"text":"do that I would have to probably show you the virtual channel construction which is going to take a while so I","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4739s"},{"start_seconds":4746,"text":"don't know if you want okay I mean I be this is where it begins to get really interesting but we've come out of time","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4746s"},{"start_seconds":4755,"text":"okay so we go through this at different time or something there the I guess to give you like a little","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4755s"},{"start_seconds":4762,"text":"bit insight into why that happens one of the rules are state channels if you can only depend on a result of state channel if you're a party to that state channel","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4762s"},{"start_seconds":4770,"text":"like if if Alice and Bob so the things the place where this gets complicated Alice and Bob have their outcome from","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4770s"},{"start_seconds":4778,"text":"Tic Tac Toe and they send that to the hub and the hub's got to update these things independently the hub sort of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4778s"},{"start_seconds":4787,"text":"can't trust what Allison bothers telling them kids like Alice and Bob could like give one outcome to one arm and one outcome to the other arm and it could be that these two arms are forced into","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4787s"},{"start_seconds":4795,"text":"resolving so the way this is work of it I haven't said this but they would each put in five and if this came out as","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4795s"},{"start_seconds":4804,"text":"eight - then the hub would be balanced eight to eight - so the hub still has","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4804s"},{"start_seconds":4813,"text":"their ten but it's like moved around and Alice and Bob we've got their eight - so like the hub the danger for the hub is that like it's forced to resolve that","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4813s"},{"start_seconds":4821,"text":"and it doesn't maintain its ten so that's the safety property you need for the hub and that's difficult when the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4821s"},{"start_seconds":4829,"text":"hub can't trust anything that comes out of Alice and Bob channel like in its final state sure they kept it on chain and then the cub can trust it cuz it knows it's never going to find lies","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4829s"},{"start_seconds":4837,"text":"somewhere else but like yeah you need so they end up having to have like a joint so in virtual channels you actually need","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4837s"},{"start_seconds":4846,"text":"a joint like ABC channel you need a three-person channel to have the updates","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4846s"},{"start_seconds":4854,"text":"from it and then you need to there are actually sort of ways you can do it with this but it go this is too","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4854s"},{"start_seconds":4862,"text":"high level till I can make me interesting that I it's it's all in the night robe chapter on the paper if you're interested in this stuff cool","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4862s"},{"start_seconds":4870,"text":"okay that's quite a bit of stuff so so then let's let's mine like one minute on","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4870s"},{"start_seconds":4877,"text":"non technical stuff so this is all life right and the the basic games alive we're currently working on this ledge of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4877s"},{"start_seconds":4886,"text":"a now after that we'll work on this virtual stuff okay so virtual stuff is in life the virtual stuff is not like the legislature it I mean a lot of the","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4886s"},{"start_seconds":4895,"text":"complexity and stuff is building the off chain software to support it so like yeah it just inherently gets pretty","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4895s"},{"start_seconds":4902,"text":"complex and kind of think through all the different stuff is but the product is is like an SDK on top of future building games or there is some sort of","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4902s"},{"start_seconds":4910,"text":"so we're really just developing a protocol and the other people can use","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4910s"},{"start_seconds":4917,"text":"for this various stuff like you can already write these games like tic-tac-toe on it there'll be like direct channels they will need to do it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4917s"},{"start_seconds":4925,"text":"doesn't support this legend all stuff yet but they soon will do the stuff that we're actually building is a wallet so your wallet will run in the browser to","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4925s"},{"start_seconds":4934,"text":"play the game to play the game so like we need the way it works at the moment is like if you wanted to make one of these games like tic-tac-toe you create","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4934s"},{"start_seconds":4941,"text":"the on train smart contract you'd write the front end and then you'd import our wallet and the thing that wallet does for you is it stores the states it does the signing in the future it will check","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4941s"},{"start_seconds":4950,"text":"that the valid transition function is true so it can like emulate some solidity code that it pulls down and checks that your wallet is not signing things it responds to challenges it","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4950s"},{"start_seconds":4959,"text":"allows you to launch challenges it does like basically the protocol part of it so that you can just focus on like this","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4959s"},{"start_seconds":4966,"text":"the the game part of it and that wallet and then the other thing that we're building is like we already have some bots that support that protocol but like","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4966s"},{"start_seconds":4974,"text":"the other thing we'll be building is the hub the intermediary that talks that wallet so like from you as an application developer you won't notice","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4974s"},{"start_seconds":4982,"text":"whether your app is running in a virtual channel or in a ledger tablet or channel or in a direct channel and the way you code your app you know","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4982s"},{"start_seconds":4991,"text":"at some point in the future you imagine you get an upgrade where your your state channel application will run completely off chain without you making any changes","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4991s"},{"start_seconds":4998,"text":"to it you'll just let import an updated version the wallet and the wallet will speak to a hub and it will work cool okay awesome","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=4998s"},{"start_seconds":5005,"text":"so that's concludes the video thanks for watching","url":"https://www.youtube.com/watch?v=NLYKh8L5NMM&t=5005s"}],"youtube_url":"https://youtube.com/watch?v=NLYKh8L5NMM","url":"https://near-pedia.xyz/videos/NLYKh8L5NMM"}