The rationale behind the concept of smart contracts makes enormous sense to an Islamic economist. The original goal behind the idea (Szabo, 1994) was to apply the principles of traditional contracting and related business practices to the design of electronic commerce protocols between multitudes of unknown parties on the Internet. The author(s) of this concept felt that specification through clear logic, and verification or enforcement through cryptographic protocols and other digital security mechanisms should constitute a sharp improvement over traditional contract law in protecting the rights and obligations of parties.
A smart contract is a computerized transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitrations and enforcement costs, and other transaction costs.
Arguably, smart contracts are closer to Islamic contracts with an undiluted focus on avoidance of any kind of uncertainty regarding settlement of the contracts. One would witness a sharp reduction in the element of gharar (defined as uncertainty) with contracting between unknown parties that meet on the internet. When Islamic contracts take the form of self-executing digital or smart contracts, with “electronically coded” terms of the contracts. The contractual terms will execute only if the conditions are met. This will automate the entire contractual process for Islamic institutions. The Islamic contracts will now be easy to verify, immutable and secure, mitigating gharar in the form of operational risks arising from settlement and counterparty risks. Gharar in the form of administrative and legal complexities and redundancies will also be mitigated.
One would also expect a resolution of the issue of high transaction costs with Islamic contracts (related to Shariah compliance), compared to their conventional counterparts. Islamic finance leverages on a wide range of contracts such as profit-sharing agreements, partnerships and agency arrangements involving multiple parties. This is in sharp contrast to a conventional loan agreement that requires a single contract between the financier and the borrower. Critics of Islamic finance often underline the higher administrative and legal costs associated with its composite products requiring multiple contractual arrangements. Thus, Islamic finance is seen to impose an incremental cost on the economy. However, the self-executing smart contracts resolve this precise problem as highlighted above.
An extension of smart contracts is the concept of the decentralized autonomous organization (DAO). A DAO is an organization that is run through rules encoded as computer programs or smart contracts. A DAO’s financial transaction record and program rules are maintained on a blockchain. In theory, there are several examples of this business model. In practice, the precise legal status of this type of business organization is unclear. However, a DAO may take the structure of a general partnership or musharakah, while functioning as a corporation without legal status.
Smart contracts and DAOs use the blockchain technology. Therefore, it is important to examine the blockchain technology to underline the relevant issues from the Islamic point of view.
A blockchain essentially, facilitates the transfer of value or data without the need of a central authority or a third party. It is a decentralized digital ledger, which records transaction chronologically and publicly, allowing anyone to verify and access the data. The first and original application of blockchain is Bitcoin, a decentralized digital currency that allows sending money from anywhere in the world at little to no cost, with no banks or third parties involved in the transaction. A blockchain can cater to any form of transactions involving value such as money, property and goods. For example, the blockchain data could in principle, if regulatory structures permitted, replace public documents such as deeds and titles. Thus, a “smart long-term ijara-thummul-bai” or lease-purchase contract – that uses the bitcoin blockchain and automates the periodic payment streams as well as change in title of leased assets at the end of lease period – will now be a self-paying and self-executing instrument. Compared to its equivalent conventional financial instrument for raising long-term finance, this smart contract has clear advantages that include minimizing counterparty risk, reducing settlement times, and increasing transparency.
Blockchain is relatively secure for the following reasons. One, it uses cryptographic techniques backed by complex mathematical algorithms to verify and secure the data. Two, it is much harder to hack a decentralized network rather than a centralized, single-point-of-failure system. Further, the level of security with blockchain rises, the longer the chain gets. This is because a tremendous amount of computing power is required to “hack” or alter the information in the blocks. Proponents assert that the features of immutability and transparency of the blockchain process removes the possibility of fraud and theft. It may be noted here that the potential of technology is also fraught with grave risks, at least until society has a good understanding of its uses and abuses, throwing the game back into the domain of prohibitive gharar or excessive complexity. What are believed to be the strengths of blockchain technology – immutability and transparency – may quickly turn into the gravest vulnerabilities. If there are security holes in the code that is now visible to all, but difficult to alter, it will rule out bug fixes unless a moratorium is called for the purpose, as in the well-documented case the maiden DAO that raised the largest amount of equity capital in the history of mankind through crowd-funding.
 The Securities Exchange Commission, US in recent past has held some similar approaches as illegal offers of unregistered securities.
 This will imply unlimited legal liability for participants, even if the smart contract code or the DAO’s promoters say otherwise. Another issue with DAOs relates to participation of shareholder/ partners in considering alternative proposals, which can be problematic and time-consuming.
 In mid-June 2016, a specific DAO, The DAO, set a record for the largest crowdfunding campaign to date. However, multiple issues in the code of The DAO were identified subsequently. The operational procedures for The DAO enabled an attempted large withdrawal of funds from The DAO. The original contract was later bailed out with the consensus of the community, however, only at a financial loss to The DAO and credibility loss to the concept.