Follow along with the vídeo
Chapter 1: welcome
Quick tip, we will be constantly using resources from the GitHub Repo
Welcome to Cyfrin Updraft!
Hello and welcome! If you're interested in the world of Web3 development, then you're in the
right place. This is the most cutting edge and comprehensive course ever created.
Let's talk about what to expect.
Why Take This Course?
With the massive demand for Solidity and Smart Contract developers, this course is a golden
opportunity to launch, advance, or switch to a career in Web3. As you navigate the course, you
will learn how to work with AI tools so that you can fast-track your learning journey and
become a proficient 10x developer.
Don't worry if you've never coded before, let me assure you that this course is designed for
learners at all levels. If you're an experienced Smart Contract engineer or familiar with
blockchain development, you're welcome to skip around and cherry-pick modules that interest
you. But most importantly, this course aims to turn you into a pioneering force within Web3.
Who Am I?
My name is Patrick Collins, a seasoned Smart Contract engineer, security researcher, and
dedicated advocate for Web3. I co-founded Cyfrin, a Smart Contract Security firm, I'm an
average Web3 YouTuber and the co-creator of Cyfrin Updraft.
I live and breathe smart contract development.
But beyond that, I love taking passionate smart contract developers, like you, into the journey
of Web3.
What to Expect
This is not your run-of-the-mill course. Instead, it's a culmination of all the knowledge we've
accumulated after years of working in this industry as a Smart Contract developers and security
researchers. Our track record guarantees you'll exit the other side, armed with the knowledge
necessary to make a significant impact in the cryptocurrency and blockchain industry.
Beyond just teaching you to code, this course prepares you to maneuver DeFi, NFTs, DAOs,
Tokens, Upgradeable Smart Contracts and more. By the end, you'll have a clear path forward
and a wealth of economic opportunities at your disposal – all you need is the willingness to
take the steps.
Best Practices
Let's start by covering some of the best practices to help you get the absolute most out of this
course.
Use the GitHub repo as your Bible! it will have all the resources you'll need to succeed.
Contained within, you'll find a discussions tab. Any questions you have or hurdles you face can
be posted here!
Ask meaningful questions and interact with like-minded learners – this is just as important as
grasping the actual technologies.
Code along with me - As we progress through the course, it's a good idea to code along with
me. Actually doing the work and performing the actions is how you'll build familiarity with
these processes and how they'll really stick.
Watch for Updates - This space moves very quickly - as things are updated, I do my best to
catalogue them. In each video, at the bottom, there will be an "updates" section if there is
some information that differs from the video.
Move at your Pace - Adjust the pace of the course to meet your needs. The course is modular,
so if you want to skip to particular areas - absolutely do that.
Reflect on your Learnings - repetition is the mother of skill. The more you repeat these
development practices, the more they'll stick.
Complete the Optional Challenges - The GitHub Repo has links to fun challenges at the end of
each lesson - these are meant to test your skills and reward you with a fun way to show of your
progress as a smart contract developer!
Leverage the Community - Blockchain development is incredibly collaborative. Get involved
on GitHub, Peeranha and other forums. Join our Discord server and have conversations with
developers just like yourself.
Remember: A challenge is not a roadblock, but an opportunity to learn something new.
Let's Get Started
With the above understanding in place, get ready. We're above to embark on a journey of
knowledge and opportunity.
Our first step will be understanding how the blockchain even works, what smart contracts even
are.
Let's get Froggy 🐸
Chapter 2: Best Practices
Follow along with the video
Quick tip, we will be constantly using resources from the GitHub Repo
Welcome to Cyfrin Updraft!
Hello and welcome! If you're interested in the world of Web3 development, then you're in the
right place. This is the most cutting edge and comprehensive course ever created.
Let's talk about what to expect.
Why Take This Course?
With the massive demand for Solidity and Smart Contract developers, this course is a golden
opportunity to launch, advance, or switch to a career in Web3. As you navigate the course, you
will learn how to work with AI tools so that you can fast-track your learning journey and
become a proficient 10x developer.
Don't worry if you've never coded before, let me assure you that this course is designed for
learners at all levels. If you're an experienced Smart Contract engineer or familiar with
blockchain development, you're welcome to skip around and cherry-pick modules that interest
you. But most importantly, this course aims to turn you into a pioneering force within Web3.
Who Am I?
My name is Patrick Collins, a seasoned Smart Contract engineer, security researcher, and
dedicated advocate for Web3. I co-founded Cyfrin, a Smart Contract Security firm, I'm an
average Web3 YouTuber and the co-creator of Cyfrin Updraft.
I live and breathe smart contract development.
But beyond that, I love taking passionate smart contract developers, like you, into the journey
of Web3.
What to Expect
This is not your run-of-the-mill course. Instead, it's a culmination of all the knowledge we've
accumulated after years of working in this industry as a Smart Contract developers and security
researchers. Our track record guarantees you'll exit the other side, armed with the knowledge
necessary to make a significant impact in the cryptocurrency and blockchain industry.
Beyond just teaching you to code, this course prepares you to maneuver DeFi, NFTs, DAOs,
Tokens, Upgradeable Smart Contracts and more. By the end, you'll have a clear path forward
and a wealth of economic opportunities at your disposal – all you need is the willingness to
take the steps.
Best Practices
Let's start by covering some of the best practices to help you get the absolute most out of this
course.
Use the GitHub repo as your Bible! it will have all the resources you'll need to succeed.
Contained within, you'll find a discussions tab. Any questions you have or hurdles you face can
be posted here!
Ask meaningful questions and interact with like-minded learners – this is just as important as
grasping the actual technologies.
Code along with me - As we progress through the course, it's a good idea to code along with
me. Actually doing the work and performing the actions is how you'll build familiarity with
these processes and how they'll really stick.
Watch for Updates - This space moves very quickly - as things are updated, I do my best to
catalogue them. In each video, at the bottom, there will be an "updates" section if there is
some information that differs from the video.
Move at your Pace - Adjust the pace of the course to meet your needs. The course is modular,
so if you want to skip to particular areas - absolutely do that.
Reflect on your Learnings - repetition is the mother of skill. The more you repeat these
development practices, the more they'll stick.
Complete the Optional Challenges - The GitHub Repo has links to fun challenges at the end of
each lesson - these are meant to test your skills and reward you with a fun way to show of your
progress as a smart contract developer!
Leverage the Community - Blockchain development is incredibly collaborative. Get involved
on GitHub, Peeranha and other forums. Join our Discord server and have conversations with
developers just like yourself.
Remember: A challenge is not a roadblock, but an opportunity to learn something new.
Let's Get Started
With the above understanding in place, get ready. We're above to embark on a journey of
knowledge and opportunity.
Our first step will be understanding how the blockchain even works, what smart contracts even
are.
Let's get Froggy 🐸
Chapter 4: ZkSync Sponsorship
Chapter 5> what is a blockchain
Follow along with this video:
You can follow along with this section of the course here.
Bitcoin and Blockchain
You might be familiar with Bitcoin, which is one of the first protocols to utilize the revolutionary
blockchain technology. The Bitcoin Whitepaper, authored by the pseudonymous Satoshi
Nakamoto, described how Bitcoin could facilitate peer-to-peer transactions within a
decentralized network using cryptography. This gave rise to censorship-resistant finance and
presented Bitcoin as a superior digital store of value, often referred to as digital gold. There is a
fixed amount of Bitcoin, similar to the scarcity of gold. You can learn more about this in the
Bitcoin Whitepaper.
Ethereum and Smart Contracts
A few years after Bitcoin's creation, Vitalik Buterin and others founded Ethereum, which builds
upon the blockchain infrastructure, but with additional capabilities. With Ethereum, you can
create decentralized transactions, organizations, and agreements without a centralized
intermediary. This was achieved through the addition of smart contracts.
Though the concept of smart contracts was originally conceived in 1994 by Nick Szabo,
Ethereum made it a reality.
Smart contracts are a set of instructions executed in a decentralized way without the need for a
centralized or third party intermediary.
Smart Contract functionality is the primary difference between blockchains like Ethereum and
Bitcoin. Technically Bitcoin does have smart contracts but they're intentionally turing
incomplete.
The Oracle Problem
However, smart contracts face a significant limitation – they cannot interact with or access data
from the real world. This is known as the Oracle Problem.
Blockchains are deterministic systems, so everything happens within their ecosystem. To make
smart contracts more useful and capable of handling real-world data, they need external data
and computation.
Oracles serve this purpose. They are devices or services that provide data to blockchains or run
external computation. To maintain decentralization, it's necessary to use a decentralized Oracle
network rather than relying on a single source. This combination of on-chain logic with off-
chain data leads to hybrid smart contracts.
Note: Most of this course will assume we're working with an Ethereum or EVM environment.
The skills you learn here will be compatible with the vast majority of blockchain architectures!
Chainlink
Chainlink is a popular decentralized Oracle network that enables smart contracts to access
external data and computation. Chainlink is also blockchain agnostic - so it's going to work with
any chain out there.
Layer 2 Scaling Solutions
As blockchains grow, they face scaling issues. Layer 2, or L2, solutions have been developed to
address this. L2 solutions involve other blockchains hooking into the main blockchain,
essentially allowing it to scale. There are two primary types of L2 solutions:
Optimistic Rollups: eg. Optimism, Arbitrum
Zero-Knowledge Rollups: eg. ZKsync, Polygon ZK EVM
Don't worry too much about this now. Once we understand how blockchains work 'under the
hood', we'll go further into Layer 2's then.
Terminology
You're going to hear some terms used in this course (and the community as a whole) a little
interchangeably. Maybe you haven't heard these terms before. I hope this offers a bit of
clarification.
Common Terms:
1. Blockchain: In web3, a blockchain is a digital ledger that records transactions across
many computers in a secure and decentralized manner. Each block contains a number
of transactions, and every new block is linked to the previous one, forming a chain. This
makes the data tamper-resistant. Example: Bitcoin's blockchain records all BTC
transactions.
2. Oracle: Oracles in web3 are intermediaries that provide smart contracts with external
data. They act as bridges between blockchains and the outside world, allowing smart
contracts to execute based on real-world events and data. Example: A weather oracle
provides data for a smart contract that triggers crop insurance payments based on
rainfall data.
3. Layer 2: Layer 2 solutions in web3 are technologies built on top of a blockchain (Layer
1) to improve its scalability and efficiency. These solutions handle transactions off the
main chain, reducing congestion and fees, and then settle the final state on the main
chain. Example: The Lightning Network for Bitcoin.
4. Dapp (Decentralized Application): A Dapp is an application that runs on a
decentralized network, typically a blockchain. It is powered by smart contracts and
operates without a central authority. Dapps can serve various purposes, from finance
to gaming. Example: Uniswap, a decentralized finance application.
5. Smart Contract: In web3, a smart contract is a self-executing contract with the terms of
the agreement directly written into code. They run on blockchains and automatically
execute when predetermined conditions are met, without the need for intermediaries.
Example: A smart contract for an escrow service.
6. Hybrid Smart Contract: Hybrid smart contracts combine on-chain code (running on a
blockchain) with off-chain data and computations provided by oracles. This allows the
contracts to interact with data and systems outside their native blockchain. Example: A
smart contract for insurance that uses real-world data (like weather or flight delays)
provided by oracles.
7. Ethereum/EVM (Ethereum Virtual Machine): Ethereum is a blockchain platform
known for its smart contract functionality. The Ethereum Virtual Machine (EVM) is its
computation engine that executes smart contracts. Ethereum allows developers to
build decentralized applications and is the basis for many web3 projects. Example: ERC-
20 tokens, a standard for creating fungible tokens on Ethereum.
Web3
Web3 is a term used to describe the new paradigm of the internet powered by blockchain and
smart contracts. Unlike the previous versions of the web, web3 is permissionless and relies on
decentralized networks rather than centralized servers. This ushers in an era of censorship-
resistant and transparent agreements and transactions, often called an ownership economy.
Web1: The permissionless open sources web with static content
Web2: The permissioned web, with dynamic content where companies run your agreements
on their servers.
Web3: The permissionless web with dynamic content.
Decentralized censorship resistant networks run your agreements and code.
User owned ecosystems where one owns a portion of the protocol they interact with -
instead of solely being the product
Wrap Up
We've taken a high-level view of the blockchain landscape, including its history and the
problems that smart contracts solve.
At this point you might be asking yourself what do these smart contracts really mean? or what
is meant by trust minimized agreements/unbreakable promises?
In my mind a technology is really only as good as the problem it solves. So next, we're going to
look at what the purpose of smart contracts is - what's the value proposition exactly?
Let's take a closer look at the undeniable value of smart contracts in the next lesson.
Chapter 6: The purporse of smart contracts
The Essence of Blockchain and Smart Contracts
Almost every interaction or transaction in our lives involves some form of agreement or
contract. For instance, purchasing a chair involves a contract to buy lumber, assemble it, and
sell the finished product. Your electricity supply is also based on an agreement between you
and the electric company. When you get an oil change for your car, you're promised a service in
exchange for money.
Almost everything we do in modern life relates to an agreement or contract in some way.
To make it more relatable, think of contracts and agreements as promises. Traditional
contracts, however, require trust between parties, and this doesn’t always work in favor of
honesty and fairness.
The Problem with Traditional Agreements
Lets consider some real world examples of where trust leveraged agreements can go wrong
and why blockchain technology and smart contracts mitigate these risks.
Consumer Trust
In the 80s and 90s, McDonald’s Monopoly game promised customers a chance to win money
through game cards obtained with purchases. However, it turned out that the game was rigged
by insiders who manipulated the system for their gain. Essentially, McDonald’s failed to keep its
promise.
This example demonstrates that relying on trust within agreements can lead to fraudulent
activities and broken promises.
With smart contracts, we can eliminate the need for trust. A smart contract is an agreement or
a set of instructions that are deployed on a decentralized blockchain. Once deployed, it cannot
be altered, it automatically executes, and everyone can see its terms.
Imagine if McDonald’s Monopoly game was operated on a blockchain through a smart
contract. The fraudulent activities would have been impossible due to the immutable,
decentralized, and transparent nature of smart contracts.
Banking and Trust
Traditional banks have sometimes failed to keep the promise of safeguarding people's money,
as seen during the Great Depression. Blockchain and smart contracts can ensure transparency
and execute automated solvency checks, preventing the bank from becoming insolvent.
The core of blockchain and smart contracts lies in creating a trustless system where
agreements are transparent, unchangeable, and executed without human intervention. This
technology holds the potential to revolutionize industries and everyday agreements by
ensuring honesty and fairness.
Financial Markets Access
Centralized bodies, like traditional exchanges, have the power to restrict access to financial
markets. This was evident when Robinhood restricted trading on certain assets in 2021. With
decentralized exchanges like Uniswap, there is no central authority that can alter or limit
market access. This introduces fairness and openness to the financial markets.
To Summarize
Traditional Agreements: Require trust in a centralized entity.
Smart Contracts: Transparent, decentralized, and tamper-proof.
In a scenario where you have to choose, smart contracts are an obvious choice as they cannot
be manipulated or altered in anyone's favor.
Smart contracts are the solution to minimizing the reliance on trust based systems that have
historically failed us time and time again.
Under the Hood
Smart contracts are relatively new, but have already started transforming various markets. They
do this by representing 'promises' as code on the blockchain. This code is executed by a
decentralized collective, such that no single entity can alter the agreemeent in any way! The
agreement and its terms are public knowledge and will automatically execute without human
intervention.
More industries are adopting smart contracts and blockchain due to the numerous advantages
they offer. This results in trust-minimized agreements or what can be simply termed as
unbreakable promises.
Beyond Trust Minimization
It is important to note that blockchain, smart contracts, and cryptocurrencies are not just
about trust-minimized agreements. They offer security benefits, uptime advantages, execution
speed, and much more.
Caution: Not All Are Equal
However, beware of platforms that claim to be decentralized but are not in practice. An
example from 2022 is the SBF's FTX platform. It presented itself as a Web3 platform, but was
essentially a traditional Web2 company using cryptocurrency without the benefits of smart
contracts.
As an emerging developer or user in this space, it's important to discern between legitimate
projects and those that aren't contributing to the ethos of Web3. I want you to be successful,
but I want you to be successful because you're creating value. Platforms like FTX were
pretending to bring value to the space and leeching value from it.
Wrap Up
What we've learnt is that traditional contracts or agreements between parties are almost
always trust based. Trust based agreements come with inherent flaws and the potential of
broken agreements, the consequences of which we've seen throughout history - The Great
Depression, Monopoly Lottery, Robin Hood etc.
Blockchain technology and smart contracts solve these problems by introducing fairness,
transparency and immutability to promises. These attributes of smart contracts assure that
trust isn't required and we can be certain that an agreement will be executed as described
100% of the time.
Lastly, it's important to note that there are several actors, such as FTX which pretend to
embody the ideologies of Web3, but are really centralized entities looking to extract value from
the system, be aware of these.
In the next lesson, we'll look at some of the specific features of smart contracts and consider a
few examples of their applications.
Chapter 8: Quick Recap
Follow along with this video:
Introduction
Blockchain technology has transformed digital transactions and agreements. Bitcoin was the
first protocol to popularize blockchain, facilitating transactions without intermediaries. Building
on this foundation, Ethereum and other smart contract platforms have advanced the
technology by enabling the creation of smart contracts and decentralized applications. These
platforms interact with the real world through decentralized networks like Chainlink, extending
blockchain's capabilities. This aspect challenges traditional finance, offering a new way to
manage and transfer wealth.
Bitcoin and Ethereum
Bitcoin introduced the concept of a decentralized digital currency. It functions as a store of
value and allows for peer-to-peer transactions without the need for a central authority. This
decentralization ensures that no single entity controls the network, making Bitcoin resistant to
censorship and central points of failure.
Ethereum expanded on Bitcoin's technology by introducing smart contracts. Smart contracts
are self-executing contracts with all the terms and conditions transparently written into code.
These contracts are trust-minimized agreements, and they remove the need for
intermediaries. Ethereum's platform allows for the creation of decentralized applications
(dApps) that can interact with the blockchain and real-world data through decentralized
networks.
Chainlink
Chainlink is a decentralized network that facilitates the creation of hybrid smart contracts. By
combining on-chain logic with off-chain data and computation, they ensure that both the logic
and the data remain decentralized.
Key Features and Benefits
✅ Decentralization. Smart contracts operate on decentralized networks maintained by nodes,
which remove the need for central intermediaries
✅ Transparency and Flexibility. All transactions and contract executions on the blockchain are
visible to everyone, ensuring transparency and fairness. Additionally, pseudoanonimity ensures
that privacy is maintained, since accounts are not tied to real-life identities.
✅ Speed and Efficiency: Blockchain transactions are instant, unlike traditional bank transfers
that can take days or weeks to execute. This efficiency extends to financial settlements,
eliminating the need for clearing houses and reducing settlement times.
✅ Security and Immutability: Once deployed, smart contracts cannot be altered, ensuring that
the terms remain unchanged. Hacking a blockchain is extremely challenging due to its
decentralized nature, offering a more secure method for protecting information compared to
centralized systems.
✅ Reduced Counterparty Risk: Smart contracts remove the need for trust in intermediaries,
ensuring that agreements are executed as coded without the risk of human interference or
fraud.
Conclusion
Blockchain technology has revolutionized digital transactions and agreements. Bitcoin
introduced decentralized digital currency, Ethereum expanded it with smart contracts, and
Chainlink enhanced it with hybrid networks. These advancements challenge traditional finance,
offering secure, transparent, and efficient ways to manage and transfer wealth, leading to a
new era of trust-minimized agreements.
🧑💻 Test Yourself
1. 📕 Describe briefly what are Bitcoin, Ethereum and Chainlink
2. 📕 What are the key advantages of smart contracts over traditional financial systems?