The Pioneers of Programmable Money, Introducing 0x

in #cryptocurrency6 years ago

If you give someone $50 and instruct them to only use it to buy healthy food. They can choose to ignore the instruction and lie to you. You won’t even know about it.

In our day to day transactions, we expect people to satisfy our instructions. When they break those instructions, you are likely to face a loss.

What if we can strictly enforce instructions in our transactions?
Ethereum is a cryptocurrency that provides you with a system to facilitate transactions only when a given set of instructions are satisfied. The system is transparent because it keeps a log of the decision making process.

If you are funding a non-profit, you can provide an instruction to release funds only if the organization reach the target of sheltering a thousand people.

The beauty is you can have more instructions, you can also instruct to release half the funds if 500 people are sheltered.

Hence, we have the ability to program money that can move at the speed of computers.Currently, money moves according to the speed of people involved.

Let’s take startup fundraising as an example. After you convince an angel investor or a venture capitalist, it would take three to four months for the process to complete and then money is transferred.

On Ethereum you can raise investments in few hours.
You can instruct the Ethereum computer through a smart contract to issue the investor a token when he transfers money. The investor will be able to redeem the token for a product or service your company provides in the future.
Presently there are more than 18,000 tokens on the Ethereum platform which are worth several billion dollars.

People will buy your tokens for two reasons.

  • They want to redeem your service on a future date.

  • They believe in your idea and expect its price to increase in the future and they can exchange it for profit.

Your customers are likely to hold tokens of other companies. If they are frequent traders they are likely to keep them in exchanges.

Keeping tokens in centeralised exchanges is a bad idea. The following is a list of attacks on centeralised exchanges. If your tokens are stolen, your company can be at risk.

If you have instructed your Ethereum contract to follow instructions of your majority stakeholders, hackers will dictate your company’s terms.

Centeralised exchanges are closed systems. An open system like Ethereum is easily extendable since anyone is allowed to interface with it to build applications.In a closed exchange, the company can choose to extend only certain functionalities to a certain set of people. Hence, it’s hard to build autonomous applications on closed systems. Now, how do we solve the problem of security and closed system?

Decentralised Exchanges

In a decentralized exchange, trading happens directly between people’s wallets. The decenteralised exchange doesn’t hold their user’s assets.

Traders create an order at the price in which they want to buy or sell and pre-authorises a transaction. The order is broadcasted through out the network, traders who are willing to counter the order fills it.

If Sara wants to exchange BAT for ETH, she specifies the price at which wants to sell it and create an order in a decentralized exchange. The decentralised exchange pings her wallet to take her approval in order to pre-authorise the transaction.

After her approval, the order is visible to other traders who can choose to fill the trade. Mark chooses to fill the trade, he authorizes the transaction through his wallet.

The trade happens, Sara’s BAT token get transferred to Mark’s wallet and his ETH is sent to her wallet. The trade didn’t require a middleman to hold tokens.

Key Features of Decentralised Exchanges

  • The security risk is minimised because no assets are held.

  • Trading happens faster because the time taken to transfer assets to exchanges is eliminated.

  • Governments cannot regulate or ban it since the Ethereum system approves only decisions given by the majority stakeholders.

  • The cost involved in maintaining a decentralized exchange is drastically less when compared to managing centralized ones.

  • The trading fee is comparatively less because the infrastructure costs are optimised and the withdrawal fee is eliminated.

  • Decentralised exchanges are also extendible since it supports application integration.

  • It is an open platform and anyone can build relayers/services on top of it.

Introducing 0x

Open frameworks played an important role on the internet we see today. If you want to build a web app from scratch you have to do a lot of things yourself (listening to requests from port 80, writing a wrapper to interact with your database, etc).

But, people hardly code from scratch. Instead, they use MVP frameworks like Laravel, CodeIgniter, Django, Flask, etc. You can reuse their code which was refined over time by the community. This process can save you time and help you take your ideas to market faster.

Now back to programmable money!

Building autonomous systems that can facilitate transactions on Ethereum from scratch is hard and time-consuming. Your code needs to be optimised because you have to pay for the computational power utilised.

0x is a protocol that takes care of the core architecture. Hence you can focus on the core business logic and worry less about the architecture. 0x smart contracts are rent free and open source. It is backed by a strong community who continuously refine and optimise its code.

