Skip to content
by Unity Nodes
NEAR Protocol

What are Decentralized Applications and How Do They Work | San Francisco, CA

about 57:28 long

Nothing is loaded from YouTube until you press play, and then without tracking cookies.

About this video

You're already well familiar with the design, interaction and development patterns of "normal" web and mobile apps. In this meetup, we shifted the focus to describe what a decentralized app (DApp) actually is from the very top to the nuts and bolts below the surface.

This is intended to help the full spectrum of designers, developers and product people to understand why they might create a DApp in the first place and how that is different than working with web 2 applications. We'll cover the high-level user-facing aspects (like interactions and flows) down to the low-level of the stack (the actual blockchain), so you understand what you're getting into.

We assume you know what a blockchain is.

*About the Blockchain Onramp Series*

Blockchain Onramp is a series of events covering the full spectrum of knowledge necessary to operate effectively within the blockchain ecosystem as a designer, developer or product person. After participating in these events, you should be able to take your functional expertise in any of these areas and apply them to blockchain projects.

We are doing this to provide a key -- and currently missing -- plain-English onramp for people of all functional experience who are interested in building real businesses on this new technology.

The format of each event may differ slightly, but they will be a combination of expert talks and discussions with industry practitioners.

The rough Blockchain Onramp Series roadmap is:

Product Series: Ecosystem, DApps, and Strategy Design Series: Onboarding UX, Best Practices Development Series: Developer stack, Building on TestNets, Security, Best Practices Startup Series: Marketing, Business Models, and Fundraising

-- ABOUT THE SPEAKER --

Erik Trautman leads operations at NEAR Protocol, which is a scalable mobile-first blockchain. He has a long history in technical education: he started in market analysis on Wall Street in 2007, created the popular Odin Project in 2012 and ran Viking Education as its CEO until its acquisition in 2017.

Follow the latest from NEAR Protocol on,

Medium:   / nearprotocol   Twitter:   / nearprotocol   GitHub: github.com/nearprotocol LinkedIn:   / near.  . Telegram: t.me/cryptonear Discord:   / discord

#FutureIsNEAR

Transcript

12,776 words

