Basics of Financial Smart Contracts

Compared to one week ago a single Bitcoin has lost around 14 percent of its value, allegedly due to the Alibaba IPO. Regardless of the cause, it is a typical example of the price volatility inherent to cryptocurrencies. This is further exemplified by the fact that one Bitcoin can currently be bought for around $400 each, but was trading at more than double this amount at the start of the year. To eliminate this price volatility, market participants can turn to financial derivatives. Futures Contracts, for example, can be used to fix a price for a certain quantity of Bitcoin on a future date. But in order to trade these contracts, the involvement of a third party is required.

Derivatives and Smart Contracts

Cryptocurrency exchange OKCoin is one exchange that currently offers Futures trading, but this type of derivative requires users to hold a certain amount of margin in their account. If the exchange were to default, users would lose both their contract (protection) and their deposited margin. The derivative thus might eliminate price risk in theory, but due to the involvement of a third party counterparty risk is introduced.

The introduction of so called “smart contracts” could change the previous. A smart contract is “a computer protocol that facilitates, verifies and enforces contracts.” It is also part of the wider development that the concept of blockchain technology is being applied to more than just money. By applying it to financial derivatives, or financial instruments in general, contracts could be enforced by the decentralized network rather than a specific exchange. Price risk could thus be eliminated without trading the risk for counterparty risk, and also costs could be significantly reduced. But how would such a contract look?

Building a Basic Contract

Fortunately, financial contracts are the easiest application of smart contracts. To replicate the price fixing effect of a Futures Contract, two parties could agree to one party paying the contract seller a certain amount of dollars’ worth of Bitcoin. Both parties would then be required to lock in a certain amount of Bitcoins, and the buyer will receive what is left after paying the seller. Effectively, this fixes the price for the seller while providing a leveraged long position to the buyer. The next step is to create a reference that determines the value of the contract to both parties. This is the most tricky part, as it requires data such as the USD/BTC rate from an external source. Once the reference is set, the protocol could re-calculate the value of the contract at fixed intervals and settle the differences.

To add an example, consider a buyer that agrees to paying the seller $400 worth of Bitcoin while the price is also at $400. Both parties put in a margin of one Bitcoin. If the value of a Bitcoin drops to $200, the protocol will determine that the seller is now entitled to 2 coins (equal to $400 in value). The buyer will have zero coins and thus lose $400, while the actual price has only fallen $200. Should the price increase to $600, then the seller will only have to receive two thirds of one coin to get the agreed $400. The buyer will receive the remaining 0.33 coins and have 1.33 coins in total worth $800, or equal to a $400 gain. Again, the price has only changed by $200. Obviously, this is far from a real Futures Contract (just on one side), but it shows how a very basic smart contract with minimal inputs can provide both hedging and speculative properties, and without counterparty risk. There are also virtually no costs involved, hence this type of contracts may play a big role in the future of both cryptocurrencies and finance.

Take a second to support Digiconomist on Patreon!
Become a patron at Patreon!