Having trouble understanding the crypto universe? Worry not. We are about to make it as simple as possible so stick with us and learn the ins and outs of smart contracts in the simplest possible way. Let’s get to it then:

What is a smart contract?

A smart contract is a piece of code that does something if something else happens.

This way of operating has earned it the name “if this, then that”.

One could argue that smart contracts were the vision of Nick Szabo, the man who coined the term in the early 1990s, before any blockchain technology had ever been invented. At the time, he described them as "a set of promises, specified in digital form, including protocols within which the parties perform on these promises."

How and where can one write them?

They are typically written on the  Ethereum  network and by means of something called Solidity.

Are there any inherent things one should know of?

Yes. Two of them.

1. Smart Contracts are immutable

They cannot change. They are programmed do something when they get triggered (“if this, then that”).

As smart contracts are coded on the blockchain and like the blockchain they cannot be changed even if there is a bug or inefficiency present in its code.

They can, however, be “replaced” by a new contract and whoever makes it, must tell people not to use the old version.

2. Smart Contracts are distributed

This means that there are no discrepancies.

Smart contracts are an agreement between parties online that can be automatically executed if certain conditions are met.

They are designed to eliminate human error and issues. As the code is distributed between a global network of computers, everyone can actually see what terms were agreed upon.

So, how exactly do they work?

Let’s go over some examples of the purposes smart contracts can have.

When writing a smart contract, the conditions in which it resolves can be endless.

They can range between but are not limited to these examples:

·“I will give you 10 ETH (Ethereum)” and in turn “You will give me 30000 ADA (Cardano)”

·“A certain number of tokens will be wired to an account if you reach a certain verifiable goal within or without a timeframe (ex: getting people to sign up for something)”

·“If X happens, you will receive Y”

·“If a predetermined address reaches a certain point (such as, for example, 100 ETH), every donator will receive a portion of something, such as, an NFT”

Here are more concrete examples of its applications:

Token Switching:

Via smart contracts one can create pools of money with pairs of tokens, allowing users to switch out one token for another. And as one increases in volume, the price of the other will also increase as means of keeping steady value in the pool.

This is extremely valuable for day traders and investors who wish to get into a specific coin but isn’t currently feature on their preferred exchanges.

Flash loans:

What if we told you, you could borrow 1 million dollars without any money down? Well, you can, provided you write a smart contract which pays it back on the exact same minute or transaction block, and/or overcollateralize it.

Those are the only catches.

And we know you might be wondering why on earth would someone do a minute loan of millions of dollars. The answer is simple: speculation. You can buy one coin on a platform and sell it for a higher price on another, return the money and pocket the profit.

The smart contract can even check itself by running a simulation of what you programmed and tell you whether whatever you programmed it to do will, in fact, be possible to do and the money will be repaid to the lender.

This procedure is completely impossible to do with traditional finance, but blockchain technology makes it not only simple, but also a daily occurrence.

Wrapping up

Smart contracts are the future, and we highly recommend you get acquainted to them because its adoption and use is already underway.

Being proactive with smart contracts might be a fun route to take as you’ll be versed when they eventually see widespread usage.

Keep an eye out for them and be prepared, because right now it’s a matter of time until they take over.