We usually hear about Bitcoin as a currency, which, in conjunction with the technology that supports its operations (Blockchain), allows you to send money quickly, easily and economically. Nothing further from reality, this technology also has other uses. For example, we can use smarts contracts to modulate transactions based on the levels of Trust of the parties involved.

Usually systems like PayPal use type systems escrow service. This helps you deal with the problem of trust between the agents involved in the transaction. For this, a intermediary who has full control over the transaction, exercising the role of referee, to prevent malicious behavior.

However, we do not have to go to large companies or complex systems developed based on high security standards to see systems based on a trusted intermediary. Instead, we can find a multitude of systems in our daily life where we can see them present.

Let's imagine for a moment that we go to a vending machine to buy a soda. It is a contract in which we exchange money in cash (€ 1) for a good (soda). The machine is responsible for checking the validity of the funds entered. All this thanks to a software that is in charge of verifying the process. This software is the one in charge of validating or canceling the transaction. Despite this, it is possible that the machine will fail, and because the product gets stuck, we will not receive either the good or our money.

If we want to carry out the transaction with a relative or someone you know, whom we trust, we will not need to use this type of trusted intermediaries, we would directly give you € 1 for the refreshment.

Advantages of smarts contracts

The main advantage that the use of intermediaries gives us is the speed (when trusting that intermediary, the transaction becomes instantaneous), as well as, obviously, the fullfilment of security requirements sometimes the level of uncertainty is lower.

This also has a main disadvantage, the loss of privacy, and sometimes, the security, if this trusted intermediary turns out to operate in a questionable way, putting at risk the funds of his clients, as could be the case of the bankruptcy and “corralito” of Mt.Gox (the vending machine that keeps your funds and does not provide you the service), Exchange that allowed to exchange FIAT money for Bitcoins, without having to resort to face-to-face exchanges with third parties that we do not trust.

The technology of Bitcoin (Blockchain), as well as other projects such as Ethereum, NXT or Ripple, allow these trust relationships to be decentralized. We went from trusting an individual, company or institution, to trusting a decentralized, autonomous, distributed system with pre-established transparent rules that anyone can check, and that no one can alter. In short, we transfer the trust of a human being to a code.

This allows to greatly simplify the number of processes and factors involved in a transaction. It is the protocol itself that verifies and enforces the contract to both parties, without even requiring a contractual clause signed by them.

What capacity can smart contracts offer in Bitcoin?

A simplified example of the use of this technology would be to bet 5 bitcoins against a third party (it could be a friend or a company) that the Tesla price will go up by at least 2,5% in the next 4 weeks. To do this we would create a neutral account controlled by a smart contract. In this account each of the participants of the bet (contract without signed clause) must send 5 bitcoins.

When the 4 weeks have passed, the contract will automatically review how much Tesla shares have risen. For this, the nodes, which function as a property registry, will verify this information that has been programmed in the smart contract. Once the process is done, it will be the same smart contract that deposits the winnings into the winner's account, autonomously.

This simulation would be nothing more than a futures contract, a habitual operation and accessible to anyone. But it is a clear demonstration of the main possible implementations for smart contracts. However, this does not limit its capabilities. We can apply the system to stocks, indices and bonds among other financial instruments, where we would endow Bitcoins with attributes. An example of this type of functions we already see in the well-known Colored Coins.

If you have been wanting to know more, you can not miss the spectacular post that we have prepared explaining the smart contracts in depth and with use cases: Smarts contracts in depth: What are they, how do they work and what do they contribute??