What is a Smart Contract?

A Thread 🧵🧵 šŸ‘‡šŸ‘‡

1.

Yesterday, in the tweet below I stated that a Smart Contract is the building block or core component of a Decentralized Application.

Today, I will be giving an in-depth look at Smart Contracts; What they do, their features, how they work...

Let's go

https://t.co/GnmtEK5ikc
2.

Smart contracts are basically self-executing code hosted on the Blockchain.

In terms of being a contract, it a set of rules that executes when predefined conditions are met.

As for the part of being "Smart", It's not.

Take, for instance, let's look at an application like
3.

...GoFundMe(a centralized crowdfunding platform for donations, contribution) in terms of a smart contract.

The smart contract will be given the rules as follows:

"The benefactors will be required to send money to a particular public address(like an account number in terms
4.

of blockchain technology), then when the money gets to a particular amount let it be automatically sent to the beneficiaries' public address".

That's basically how smart contracts work even though there are more sophisticated applications.

So, what are some features?
5.

> Distributed
> Transparent
> Immutable

> Distributed

Since smart contracts are hosted on the blockchain which is decentralized, they are replicated and distributed in all nodes of the network.
6.

> Transparent

Since smart contracts are based on a public blockchain, their source code is not only immutable but also visible to anyone.

So, you could take the address of a smart contract to an explorer and the source code will be visible to you.
7.

> Immutable

As you may know, the blockchain is immutable so therefore anything hosted on the blockchain can't be changed.

How does a Smart Contract work?

Although there are other Blockchains that support smart contracts, I will be using Etherrum for this explanation
8.

Just as you may know from basic programming, every programming language needs an interpreter or compiler to run.

So, the Ethereum Blockchain provides the Ethereum Virtual Machine(EVM) which serves as an interpreter for the Solidity programming language and others.
9.

This EVM is present on every full node(a type of node that houses a full copy of the blockchain).

When the smart contract is deployed on the blockchain, it is given an address that will be used to communicate it and also view its code.
10.

These should give you a basic idea of how a smart contract works.

If you liked this thread, do well to like, retweet, and follow at @The_python_dev_.

If have any questions, feel free to come to my dm.

You May Also Like

And here they are...

THE WINNERS OF THE 24 HOUR STARTUP CHALLENGE

Remember, this money is just fun. If you launched a product (or even attempted a launch) - you did something worth MUCH more than $1,000.

#24hrstartup

The winners šŸ‘‡

#10

Lattes For Change - Skip a latte and save a life.

https://t.co/M75RAirZzs

@frantzfries built a platform where you can see how skipping your morning latte could do for the world.

A great product for a great cause.

Congrats Chris on winning $250!


#9

Instaland - Create amazing landing pages for your followers.

https://t.co/5KkveJTAsy

A team project! @bpmct and @BaileyPumfleet built a tool for social media influencers to create simple "swipe up" landing pages for followers.

Really impressive for 24 hours. Congrats!


#8

SayHenlo - Chat without distractions

https://t.co/og0B7gmkW6

Built by @DaltonEdwards, it's a platform for combatting conversation overload. This product was also coded exclusively from an iPad 😲

Dalton is a beast. I'm so excited he placed in the top 10.


#7

CoderStory - Learn to code from developers across the globe!

https://t.co/86Ay6nF4AY

Built by @jesswallaceuk, the project is focused on highlighting the experience of developers and people learning to code.

I wish this existed when I learned to code! Congrats on $250!!
Oh my Goodness!!!

I might have a panic attack due to excitement!!

Read this thread to the end...I just had an epiphany and my mind is blown. Actually, more than blown. More like OBLITERATED! This is the thing! This is the thing that will blow the entire thing out of the water!


Has this man been concealing his true identity?

Is this man a supposed 'dead' Seal Team Six soldier?

Witness protection to be kept safe until the right moment when all will be revealed?!

Who ELSE is alive that may have faked their death/gone into witness protection?


Were "golden tickets" inside the envelopes??


Are these "golden tickets" going to lead to their ultimate undoing?

Review crumbs on the board re: 'gold'.


#SEALTeam6 Trump re-tweeted this.