Smart contract

Quick definition

Copy link to section
Updated: Jan 20, 2023

Smart contracts are programs that are told how to operate automatically by lines of code.

Key details

Copy link to section
  • Smart contracts are lines of code that form the backbone of many platforms that use blockchain technology, most notably the Ethereum network.
  • Smart contracts help make decentralised finance possible by writing the rules that govern the system in lines of computer code that cannot be altered
  • Anyone can read what’s inside a smart contract and transparency is an important part of the way blockchain platforms establish trust.

What is a smart contract?

Copy link to section

Smart contracts execute functions automatically by following the logic they are programmed to perform. When creating dApps, smart contracts are made to contain all the events and actions that the application should be able to perform for users.

Because the rules of an application are programmed into the smart contract before it is deployed, there is no need for a third party to oversee its performance or authority to tell the user how they should interact with the program. This makes decentralisation possible because smart contracts can operate independently.

The contents of a smart contract are publicly available. This allows for transparency between the user and the program and allows the user to trust the program that they are using. It also makes it easier to combat malicious code that is deployed on the blockchain by having programmers familiar with solidity to check the code’s security for other users.

What makes smart contracts vulnerable?

Copy link to section

Unless you’re familiar with how smart contracts work or the programming languages used to create them, smart contracts can be used to exploit users and investors or can be exploited by hackers under the noses of unsuspecting developers who are unaware of possible security breaches in their code.

Once a smart contract has been deployed on Ethereum it’s not possible to edit that now active smart contract. It’s important that before a smart contract is deployed that its code is checked thoroughly by professionals. There are smart contract audit firms like Certik and Trail of Bits who investigate smart contracts before they are deployed, analysing a contract’s security, the quality of the code and more.

Where can I learn more?

Copy link to section

If you’d like to learn more about how the blockchain works then you can read our lesson on blockchain technology. To learn more about cryptocurrencies and how to invest in them then head over to our crypto investing hub.

Sources & references
Risk disclaimer
James Knight
Editor of Education
James is the Editor of Education for Invezz, where he covers topics from across the financial world, from the stock market, to cryptocurrency, to macroeconomic markets.... read more.