A smart contract is a self-executing program that automates the actions required in an agreement or contract. Once completed, the transactions are trackable and irreversible. [1][2][3]
Smart contracts seek to reduce dependence on trusted intermediaries, lower arbitration costs and fraud losses, and minimize both malicious and accidental exceptions. Linked closely with cryptocurrencies, smart contracts are foundational for decentralized finance (DeFi) and non-fungible token (NFT) applications. [1][2]
Smart contracts were first proposed in the early 1990s by Nick Szabo, an American computer scientist who invented a virtual currency called "Bit Gold" in 1998, 10 years before Bitcoin was introduced. Szabo was often rumored to be the real Satoshi Nakamoto, the anonymous Bitcoin inventor, which he denied. [1][7]
Szabo's first publication, "Smart Contracts: Building Blocks for Digital Free Markets" was published in Extropy #16, and then later reworked as "Formalizing and Securing Relationships on Public Networks." These documents described how it would be possible to establish contract law and related business practices through the design of electronic commerce protocols, between strangers on the Internet. [3][7]
In 1996 Szabo described smart contracts as follows:
"New institutions, and new ways to formalize the relationships that make up these institutions, are now made possible by the digital revolution. I call these new contracts "smart", because they are far more functional than their inanimate paper-based ancestors. No use of artificial intelligence is implied. A smart contract is a set of promises, specified in digital form, including protocols within which the parties perform on these promises."[7]
Szabo, inspired by researchers like David Chaum, also had a broader expectation that specification through clear logic, and verification or enforcement through cryptographic protocols and other digital security mechanisms might constitute a sharp improvement over traditional contract law, even for some traditional kinds of contractual clauses (such as automobile security interests that provide for repossession) that could be brought under the dominion of computer protocols. [7]
The term "smart contract" refers to a type of general-purpose computation that occurs on a blockchain or distributed ledger. This meaning is used by organizations such as the Ethereum Foundation or IBM. In this context, a smart contract does not necessarily correspond to the traditional concept of a contract but can be any computer program. [1][3]
Smart contracts operate as immutable programs on blockchains following the logic: "if/when x event occurs, then execute y action." A single smart contract can encompass various conditions, and an application may employ multiple smart contracts to facilitate an interconnected series of processes. Several programming languages, with Solidity being the most popular for Ethereum, are available for creating smart contracts. [1][3]
Developers can create and deploy smart contracts for personal use, such as a customized yield aggregator. However, many smart contracts involve multiple independent parties with varying levels of trust. These contracts precisely dictate user interactions, specifying who can engage, when, and the inputs leading to specific outputs. This results in multi-party digital agreements transitioning from a probabilistic state, where execution is likely, to a deterministic state, ensuring execution according to the specified code. [1][3]
Because they operate on top of blockchains, smart contracts are automatically and deterministically executed exactly as programmed. In the context of enforcement, this hypothetically means that no party involved in a smart contract transaction can change its outcome or renege on terms outlined in a smart contract. [3][8]
Decentralization through Byzantine fault-tolerant algorithms enabled digital security and smart contract formation. Some blockchains have programming languages with varying degrees of Turing completeness, which facilitate the creation of highly customized logic. [7]
Notable examples of the implementation of smart contracts include:
A smart contract is "a computerized transaction protocol that executes the terms of a contract." A blockchain-based smart contract is visible to all users of said blockchain. However, this leads to a situation where bugs, including security holes, are visible to all yet may not be quickly fixed. [3]
Such an attack, difficult to fix quickly, was successfully executed on The DAO in June 2016, draining US$50 million in Ether while developers attempted to come to a solution that would gain consensus. The DAO program had a time delay in place before the hacker could remove the funds; a hard fork of the Ethereum software was done to claw back the funds from the attacker before the time limit expired. [4]
Issues in Ethereum smart contracts, in particular, include ambiguities and easy-but-insecure constructs in its contract language Solidity, compiler bugs, Ethereum Virtual Machine bugs, attacks on the blockchain network, the immutability of bugs, and that there is no central source documenting known vulnerabilities, attacks, and problematic constructs. [3][4]
Szabo's concept envisioned smart contract infrastructure through replicated asset registries and contract execution via cryptographic hash chains and Byzantine fault-tolerant replication. Askemos implemented this approach in 2002 using Scheme, later adding SQLite as a contract script language. [5]
An alternative proposal, "colored coins," suggests using Bitcoin for replicated asset registration and contract execution. Various projects have implemented replicated titles for diverse forms of property, alongside replicated contract execution. [6]
The theoretical advantages of smart contracts include minimizing counterparty risk, reducing settlement times, and enhancing transparency compared to conventional financial instruments. In 2015, UBS experimented with "smart bonds" utilizing the Bitcoin blockchain, envisioning fully automated payment streams for a self-paying instrument. [5][6]
Decentralized finance (DeFi) encompasses applications leveraging smart contracts to replicate traditional financial products such as money markets, options, stablecoins, exchanges, and asset management. These applications employ permissionless composability to combine services, creating new financial primitives. Smart contracts within DeFi can securely manage user funds, holding them in escrow and distributing them between users based on predetermined conditions. For instance, BarnBridge automates trades for users seeking fixed asset exposure, and Aave facilitates permissionless and decentralized lending and borrowing through smart contracts. [1][3]
Token smart contracts are used to create, track, and assign ownership rights to specific digital tokens existing on blockchain networks. The token contract programs functionalities into the tokens it issues, providing holders features like utility/insurance in a dApp (utility token), voting weight in a protocol (governance token), equity in a company (security token), ownership claim to a unique real-world or digital asset (non-fungible token), and more. For example, the FIL token is used to pay for Filecoin’s decentralized storage services and the COMP token allows users to participate in the governance of Compound protocol. [1]
Blockchain-based games use smart contracts for tamper-proof execution of in-game actions. One example is PoolTogether, a no-loss savings game where users stake their funds in a shared pool that is then routed into a money market where it earns interest. After a predefined period, the game ends and a winner is randomly awarded all the accrued interest while everyone else can withdraw their original deposit. [1]
Similarly, limited-edition NFTs can have fair distribution models and RPGs can support unpredictable loot drops using randomness, helping to ensure all users have a fair shot at getting rare digital assets. Many projects access randomness using Chainlink Verifiable Random Function (VRF)—a random number generator (RNG) that uses cryptography to prove it's tamper-proof, meaning the RNG process is publicly auditable. [1]
Parametric insurance ties payouts directly to predefined events, leveraging smart contracts for tamper-proof creation and execution based on data inputs. For instance, crop insurance can be implemented through smart contracts, where policies are linked to specific weather conditions like seasonal rainfall. Upon policy completion, the smart contract automatically issues payouts if the actual rainfall surpasses the predefined amount. This model ensures timely payouts for end-users with reduced overhead, and it opens the supply side of insurance to the public through smart contracts. Users can deposit funds into a pool, and the smart contract distributes premiums to participants proportionate to their contribution. [1][2]
Smart contracts can be utilized in voting and governance within a DAO (Decentralized Autonomous Organization) by encoding the rules and procedures for decision-making directly into the contract code. Participants in the DAO can then interact with the smart contract to cast votes, propose changes, or participate in governance decisions. This ensures transparency, immutability, and tamper-proof execution of the voting process, enhancing the democratic and decentralized nature of DAO governance. Smart contracts can automate the tallying of votes, enforce voting rules, and execute decisions based on predefined conditions, providing an efficient and trustless mechanism for managing the DAO's affairs. [8]
Smart contracts can be employed in blockchain crowdfunding by automating the fundraising process and ensuring transparent and secure handling of contributions. Through a predefined set of rules encoded in the smart contract, participants can send contributions to a crowdfunding campaign. The smart contract then automatically manages the release of funds based on specific conditions, such as reaching a funding goal or a predetermined timeline. This eliminates the need for an intermediary and enhances trust among participants, as the contract's execution is verifiable on the blockchain. Additionally, smart contracts can facilitate the distribution of tokens or rewards to contributors based on the terms set within the contract. [8]
편집자
편집 날짜
February 9, 2024