follow us on twitter . like us on facebook . follow us on instagram . subscribe to our youtube channel . announcements on telegram channel . ask urgent question ONLY . Subscribe to our reddit . Altcoins Talks Shop Shop


This is an Ad. Advertised sites are not endorsement by our Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise Here Ads bidding Bidding Open

Author Topic: What are Smart Contracts and How Do They Work? (Examples & Challenges)  (Read 7584 times)

Offline Ozark

  • Hero Member
  • *
  • Activity: 1130
  • points:
    6028
  • Karma: 12
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: November 20, 2021, 03:05:37 PM
    • View Profile

  • Total Badges: 20
    Badges: (View All)
    10 Posts First Post Fifth year Anniversary
Smart contracts are a new technology that enables automatic negotiation, fulfillment and execution of agreement terms in a blockchain environment.


I recently asked a friend of mine what he thought of ‘Smart Contracts.’ He’s a developer and I figured he might have some interesting insight. To my surprise, he did not know what a smart contract was. I was especially surprised since we had spent over a year discussing cryptocurrencies, SEC regulation and many other things related to blockchains. How could someone knee deep in the computer industry not know what a smart contract is?

Well the truth is smart contracts may create more confusion among crypto enthusiasts than any other idea related to the industry. Therefore, it’s not an easy concept to explain, especially to those who just got a handle on what a blockchain is. Consequently, the concept is still shrouded in mystery. Hopefully, this article can clear that up a little.

What are Smart Contracts?

Smart contracts are a new technology that is only possible through the use of blockchains. While a garden-variety, standard contract outlines the terms of an agreement between parties and is often enforceable by law; a smart contract is digital, stored within a blockchain and enforces all aspects of the agreement with cryptographic code.

In other words, smart contracts are simply software programs, and like all programs, they execute exactly as they are supposed to by their programmers. Smart contracts read just like programmed applications: ‘If this happens, then do that.’

Basically, through elegant math, smart contracts can negotiate the terms of an agreement, automatically verify fulfillment and even execute the agreed terms-- all without the use of a central organization to approve whether a party completed their end of the agreement. Smart contracts make intermediaries like notaries, agents and lawyers nearly pointless.

I understand you may still be confused. Stay with me.

How do Smart Contracts work?

The idea of smart contracts was first conceived in 1993 by a computer scientist and cryptographer by the name of Nick Szabo.

In a 1994 essay, Nick wrote “The general objectives of smart contract design are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitration and enforcement costs, and other transaction costs. Some technologies that exist today can be considered as crude smart contracts, for example POS terminals and (credit) cards, EDI, and agoric allocation of public network bandwidth.”

Although smart contracts only really became possible with the creation of Bitcoin in 2009, it was Ethereum that embraced it wholly, making it possible to execute and store smart contracts within its distributed ledger. Ethereum’s platform was specifically designed for executing smart contracts, making both transactions and ICOs (Initial Coin Offerings) possible and seamless. In many ways, smart contracts are the building blocks of all blockchain technology. Furthermore, many exciting new blockchain startups are absolutely dependent on the revolution smart contracts are expected to create.

Just like there’s a network of nodes that validate bitcoin transactions, smart contracts also use a network of nodes to validate whether aspects of the agreement have been completed. They don’t need an intermediary like a lawyer to verify the existence of these aspects. These nodes and the code within the smart contracts provides the validation itself. This also makes smart contracts transparent and traceable by all the parties involved. Therefore, trust between parties is no longer a moot point. Lawyers may still be needed at some point, but much of the battle has been done.

Lastly, since a smart contract is embedded within a blockchain where all data is stored in a decentralized distributed manner, no one is in control of the money-- not until the contract’s terms are completed. This money is often the blockchain’s native cryptocurrency- like Ethereum’s Ether. It doesn’t get more trustless than that.

Examples of how you can use Smart Contracts

In many ways, smart contracts are like the contracts you might have signed to buy a car. Except now these contracts are automated and trust can be digitally secured.

Nick Szabo wrote in his paper, “We can extend the concept of smart contracts to property. Smart property might be created by embedding smart contracts in physical objects. These embedded protocols would automatically give control of the keys for operating the property to the agent who rightfully owns that property, based on the terms of the contract. For example, a car might be rendered inoperable unless the proper challenge-response protocol is completed with its rightful owner, preventing theft.

If a loan was taken out to buy that car, and the owner failed to make payments, the smart contract could automatically invoke a lien, which returns control of the car keys to the bank. This smart lien might be much cheaper and more effective than a repo man. Also needed is a protocol to provably remove the lien when the loan has been paid off, as well as hardship and operational exceptions. For example, it would be rude to revoke operation of the car while it's doing 75 down the freeway.”

Here are some examples of smart contracts:

Voting

Since the last very dramatic US presidential campaign, the integrity of the current voting system has been repeatedly challenged by politicians and voters. Is it rigged or isn’t it? With smart contracts, it will be impossible to rig it in any way.

