Skip to content
Finic
Crypto

What is a smart contract?

A smart contract is a program stored on a blockchain that runs automatically when called, holding and moving assets according to its code.

How it works

A developer writes the contract, compiles it and deploys it to a blockchain such as Ethereum, where it gets its own address. Users and other contracts call its functions by sending transactions, and every node runs the same code to agree on the result.

Once deployed, the code is usually fixed. Some contracts use upgrade patterns that let an admin replace the logic, which adds flexibility but also gives that admin a great deal of power.

Fraud and risk angle

Code is the rulebook, so bugs become losses. Attackers search for flaws such as faulty access checks, unsafe external calls and price feeds that can be manipulated within one transaction.

Malicious contracts are also common. A token contract may block holders from selling, charge hidden fees or let the creator mint unlimited supply, which are typical features of a rug pull. Other contracts exist only to receive token approvals collected through approval phishing.

How to reduce the risk

  • Check whether the contract code is published and verified on a block explorer.
  • Look for independent security reviews, while keeping in mind that a review does not prove the code is safe.
  • Find out who controls admin and upgrade keys, and whether changes go through a delay.
  • Limit token approvals to the amount you need and revoke ones you no longer use.

Example

In a hypothetical case, a new token launches with a contract that lets anyone buy but only a list of allowed addresses sell. Buyers see the price rise and add funds, but their sell orders fail. The creator then sells their own large holding and leaves.

← All glossary terms

Ship fraud, bot and KYB checks in minutes.

Start with $5 of free credit, or copy a prompt and let your coding agent set Finic up.

Sign up See pricing