-
@ croxroadnews
2024-02-08 02:14:20Introduction
In the 1990s, Nick Szabo was the first person to explain smart contracts. At the time, he characterized a smart contract as a tool that formalizes and protects computer networks by integrating protocols with user interfaces. Specifically, he said that this combination makes smart contracts both formal and safe.
Szabo spoke about the possible applications of smart contracts in various domains that use contractual agreements, including credit systems, payment processing, and intellectual rights management.
In the realm of virtual currencies, an application or computer program that operates on a distributed ledger known as a blockchain might be referred to as a smart contract. In most cases, they function as a digital agreement that is monitored and upheld by a predetermined set of guidelines. These guidelines are predetermined by computer code, which is then copied and run on each and every node in the network.
The use of smart contracts in blockchain technology makes the establishment of trustless protocols. Because of this, it is possible for two parties to establish promises using blockchain technology without needing to know or trust the other party. They are able to be certain that the deal will not be carried out in the event that the stipulations are not satisfied. Aside from that, the use of smart contracts may do away with the need for the employment of middlemen, which would result in a large reduction in operating expenses.
Buterin, the architect of Ethereum and one of its co-founders, is credited with popularizing smart contracts despite the fact that the Bitcoin protocol has supported them for a significant number of years. However, it is important to keep in mind that the manner in which smart contracts are put into action may be presented differently by each blockchain.
The Ethereum Virtual Machine (EVM), an integral component of the Ethereum blockchain, will be the primary topic of discussion in this article. Specifically, the smart contracts that are executed on the EVM.
How do they work?
A deterministic program best describes the operation of a smart contract in its most basic form. It carries out a certain job if and only if a specified set of criteria are satisfied. As a result, the words "if... then..." are often used in a smart contract system. But despite the common nomenclature, legal contracts are not smart contracts, and smart contracts are not legal contracts. They are more than a line of code executed across several computers (blockchain).
When users (addresses) communicate with one another on the Ethereum network, blockchain activities are carried out and managed by smart contracts. These contracts are responsible for the execution and management of these operations. An externally held account is the term used to describe any address that is not a smart contract (EOA). So, the rules for electronic operating agreements (EOAs) are set by the people who use them, while the rules for smart contracts are set by computer code.
In their most basic form, Ethereum smart contracts can be broken down into three components: a contract code, two public keys, and the contract itself. The person who first creates the contract will be the one to provide the first public key. The other key acts as a digital identity that is exclusive to each individual smart contract, and it serves as a representation of the contract itself.
A transaction accomplishes any smart contract deployment on a blockchain, and the contracts themselves can only be activated when an EOA makes the request (or by other smart contracts). Nevertheless, an EOA is always the source of the first trigger (user).
Key features
Typically, a smart contract written in Ethereum will have the following characteristics:
-
Distributed. On the Ethereum network, smart contracts are copied and dispersed among all of the nodes. Compared with alternative systems built on centralized servers, this is one of the most significant distinctions.
-
Deterministic. If all conditions are satisfied, smart contracts will only carry out the operations they were initially designed. Additionally, the consequences will always be the same regardless of who carries them out; this is a constant.
-
Autonomous. Because they function similarly to self-running programs, smart contracts may be used to automate a wide variety of functions. Most of the time, though, if a smart contract isn't activated, it will stay "dormant" and won't do any of the things that were planned for it.
-
Immutable. After they have been deployed, smart contracts cannot be modified in any way. They can only be "removed" if a certain function has already been put into place before that point. Because of this, we could say that smart contracts can provide code that can't be changed.
-
Customizable. It is possible to write smart contracts in a variety of different ways before they are deployed. Therefore, they may be used to develop a wide variety of applications that do not rely on a central server (DApps). This is because Ethereum is a Turing-complete blockchain relevant to the previous point.
-
Trustless. Through the use of smart contracts, two or more parties may engage with one another even if they do not know or trust one another. In addition, the use of blockchain technology guarantees the veracity of the data.
-
Transparent. The source code of smart contracts is not only unchangeable but can also be seen by any member of the public since they are built on public blockchains.
Can I change or delete a smart contract?
After a smart contract built on Ethereum has been deployed, adding new functionality to the contract is not feasible. However, if the smart contract developer incorporates a function known as SELFDESTRUCT into the code, they will be able to "destroy" the smart contract later and create a new one in its place. On the other hand, they won't be able to get rid of the function even if they try if it wasn't in the source code from the start.
Particularly noteworthy is the fact that so-called upgradeable smart contracts provide developers with a greater degree of leeway in terms of the immutability of contracts. There are a wide variety of approaches to developing upgradable smart contracts, each with their own level of complexity.
To illustrate this point using a simplified scenario, let's pretend that a single smart contract is broken up into many different smaller contracts. While some have the ability to be deleted, those that are meant to be immutable cannot be changed in any way. This means that a part of the code called "smart contracts" can be taken out or changed without affecting how other features work.
Advantages and use cases
Smart contracts, made up of programmable code, are very adaptable and can be constructed in various ways, allowing them to provide a wide range of services and solutions.
Smart contracts, which are computer programs that can run themselves and are decentralized, could boost operational transparency while also lowering expenses. Depending on how they are used, they could make things more efficient and cut down on bureaucracy costs.
When several parties are involved in a transaction involving the transfer or exchange of cash, smart contracts are especially beneficial because of their efficiency.
To put it another way, smart contracts may be tailored to meet the requirements of various use cases. Tokenized assets, voting systems, cryptocurrency wallets, decentralized exchanges, games, and mobile application development are a few examples of what may be created with blockchain technology. They can also be used with other blockchain technologies to solve problems in areas like healthcare, charitable giving, supply chain management, government, and decentralized financial systems (DeFi).
ERC-20
The ERC-20 standard is adhered to by tokens that are distributed via the Ethereum network. The standard outlines the fundamental capabilities that each Ethereum-based coin must have. Because of this, the digital assets in question are often called ERC-20 tokens, making up a large portion of the current cryptocurrencies in use.
On the Ethereum network, several blockchain organizations and startups use smart contracts in order to create their own digital tokens. Following the completion of the issue, the vast majority of these businesses distributed their ERC-20 tokens by participating in initial coin offering (ICO) activities. The vast majority of the time, the use of smart contracts makes it possible to conduct trustless financial transactions and token distributions in an effective manner.
Limitations
Humans are responsible for writing the computer code that makes up smart contracts. This exposes the code to multiple vulnerabilities and increases the likelihood of introducing flaws. In an ideal world, they would be created and implemented by experienced programmers; this is especially important when dealing with sensitive data or large sums of money.
Aside from that, many believe that centralized systems can deliver the majority of the answers and functionality provided by smart contracts. The primary distinction is that smart contracts' execution occurs not on a single server but throughout a decentralized peer-to-peer network. The fact that they are built on a distributed ledger also means that they are often either unchangeable or very difficult to alter.
Being unchanging may be a strength in some circumstances, but it can also be a severe weakness in others. For example, when a Decentralized Autonomous Organization (DAO) dubbed "The DAO" was hacked in 2016, millions of ether (ETH) were stolen owing to weaknesses in its smart contract design.
The developers were unable to make any changes to the code since their smart contract was immutable. This ultimately resulted in a hard fork, which resulted in the creation of a second Ethereum chain. To put it another way, one chain "reverted" the hack and gave the money back to the people who were entitled to it (this is part of the current Ethereum blockchain). The other chain came to the conclusion that it should not intervene with the hack since events that occur on a blockchain should never be subject to modification. The previous name for this chain is now Ethereum Classic.
It is essential to emphasize the fact that the issue did not originate with the Ethereum network. Instead, the issue was brought about by a flawed implementation of a smart contract.
One of the disadvantages of using smart contracts is that their legal standing is not entirely clear. Not only does it fall into a gray area of the law in most countries, but the way the law is set up now doesn't make it easy to use smart contracts.
For instance, many contracts provide that both parties must be able to provide valid identification and must be at least 18 years old. In conjunction with the pseudonymity offered by blockchain technology, the absence of middlemen may pose a danger to those standards. Even though there might be a way to solve this problem, the legal enforceability of smart contracts is still a big problem, especially in networks that don't have borders and are spread out.
Criticism
A number of proponents of blockchain technology consider smart contracts to be a solution that has the potential to quickly replace and automate a significant portion of our commercial and governmental institutions. While this is a possibility, it is unlikely that it will ever become the standard.
The use of smart contracts undoubtedly makes for an intriguing use of technology. However, because of their distributed, predictable, transparent, and to some extent immutable characteristics, smart contracts may not be as appealing in other contexts. The fundamental argument against smart contracts is that they are insufficient to address the majority of the current world's challenges.In fact, traditional server-based options may be more advantageous for some types of enterprises compared to smart contracts. Centralized servers are simpler and less expensive to operate. Additionally, they tend to show greater efficiency in terms of speed and communication across different networks (interoperability).
Closing thoughts
There is no question that smart contracts had a significant influence on the world of cryptocurrencies, and there is also no question that they completely transformed the blockchain industry. Even though end users may not interact directly with smart contracts, they are expected to power a wide range of applications in the near future, from financial services to control of supply chains.
The combination of blockchain technology and smart contracts has the potential to cause significant upheaval across practically all facets of our civilization. But only time will tell if these new technologies will be able to get around the problems that are stopping them from being used by many people.
That's all for today, see ya tomorrow
If you want more, be sure to follow us on:
NOSTR: croxroad@getalby.com
Youtube: @croxroadnews
Store: https://croxroad.store
Subscribe to CROX ROAD Bitcoin Only Daily Newsletter
https://www.croxroad.co/subscribe DISCLAIMER: None of this is financial advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. Please be careful and do your own research.
-