Smart contracts are programs that can interact with the blockchain, which can be viewed as a decentralized database. They allow developers to build decentralized applications (dApps) with controlled execution of contractual terms, where code is law.
But Technically, What is a Smart Contract?
Smart contracts are human-readable code that can be compiled and deployed on a blockchain. In this context, a smart contract can be seen as a stored procedure that can modify the data, interact with other smart contracts, and can be called by end users.
Thanks to the asynchronous execution of smart contracts, they can even automatically wake up at a specific time or when the ledger reaches a specific condition, such as the data of a smart contract having a specific value.
Limitations of Smart Contracts
While smart contracts have many benefits, they also have limitations.
For example, smart contracts:
- Are small, and storage has a cost.
- Have short execution times, and execution has a cost, often called gas, and there is a gas limit for a given slot.
- Must be deterministic, which implies that all their parameters are public and they can only access information on the blockchain.