lesson
25 min

When Code Cannot Be Undone

Bugs, bad data, and no undo button: the risks of smart contracts and when a regular agreement is better.

What you will be able to do

By the end of this lesson, you can describe why bugs and bad data are serious risks in smart contracts and decide when not to use one.

The strength is also the risk

Smart contracts are hard to change. That builds trust. It also means a mistake in the code can be locked in, and money can move before anyone can stop it.

Three big risks

1. Bugs

Code written by people has mistakes. In regular apps, a bug can be fixed with an update. In a smart contract, a bug may be permanent, and attackers actively hunt for them. Serious teams pay for outside security audits, careful reviews of the code by experts, before launch. Even audited code has been hacked.

2. Bad data in, bad action out

A smart contract cannot see the real world. It needs an oracle, an outside service that feeds it facts like a price, a delivery confirmation, or the weather. If the oracle is wrong or hacked, the contract acts on bad information, automatically.

3. No one to call

There is usually no customer service, no appeal, and no judge built in. If you send money to the wrong address or sign the wrong transaction, it may be gone.

When a regular agreement is better

SituationBetter choice
The deal depends on judgment, like "the work is good"A written agreement and a person to decide
People may need to change terms laterA regular contract that can be amended
The people involved are not comfortable with crypto walletsA payment app or bank with fraud protection
A mistake would hurt someone who cannot absorb the lossA system with refunds and an appeal process
Minors are involvedNo smart contract; adults handle agreements

Before anyone relies on a smart contract

0 of 6 done

Module 7 check

Quiz: Module 7: Smart Contracts

  1. 01What is a smart contract?

    Choose one.

  2. 02In the escrow code, what happened when approved was false?

    Choose one.

  3. 03What made The DAO attack possible?

    Choose one.

  4. 04What is an oracle in a smart contract?

    Choose one.

  5. 05When is a regular agreement better than a smart contract? Choose all that apply.

    Choose all that apply.

Ask. Answer. Build together.