Group 3 · Building on it

Smart contracts and token approvals

promises written in code

The idea

A is a program stored on a blockchain that executes its published rules. A token approval (allowance) can let a contract move your tokens later — sometimes without a second click if the allowance is large.

Why it matters

The website is advertising; the contract code is what the chain runs. Unlimited approvals are how many drains happen.

How it works

A smart contract is code saved on a blockchain at its own address. When someone sends it a transaction, every node runs the same code with the same inputs and records the same result. Nobody can step in halfway and say, “That is not what I meant.” If the code is fixed once published, its bugs stay too.

Token approvals add a second step. Many token contracts let you grant another contract an allowance: “You may move up to this many of my tokens.” Later, that contract can pull tokens from you, up to the limit, without asking you to sign again.

Real example: a swap site asks you to approve its contract before your first trade. Some sites ask for an unlimited allowance to save you clicks. If that contract is later hacked, or was a fake from the start, it can use the old approval to drain that token from your account. Setting a limit, or revoking the approval when you are done, closes that door. Source: Ethereum.org — Smart contracts.

Picture it

Vending machine that cannot “know what you meant” = . Leaving a signed blank check = unlimited approval.

Watch out

“Approve” prompts on look-alike sites; approvals you forget to revoke after a one-time use.