# A Primer on Smart Contracts

In the field of cryptocurrencies, *smart contracts* are pieces of code that can run on a blockchain and enforce certain rules or logic, much like real-world contracts. However, due to the inherent programmability provided by blockchain technology, smart contracts can go much further than that, acting as a foundation to build decentralized applications and concepts such as DeFi, while eliminating the necessity of "trust" usually provided by a third-party on a traditional real-world contract.

Although a fairly old concept in theory, smart contracts in practice have been popularized by the [Ethereum](https://ethereum.org) blockchain and its implementation of a virtual machine - the "Ethereum Virtual Machine", or [EVM](https://ethereum.org/en/developers/docs/evm) - that made it possible to deploy and interact with them. Other coins such as [Avalanche](https://support.avax.network/en/articles/5417030-what-is-the-ethereum-virtual-machine-evm), [Tron](https://developers.tron.network/v4.4.2/docs/tvm) and [Bitcoin Cash](https://cashscript.org/) have followed along with their own implementations as time went on.

[Ethereum's website](https://ethereum.org/en/smart-contracts/) has a good explanation of smart contracts in EVM and most major scaling solutions for Ethereum use the same unsustainable technology, introducing the same issues of scalability in every deployed layer.