If all votes were stored on a blockchain, it would be nearly impossible to hack and decode them. In addition, the automated nature of smart contracts can make the tedious process of voting much simpler and fully online. It may even boost the low turnout America usually gets. Blockchain startups like Horizon State want to enable transparent, unbiased voting in nations around the world.

Supply Chain

More often than not, supply chains are hampered by a paper-based system of contracts. These forms have to pass through many hands for sometimes even the simplest tasks. Theft, loss and fraud are quite common due to the increased exposure this system creates. The blockchain and smart contracts nullify this by providing a secure, transparent digital version to all parties. It can automate tasks and transactions, and even restrict behavior based on the rules stored within its code.

Automobiles

I recently was introduced to a friend’s newly born baby. He was maybe just a few months old. For some strange reason, one of my first thoughts was that by the time this child is old enough to drive, self-driving cars will be the norm. In fact, almost everything about cars will be automated. Smart contracts will be what drives this automation.

An example would be an insurance company charging rates based on the way customers are operating their vehicles. The vehicles would be the ones reporting this data to the insurance companies. A trippier example would be vehicles talking to other vehicles on the road-- like one allowing the other to make a lane change once certain conditions are met, like “If your passenger is late for work, plus has a route with worse traffic than mine, you can cut in front of me.”

Real Estate

Let’s suppose you rent an apartment for a week through airbnb, except this is a version of airbnb that exists on a blockchain in which you can pay in a cryptocurrency. After paying, you receive a digital receipt, as dictated within the code of the smart contract. The smart contract tracks whether you receive the “digital key” or not. If you don’t get this key by the specified date, the smart contract automatically gives you a refund.

Of course, these types of programs work best when items like house keys are digitally tied to the internet. That’s why the marriage of (IoT) Internet of Things and blockchain will be so huge in the future, enabling enormous transformations across industries.

For those of you who don’t know, the “Internet of Things” is the network of physical devices like home appliances that are embedded with software and sensors that enable them to connect and exchange data over the Internet.

Healthcare

Healthcare can be very complicated, and I’m not just talking politically. Smart contracts can definitely help streamline the process of authentication and authorization for insurance trials, patient data protection, regulation compliance and even healthcare supplies.

Finance

Banking seems to be the industry most open to blockchain and smart contract implementation. It is not hard to comprehend why when you consider the enormous amount of money that can be saved by automating various financial operations, including international transactions.

Legal Issues

As mentioned earlier, the traditional model of contracts often relies on lawyers and notaries to resolve conflicts and ensure all aspects of the agreement are met. However, smart contracts automate these steps in a traceable and transparent way. When you consider the enormous amount of money and time that can potentially be saved, smart contracts can make notaries and contract lawyers nearly obsolete.

Complications

As powerful as this new technology can be, we may still be several years away from implementing it across most industries. There are several reasons for this. For one thing, smart contracts can get extremely complicated. Smart contracts, more often than not, require more than one smart contract to complete tasks. A multitude of smart contracts linked together is often needed to cover all the scenarios that may occur. This can pose a challenge for programmers during the infant years of this technology. Artificial intelligence has the potential to streamline that process. Until then, expect the occasional error when dealing with highly complex transactions.

Second, as mentioned earlier, this technology works best with IoT. Without IoT, smart contracts themselves cannot interact with the real world. Smart contracts need an entity, sometimes referred to as an ‘oracle’ to let them know when a task is completed. This “single point of failure” can make a smart contract less decentralized and secure.

The third problem is probably the biggest. Smart contracts are programs. What if the program gets bugs? Afterall, it’s still humans constructing these programs and vulnerabilities are to be expected. When ethereum was first launched, it was a bug within its smart contract that allowed the easy theft of millions of dollars worth of ether. This led to the fork that created Ethereum Classic.

What if a party using a smart contract sends the wrong information? What if he or she sends the wrong house key to an airbnb customer? If there’s problems or mistakes with traditional contracts, parties could challenge them in court before events can take place, but with smart contracts, the contract is executed regardless.

These kinds of critical issues and much more make businesses uneasy about adapting smart contracts. However, most aficionados like myself have confidence that developers and AI will eventually figure all this out. Trial and error is their friend. After all, it took decades for the Internet to evolve into the beast it is today. And yet, the Internet still has its problems and complications. Online advertising anyone? Net neutrality?

Why Smart Contracts are our future

There is no doubt in my mind smart contracts will be a part of our future in one form or another. Even today, the positives far outweigh the negatives. Transparency, fraud reduction and immutability make smart contracts a credible alternative for most established businesses.

Here are additional benefits to using smart contracts in your business:

 @ Better customer service. Without the need for intermediaries to create trust, businesses can engage directly with customers.
 @ Employee departures don’t affect its functionality. Decentralization means   there is no need to worry about the loss of data. The blockchain and its smart contracts will  continue to function regardless.
 @ Cost reduction. Eliminating the middleman means less fees. How much does your lawyer charge again?
 @ Record keeping. Since smart contracts are implemented through blockchains, it means all data is efficiently chronologically stored and can be easily accessed. Your documents are duplicated many times over in every node within the network.
 @ Faster speed. Without the extra steps needed when incorporating middlemen in traditional contracts, tasks automated by smart contracts happen much faster.

