What are ‘self-executing’ smart contracts?
While studying blockchain and smart-contract development one will eventually run into the term ‘self-executing’. Statements might be similar to these:
- “Smart contracts are self-executing computer programs that live on a blockchain” ¹
- “smart contracts are used to automate the implementation of agreements for parties to achieve near-instant finality without the involvement of a third party.” ¹
- The code is run and executed by all computers in the network. If a term of the contract is satisfied and it is verified by all participants of the blockchain network, then the relevant transaction is executed. ²
- etc.
The problem with all these statements in the context of a computer program is that one might infer that a smart-contract runs automatically, by itself. Not only is this NOT the case but self-execution refers to something far more important than automation.
History of the term ‘self-executing’
The term ‘self-execution’ comes from law, specifically referring to self-executing treaties. A self-executing treaty is an agreement between parties which upon signing, immediately becomes enforceable by the law and the judiciary system. A non-self-executing treaty on the other hand needs additional legislation to become enforceable.
“At a general level, a self-executing treaty may be defined as a treaty that may be enforced in the courts without prior legislation by Congress, and a non-self-executing treaty, conversely, as a treaty that may not be enforced in the courts without prior legislative ‘implementation.’” ³
The term in its original context has no relation to computers, programming or software automation. It is merely the act of signing a document which then can immediately be held up in the court of law. Furthermore, checking the dictionary for ‘execution’ we can see these two distinct meanings ⁴:
Execution
noun
- (computer science) the process of carrying out an instruction by a computer.
- (law) the completion of a legal instrument (such as a contract or deed) by signing it so that it becomes legally binding and enforceable.
‘Self-executing’ smart contracts
Back to smart contracts. Smart contracts are essentially computer programs — procedures — deployed to and executed (run) by the blockchain network. When a computer program is deployed on a blockchain it gains unique qualities which make it possible to trust the program without further inputs, checks or external validation. This means that the program could be used to represent a contract between counterparties — what we get is a self-executing contract.
The use of a blockchain is important for several reasons when it comes to self-executing smart contracts. First, a blockchain provides a decentralized and immutable ledger that allows the terms of a contract to be recorded and enforced without the need for a central authority or intermediary. This ensures that the computer program and its encoded rules are secure and transparent, and that it cannot be altered or tampered with once it has been deployed.
Second, a blockchain provides a way for the agreement to be executed (go into effect) automatically, without the need for any further input or intervention from the parties involved. This allows the contract to enforce its terms in a trustless manner, ensuring that the terms of the agreement are followed without the need for trust between the parties.
Overall, the use of a blockchain provides the necessary storage, access rights, and trustless execution environment that is required for a contract to be considered self-executing.
Real world examples of self-executing smart contracts
Here are few examples of self-executing clauses in a digital agreement:
- A smart contract that automatically releases funds to a seller when a buyer receives a product. The trigger may be the buyer’s confirmation that they have received the product.
- A smart contract that automatically distributes profits to investors in a crowdsourced project according to their agreed-upon ownership stakes. The trigger may be the completion of the crowdsourced project
- A smart contract that notifies about a security upgrade on a network of connected devices when a vulnerability is detected. The trigger may be the submission of a patch for a security vulnerability.
More examples of self-executing smart contracts can be found at www.toolblox.net.
Smart contract automation
What about running smart contracts automatically — making them execute on their own? For example, if in the contract there is a clause that an agreement or promise expires at a certain point of time or some other kind of external event should dictate a state transition in the contract… There is no built-in functionality in blockchains to achieve any of that but there are several approaches to handle these situations: cross-contract calls or oracle (off-chain) automation can be used for example.
Summary
One must be careful when using the term ‘self-executing’ in context of blockchain programming and indeed there is a lot of literature using the term in a misleading way (‘self-executing computer program’?). While there are ways to automate code execution on blockchain, it instead refers to the properties gained from running programs on top of a permissionless distributed ledger.
An agreement between two parties can be executed — signed and put into effect. But the agreement, it turns out, can be executed in another way as well: the rules in the agreement can be coded into a computer program and deployed on to a blockchain. This agreement can then be called a self-executing smart contract:
- It is ‘self-executing‘ because it does not need a central authority, employs digital signatures and its state is immutable.
- And it is ‘smart’ because it is a computer program with many ways to integrate it into our daily lives instead of a paper document that lives in the drawer.
The benefits of self-executing smart contracts are just being discovered. Whether it is to execute by-laws of an organization (DAOs), track offers and shipments, report ESG (environmental, social, and corporate governance) metrics, run binding auctions, execute escrow transactions or digitalize other business processes. Blockchain is not only the technical enabler (with storage, payments and runtime built in) but, more importantly, it enriches the social protocol.

Visit toolblox.net to find out more about the benefits and build self-executing smart contracts and blockchain applications without using any coding skills.
Br,
Silver // Toolblox
[1] How Do Crypto Smart Contracts Work? | CoinGecko
[2] Smart Contract — Overview, How It Works, Role in Blockchain Tech (corporatefinanceinstitute.com)
[3] The Four Doctrines of Self-Executing Treaties (georgetown.edu)
[4] Execution — Definition, Meaning & Synonyms | Vocabulary.com
What are ‘self-executing’ smart contracts? was originally published in CoinsBench on Medium, where people are continuing the conversation by highlighting and responding to this story.
Originally published on Medium.