Captions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.

  1. 0:00

    you so yeah so so today is decentralized applications 101 or why the heck should I build a dap adi app whatever you want to call it it's one of those things where no matter what I say I'm gonna be on the wrong side of history is it a gift is it a jiff nobody knows hopefully they don't they don't dig this up too soon yep and and so the default question of anybody peering into this space is

  2. 0:30

    basically you know if you've gotten to the point of the word decentralize this application or adapt or Diop you're generally saying what the heck is it and why should I build it and if I didn't if you get further than that it's it's how do you actually do it and you know there really aren't that many resources out there I can be very hard to find information I you know hopefully again when this is dug up many years that'll it'll be a different story but right now there's there there is a black hole

  3. 0:53

    there's a lot of stuff that's left over from last year's frothy boom and it's not terribly helpful it's very it's very focused on how do you make as much money as quickly as possible you know throw some advisors up on your website write it write write a white paper and it's like they're conflating they're conflating blockchains with d apps with you know all sorts of other things and doesn't really make a lot of sense and then the other half of things are super

  4. 1:18

    technical guides that tend to be you know okay well so how do I would you know it starts with the code and then it builds up and there's not a lot of in between so what I'm hoping to do today is is kind of bridge some of those gaps and you know we'll have some time at the end to address questions as well I'm sure you guys will have plenty just quick background on me so I I work at near protocol and basically what we're doing is building a fully sharded scalable blockchain and we're focused on

  5. 1:44

    usability and developer experience and my background is in education and I've previously run an education company in the online space and spent some time playing on Wall Street doing analytics and things like that so this is pretty old hat for me and I really I really like being a part of it as far as today so our our road map basically looks like gonna kind of start from the high level and work down we're gonna be we're gonna be talking a little bit about the high

  6. 2:08

    level of blockchain and decentralization and things like that hopefully we won't spend all the time there and then moving more into the actual interaction of how do you how do you touch the apps how do you how do you work with them and then digging a little bit deeper and looking under the hood that's kind of how are the technical flows set up so diving in what what is a decentralized app so again if you google

  7. 2:33

    that it comes up with some really strange stuff and I mean all it really all you really need to do is you need to have the app itself distributed across a lot of a lot of nodes or whether those are people or whatever it is the app the app needs to run in a distributed fashion and it needs to store its data in the distributed fashion and basically there there can't be a single point of failure because otherwise it's you know it might be distributed but centralized so you know the whole point of a

  8. 2:57

    decentralized app here is that is that you know there's no single point of failure things that are not requirements you don't have to have an ICO you don't even have to have a token and you don't actually technically have to be open source although that's something we'll talk about in the end but you know whether or not you want to be open source your code is running on other people's machines and so you know you effectively are regardless so in terms of terminology we here adapts the EPS

  9. 3:21

    and smart contracts all of that kind of conflated smart contracts are really a subset of what goes on in adapt and I'm gonna use the word app I don't have to qualify it every time and say D app so the the DAP is I mean the app if you think about a web app an app contains all sorts of things there's the front end there's the server side there's the database and you all kind of you kind of think of the whole thing as the app and the same thing is true with adapt I do

  10. 3:45

    centralize that right it's I mean the app contains so much more than then you know just the part that touches the blockchain and that's the smart contract the smart contract is is in and we'll see this in a little bit more detail but the smart contract is really just a portion of it so it's very easy again a lot of language that you'll probably find in materials will sort of conflate the two things but the app is adapt is much bigger so the way I kind of want to

  11. 4:09

    do this is it just start with web to start with today and just benchmark things on that and then we can look at what's different in in the decentralized world and that way everybody is on the same page and we have a good ground to start on and so if you've worked with web to apps or normal apps as you can call them so you know it has a front-end that lives in either a browser or on a mobile phone or something like that your your front-end basically sends

  12. 4:35

    requests to a server that server talks to a database and stores data and the server is owned by one person the database is owned by one person or controlled by one person practically speaking a lot of times these actually are made up of distributed systems so you know they you're the servers probably hosted on the cloud somewhere which is a whole bunch of servers that are distributed you know your your database in large companies like

  13. 4:58

    Facebook and things like that it's a it's super distributed and it's sharded in a lots of little pieces but in the end of the day what actually matters is the fact that all this is controlled by one person or one one entity so it's not I mean it might be distributed but again it's centralized so centralization has a lot of advantages there's a reason why we've done it this far and and why it's worked out so well it's I mean you have full control over everything that's going on we we have a lot of experience

  14. 5:23

    building business models that are that are based on the current architecture I mean SAS SAS is is an enormously impactful business model that's changed the entire world in the way that we operate software and off software it cost I mean it's not that expensive to run a web app these days we have speed it's it's super fast and another one that that's maybe underappreciated until you until you

  15. 5:47

    start comparing it to the decentralized world is the speed of iteration is super high because again you just push your code to the server all of your server instances have have all the same code and your user the next request that comes in from some user somewhere is immediately going to be running your new code that makes it so you can you can iterate your business you can iterate your app very very quickly in a centralized fashion and of course one of the things that we all kind of grind our teeth on is that is that moats are well

  16. 6:11

    understood from a business perspective as well we know that if we own the data we know how to monetize it and we know how to prevent you from leaving the app because we're gonna give you a better and better experience or well yeah there are a lot of ways obviously of getting these apps and I think we've all we've all found them all and some of the downsides are they tend to be a little bit more abstract and so some in some countries in some places and some people with some subgroups these are very very

  17. 6:36

    painful for most of us especially here in this room these are probably a little bit more abstract censorship is is of real thing though sometimes sometimes so one of the core ways of censoring is if I run a platform if I'm Facebook and your building and your Zenga and your building games and your spamming my newsfeed you know congratulations you just built a billion-dollar business and I just kicked you off my platform and

  18. 6:59

    that you know that hurts a lot and there's also unintended censorship where I mean you know you kind of hear you control the guns you control anything I mean if they know where to send the people with guns or the people with lawyers or you know the people with handcuffs then then they can they can make you do things so you know let's say hypothetically Facebook didn't want to give up their data I mean if the Department of Justice comes in and makes them there they're gonna have to do that and that's because they they're a

  19. 7:24

    centralized company and in order to operate in this country they have to you know they have to play by the law and the law knows where to find them so obviously hacking is something that everybody's familiar with and the fact that the more data you centralize the more it becomes a target and frankly the more it can become a liability for you as a company as well so data data is a

  20. 7:40

    double-edged sword more and more so these days again on one side you have machine learning and artificial intelligence advances that are kind of adding value to data and on the other side you have increased instances of hacking and more consciousness around privacy like Europe's gdpr and things like that that are making data a liability because once you do get hacked it's you know it's starting to raise the raise of the penalty and then finally another another one of course is the more data you have lying somewhere the

  21. 8:06

    more valuable it is for anyone and so if your company goes bankrupt if your company wants to sell that data and monetize it they can do that and you know you you might have you know they might have started with the best of intentions but you're now on the your data is now on the auction block five years down the road ten years down the road and you don't really know where that's going so well I mean one of the one of the core paradigms of people who

  22. 8:30

    are building these these applications in today's world is basically hoarding data I mean it's it's always up until now it's been how much data can we get how valuable can that data be and we're all gonna basically suck data out of the user and all their interactions and store it in our in our silos and then exchange it with each other and use that to build shadow profiles for advertisers behind the scenes and things like that and that's more or less the way that the web works right now is everything that

  23. 8:53

    you do leaves this this ripple effect of data and everybody else is frantically vacuuming it up and paying other people for portions of it and things like that so if we look at the the difference on the decentralized side so at the very very high level architectural II I mean we still need a front end we still need we still need to you know to put the app in browser on a mobile phone whatever it is right I mean you need to be able to interact with the app somehow I met uses

  24. 9:18

    the same set of tools that you're used to in the normal world which is you know HTML CSS and JavaScript that also has to get served from somewhere it has to find its way to use somehow and and generally we use we used conventional servers for that so there's there's nothing too revolutionary about that what's new about it is that the the front-end actually talks back to a blockchain instead of using a database instead of

  25. 9:42

    using a centralized database and that's basically via the smart contract and we'll talk about the wallets as well and it kind of goes via the wallet to the smart contract to the blockchain and the vault the smart contract is running on the blockchain so I guess it's a little bit reversed it's to the blockchain which runs the smart contract but architectural is speaking the real difference I want to highlight is that the database is kind of out and the smart contract talking to the blockchain

  26. 10:04

    is is in oh and then at the very bottom you can see that one of the core benefits as well as or one of the core differences is that data is generally being stored or worked with on behalf of the user and with permission from the user so we'll take a look at that in the interactions so just a quick thing to note if you if you see a lot of blockchain diagrams they're really bad like they're wrong you have a lot of

  27. 10:29

    diagrams that are sort of squares in a loop which doesn't make a lot of sense you some of them do forking which makes sense a little bit but they kind of get wrong the idea like it kind of gives you this sense that there's some sort of centralized chain and I think the most important mental model that you can have is that is that this is a distributed system with lots and lots of individual nodes that make it up so each individual node is actually running the chain each individual node is running your smart

  28. 10:54

    contract and that's that's really important because that's what gives us our decentralization so I you know it's a diagrams are actually really powerful because that's what benchmarks your mental model at least it does for me so it's good to have a good diagram and I will say our designer has not taking a look at this so this is not I'm not qualifying this is a good diagram but at least it gives you that idea so so some of the

  29. 11:17

    advantages are you know kind of the flips of the disadvantages on the centralized side there's there's a lack of censorship you know you also don't have the same platform risk that Facebook's going to kick your app off because your app kind of just runs out there it's it's kind of you you put it out there and then it's running on a hundred thousand or a thousand or a hundred or however many nodes and there's really nobody else who can who can mess with it on your behalf and of

  30. 11:40

    course everybody can see the code that's running because your code has to run on all of these machines so somebody is actually seeing the code you're it's not hidden it's not hidden behind a server so you can actually verify what's going on so there are there are problems this is this is this is not a me standing on my soapbox and boosting decentralization decentralization comes with very real costs and it's very it's a lot of people don't really talk too much about this

  31. 12:03

    stuff but it's absolutely it is expensive so so on the right you can see that the sort of a conventional thing that they say is you know you can be better faster and cheaper and you can pick any two of the or cheaper and you can pick any two of those and decentralization is actually a homeless the opposite it's you can you can be better you can't be cheaper you can't be faster because almost definitionally when you're decentralizing something

  32. 12:27

    across many many nodes each one of those nodes is effectively running a server of its own so the you know at a minimum if you're running a hundred nodes it's gonna cost you a hundred times as much as running on a server that that same amount of compute if we're thinkin apples to apples so blockchain is not cheaper blockchain is also not faster I mean to running something on on an Amazon AWS server or even just your your

  33. 12:50

    laptop running a webserver a simple web server is gonna be infinitely faster okay exaggeration we're engineers will take we'll take issue with that but but I mean it's gonna be orders of magnitude faster than anything on blushing because blockchain it has to not only run the code but then it also has to talk to El all the other nodes and agree that everybody ran the same code and everybody got the same result from that code right so all that takes time so you

  34. 13:14

    know whereas something will be you know single-digit milliseconds to run on a centralized server system in the blockchain it could be multiple seconds I mean in in in in aetherium it takes 14 seconds or did is a 14 so it's 10 at whatever it is it's it's on the order of 14 seconds that coin on the order of 10 minutes and you know platforms we're beginning to see an asymptotic push downwards but it but there's just a minimum amount of stuff that you need to do on a blockchain to get everybody to agree so it's never

  35. 13:44

    gonna get to the single-digit milliseconds you know at best we're gonna be getting into into sub-second a few other things that are a little bit less a little bit less clear I guess one is just the service side so you know if if nobody really owns this app so that's the other the other thing about this is when you're a developer and you kind of put your app out there and it's running on the chain and you you don't really

  36. 14:06

    control it anymore technically because it's running out there like you know you could get hit by a bus and it'll still it'll still keep running but the problem is is how do you add a service layer on top of that this is something that a lot of people have struggled with because there's there's a lot of narratives around remove the middleman you know if everything's on the if everything's on the blockchain then then we don't have to pay Airbnb to list our houses but the problem is what goes wrong when somebody

  37. 14:30

    comes to your house and they trash it you want services you know what goes wrong you know what happens if you lost your password so services are actually a valuable thing that we haven't really figured out how to tie those back to a decentralized app because who provides the services and how do they get compensated for that and then privacy is the other thing again blushing doesn't solve privacy it doesn't solve privacy it doesn't solve the right to be forgotten and things like that I mean your data lives out

  38. 14:55

    there and it's an immutable record and it's and it's an append-only database so it's back there somewhere so these these aren't resolved issues despite what you you know what you may have heard and what might be written out there so these are definitely open questions thus far the real question is is it worth the trade-off right like what's worth me spending you know spending more money and and you know taking more time and thus far we found money definitely

  39. 15:25

    so--but Bitcoin is still the killer app you know store a value right now originally it started as a transactional thing now it's more of a store value thing you have someone like Ripple doing doing of a transactional thing on optimizing for cross-border transactions and kind of a medium of exchange for for remittances and things like that trying to trying to replace Swift though those are really the killer apps right now but then you also have things like what-what

  40. 15:49

    can't exist without blockchain well you've black markets I mean that that's pretty clear you know we had Silk Road and we have a lot of a lot of things where people don't have access to markets that might not be you know might not be trading hits and and drugs and things like that but but you know are more benign things that just didn't have you know there was some sort of government censorship or there was some other lack lack of access and then it's sort of related to the government side you have systems that are that are

  41. 16:13

    censored and of course people aren't you know those are things that also can can be done on blockchain but we don't necessarily like we haven't really gotten a lot further than that I mean we're building gambling apps we're sort of we're relating the charge with with the usual players and I don't think porn has found its way on there but we definitely of gambling and we definitely have what am I looking for what's the other sin gambling well gambling gaming

  42. 16:39

    and and and advertising things like that but but what we do have is a new set of primitives and and so so my goal here isn't isn't to just sort of lay out like these are the things you can do with the apps but I'm trying to try to get it into a little bit more fundamentally like what the apps give you what to decentralized apps give you that might be worth the costs and it's really up to

  43. 16:56

    your creativity to figure out how do you put these things into something useful so from just a general perspective the previous the previous diagram you saw basically you know these apps are trying to vacuum data out of users and hoard it off to the sides because we're actually asking the user for permission the user actually has a lot more control and that really prevents a lot of those effects

  44. 17:18

    and just just looking at that the the way that this is progressed you can actually think about the money transfer function of Bitcoin as being the original DAP I mean it doesn't do much it's not that interesting I mean like yeah wait I mean it is very interesting from a meta perspective it's a Seidel perspective but from a technical perspective it's actually not that interesting to just sort of send Bitcoin between two wallets and but that's that's basically the the original

  45. 17:43

    decentralized app and then you started getting some more stuff around where you could you could program transactions a little bit more you can apply some conditional logic to like you know when am I gonna release these funds and things like that and now we're you know with aetherium we're getting and beyond we're getting deeper into the logic that you can run on these on these decentralized networks is much more complex and you can actually build essentially a turing-complete like a full full computer based on based on

  46. 18:08

    these networks so my point here is just that is just that a lot of things actually technically qualify as decentralized apps and right now we're just we're just kind of pushing the envelope more and more complex and trying to see like where can we go with this stuff so I want to talk about primitives so the idea of a primitive is is really just just what do you get what do you get for free when you when you sign up to use the blockchain and and different platforms different technologies give you different sets of

  47. 18:33

    primitives blockchain has has a few that are that are actually quite powerful so so there are really three big categories one is identity because everybody on the account every everybody every every contract every refrigerator or whatever it is everybody gets gets an account and that account can hold all sorts of different stuff it can hold your money it can hold your data it can hold your crypto kitties it can hold your your

  48. 18:58

    house if some people have their way you can put a lot of stuff in that bucket transactions are the other one so so we talked about transactions cross-border transactions things like that well what blockchain gives you that's a little bit different or what it gives you out of the box is it well actually I'll go into this but transactions are fundamental they're they're a fundamental thing about the way that we've designed block chains is we've basically created these

  49. 19:21

    things beak we originated them with Bitcoin precisely so that we could transact and so transactions have been a core core aspect of this and of course cryptography is the other glue that holds a blockchain together and because it's so fundamental to the way a blockchain works you expose a lot of cryptographic primitives that developers can use to do things that that they might otherwise have a lot of difficulty doing you know so so everybody here if you're creating accounts on the chain

  50. 19:46

    will have access to to a key and and that key can be use for all sorts of things where in any other context it might actually be a pain to get you to sort of deal with these keys right so let me go into the identity primitives so so I want to I want to dig it a little bit deeper onto what each of those three categories offer so as I said everything on a blockchain gets assigned a contract so so it's sort of like you know when you when you get created as a user and an app like whatever it is when you when you create

  51. 20:17

    your wallet you get one of these nonsensical hashes and that becomes your account and your account sort of has everything attached to it and everybody gets one and and and the cool thing is that accounts don't have to be humans accounts can you know accounts are they don't care there you have an account that's assigned for a smart contract even account that's a sign for your refrigerator you have an account that's assigned for you and and and that's that's interesting because we don't always get that for free with with other

  52. 20:42

    systems the other one is ownership of course which is that the account actually is a bucket that allows it to control all sorts of things so your refrigerator could could have tokens in it you know in its account and you kind of get that for free again I'm I want to be a little careful not not to go too ridiculous on the use cases because the goal is really just to illustrate and you know let us be creative and then of course another

  53. 21:06

    one is is is logging in and and dealing with reputation which is you know right now you might have Facebook as your general login for the web right you know you go to a website login with Facebook things like that but you still you're trusting facebook with all of that and and blockchains the fundamental platform itself can provide these types of these types of services and and you can also have reputation and so one of the challenges of blockchain and decentralized systems

  54. 21:30

    is is the idea of well anonymous system specifically is what happens like how do you have reputation like how do you know how do I know that you're trustworthy and how do how can I extend you credit whether it's actually monetary credit or some sort of social credit to do something and so you can actually begin to accrue some sort of transaction history or credit as you're on the as they're on the chain so transactions there there are a few daffy you different ways that transactions are

  55. 21:54

    given to you kind of for free on the blockchain so you have direct transactions so so you have peer-to-peer transactions which is definitely not trivial I mean you know you might have functionality on your phone where you can send data to people you can sort of air airdrop files and things like that right but but what this gives you is is is definitionally at the very basic level you have the ability to peer-to-peer transact anything that's in your wallet any any data that you have it can go peer-to-peer you don't need my

  56. 22:19

    permission you don't need Facebook's permission you don't need to apples permission to do that and so as a developer that gives you that gives you a lot of freedom to empower your users those transactions are also instant so that's maybe less less relevant on the on the the digital side but but on the financial side that's certainly not the way that the world works right now you have multiple multi-day settlement and and these these for better or worse some

  57. 22:44

    sometimes it can be a disadvantage are instant or more or less instant because of because of negligible fees you also get what you can do micro transactions so instead of paying stripe or who or whatever your processor is 30 cents minimum per transaction which by definition means you you can't have tiny little transactions you know this is why people won't take credit card less than you know four dollars or five dollars at a coffee shop it's because they're getting charged 30 cents on that

  58. 23:07

    transaction plus three cents plus three percent of the cost which just like cuts it out their entire margin you know if you don't have to deal with this legacy of financial system if you're just doing a lot of peer-to-peer stuff you can you can do much much smaller transactions for much much smaller fees you also have conditional transactions is basicly the idea that you can sort of wrap a transaction very very simply in in in some sort of basic logic or or complex logic that allows you to do things like

  59. 23:31

    escrow you know and an escrow is really important because how do how do we you know if we're transacting how do we verify that you know I'm gonna give you at the same time as you give me you know the whole prisoner swap thing it makes it quite easy to do that with with the primitives that you get on blockchain so the third category is cryptography as I said it's the glue that holds a lot of this together two of the cool things that you can do with it one is you can verify any activity so if you want to

  60. 23:55

    verify that that people have done something whether it's somebody in your supply chain or something along those lines you know you you can basically you can basically checkpoint that on the blockchain and then in the future you can basically unlock the thing that was kind of locked there and and it's like a little time capsule and you could say oh yeah look you actually did the thing that you said you're going to do and on the other side very similarly you can also verify that that things are in fact

  61. 24:19

    fair that they you know that the poker game you're playing actually has a ran this algorithm that's this legit and fair alright so there's a lot of stuff that those primitives allow you to do I'm not gonna list them all but you know if your app needs peer to peer transactions if you need to handle money if you need to deal with you know it's easy verifiability if you need to escrow

  62. 24:41

    a bunch of stuff that you know these are all questions that say like oh yeah maybe buck Shan actually does give me some tools that that I didn't know that I could use that easily you know I wouldn't know what to do with those thing I wouldn't know how to put those things in if I wasn't working with this platform so next time talk about the actual interactions like what's it like to work with a decentralized application so one of the core tenets one of the core facets as I was talking about is

  63. 25:07

    permission you know a lot of this requires permission because a lot of what we're doing is asking the user for things so you know they control their data they control their accounts and all we're doing is just borrowing from them the access rights to change things so you know an example as a marketplace if you know if we're running a decentralized marketplace and you want to transact with somebody else maybe

  64. 25:29

    it's a decentralized exchange maybe it's a collectibles marketplace or something who knows what the future is going to hold but you know the plat for the marketplace needs to ask you for permission and you don't actually have to give them your information you don't have to give them your password you don't have to give them anything you basically just allow them you you basically greenlight a specific transaction and say yes I I allow this transaction to occur and and you know

  65. 25:54

    you don't have to trust them they don't have to trust you but it goes through anyways so the core of all that is the wallet and so that's something that's new that's something that's weird it's new it's a pain in the ass for all the users it's it's kind of a great strength and the great weakness of all this so when I say you get cryptography for free what I really mean is you have to go through all the trouble of setting up a wallet and then you get cryptography for free so you know it's it's we're working

  66. 26:19

    on making this easier but the idea of the wallet is that basically your wallet kind of lists vieni accounts that you have created and all an account really is is your private key your cryptographic key that points to the safety deposit box which lives on the blockchain so you know your your your wallet doesn't store a whole bunch information it's you know it's just a little teeny tiny thing wrapped in a bunch of cryptography but you know it's a little teeny tiny thing and that's it

  67. 26:43

    all you need is the key it's just it's literally like a physical key that you use to unlock things and it's like a key in a signet ring you know that you can use the like stamp the wax on the on the secret message that's basically all it is most wallets from a technical perspective both have that key and they also have to talk to the network so you know as we get a little bit deeper into the stack you know generally the wallet will do two things which are kind of

  68. 27:07

    separate one would be accepting transactions on behalf of the user and signing them so that you as the user sign those transactions and then that transaction has to find its way onto the blockchain and so the wallet usually runs a node from the blockchain or a light node or or there are a few different ways of doing it but the wallet also sends that transaction down to the the blockchain which then runs the whatever logic needs to be run on the smart contract all right so this

  69. 27:33

    might be tricky too tricky to look at from a distance we're actually gonna see this a little bit more later on but this is a wallet transaction flow it's basically a coin based trading flow that goes through meta masks which is a wallet that lives in the browser it's a browser extension and all this is saying is essentially I want to buy some stuff and then the wallet pops up and says hey do you do authorize this this buy to go and then sort of what are the parameters that you put on it and then and then it

  70. 27:58

    sends back to the coinbase transaction which you know can then proceed once once you've been asked for the permission so the thing about wallets that's kind of cool is it's not it's not just about money so again remove remove the the narrow focus on a wallet as holding tokens or a wallet us as hooking as holding money which again is still not really accurate as a wallet itself only holds the key that points to the money that lives on

  71. 28:25

    the chain but that wallet can point to anything you know so so you can have a crypto collectible which are you know again we'll go into crypto can I use crypto kiddies a lot because it's probably the most well known crypto collectible and and we have a flow coming up from that but you can you can store anything in your wallet or it could just be data about your your movements you know it could be your

  72. 28:47

    your your passport information it could be literally anything so so what the wallet the job of the wallet is just ask permission and to sign things so anytime that we want to get something unique from that user we ask them via the wallet so all I wanted to highlight here is this is just the two-step process so this is this is a diagram from my ether wallet which is one of the etherium

  73. 29:12

    wallets that's available and and the only thing I wanted to highlight was that it that wallet both signs your transactions so you know once you give permission for the app to do something on your behalf you've signed it and then it actually sends those transactions out to the blockchain and most of this diagram is about the guts of like how is it sending those transactions to the blockchain and you know how are those going to be included so you don't need to worry

  74. 29:35

    about the details there so I wanted to do a quick case study on crypto kitties and so I don't know if you've had a chance to play with this I don't know if you've purchased scripto before I don't know if you've purchased crypto collectibles before but this is the way it works right now so crypto kitties if you haven't heard you basically it's a it's a game where you breed cats you each cat is completely unique there is only one cat like it in the entire

  75. 30:00

    blockchain and that cat has a genetic signature that you breed with other cats and then they make kittens that have a new genetic signature and everybody's happy and you you know it has a but but what it has is because these are unique they have they have some scarcity value and so if we all believe they have value then they have value and and and so the way the app does this is is or basically

  76. 30:24

    what the app offers you as a user of the app aside from holding a bunch of cute little kittens is you can breed them with other people and they have a marketplace where you can actually ask people and sort of you know offer people to breed with them or they with their their kitties this is not the so good or or you can also sell yours just just outright and so what I what I did with this was I signed up and I bought a crypto kitty which has yet to show up in my wallet and I'm a little confused

  77. 30:53

    what's exactly is going on but luckily that's not relevant so what I wanted to walk through was just the UI just one of the steps what does it take to interact with one of these decentralized apps so cryptic kiddies lives on the blockchain but as we were saying it it gets served so so this front end is is visited through a normal browser it's it looks like a normal web app like any other web app in the world and it's actually being served from a normal server like a

  78. 31:18

    normal web app so nothing nothing special when you go to crypto Kitty Co so if you click the start button that's when immediately we have to start doing some crypto stuff so I have a browser add-on but the meta mask add-on which is my wallet and so it's kind of a separate process that runs in my browser and so immediately the first thing that it does is it pops up my meta mask window and it says you know sign into

  79. 31:41

    meta mask so you know sign into your wallet because we're gonna have to ask you for stuff and so I sign into my wallet and then it basically similar to like a sign in from Facebook it's the same thing it's our you know would you like to allow crypto kiddies to just connect with your wallet and see your information because meta mask you know privacy is important there they're not even gonna give your information out to crypto kitties unless you say okay like

  80. 32:04

    I'll let crypto kitties like see Who I am you know see you see my public key and so we click through the UI we create an account sign into that account and then upon signing in actually oh yeah so so in order to sign in I need to it pops up another meta mask thing and it says I need to actually sign something which which is them creating an account on my behalf so you know it's more or less me me owning something and so you know they have to ask my permission to sign it once I once I once I quote sign that

  81. 32:37

    from from my wallet it's okay cool now we're in crypto kitties they have they have a whole flow to it you know get started with crypto kitties do the tutorial nothing interesting there again this is like any other web app I've created an account I'm just working with it normally but now I want to adopt a kitty so what I did was I just went to to you know the the kitties there's a list of these

  82. 33:01

    kitties I looked for the cheapest one possible because I don't want I don't wanna spend all my my ether on a crypto kitty for for you guys I love you all but and so when I click on that it basically pops up the kitty and it says you know this cat is owned by Nick and I can buy it right now for four you know point zero was at point zero zero four eight you know point zero zero four eight

  83. 33:28

    ether so I click buy now gives me to a confirmation screen on the left and then as soon as I click OK buy this kitty we're back to meta mask it's got asking me it's my wallet again and my and crypto kitties is basically saying hey wallet you know hey hey Eric and your wallet like can i execute this transaction on your behalf and this one's gonna cost you money so what it's asking me is is are you willing to pay

  84. 33:50

    the the gas fee that this is going to cost and we'll talk about gas in a little bit and are you willing to pay the cost that you said you're gonna pay for your kitty and so I have to I have to confirm that and so once I confirm that now right now you know the website reloads and now suddenly there's a transaction there that's that's sitting there and it's waiting for me and and you can actually view the details of it and you I'm sure nobody can read that on the right but basically that's ether scan which is a website that actually

  85. 34:16

    examines the blockchain itself for aetherium and and it looks at the transaction that's going into the blockchain and it kind of pops it up and gives you all the information you need about that transaction so what we're looking at there is okay the transaction went through and it's officially it's officially on the blockchain that I'm asking this person to buy their their crypto Kitty so he has a no clue approved to sale

  86. 34:39

    I don't really know exactly what's supposed to happen I'm a little bit confused as a user but this is irrelevant for you guys I was just checking that the sale hasn't been finalized so I probably missed something in the tutorial but irrelevant so it's a my point in walking through that was just to show the different points it's kind of the different high-level things that are happening and when they had to ask my permission right so they had to ask my permission to create the account and they had to ask my permission when I

  87. 35:03

    was spending money which was real money so at some point in theory I'm gonna have a crypto kitty it was it was transferred before the approval so I I don't actually know what it's doing behind the scenes right now because it's it's sort of in I'm in limbo right now so I think they might be screwing the fund off to the side and waiting to see if they're gonna accept it and if if they don't accept it it

  88. 35:26

    might go back to me I don't I don't actually know what they're gonna do so what I want to do right now is get a little bit technical it's just dig in a little bit more start exposing a little bit more technical terminology and a little bit more architecture behind what's actually going on so we'll kind of back up for a second out of the example of crypto kitties I'll jump back into that but so what does it actually take to build decentralized app again

  89. 35:51

    the front end is just a front end you know it's the same front end that you're used to building HTML CSS and JavaScript the only thing that's that's different is that you know you have to program the JavaScript on that front-end to understand how to how to ask the wallet questions and how to how to send transactions to the blockchain you have to and usually this is gonna require some sort of library that the platform you're building on top of is gonna give

  90. 36:13

    you or you know somebody somebody's gonna give you some developers gonna give you this library that sort of translates between vanilla JavaScript and blockchain ease and then of course you have to build a smart contract which lives on the blockchain and actually does the stuff that the browser is trying to get you to do and then of course you have to deploy the the smart contract to the blockchain so the high-level flows again I want to just try and try and hone in on conceptual

  91. 36:37

    diagrams as much as possible so this actually shows that shows the the flows for two different types of apps so on the Left we have a web app on the right we have a mobile app kind of the point of showing them side-by-side is that there's really no ultimately no difference the only difference is the web app you know you might use a JavaScript library on a mobile app you might have an SDK that's that's kind of embedded with the mobile app because you had to download the thing it's probably

  92. 37:00

    written in the same language and and that basically the flow of this is you know when it transactions coming through it comes through from the app it has to ask the wallet and then the wallet figures out how to push it down and talk to the chain that's that's really all I want to I want to show here there's a little bit more in the diagram about how the wallet might find its way to the chain but I don't think you need to worry too much about

  93. 37:23

    that might be deeper than we really care about but if you're interested I guess I'll explain so there are generally kind of two options for for sending transactions to the chain so the wallet can either run a node actually itself in which case it literally is part of the chain and in a way because again it's just a whole bunch of nodes around the world and so one of those nodes might be running in your browser it might actually not be doing all of the work of

  94. 37:46

    the chain it might be kind of a light node but the idea is that it's it's talking to its peers and it kind of it's synced to the network and it knows what's going on so that's one way of doing it the other way is is hey centralization it's back is is basically hard-coding an endpoint that it knows how to reach which is a trusted node and so you might have heard of in fura that's that's effectively a trusted node for the etherium network or they

  95. 38:11

    basically said you know what if you guys want to send transactions to a theory I mean you don't want to run a node in your browser and you don't want to sync it to the network and you don't want to figure out how that works or or use resources or whatever it is just send it to us and we'll make sure it gets to the network on your behalf which you know like warning bells centralization point single points of failure things like that but it's it's the way the world works right we're constantly sort of sloshing back and

  96. 38:35

    forth from decentralizing to doing something that's easy to do centralizing and doing something that's easy I don't know what they technically call it I mean it's synced to the network but it could be a rapid sync so yeah we can dig into that a little bit after if you want so I I'm the kind of person who has to understand step by step by step so hope maybe you guys are or maybe you can tune out for 30 seconds but really really walking through the steps of what's happening when a user's doing something

  97. 39:08

    on the web page so again you can think of the crypto Kitty example what's happening when I'm actually trying to buy that thing it so the first thing is obviously I'm interacting with a web page I'm clicking by you know I say do the thing I'd say buy the kitty the second step is that then my front-ends javascript code is gonna is going to record that I push the button and it's gonna it basically has to check for a wallet and say hey you know it

  98. 39:30

    do you have meta Mask installed if yes great here's here's the here's the transaction that we want to get I'm asked to sign and and you know like call me back when you're done and so then then everything moves over into the wallet so now it's the wallets turn your app your app has no idea what's going on now your app is just sort of whistling off to the side and and and meta mask is is now or whatever wallet it is that you've chosen now now that's the one

  99. 39:56

    that pops up the window for the user and says hey we just received this thing that you know supposedly we're supposed to send on send back to the chain on your behalf is this real you know do you approve it whatever whatever and so once once that gets your permission then it's going to use as I said either the either the the trusted node or it's going to actually already be synced up into the network directly and it's going to send that transaction that's now signed to

  100. 40:20

    the network and so then the blockchain network now you're in the blockchain network and now if the transaction gets propagated it gets included in a block and then it actually gets run using the smart contract code that you've created because it you know the transaction is basically pointing to that smart contract and it runs that smart contract and then finally of course something has to come back so once all the nodes have achieved consensus have figured out hey this is actually what this is what the

  101. 40:45

    smart contract result should be we're all in agreement it's now been whatever 14 SEC 10 second 14 seconds on aetherium cool let's send that thing back and and we're good to go so that's that that's kind of a step by step life cycle and you can kind of see a picture of it again step one is in the user interface it pushes through your JavaScript code it goes to the wallet which then has to ask you questions that wallet will then send it into the

  102. 41:10

    blockchain network which runs the code on your behalf and sends the response back so as a developer what are you gonna pay attention to I mean you really really only have it depends on your function either the top two or the top three if you're more of a designer you might be focusing more on the third one but basically you know you have to build a smart contract that sits on the blockchain and you have to build the JavaScript code that knows how to talk to the smart contract up in your app and yes it's going to go via the wallet but

  103. 41:42

    I mean you know you're the one who has to code the JavaScript and you're the one who has to code the the smart contract and then of course the user interface everyone has to think about that so we always want to put that there because again this flow is real pain for users so again we're constantly pushing forward and trying to figure out how do we streamline this how do we remove steps how do we create defaults and things like that but the user interface is still super important the user flow

  104. 42:06

    is still super important just a quick technical aside smart contracts can call other smart contracts so it's not like you have to build you know this monolithic thing that they can't reach out if you're a developer you understand there that's that's silly and it doesn't make any sense smart contracts can talk to other smart contracts which if we look at crypto kitties they actually cryptic kitties has a whole bunch of smart contracts inside of

  105. 42:31

    it so these are actually technically have more but these are kind of the main ones there's there's a pretty good blog post out there where they talk about that so if you're curious you can probably google around and find it but you know they they essentially have you know the one big kitty core contract that then calls out to specific contracts that each have specific functions if you're a developer you're used to this this is just modularity but all I'm trying to say is you can do this in smart contracts it's not quite as

  106. 42:57

    seamless as it would be in the normal normal developer world but you can do it you know so one contract has all the the meta stuff one contract figures out how do you actually create new kitties one contract figures out how the auctions work stuff like that and so just a few notes on the architecture so the display logic is actually on the server so this is something specific for for crypto

  107. 43:22

    kitties it may be true for it isn't necessarily a general commentary on decentralization I'm only really bringing it up just just to flag the nothing is absolute and and something like crypto kitties it's running on the etherium network but at the same time there are elements of it that might feel more centralized and so nothing is absolute here and so for instance what what do you actually get when you own a crypto kitty we're like what does that

  108. 43:46

    even mean so technically speaking in one of their contracts and was it I think it's kitty base they they have they have data structures they have big arrays that basically just record all of all of the kiddies you know that are out there and and then they just map it to what account number owns it and so you know what do you actually own when you when you own a crypto kitty I mean effectively what you actually own is its genetic signature and that's about it

  109. 44:10

    they what they own is and again this might be a little bit old because this is a lot of this information is from about a year ago and they were talking about changing it so this might be a little bit different but as a case study it's still useful you own the genetic signature but they decide how to display it so so all of those fancy graphics that make the bug eyes and the cute little tongue sticking out and stuff like that you know that

  110. 44:34

    that comes from them that comes from their server so so technically they own the trade they own the rights to those types of things so it is an interesting commentary on what do you actually own when you own something that's decentralized so again another one is of course that the website itself is served from some sort of static host most likely they could have served it from a torrent network so that is actually possible as you can serve you can serve static pages from decentralized sites

  111. 44:57

    you could serve it from potentially ipfs you could serve it from a BitTorrent Network it might not work out too well because users might not be able to find it on accom it's all sorts of all sorts of interesting issues there but I just wanted to say again emphasize that none of this is is totally reinventing the wheel the website had to come from somewhere they have the HTML code had to come from somewhere and it wasn't the blockchain and

  112. 45:24

    I believe that's what's going on there yeah again the code is probably different from from when I took a look at some of this stuff but yeah it's I was I was pretty surprised when I saw that too and then finally the the code is it's not actually open source on github which is a bit unusual but there-there is I mean it's it's on the web I mean it exists somewhere and you can find it if you're if you're curious to poke through

  113. 45:50

    it so last things I wanted to talk about we're just a few other considerations and one of them one of the big ones is gasp like what the heck is gas so the wallet is is probably the biggest interaction difference between the blockchain and you know working with a D app adapt whatever and working with a centralized app but then as a developer yes you have to think about the wallet but in a lot of ways you don't actually have to think too much about the wallet because you're just sort of you just

  114. 46:17

    sort of like make your transaction happen and the wallet figures out what to do but you do have to think about gas and so the idea of gas is that these networks have to get paid for by somebody so I mean you have a whole bunch of nodes that are running the blockchain so how do they get paid to do the work that they're doing and they get paid by you giving them a transaction fee whenever they run your transaction on the chain and so that's gas and so in

  115. 46:41

    Bitcoin Bitcoin Bitcoin is is generally is one of the simplest overall networks because it really only does one thing it really only transact Bitcoin from one address to another and then it has some simple functionality on top that people have you know kind of built a lot of stuff on top of but fundamentally it's pretty basic each block on the chain in Bitcoin can only hold a certain amount of bytes of space that's how they've decided that they're gonna make sure that their blocks don't get so big that it takes forever to send it out to the

  116. 47:07

    network and that computers can't hold them and things like that so in Bitcoin it probably makes sense intuitively that you know if you had a gigabyte size block it would take forever to propagate that to the network and then you'd have an infinite blockchain time and you know no one would ever get it in in smart contract platforms like aetherium it's kind of the same idea except instead of space being the fundamental requirement it tends to be computing time or you know the amount of energy like the

  117. 47:30

    amount of cycles that that thing is actually using that that that run of your smart contract is actually using and so the idea of gas is that how do we actually account for that so it's really easy to say like how many bytes is this piece of code on the snippet of data that you sent me which represents a transaction it's a lot harder to be like you sent me you sent me some code that I'm supposed to run on my machine but I don't know if this is gonna take me you know one unit of time

  118. 47:53

    or 100 units of time and like how do we even how do we even pull that together but we have to figure it out because you know otherwise again you run into the problem where it might you might ask each node to run a silly amount of code and then and it kind of like slows down everything and comes up the whole system so the idea is that each block has a limit on gas and gas is just an accounting measure that represents how much complexity on the computing side

  119. 48:16

    does a given operation take so a simple operation like transferring somebody tokens might be super lightweight just requires a little bit of gas something like writing data to save it to the chain might be much more complex and take a lot more gas and so the idea is that you as a developer need to be conscious of when you're running your code how much gas is that code actually requiring to run because somebody's gonna actually have to pay for that gas

  120. 48:38

    and so the wrinkle here is that again on the Bitcoin blockchain how do you if there are more transactions that want to be in the block then there's actually space in the block the people who are running this block you have the nodes on the chain will actually the miners technically but I'm sort of conflating proof of staking proof of work a little bit so sorry for that but if you don't know what I'm talking about don't worry about it

  121. 49:02

    but basically the people who were minting these blocks they need to figure out well I don't know there's a thousand there's five thousand transactions waiting and I can only fit two thousand in this block roughly how do I pick which ones well I picked the ones that are gonna pay me the most so every transaction on Bitcoin comes in with an offer price and it says hey like I'm willing to bid and you know I'm willing to I'm willing to put this transaction in here for you know this much Bitcoin and you know all the other guys willing

  122. 49:25

    to pay this much and and so that you know the it's actually pretty easy for the block producer to then say oh you know I'll just take the most expensive ones that are gonna pay me the most it's pretty pretty vanilla with something like gas that that's basically the same principle it's like you know if if there's like ten thousand there's a ten thousand gas thing that wants to get in there's a hundred thousand gas thing that wants to get in there's you know a whole bunch of these different sized

  123. 49:49

    transactions that are trying to get in I we have to we have to allow them to sort of fight their way in by paying who's gonna pay the most and so that's what aetherium is doing with gas is so the gas is how much the accountings know on an accounting basis like how complex that transactions going to be and then they actually submit a bid for what what they're willing to pay for each unit of gas so it gets kind of complicated but but like once you get familiar with it

  124. 50:13

    it makes sense so again in in Bitcoin you can almost think of it like you know how many Bitcoin per byte of size am I willing to to bid to get into that particular block same thing is true with aetherium you say how many ether am I willing to bid for each unit of gas in order to get into the next block so it's pretty complicated and so that's that tends to be a hurdle not just for you

  125. 50:37

    but for the users too because as you saw in my meta mask it was asking me there's a gas fee sitting there and the reason for that is that any chain even though I didn't actually necessarily even though this this this transaction wasn't necessarily consummated even though I didn't necessarily get my kitty somebody on the blockchain had to run this transaction regardless right and anytime that you're asking these these nodes to

  126. 51:00

    run something you have to compensate them which means you have to pay gas so something that's fundamental about the blockchain which is challenging coming from the web to world where things are so low-cost that you don't really end up paying for a lot of this stuff is that you have to pay for every single time you ask people to do work on your behalf and if you if you're a developer you you

  127. 51:16

    understand how many times in a given flow of an application you're actually asking for compute help and you're asking for compute power and so every time that we're trying to do something that touches the user that's asking the chain to do something on their behalf it has to come with a gas cost and so some some apps will will assign a default gas cost because again remember the more I'm willing to pay for my gas the the more likely it is to get it in the next block if I'm not willing to pay much at all it

  128. 51:42

    might just sort of sit out there waiting and waiting and waiting and waiting and so sometimes they you actually ask the user for that and you say hey you know how much are you willing to pay and the user is like what the hell is gas and other times the Apple will sort of just average you know the last few blocks and I'll just say I don't know like it you'll probably get in there if you bid this amount just do it

  129. 52:01

    but so I'm not actually sure I think crypto kitties might be monitoring the chain and getting an average of the last few blocks and using that as their gas fee or they might be outsourcing to a third party that does something similar and then suggesting this as the gas fee that I should be bidding because what happens is I mean I won't when we'll go back to the slide but if you if you remember the block Explorer that I showed where you sort of the website

  130. 52:36

    that tells you all the data about the transaction that hit the chain like vet vet will also show off all of this stuff like how much gas did it how many how long did you have to wait until it was actually accepted in the next in the next block and things like that so yeah so who should pay for it open question right should a user pay for it I mean that's a real pain nobody I mean these

  131. 53:00

    frankly if you're thinking about user experience the user should never have to do anything because they don't want to do anything but somebody has to pay for this we haven't gotten to the point where it's totally abstracted away and you know but it can be costly if you're a developer especially if you write inefficient code you know we're kind of back to the days where you have to you know embedded systems like back in the day when you're managing memory you had a finite amount of memory on chips and

  132. 53:24

    things like that right I mean I guess today you still do but you know it's kind of a different world when you have to actually think about these things so again it's sort of a step back for from a development perspective cuz you're after you having to think about these very very detailed technical things all right so if you want to dive deeper things that are a little bit out of scope data storage so I mentioned it's pretty expensive to write to the chain well what if you have what if you want

  133. 53:49

    to save an image what if you know I mean these are normal things that any web 2 app actually it needs to be able to do and so there are solutions that are that are out there that are sort of working on this problem of how do you build a decentralized file storage system so the most common one is ipfs interplanetary file system which is related to the file coin token and you know that's that's one thing that you can look into that a lot of

  134. 54:12

    developers will hook into it has its own challenges its own decentralization issues which are out of scope and the naming is another one nobody wants to copy-paste all of these giant hashes where if you put in the wrong one then it goes to you know you've effectively destroyed whatever it is you thought you were sending so these are all problems and so you have projects that are trying to work on how do we solve the naming problem how do we solve across all the

  135. 54:35

    block chains you know sort of like with domains the DNS system in domains says you know there's only one WWE Google calm things like that like how do you do that on the blockchain side it's it's not trivial and there are a lot of projects out there tackling it but you as a developer are going to interface with these things so if you think just open just to kind of close out with on the issues open source so everything is

  136. 55:01

    open source here so get into open source culture if you're interested another one is governance is super important so the crypto kiddies contract for reference has basically they have roles hard-coded in there where they say well this is the the account of the CEO this is the account of the CEO and the CFO CTO and CFO anyways some of the executives in their company are hard-coded into the contract or are basically written into the contract in a way that they can make changes so you know for instance you can imagine they

  137. 55:31

    might want to have have the money that the contract has accrued from their transaction cut of running these auctions they like somebody wants to get paid right so you have to figure out where to send that but what it means is that they've actually written this in that somebody has power to change this contract is that centralized there is a decentralized again the sloshing write it as a developer I want to be able to

  138. 55:54

    update my contract like what happens if I see a bug and I want to fix it I want to be able to upgrade my contract but if I'm the one who can upgrade my contract doesn't that mean that it's centralized and I'm a single point of failure because if somebody has a gun to my head I could do something nefarious so I think things to think about and governance is is a really important issue it's an important issue on the basic blockchain level which is where you tend to hear the term use but it's also an issue on decentralized apps like

  139. 56:18

    anything that's decentralized where you have to make changes to it how do you make those changes like who decide it's when the who makes these changes and how we talked a little bit about decentralization and then the final thing to go out on is is if you need to know something how do you know where do you get this information from like if I need to if I'm running a sports betting site and I need to know what was the

  140. 56:40

    score of the Lakers game where do we get that because if there are a thousand notes who are all running this piece of code that are all asking what was the score of the Lakers game does that mean that each one of those is going to send one of a thousand requests to the API for the espn.com or whatever it is that's that's publishing this score or I mean that doesn't make any sense and a lot of them might not you know it might

  141. 57:03

    not be written in such a way that you can actually make those web requests you know I think that that's sort of like you the whole idea of these nodes is you're trying not to allow the code to break out because that's a security risk so how do you how do you how do you do that how do you find information that's that's that's coming in these are these are super trivial problems in a centralized world and it's not trivial at all in a decentralized world so we call that the Oracle problem you know it's it's you're you need to get this

  142. 57:28

    source of truth from somewhere the Oracle on the hill so who is the Oracle and who decides how the Oracle gets their information a very interesting question and again one that's out of scope for us today but well we're thinking about so that's all I have for today but I'll stick around for questions okay thanks a lot you guys