Final Words

Blockchain technology is already impacting businesses around the world. Smart contracts make this possible. More importantly, promising use cases for smart contracts are laying the groundwork for new and exciting business ideas. So try not to think of smart contracts as job killers. Instead, think of smart contracts as job creators-- jobs yet to be imagined.

For those businesses that are scared of adopting this technology, I don’t blame you. Fortunately, some of the brightest minds in the world are fixing the glaring problems I mentioned earlier. It may take decades, but smart contracts will indeed become a powerful alternative for many of the systems in place across countless industries.


SOURCE

Altcoins Talks - Cryptocurrency Forum


For Monthly biddings Check Here


Offline JaniceFowler

  • 1st Step
  • *
  • Activity: 3
  • points:
    63
  • Karma: 0
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: April 15, 2019, 01:06:17 AM
    • View Profile

  • Total Badges: 6
    Badges: (View All)
    First Post Fourth year Anniversary Third year Anniversary
There are a lot of variants of such problems solutions. Nevertheless, if you are looking for the best area here, it is necessary to mention the one from the article.

Offline Minerok96

  • Baby Steps
  • *
  • Activity: 5
  • points:
    71
  • Karma: 0
  • cryptominer, x_x
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: April 10, 2019, 05:40:56 AM
    • View Profile

  • Total Badges: 7
    Badges: (View All)
    First Post Fourth year Anniversary Third year Anniversary
Hi! thank you for the work you have done and your explanation, it's great  8)

Offline CryptoYears

  • 1 strike
  • Sr. Member
  • *
  • Activity: 352
  • points:
    3833
  • Karma: -25
  • Trade Count: (0)
  • Referrals: 0
  • Last Active: February 25, 2022, 09:05:56 PM
    • View Profile

  • Total Badges: 14
    Badges: (View All)
    Sixth year Anniversary Fifth year Anniversary Fourth year Anniversary
These are very important aspects of the Crypto industry and it’s not so straightforward to learn about these. So, it’s very important we give proper time to it and make sure that we learn beyond parts.

I always stay in favour of learning and getting proper Crypto Guidance, because that’s the way one is capable of achieving type of results you want. I myself has given a lot of time to learning, and only then I found myself performing much better.

Offline Payme21

  • Full Member
  • *
  • Activity: 226
  • points:
    298
  • Karma: 1
  • Trade Count: (0)
  • Referrals: 4
  • Last Active: August 04, 2020, 09:52:34 AM
    • View Profile

  • Total Badges: 16
    Badges: (View All)
    10 Posts First Post Fifth year Anniversary
Thanks a bunch for this. It was indeed educative. Hoping for a day when smart contracts will be the norm so we can fully take advantages if all its advantages

Offline TheCBF

  • Baby Steps
  • *
  • Activity: 16
  • points:
    79
  • Karma: 0
  • CBF | FCB
  • Trade Count: (0)
  • Referrals: 1
  • Last Active: August 02, 2019, 12:03:11 PM
    • View Profile

  • Total Badges: 12
    Badges: (View All)
    10 Posts First Post Fourth year Anniversary
Hi Ozark,

Great post.

The Complications you mention are of particular note. While Solidity being a Turing complete language is offered up as a positive thing (which it is), it doesn't make it any easier to use. It's the ability of coders to write smart contracts in a perfect, bug free, efficient and compact that will always be the challenge. All software has bugs in it and that introduces the risk of financial loss. There are services to test the contracts, but then all software is tested and it still goes live with bugs. In the case of Ethereum, Smart Contracts can be deployed as small sets, thereby allowing upgrades with minimal disruption and they of course can inherit functionality from other contracts so that functionality can be modified if issues are found.

Interesting that you mention the use of IoT and the need for external oracles to provide state change data. This is so often overlooked. The Smart Contract can only know what's happening when it runs, but as they need to be called it's certainly a challenge to have a contract run on some change we care about. That means there's another script on a server somewhere that monitors the change of state and calls the contract. Web3JS is a good tool for this of course, but so is all the typical server, software, chron jobs, etc. we'd expect of a service. None of that goes away just because we wrote a few Smart Contracts.

Regards,

CBF

« Last Edit: July 11, 2019, 11:45:26 AM by TheCBF »
Cooperative Blockchain Foundation | Fundación cooperativa de blockchain | Fondation coopérative de blockchain
www.WeAreCBF.Org [nofollow]

 

ETH & ERC20 Tokens Donations: 0x2143F7146F0AadC0F9d85ea98F23273Da0e002Ab
BNB & BEP20 Tokens Donations: 0xcbDAB774B5659cB905d4db5487F9e2057b96147F
BTC Donations: bc1qjf99wr3dz9jn9fr43q28x0r50zeyxewcq8swng
BTC Tips for Moderators: 1Pz1S3d4Aiq7QE4m3MmuoUPEvKaAYbZRoG
Powered by SMFPacks Social Login Mod