You can use their APIs to easily program money or even build a decentralised exchange/relayer. We already have a lot of projects built on top of 0x. Radar Relay, ERC Dex, DDEX, Paradex (Acquired by Coinbase) are the popular relayers built on 0x.

They are called relayers because they use 0x’s infrastructure to enable trading. These relayers can charge its users a fee for its services. This is a win-win situation for both 0x and relayers because they will individually market and compete to build quality services on top of 0x.

When relayers attract more users, 0x will start growing as an open platform. This would also enhance 0x architecture since its open source and contributed by the community. Relayers thus don’t have to worry about maintenance and system upgrades, they can focus on the core business model.

How Does Trading Happen on 0x?
In order for the trading to happen, we need a system to create, match and fill orders. As discussed in the earlier example, Sara creates the order and Mark sees the order and chooses to fill it.

These created orders need not be filled. Frequently writing data on Ethereum is inefficient and costly. 0x uses a brilliant approach and take the order creating, matching and filling process off-chain.

0x matches orders by broadcasting signed messages across the network, only when an order is filled, trade is executed on the blockchain. This approach reduces the load on the blockchain and enables efficient trading.

The Four Key Components of 0x Protocol

0x protocol is made up of four key components. Makers, takers, relayers and smart contracts. Let’s see how these components worth together to enable decentralized trading.

Relayers offers interfaces(web or mobile apps) to users. There is a fee for using the 0x platform which needs to be paid using ZRX. Relayers offer competitive pricing to its users.

The makers are users who want to sell or buy tokens. In one of the earlier examples we discussed, Sara is a maker who wants to trader her BAT tokens. Makers use the relayer’s interface(eg. Radar Relay) to create orders by authorizing the transaction using their private keys.

The order will contain parameters like the tokens they like to trade, the price at which they want to buy or sell, the relayer fee and time in which the order will expire if it’s not filled.

Relayers validates the maker’s order and appends it to their order book. These orders are also visible to other traders using the relayer. When a trader chooses to fill the order created by the maker he becomes a taker. Some relayers automatically matchmakers who make opposite orders.

Once the order is matched, the Ethereum smart contract executes the order on-chain. Tokens get exchanged directly between the wallets of maker and taker. The relayer receives the agreed amount of fee.

Relayers are only one of the use cases of 0x, the potential applications of 0x are infinite, let’s have a look at some of the application.

Applications of 0x

The process of creating a decenteralised organization on Ethereum, issuing tokens, developing code to manage the governance by voting, etc requires technical resources. It’s also time-consuming and costly.

Aragon is a decentralised application that uses 0x protocol to help users easily built decentralised organisations on Ethereum.

Fintech products that help people invest their money efficiently aren’t something new. However, these products lack transparency.

Auctus is retirement planning platform that makes use of the 0x protocol. You get human and robotic advisory to help you manage your assets efficiently. Advisors are incentivised based on their advice.

A lot of experts who make predictions, most of these predictions fail. What if we can make them accountable for their predictions?
Augur is a prediction market platform that uses 0x protocol. An expert can make predictions on the platform by holding their money. If their prediction comes true they are incentivised else they lose their money.

The kind of applications that can be built on 0x is vast. We are yet to see its true potential. You can have a look at the story “18 Ideas for 0x Relayers in 2018” written by Tom Schmidt from the 0x team.

This story is part of our “Deep Dive Into ERC20 Ecosystem” Series. The second part of the story will be published soon. In the next story, we will be reviewing relayers built on top of 0x.

Votes Please 👏 , Thank You 😊. Follow us OnChainLabs! and me (Febin John James!) for more stories.

We are also taking an initiative to bring people working in the crypto space closer. If you are a developer, designer, marketer, writer, trader, entrepreneur, etc in the crypto-space please fill this form!. We will curate the list and share it with you, that can help you build your network.

Sort:  

Coins mentioned in post:

CoinPrice (USD)📉 24h📉 7d
ANTAragon1.890$-12.8%-22.19%
BATBasic Attention Token0.248$-18.0%3.39%
ETHEthereum466.833$-11.36%-5.9%
REPAugur30.309$-12.67%-8.35%
ZRX0x0.723$-14.88%-19.46%

Coin Marketplace

STEEM 0.17
TRX 0.12
JST 0.027
BTC 54917.96
ETH 2851.40
USDT 1.00
SBD 2.21