StartLearnBuildTokensResourcesConverseBlogLibrary
    HomeBuildOutsmarting ContractsRandom Order

    Table of contents

    • Random Order
    Random OrderWhy

    We’re going to learn how to attack smart contracts with other smart contracts, because this is the active practice of complementary opposites. By understanding the different vulnerabilities which have been exploited over time, we can learn both how “smart” contracts actually work, as well as how to employ better patterns of thinking which will improve our craft.

    By becoming conscious of our limitations and weakness, we are made stronger and more resilient. By looking into the shadows, we become certain that there is light.

    Preparation
    1. Ensure that you still have some Sepolia ETH left in your account.
    2. If you feel highly motivated, familiarise yourself with Integrated Development Environments (IDEs) and Remix.
    3. Sit and breathe quietly for at least 10 minutes.
    Application

    We’re going to take on the next 2 Ethernaut challenges in this lesson: CoinFlip and Telephone. This requires writing our own contracts and learning how to compile and deploy them, for which we will use the IDE provided by the Ethereum Foundation, called Remix.

    1. What is an IDE and what purpose does it serve in this life?
    2. How can I read and understand what is going on in a smart contract?
    3. What are global variables, and how global is global?
    4. From where do my transactions truly originate?
    5. What does it mean to compile a contract? What is an ABI and what is bytecode?
    6. Hang on, you mean all these contracts can actually speak to one another?
    Summation

    In this session, you will have learned:

    1. How to read Solidity in more detail, along with some of the nuances it has.
    2. How to deploy your own contracts directly from the browser.
    3. How to programme contracts to interact with other contracts.
    4. How difficult it is to programme randomness, and how a single, shared, global computing surface makes this even more challenging.
    5. Why everyone having access to the same information at the same time is both very cool, but also a very challenging context in which to programme.
    6. How even very simple code can have unintended consequences if you aren’t careful and considerate about how you approach your craft.
    Recording
    Rule 30
    Previous
    Lifting The Veil
    Next
    The True Store