00:00:00
ethereum is the world's first
00:00:01
decentralized computer built
00:00:03
on the blockchain its cryptocurrency
00:00:05
ether reached a market cap of 100
00:00:07
billion
00:00:08
wow that's a lot of money ethereum
00:00:10
enables a so-called
00:00:12
decentralized application with a
00:00:14
building support for transferring money
00:00:16
impossible to send so impossible to stop
00:00:18
facebook twitter i'm looking at you
00:00:21
the future of finance d fight well
00:00:23
decentralized finance
00:00:24
is being built on ethereum was already
00:00:27
25 billion invested and this is
00:00:30
just a small part of the full potential
00:00:32
of ethereum
00:00:33
voting social media supply chain games
00:00:36
the possibilities are
00:00:37
endless our entire society is going to
00:00:39
be impacted by this tech
00:00:41
and who knows maybe he can make coffee
00:00:43
too i don't know
00:00:44
so in this video i will explain how
00:00:47
ethereum work
00:00:48
including smart contracts and
00:00:49
decentralized applications
00:00:51
but not so fast ethereum is built on the
00:00:54
blockchain technology if you don't
00:00:55
already know how blockchain work
00:00:57
check out this other video on my channel
00:00:59
first and come back here after if you
00:01:01
don't know me i'm
00:01:02
julian and on my channel eat the blogs i
00:01:04
teach blockchain
00:01:05
development
00:01:08
[Music]
00:01:10
before ethereum was created we already
00:01:13
had another blockchain called bitcoin
00:01:15
why do we even bother with ethereum
00:01:17
bitcoin works great for simple financial
00:01:20
transactions like
00:01:21
bob sends one bitcoin to alice but not
00:01:24
for more advanced use case
00:01:26
side note if you learn blockchain or
00:01:28
crypto stuff you will notice that
00:01:30
everybody always use bob and alice in
00:01:32
the example
00:01:33
you have to use bob and alice if you use
00:01:35
other names it doesn't work
00:01:38
in 2014 a very smart developer called
00:01:40
vitalik buttering became frustrated with
00:01:43
bitcoin he started to work on another
00:01:45
blockchain
00:01:46
more powerful than bitcoin he basically
00:01:48
wanted to build a computer
00:01:50
on top of the blockchain technology how
00:01:53
crazy is
00:01:54
that he called this new blockchain
00:01:55
ethereum vitalik first
00:01:57
mentioned ethereum publicly at a bitcoin
00:02:00
conference in miami in january
00:02:02
2014 his id had a really good reception
00:02:06
a team of developers joined him to work
00:02:08
on the first prototype of ethereum
00:02:11
they all happily coded for months and
00:02:14
months
00:02:15
until the big launch in july 2015 when
00:02:18
the ethereum network
00:02:19
started it quickly attracted many
00:02:21
entrepreneurs investors and users who
00:02:24
were eager to experiment with this new
00:02:26
development platform
00:02:27
today the ecosystem of ethereum is
00:02:29
vibrant with hundreds of companies
00:02:31
building on it
00:02:32
lots of users a lot of great crypto
00:02:35
youtubers
00:02:36
like me the influence of ethereum in the
00:02:39
blockchain ecosystem is
00:02:40
huge as a lot of other blockchains are
00:02:43
pretty much
00:02:44
copy paste of the ethereum technology
00:02:46
the media
00:02:47
mostly talk of bitcoin but most of the
00:02:50
activity
00:02:50
in the blockchain industry is on
00:02:52
ethereum
00:02:53
next we're going to dive in the
00:02:55
technology of ethereum and we will start
00:02:58
with the ethereum
00:03:02
network
00:03:04
the ethereum blockchain is a network of
00:03:06
more than ten thousand computers
00:03:07
connected to each other each of these
00:03:09
computers run the ethereum software also
00:03:12
called ethereum client
00:03:13
anybody can participate in this network
00:03:15
by running an ethereum client
00:03:17
well anybody this is the theory but
00:03:20
actually it's a little bit more
00:03:21
complicated than that
00:03:23
i will talk more about that at the end
00:03:24
of the video moving on developers can
00:03:26
deploy
00:03:27
application to the ethereum network
00:03:29
that's what we call the smart contracts
00:03:30
once you deploy a smart contract it runs
00:03:32
forever it's impossible to stop it
00:03:34
it's also impossible to change its code
00:03:36
which can be good
00:03:38
and bad because if there is a bug there
00:03:40
is no way to fix it
00:03:41
as a user you can interact with these
00:03:43
smart contracts from anywhere in the
00:03:44
world you only need a connection to
00:03:46
internet
00:03:47
and a wallet that's it next i will talk
00:03:50
about something
00:03:50
very important in ethereum
00:03:54
[Music]
00:03:56
ethereum has a built-in cryptocurrency
00:03:58
that's what we call ether just to be
00:04:00
clear is
00:04:01
totally different from bitcoin these two
00:04:03
cryptocurrencies live on
00:04:05
two different blockchains that totally
00:04:07
separated
00:04:08
you can transfer ether between different
00:04:10
people using
00:04:11
ethereum when you combine ether with
00:04:14
smart contracts it allow you to create
00:04:17
unstoppable application that can move
00:04:19
money that's really what makes ethereum
00:04:22
so powerful contrary to bitcoin ether
00:04:25
doesn't have a limited supply there are
00:04:28
more than 110 million
00:04:29
if there currently a new ether is
00:04:31
created every time a miner adds a new
00:04:34
block to ethereum
00:04:35
like for bitcoin the price of ether is
00:04:37
determined by the market the ethereum
00:04:39
blockchain doesn't care at all about the
00:04:42
price of
00:04:42
ether it only cares about who owns how
00:04:45
many ether that's it
00:04:47
next i will explain the structure of the
00:04:49
ethereum blockchain
00:04:52
[Music]
00:04:54
on the engineering blockchain you need
00:04:56
to understand a fundamental concept
00:04:58
called
00:04:58
account there are two kind of accounts
00:05:01
eoa or xno own account that's the kind
00:05:03
of account that is used by
00:05:04
humans the other kind of account is for
00:05:07
smart contracts each account is
00:05:08
associated to several fields
00:05:10
an address field that identifies your
00:05:12
account a value field that's the ether
00:05:14
value that is owned by the account
00:05:16
a code field if this is a smart contract
00:05:18
account this is the code of the smart
00:05:20
contract otherwise it's empty
00:05:22
a data field if this is a smart contract
00:05:24
that's the data of the smart contract
00:05:25
otherwise it's empty and none's filled
00:05:28
that's an integer that is incremented
00:05:30
after each transaction
00:05:31
that is used to order transactions so in
00:05:33
the ethereum blockchain like for bitcoin
00:05:35
the data is organized by block in each
00:05:38
block we have a hash of the previous
00:05:40
block to keep the integrity of the
00:05:42
blockchain
00:05:42
transactions which represent state
00:05:44
changes in the blockchain for example a
00:05:46
transaction could change the amount of
00:05:48
ether of an eoa account all the data
00:05:50
associated to a smart contract
00:05:52
and we have the entire state of ethereum
00:05:54
which is the collection of accounts and
00:05:56
the associated values
00:05:58
there is much more data in the ethereum
00:06:00
blockchain compared to bitcoin which is
00:06:01
a reflection of the advanced
00:06:03
capabilities
00:06:04
of ethereum next i will explain what are
00:06:07
smart contracts
00:06:10
[Music]
00:06:13
smart contracts are the small programs
00:06:15
at the heart of the ethereum technology
00:06:17
first of all let's clarify something
00:06:19
very important smart contracts are
00:06:21
not smart and they are not contracts
00:06:25
it's probably the worst name that was
00:06:27
chosen
00:06:28
instead understand that the smart
00:06:30
contract is a program it has some code
00:06:33
and it does what the code says
00:06:35
and that's it as i explained in the
00:06:37
previous section
00:06:38
smart contracts have an address a
00:06:40
balance of ether
00:06:41
some code and some data the code specify
00:06:44
how the data can be modified
00:06:46
the code of smart contract is grouped in
00:06:48
functions
00:06:49
if you want to modify the data of a
00:06:51
smart contract you need to send a
00:06:53
transaction to
00:06:54
execute one of these functions the smart
00:06:56
contract can also call the functions
00:06:59
of other smart contracts the main
00:07:01
programming language
00:07:02
used for ethereum smart contracts is
00:07:04
called solidity
00:07:05
if you want to learn the solidity i have
00:07:07
a full series on this on my
00:07:09
channel 3t is a high level language the
00:07:12
ethereum blockchain does
00:07:14
not understand it before a smart
00:07:16
contract is deployed to the blockchain
00:07:18
it is compiled to some elementary
00:07:19
instruction that
00:07:20
ethereum can understand the part of
00:07:23
ethereum that deals with smart contract
00:07:25
execution is called the ethereum virtual
00:07:27
machine
00:07:28
it understands more than 100 elementary
00:07:30
instructions
00:07:31
also called evm opcodes next i will
00:07:34
explain
00:07:34
wallets and transactions
00:07:38
[Music]
00:07:41
wallets are external software each user
00:07:44
has
00:07:44
his own ethereum wallet well it has a
00:07:46
private key which is like a secret
00:07:48
password the private key is associated
00:07:50
to
00:07:50
an eoa address remember i mentioned in
00:07:53
the previous section that there are two
00:07:54
kinds of
00:07:55
accounts eoa and smart contracts eoa
00:07:58
addresses are for humans
00:07:59
when a user wants to interact with
00:08:01
ethereum he will send a transaction
00:08:03
using his wallet he can send a
00:08:05
transaction to
00:08:06
another eoa address or to a smart
00:08:08
contract
00:08:09
the transaction will contain the
00:08:11
following parameters the
00:08:12
from field that's the sending address
00:08:15
the to field
00:08:16
if the transaction is a simple if the
00:08:18
transfer this is the recipient address
00:08:20
otherwise this is the address of the
00:08:22
smart contract that is called
00:08:24
the value field that's the amount of
00:08:26
ether that is transferred the data field
00:08:28
this is only used in transaction to
00:08:30
smart contract to specify
00:08:32
which function to call with which input
00:08:35
data
00:08:35
gas and gas limit field when you send a
00:08:37
transaction to ethereum you need to pay
00:08:39
for transaction fees
00:08:40
the more complex your transaction the
00:08:42
higher the transaction fees
00:08:44
these two parameters are used to specify
00:08:46
how much transaction fees you are
00:08:47
willing to pay
00:08:49
if you are willing to pay more your
00:08:50
transaction can be mined faster
00:08:52
on the other hand if you don't pay
00:08:54
enough your transaction might not be
00:08:55
mine at all
00:08:56
transaction fee are specified with a
00:08:58
unit called gas
00:08:59
gas is a whole discussion of its own and
00:09:02
if you want to know more about that
00:09:04
you can check out my series on ethereum
00:09:06
gas then we have the
00:09:08
non's field it's an integer that is
00:09:10
incremented after each transaction
00:09:12
and we have the signature this is
00:09:14
created using the data of the
00:09:16
transaction
00:09:16
and the private key associated to the
00:09:19
from address
00:09:20
this guarantees that the owner of the
00:09:22
sending address
00:09:23
really wanted to send this transaction
00:09:25
once the transaction is
00:09:27
ready it's sent to the ethereum network
00:09:30
picked up by
00:09:30
a miner and a mine in the next block
00:09:33
next
00:09:34
i will talk of decentralized
00:09:36
applications
00:09:38
[Music]
00:09:41
the problem with smart contracts is that
00:09:43
they are not very easy to use if you
00:09:45
want to interact with them directly
00:09:46
you will need to use a terminal not very
00:09:50
user-friendly that's
00:09:51
why we build a so-called decentralized
00:09:53
applications or
00:09:54
dap a dap is a combination of a smart
00:09:57
contract
00:09:57
plus a front-end interface in general
00:10:00
the front-end interface is a web
00:10:02
of mobile application the front-end
00:10:04
interface will interact with the wallet
00:10:06
of the user to get him to confirm
00:10:08
transactions
00:10:10
the dap will also need a connection to
00:10:12
an ethereum
00:10:13
client in order to read data from the
00:10:15
blockchain
00:10:16
and send assigned transactions as a user
00:10:20
using adapt feels like using a normal
00:10:23
web application
00:10:24
or mobile application except that you
00:10:26
have to manage a
00:10:28
wallet software on top of it next we are
00:10:30
going to look at the
00:10:32
security in ethereum
00:10:35
[Music]
00:10:38
is ethereum secure we heard a lot of
00:10:40
hacks in the ethereum ecosystem what
00:10:42
happened exactly if there is a bug in
00:10:44
the code of a smart contract
00:10:46
it's possible for hacker to take
00:10:48
advantage of this vulnerability and
00:10:50
potentially steal
00:10:52
all the money in the contract we
00:10:54
estimate that
00:10:55
in 2020 there were more than 100 million
00:10:58
dollars stolen because of spot contract
00:11:00
bugs
00:11:01
as we have more hacks the industry
00:11:03
learns about the code patterns that must
00:11:05
be avoided and smart contracts become
00:11:07
more and more secure
00:11:08
another kind of hack has to do with
00:11:10
wallets if a hacker managed to steal the
00:11:13
private key of your wallet
00:11:14
he can send a transaction with the
00:11:16
correct signature
00:11:17
and still all of you ether this kind of
00:11:20
hack happened for
00:11:21
centralized exchanges but also in the
00:11:24
worlds of
00:11:24
individuals this is not a flow of
00:11:26
ethereum itself it has more to do with
00:11:28
the ecosystem the best way to avoid this
00:11:31
is to always stay in control of your
00:11:33
crypto and use hardware wallets like the
00:11:35
nano ledger
00:11:36
finally there is something very
00:11:37
important to understand about security
00:11:39
there is no bug in the code of the
00:11:41
ethereum software itself
00:11:43
for example it's not possible to send a
00:11:45
transaction with some special input that
00:11:47
will
00:11:47
mess with the code of the ethereum
00:11:49
client and put you in control
00:11:51
of someone else's money this is not
00:11:52
possible so this is the most
00:11:55
important and this is why i think a
00:11:56
theorem is very secure
00:11:58
next i'm going to talk of the use case
00:12:00
of ethereum
00:12:03
[Music]
00:12:06
the most popular use case for ethereum
00:12:08
is a d5 or decentralized finance so d5
00:12:11
is all about
00:12:12
reinventing finance but on the
00:12:14
blockchain no more banks no more
00:12:15
intermediaries that take
00:12:16
all your money all of this is replaced
00:12:19
by smart contracts
00:12:20
one of the most popular defy app is uni
00:12:24
swap a decentralized exchange that allow
00:12:26
you to trade crypto assets
00:12:28
on the blockchain without any middleman
00:12:31
another very popular default project is
00:12:33
compound with compound you can
00:12:34
borrow money on the blockchain another
00:12:37
really cool if i project is
00:12:39
makerdao and it's a stablecoin die this
00:12:42
is a cryptocurrency
00:12:43
that always keep the same value one die
00:12:46
always
00:12:46
equal one dollar and d5 doesn't stop
00:12:49
there that new project every single week
00:12:51
new crazy things like flashstone that
00:12:53
allow you to borrow millions of dollars
00:12:55
without any collateral you just snap
00:12:57
your finger and you have one million
00:12:58
dollar it's like
00:12:59
magic in case you're wondering you do
00:13:01
have to reimburse the money it's
00:13:03
actually not possible
00:13:04
technically to not reimburse the money
00:13:06
of a flashlight
00:13:07
so d5 is really the main use case for
00:13:10
blockchain so if you want to get into
00:13:12
blockchain i strongly suggest that
00:13:14
you focus on d5 another use case for
00:13:17
ethereum is
00:13:18
game so there is a lot of confusion
00:13:20
about blockchain games
00:13:21
blockchain game for most of it is just
00:13:23
like a normal game most of it is
00:13:25
outside of the blockchain it could be a
00:13:27
mobile app a desktop app
00:13:29
a web application there is only a tiny
00:13:32
part of the game that we put
00:13:34
on the blockchain that's the economy of
00:13:36
the game
00:13:37
for example in a virtual reality game
00:13:39
like decentraland players acquire
00:13:41
virtual properties these virtual
00:13:43
properties are stored
00:13:45
in the ethereum blockchain this way
00:13:47
players can trust that they will keep
00:13:48
possession of their virtual assets
00:13:51
they don't need to trust the game
00:13:52
developers and it sounds so crazy to buy
00:13:55
some virtual piece of land on the
00:13:56
blockchain but be aware that some people
00:13:58
have paid hundreds of thousands
00:14:00
of dollars for some virtual properties
00:14:02
is really nuts but
00:14:03
if they know what they're doing they can
00:14:05
maybe resell it for
00:14:07
even higher price in the future who
00:14:08
knows next i want to talk about the
00:14:11
future of ethereum
00:14:17
ethereum is not perfect and is still not
00:14:19
ready for mainstream adoption
00:14:20
so you'll have to wait before you show
00:14:22
ethereum to your grandma
00:14:24
first the network has a very limited
00:14:27
capacity of only 15 transactions per
00:14:29
second this is way too low to have a
00:14:31
mainstream adoption
00:14:32
for example the visa network processes
00:14:35
thousands of transactions per second
00:14:37
next because of this limited capacity
00:14:39
users have to compete with each other in
00:14:42
order to get the transaction in mind
00:14:44
this is why it's very expensive to send
00:14:46
transactions to the ethereum network
00:14:48
when the network is congested it can
00:14:51
cost hundreds of dollars for doing
00:14:52
certain operations not great
00:14:55
another issue is speed it takes about 15
00:14:57
seconds to get a transaction mine on
00:14:59
ethereum it's not a great
00:15:01
user experience to click on the button
00:15:03
and wait so long before the action is
00:15:05
completed
00:15:06
another issue is centralization so even
00:15:09
though ethereum uses the blockchain
00:15:11
technology
00:15:12
because it takes a lot of resources to
00:15:14
be a minor mining activities are
00:15:16
very concentrated around a few mining
00:15:18
companies
00:15:19
ethereum 2.0 is the next version of
00:15:22
ethereum it will make ethereum
00:15:24
way more scalable with a capacity of 100
00:15:28
000 transactions per second when
00:15:29
combined with a side chains
00:15:31
it will have a mention called the bacon
00:15:34
chain
00:15:34
uh what i'm saying i was thinking about
00:15:36
food no no the bitcoin chain which is
00:15:38
connected to
00:15:39
many separate blockchain called shots
00:15:42
the proof of rook consensus algorithm
00:15:44
will be changed to another consensus
00:15:46
algorithm called proof of stake
00:15:47
in this new consensus instead of
00:15:49
spending electricity to mine
00:15:50
new blocks miners not called validators
00:15:53
will have to stake some ether
00:15:54
if they mine a correct block they will
00:15:56
get some reward planning ether
00:15:58
otherwise they will lose their eater
00:15:59
stake the big advantage is that it's
00:16:01
more eco-friendly and it also requires
00:16:03
much less computing resources to be a
00:16:05
minor which means everybody can be a
00:16:07
validator
00:16:08
you just need a standard consumer laptop
00:16:09
we estimate that there will be hundreds
00:16:11
of thousands of validators
00:16:12
in ethereum 2.0 way more than the ten
00:16:15
thousand miners in ethereum one if you
00:16:17
are interested in ethereum 2.0 i have a
00:16:19
video to show you
00:16:20
how you can set up a validator node and
00:16:22
make some passive income by staking
00:16:25
ether if you want to dive deeper in the
00:16:27
blockchain technology i have another
00:16:29
video to explain how blockchain work
00:16:32
and a whole playlist on the blockchain
00:16:34
technology i'll see you there