# Smart contract

> A program deployed to a blockchain that runs exactly as written, that anyone can call, and that usually cannot be changed afterwards.

Three properties define the engineering problem. The code is public, so anybody can study it for mistakes. Anybody can call it, so there is no trusted caller. And on most chains it cannot be patched once deployed, so a bug is permanent unless an upgrade path was designed in beforehand — and an upgrade path is itself a centralisation risk somebody has to hold the keys to.

Together those turn ordinary software mistakes into immediate, irreversible financial losses, which is why this field has a testing culture that is unusual by normal application standards: property-based tests, fuzzing, formal reasoning about invariants, and independent review before anything holds real value.

## Related terms

- https://dfieldsolutions.com/en/glossary/solidity.md
- https://dfieldsolutions.com/en/glossary/gas.md
- https://dfieldsolutions.com/en/glossary/smart-contract-audit.md
- https://dfieldsolutions.com/en/glossary/erc-721.md

---

Source: https://dfieldsolutions.com/en/glossary/smart-contract
DField Solutions — Dunakeszi, Hungary — dezso@dfieldsolutions.com
Booking: see https://dfieldsolutions.com/en/contact
