What are Smart Contracts?

file icon

What are Smart Contracts?

A “smart contract” is a type of computer program that executes across multiple nodes (computers) of a blockchain or DLT network. Those nodes use a “consensus” protocol to ensure that the program executes in the same way across all nodes. The smart contract itself and the data written when the smart contract executes are typically stored on the blockchain’s ledger.

Smart contracts allow for different sorts of agreements to be structured between multiple people without the need for a trusted third party like a bank or enforcement through the legal system. 

If smart contracts are run on an open, decentralized blockchain, they are not just immutable, but permissionless and trustless. This is why smart contracts – such as those used for decentralized finance (DeFi) applications – are often called “dApps,” or decentralized applications.

Smart contracts execute either when a user “calls” them, e.g. depositing ETH in Maker to create Dai, or when another smart contract “calls” them, such as liquidating a position in Aave.

The ERC20 standard is one of the most common types of smart contract on Ethereum. ERC20 smart contracts allow anyone to create a token. eXRD, the Ethereum wrapped version of XRD, is an example of one such token.

Further reading: