An Introduction To DApps & Blockchain Technology - YouTube

Channel: Tech With Tim

[0]
hello everybody and welcome to another
[1]
youtube video so in today's video i'm
[4]
going to be talking about blockchain
[6]
technology and d apps otherwise known as
[8]
decentralized applications now i want
[10]
this video to act as a high level
[12]
introduction to decentralized
[14]
applications and how you can use
[16]
blockchain technology to actually create
[18]
apps now the reason i'm making this is
[20]
because recently there's been a lot of
[21]
hype around cryptocurrency but a lot of
[24]
people look at cryptocurrency and
[25]
blockchain in general and think that's
[27]
only a way to make money they treat it
[29]
simply as an investment and something
[31]
that they can trade almost like a stock
[33]
however there's a completely different
[34]
side of cryptocurrency which is the
[36]
development side well that's what this
[38]
video is going to focus on so in this
[40]
video i'm going to talk to you about
[41]
what a blockchain is what
[43]
decentralization is what a d app is and
[46]
then the pros and cons of a d-app and
[48]
some of the different solutions that
[50]
companies are implementing to create
[52]
d-apps however before we go any further
[54]
i do need to mention that i myself am
[56]
not a cryptocurrency or blockchain
[58]
expert and that's why for this video i
[60]
teamed up with a company called cartesi
[62]
which helped me shape a lot of the
[63]
content in this video now cartesia is a
[66]
company that's dedicated to making the
[68]
blockchain and cryptocurrency more
[70]
accessible to developers like you and i
[72]
they have a ton of different products
[74]
and solutions that allow the blockchain
[76]
to be more affordable to use easier to
[78]
use and they just provide a bunch of
[79]
tutorials resources and really cool
[82]
products and you can check them out from
[83]
the link in the description now they
[85]
also are the sponsor of this video i'll
[87]
likely be working with them in the
[88]
future to create in-depth tutorials on
[90]
how to actually make decentralized
[92]
applications but as i said in this video
[94]
it's just going to be a high level
[95]
overview on how d apps work so let's go
[98]
ahead and get started
[102]
[Music]
[108]
so before we get into decentralized
[110]
applications the first thing you need to
[111]
understand is what a blockchain is so
[113]
i'll give you a simple definition here a
[116]
blockchain is a system of storing
[118]
information that makes it extremely
[120]
difficult or impossible to hack cheat or
[123]
change so generally speaking we can
[125]
trust this system and we know everything
[127]
on a blockchain is true accurate and
[130]
complete information and it's not been
[132]
hacked or kind of modified maliciously
[134]
in any way now going a bit further
[136]
blockchains are used in cryptocurrencies
[138]
like ethereum bitcoin and many other
[140]
cryptocurrencies that you would know and
[142]
the way they work is they're a digital
[144]
ledger of all of the transactions that
[146]
have occurred in this cryptocurrency's
[148]
history now this ledger is distributed
[151]
to all of the different computers that
[153]
are sitting on the blockchain network so
[155]
you may have heard of the term miners
[156]
before these are really computers that
[158]
are sitting on the blockchain and they
[160]
store a copy of this digital ledger so
[163]
every single computer that's on for
[164]
example the ethereum network has a copy
[167]
of the ethereum blockchain and this
[169]
makes it very very hard for someone to
[171]
actually maliciously change or send a
[173]
malicious transaction on the blockchain
[176]
now the way that works is if someone
[178]
wanted to actually send something
[179]
through on the blockchain that was
[180]
inaccurate was false was some malicious
[183]
type of transaction or they wanted to
[184]
modify some block or something they
[186]
would need to actually do that on almost
[189]
all of the computers that are on the
[190]
blockchain because every blockchain is
[192]
storing or sorry every computer is
[194]
storing a copy of the blockchain so if
[197]
you were to send through a malicious
[198]
transaction it'd be very easy to detect
[201]
because all of these other computers on
[202]
the blockchain would say hey i don't
[204]
have that transaction here that's not
[206]
accurate we're not going to include that
[208]
on the blockchain get rid of it now
[210]
obviously i'm oversimplifying here but
[213]
that's really the basics of how a
[214]
blockchain works and that's why we call
[216]
it decentralized because it's a
[218]
distributed ledger across all of the
[220]
computers on the network on the
[222]
blockchain network and that means we can
[225]
trust that everything on the blockchain
[226]
is correct because there's not one
[228]
centralized organization entity power
[231]
government whatever controlling what
[233]
goes on the blockchain it's a peer right
[235]
or it's a group of computers all around
[238]
the world sitting on the blockchain
[240]
network so to end off this section i'll
[241]
just say that the complete opposite of
[243]
something like a blockchain would be
[245]
something like a bank right a bank also
[248]
has a ledger of transactions it keeps
[250]
the balances of different accounts that
[252]
are with that bank however this is all
[254]
controlled by a central organization
[256]
there's not a large group or a large
[258]
network of computers or random people
[261]
around the world controlling this it's
[263]
one central institution and maybe this
[265]
institution is backed by a government or
[267]
something like that but that means you
[268]
cannot be guaranteed that there won't be
[271]
any malicious activity or stuff going on
[273]
with the transactions occurring because
[275]
there's only one entity controlling this
[278]
it is centralized not decentralized so
[280]
before moving forward i just want to
[282]
quickly talk to you about some of the
[283]
main advantages of decentralization
[286]
now really the core advantage is you
[288]
never have to worry about trust you
[290]
never have to put your trust in a
[292]
central organization institution
[295]
government whatever it may be and that
[297]
is really just a great thing because you
[299]
know the famous saying goes absolute
[302]
power corrupts absolutely and we can
[304]
look in history and see lots of examples
[306]
where a large institutional organization
[309]
has been corrupted has been malicious
[311]
and wasn't actually able to be trusted
[313]
and you can go and look at a lot of
[315]
other countries and see what they've
[316]
done with their currency mass inflation
[319]
stealing from the people go on you can
[322]
find all kinds of examples but that's
[323]
really the core advantage of
[324]
decentralization is there's no need to
[327]
trust i don't have to put my trust in
[329]
you you don't have to put your trust in
[331]
me we trust the entire network as a
[334]
whole because it's next to impossible
[336]
for any central entity organization to
[339]
go in there and be malicious and do
[341]
something fraudulent that is the
[343]
advantage of decentralization and that's
[345]
really the whole reason why
[347]
cryptocurrency has become super popular
[349]
especially in a lot of parts in the
[351]
world where they cannot trust their
[352]
government or cannot trust a banking
[354]
organization or maybe don't even have
[356]
access to that so finally we can start
[358]
talking about d apps otherwise known as
[360]
decentralized applications now d apps
[363]
are really just decentralized apps
[365]
that's all they are that means they use
[367]
some type of blockchain technology and
[369]
we can trust all of the code associated
[371]
with this application because it's
[373]
completely open source it never has any
[376]
downtime and once it's added to the
[378]
network it cannot be removed modified or
[381]
changed so just like transactions we
[383]
know we can trust when they're on the
[384]
blockchain we know we can trust all of
[387]
the code that's on the blockchain
[388]
because we can see it ourself we know it
[390]
cannot be changed or modified and we
[392]
know it's never just going to disappear
[394]
because the blockchain is always
[396]
available the blockchain never goes down
[398]
i won't explain that too much more but
[399]
that's pretty much how it works now what
[401]
is a smart contract well a smart
[403]
contract as i was kind of alluding to is
[406]
just code sitting on the blockchain it
[408]
can be executed by the blockchain and
[410]
you can think of it kind of like a set
[412]
of rules the most basic example of a
[414]
smart contract is something that allows
[416]
you to exchange one coin for another so
[419]
the best analogy that i've actually
[421]
found for a smart contract is something
[423]
like a vending machine so a vending
[425]
machine stores money and it stores you
[428]
know some type of goods right in this
[430]
case maybe we'll say it stores chips or
[432]
food or whatever if you give the correct
[434]
amount of money to the vending machine
[436]
you always get the good that you are
[438]
looking for if you give too much money
[440]
it gives you change no matter what it
[442]
always works a smart contract is exactly
[444]
the same way just like you might have
[446]
your own ethereum wallet you can
[448]
actually have ethereum stored in your
[450]
smart contract or maybe some other type
[452]
of good or service or coin or whatever
[454]
it may be and every time you give
[456]
certain input to this smart contract you
[458]
always get the same output it can never
[460]
be changed it's not malicious you can't
[462]
go in and modify it or hack it and that
[465]
is how we can trust applications that
[466]
are on the blockchain because they are
[468]
decentralized they work just like when i
[471]
send you a coin on the blockchain so
[473]
hopefully that's a decent enough
[474]
explanation but you use smart contracts
[477]
to add executable code to the blockchain
[480]
and then that code is used by an
[481]
application 8d app and that is why you
[484]
know you can trust the application that
[486]
you're using because it's distributed on
[488]
the blockchain so what i just said
[490]
sounds great and you're probably
[491]
wondering why everyone doesn't just go
[492]
use decentralized applications or
[495]
actually make decentralized applications
[497]
but the reason why is because there's a
[499]
lot of disadvantages as well now the
[501]
largest disadvantage with decentralized
[503]
applications is the cost it just costs
[506]
you a lot of money a lot of
[507]
cryptocurrency to actually be able to
[510]
run a decentralized application
[512]
not only do you need to upload the smart
[514]
contract to the blockchain that costs
[516]
you money and transaction fees then you
[518]
also need to use the smart contract make
[520]
calls on the smart contract which costs
[522]
you transaction fees and then if you
[524]
want to store any information on the
[526]
blockchain that's going to cost you
[528]
money and it just is very very expensive
[530]
even storing very small amounts of data
[533]
on the blockchain can cost you literally
[534]
hundreds if not thousands of dollars and
[537]
well it doesn't make sense for a lot of
[538]
companies or applications to use this
[540]
because of the extremely high fees now
[542]
some of the other main disadvantages of
[544]
decentralized applications include the
[546]
high latency it can take a lot of time
[548]
to send transactions or upload new smart
[550]
contracts poor user experience inability
[554]
to manage a ton of private keys and
[556]
wallets and all the other data that you
[557]
need right now it's just not the best
[559]
experience for developers fortunately
[562]
though the sponsor of this video which
[563]
is cartesi is trying to help that they
[565]
have a bunch of different solutions you
[567]
can check them out from the link in the
[568]
description to lower the cost associated
[570]
with creating decentralized applications
[572]
and remove a lot of those headaches but
[574]
still there's a lot of disadvantages
[576]
even using some of these great solutions
[578]
provided by companies like cartesi so as
[580]
i was saying there is a lot of
[582]
disadvantages and problems with
[583]
decentralized applications however there
[586]
is different types of solutions that can
[587]
be implemented to make them more cost
[589]
efficient and to make them have a lower
[591]
latency now those solutions are
[593]
categorized into layer 1 solutions and
[595]
layer 2 solutions now layer 1 solutions
[598]
use the underlying block chain
[600]
technology so a layer 1 solution would
[603]
be just using ethereum or using bitcoin
[605]
using the actual cryptocurrency or
[607]
blockchain itself now one solution
[610]
within the layer one solutions is
[612]
something called sharding now what
[614]
sharding is is kind of splitting up all
[616]
of the code or all of the you know
[618]
aspects of a decentralized application
[620]
into things called shards and then
[622]
distributing that on the blockchain
[625]
network such that it gets executed
[627]
faster and you don't need to wait for
[628]
say an entire massive large piece of
[630]
code to be executed instead you have you
[633]
know 20 or 30 pieces of code that are
[634]
being executed or 20 or 30 shards that
[637]
need to be you know run through the
[639]
network and so you can kind of split
[640]
this up and things can go a lot faster
[642]
just like what would happen if you say
[644]
split your application into multiple
[646]
threads or multiple cores so that's one
[648]
solution layer one solution called
[650]
sharding that can kind of increase the
[652]
speed and cost effectiveness sorry of
[655]
using blockchain however then you have
[658]
layer two solutions now layer 2
[660]
solutions are typically more advanced
[662]
and what they are is actually a
[663]
technology or system that lies above the
[666]
underlying block chain technology so an
[669]
example of a layer 2 solution would be
[671]
something like a state channel now a
[673]
state channel is pretty complicated to
[676]
explain but really it's a way that two
[678]
users can communicate without using the
[681]
blockchain in the way in which the
[683]
blockchain would work a little bit
[685]
confusing but it's like using the
[687]
blockchain just not using the blockchain
[689]
such that you don't have to pay the huge
[691]
latency and cost associated with the
[693]
blockchain so what happens is two users
[696]
will communicate with each other using
[698]
this state channel and then once the
[700]
communication is done or the transaction
[702]
is complete only then will it be
[704]
uploaded to the blockchain so rather
[706]
than say having a thousand
[707]
microtransactions occurring on the
[709]
blockchain you have those occur in the
[710]
state channel and then those get wrapped
[712]
into one larger transaction which then
[715]
gets uploaded onto the blockchain
[717]
again the purpose of that is to lower
[719]
the latency and to make sure that you're
[722]
not going to have to pay massive fees
[723]
for all of the different transactions
[725]
that are going through now in this video
[726]
i'm not going to explain exactly how
[728]
these solutions work i'm just trying to
[730]
give you an idea of what's kind of going
[732]
on out there and how people are trying
[734]
to mitigate the disadvantages of the
[736]
blockchain so these solutions as i
[738]
stated them do still make sure that the
[740]
trust is secure they use very advanced
[742]
math and cryptography to make sure that
[744]
everything is all good but those are
[745]
just two examples of a layer one and a
[747]
layer two solution and how you can kind
[749]
of mitigate some of those disadvantages
[751]
of the blockchain so i'm gonna start
[753]
wrapping up the video here by just
[754]
giving you two examples of decentralized
[757]
applications so that you can kind of
[758]
read about them and check them out for
[760]
yourself so the first application is
[762]
something called the uniswap now uniswap
[764]
is a decentralized finance protocol so
[767]
it's called d5 and this allows you to
[769]
actually exchange cryptocurrencies for
[771]
each other so this is a d app you can
[773]
look up uniswap and kind of see how it
[774]
works if you want to learn more about it
[776]
but another more interesting one that
[778]
was actually developed by cartesi using
[780]
some of their solutions is called
[783]
haudelum poker so hodl hodl is kind of
[786]
the term in cryptocurrency for holding
[788]
your coins no matter what never selling
[790]
them so it's kind of a punny name in
[792]
that sense but this is an implementation
[794]
of poker texas hold'em in which it's
[797]
actually decentralized so you don't have
[799]
to worry about trusting some large poker
[801]
organization or website there's actually
[803]
a lot of history of poker websites and
[805]
poker players specifically cheating and
[807]
scamming other people in this case you
[809]
just trust the blockchain and this
[811]
allows you to play poker without
[812]
worrying about you know being scammed or
[814]
fraud or people seeing your cards or
[816]
mixing up the shuffle whatever it may be
[818]
so i'll leave a link to that game in the
[820]
description there's a great video by
[822]
cartesi that explains kind of how that
[824]
works that you can check out but i think
[826]
with that i'm going to end the video
[827]
here so as i mentioned i did team up
[829]
with cartesi to create this video they
[831]
helped me come up with a lot of the
[832]
content that i shared here they're the
[835]
true blockchain and cryptocurrency
[837]
experts well you should check them out
[838]
from the link in the description they
[840]
provide a lot of layer one and layer two
[842]
solutions to help create d apps
[845]
decentralized applications and really
[847]
mitigate some of those disadvantages
[848]
that i talked about before look for some
[850]
more videos coming from them in the
[852]
future related to actually creating d
[854]
apps and let me know what you thought of
[855]
this video in the comments down below
[857]
with that said like the video if you
[859]
enjoyed subscribe to the channel and i
[860]
will see you in another one
[864]
[Music]
[870]
you