Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
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.
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 an open protocol that provides you the architecture to enable decentralised trading. In other words you can build a decentralised exchange using 0x APIs.
What is a Decentralised Exchange?
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.
With the help of 0x, 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.
Claps Please đ , Thank You đ. Follow us Hackernoon 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.
How Can 0x Help You Build Decentralised Applications was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.