IDEX- A hybrid, semi-decentralized exchange solution in Etherum Family

in #stateofthedapps6 years ago (edited)

s06.png

-----------------------------------------------******--------------------------------------------------

https://github.com/idexio/idexd

-----------------------------------------------******--------------------------------------------------

Introduction

The idea of blockchain is always to bring decentralization into the fundamentals. Having a blockchain technology and a cryptocurrency whose invention was primarily based on "decentralization", if traded in centralized exchanges, then I must say "There is a conflict of interest".

After 2009, which witnessed the birth of the first ever cryptocurrency called Bitcoin, the spree of decentralization got extrapolated with many other cryptocurrencies in the subsequent years & the economy has grown into many fold since then. But the segment of cryptocurrency exchange is still a gray area and at least needs the security of the fund to be decentralized. A decentralized exchange is equally an essential requirement so that the decentralized cryptocurrencies can be used and traded in exchanges and a decentralized exchange can only justify the basis of blockchain technology.

But wait, Centralized exchanges are not that bad completely, there are some attributes of centralized exchanges which we still need to make our exchange experience better.

In order to understand the better side of both the types of exchanges(centralized & decentralized), let's have a comparative analysis on both the types of exchanges so that we can have a better understanding between the two and that can really address to "what type of exchange we really need".

s00.png

As per statistics, almost 99% of the cryptocurrencies are still being traded in centralized exchanges and the reasons for this are :-

(1) We did not have many decentralized exchanges until 2017-18, But after 2018-19, the decentralized exchanges started growing in numbers. That is a good sign but its just a beginning only and it is too early to call that we have an established foothold of decentralized exchanges.

(2) With the available decentralized exchanges, there is a shortage of liquidity and this is probably the major reason to "why decentralized exchanges are not gaining popularity" and in terms of liquidity, centralized exchanges have the upper hand.

(3) Very fast execution in centralized exchange. Very low latency.

So fundamentally we need a "decentralized exchange" which can ensure security of the fund & the end user is the only owner of the fund. On the other hand, in order to ensure ease of doing an exchange with speed and low latency, along with high liquidity, we need the experience of a "centralized exchange".

The liquidity issues can be solved in a decentralized exchanges(which is one of the major disadvantage) in two ways:-

(1) Establish a bridge among the various decentralized exchanges to ensure liquidity. But the big question will be how interoperable all the decentralized exchanges are? Have we converged to a point to say that, we have great interoperability? Probably No.

(2) Develop a hybrid mechanism which can leverage on the advantages of both centralized and decentralized exchanges which can offer the end a user a solution which is secured by decentralization and great user experience with enough liquidity, speed of execution with low latency, like a centralized exchange.

s01.png

IDEX as a featured dApp in State of the DAPPS

State of the DAPPS is a curated directory of decentralized applications. IDEX is a decentralized exchange for trading and exchanging ERC-20 tokens in Etherum Blockchain. It is listed as a featured dApp in StateoftheDAPPS and the current rank of this dApp is #8 at the time of writing this article. The daily, weekly monthly active users, transactions and volume, etc can be found in directory of StateoftheDAPPS.
s40.png

The existing issues in exchanging ERC20 tokens with ETH

The core issue pertaining to the exchange of ERC20 token within Etherum blockchain is that, when ever a trade is cancelled you are required to pay the gas fees and this is a more frequent problem.

s07.png

In decentralized exchange like EtherDelta, a trader always chase for a order-book fill up and most of the time it fails, reason being, the order is not updated until the transaction is processed through the network, leading to a situation where the orders are claimed by more than one party & leaving most of them with failed transactions.

s08.png

So a user can sign off on a trade but smart contract will broadcast that to the network on behalf of the user, so until it is broadcasted, the user can still rescind it. This is how IDEX is unique as a decentralized exchange and a better evolution as a decentralized exchange.

In existing decentralized exchanges, the traders must wait for the previous order to mine be before they can submit a new order. What about in case the Etherum blockchain goes with a backlog issue- the traders is such a case will be forced to lose the opportunity of a good market movement.

s09.png

Exchange model of IDEX

The exchange model of IDEX consist of :-
(1) Smart Contract
(2) Trading Engine
(3) Transaction Processing Arbiter

s39.png

Credits

(1) Smart Contract

The uniqueness of the IDEX smart contract is that it separates the act of trading in the exchange from the final settlement. When a user deposits from his wallet to IDEX smart contract, starts trading, the updation happens in real time but the broadcasting to the network is done by the exchange on behalf of the user. So this prevent the trader to rescind a completed order, however trader can still rescind a order if that it not broadcasted yet. This smart contract also prevent IDEX to create any unauthorized order. So the trading is done by the user where as the settlement is broadcasted by the exchange. This ensures real time order book updation and security of fund both.

(2) Trading Engine

The off-chain trading engine manages the user's exchange experience and it enhances the speed and real time interaction with a trade in the IDEX exchange.

(3) Transaction Processing Arbiter

It manages the sequence and order of the authorized transactions and ensures that each trade is mined in the correct order.

The combination of Smart Contract, Trading Engine and Transaction processing Arbiter in the model of IDEX exchange allows to deal with multiple markets in real time. This design also allow trader to cancel an order without the cost of gas fees.

Getting Started

In order to get started with IDEX , it requires either to create a new wallet or to unlock an existing wallet first. If you create a new wallet in IDEX then it will create one new ETH wallet for you and produce a private key and key store file. If you are connecting to an existing wallet, then there are four ways to unlock an existing wallet.

s10.png

After unlocking the wallet, you can see your wallet is connected and showing in the right hand top corner. You can also change the wallet and connect a different one, should you wish to do so. Once you have your wallet connected where you have ETH and ERC-20 tokens, the next step is to send those balances to the IDEX Smart contract to be able to trade.

s31.png

s32.png

Here is the detailed step by step guide for Deposit, Withdrawal of ETH and ERC-20 tokens from your wallet to IDEX smart contract & vice versa and also Transfer of funds from your wallet to another wallet.

At the top, you can see various tabs: TRADE, ORDERS, BALANCES. Under the tab BALANCES, you can see two options

  • Full Balances
  • Balance History

Go with Full Balances.

s33.png

You can notice so many ERC-20 tokens along ETH are displayed here. You need to query a particular token or you can query all. If you query all it will show all the quantities of the tokens that are held in your ETH address which is integrated with IDEX. So hit "Query All". Now it shows the Wallet Balance starting from ETH to all other ERC-20 tokens which you are holding.

s34.png

s35.png

If you wish to buy other ERC-20 token in IDEX, you have to send ETH from your wallet to IDEX smart contract. In a similar way, if you want to sell your ERC-20 tokens for ETH, you have to send the particular ERC-20 token to IDEX smart contract. It will cost gas fees, so make sure you have enough ETH balance to cover the gas fees. Ideally you must have at least 0.01 ETH to make the things work for you.

Now suppose you want to sell a particular ERC-20 token, then after query, hit the "Deposit" button, that will get you with a pop up with input field. In that field, you need to put the amount of the particular ERC-20 token or you may choose "Send Entire Balance", should you wish to do so. Then choose the gas price from the slider, after that click "Deposit".

s36.png

After that it will get you with a confirmation pop-up, review it whether the pop-up is correctly displaying the amount of the token you want to deposit or not. If everything is correct then click "Confirm".

s37.png

That will get you another pop up to inform you that the deposit is processing.

s38.png

s101.png

Now go to the BALANCES tab again and under that you can check with "Balance History", where you can see the pending deposit. Please note that ETH deposit happen in one transaction where as token deposit requires two transactions(first transaction is the asset contract call & second one is the actual transfer). If you have integrated Metamask or Ledger Nano S, then you have to approve the second transaction.

s102.png

Once the deposit is processed, you can see another pop up to inform you that the deposit is finished.

s103.png

Similarly when you want to withdraw from IDEX smart contract to your ETH wallet, you can navigate through BALANCES tab and under that you see "My Balances", click on that and find the asset which you wish to withdraw to your wallet. It will follow the same procedure: Amount to withdraw, Confirmation pop-up. Fill the amount and confirm that and then go to "Balance History" where you can check the status of your withdrawal. Clicking on the "Processing" will take you to the etherscan page where you can have further details of your status of the withdrwal.

If you want to transfer ETH & ERC-20 tokens to another address, then you can do that by again navigating to My Balances under BALANCES and then click on "Query All", if the balances are not showing. After querying the balances you can see Transfer button on the right of it. Click on that. Now you have a pop-up where you need to fill address where you want to send, the amount and the gas fees. Then you can hit the Transfer button, that will be followed with another pop-up to confirm the same. After confirming, the transaction will be sent to be mined.

Now if you want to trade ERC-20 token and ETH, then go to TRADE showing on the top. Then select particular ERC-20 token which you want to trade. Then it will display the chart and the order book. You can fill an existing order or you can also place your own order. If you are filling an existing order, then select the price from the order-book and fill the amount of token you wish to and then trade. If you are creating your own order, you can create a limit order, specify your price, fill the amount and then place your order(Buy or Sell).

s104.png

s105.png

If you click on Buy or Sell, then you will have a pop up to inform you that the order is just placed. If the order is matched then it will be sent to Etherum network to be mined. You can see the status by visiting the tab ORDERS and under that you can find Trade History. click on that to check the status.

  • If the trade is yet to be sent off to blockchain- Pending
  • If the trade is waiting to be mined- Processing
  • If it complete- Complete

Other features of IDEX

IDEX Trading Fees & Minimum Order Size

Normally in all exchanges the market maker fees is less than the market taker fees, as market maker brings liquidity to the exchange when they create an offer and the market taker fill that offer. In IDEX the market maker fee is 0.1% where as the market taker fee is 0.2%.

Also market taker covers the gas fees. So a trader when exchanges ERC-20 tokens for ETH, the amount of ETH deducted matches that of the gas fee. Similarly when exchanges ETH for ERC-20 tokens, IDEX deducts the equivalent amount of tokens based on the price of the asset in ETH.

The minimum order set up by the market maker must be at least 0.15 ETH and 0.05 ETH for that of market taker. This minimum order size is to ensure effective management of transaction fees. 0.05 ETH is roughly around 9 usd at the moment. So minimum order size of 9 usd worth is not bad either and it can also help the traders who deal with small amount. The minimum withdrawal is 0.04 ETH.

Security

Every time a user perform a transaction, it is needed to sign that transaction to move from wallet to smart contract and vice versa, so control of the fund is at the hand of the user. If the fund is in the smart contract, that does not mean that it is held in a central account. So even if the IDEX website is compromised, the fund is still safe.

However if we can further scrutiny the type of wallet integration with IDEX, then definitely we can assess which one is more secure.

The wallet integration with IDEX has four options:-
(1) Create a New Wallet
(2) Upload keystore file or paste private key
(3) Unlock Metamask wallet
(4) Integrate Ledger Nano S

Out of these four options, Metamask can be vulnerable to malware, manually entering private key may be vulnerable to phishing attack, so the most ideal option in the context of security is to integrate with Ledger Nano S as that will insulate the user from risk like malware and phishing attacks.

Supported Cryptocurrencies

IDEX offers the decentralized exchange facility exclusively within Etherum and ERC-20 tokens only.

Customer Support

With the Customer Support interface in the website of IDEX, a trader can seek for clarification of his queries and concern to the support staff. But it is always good on the part of the trader to go through the comprehensive FAQ page as that can give a better insight to the various key elements which the trader will experience in real trading. So for a better insight it always better to go with FAQ page first & then as and when the concern emerge in, that can be sorted out with the support staff at the chat interface.

Pros & Cons of IDEX

s05.png

Comparison of IDEX with Ox protocol & EtherDelta

Ox protocol is a protocol upon which the decentralized exchanges are built. Ox protocol in itself is a great thing for decentralized exchange community especially in enhancing shared liquidity through open order book and it solved the existing issue of EtherDelta where liquidity has always remained a major issue. But the open order book also resulted in problems like order collision & griefing. IDEX has definitely solved the problem of order collision & griefing while keeping the liquidity intact.

The cancelled order costing gas fees was a headache in EtherDelta, Thanks to IDEX for solving that.

Ox protocol is susceptible to backlogs of Etherum blockchain where as IDEX is not affected by such backlogs.

So in the segment of decentralized exchanges, IDEX is a better evolution as a decentralized exchange.

s02.png

Evaluation & Rating

I have evaluated IDEX as a decentralized exchange solution based upon many parameters as given below and the score has been given out of 5. The overall average rating is found to be 4.25 star out of 5 star in my assessment.

s03.png
s04.png

Conclusion

The decentralized exchanges are evolving and people in crypto ecosystem really look forward to decentralized exchanges but thy can only prefer when it can offer the same exchange experience like the centralized exchanges along with decentralized security of fund.

The design of IDEX is somewhat looking to cater the traders in that way. If we look back at the evolution of decentralized exchanges, EtherDelta suffered with liquidity issue, then we come across the concept like shared liquidity by Ox protocol, which really solved the liquidity issue, but resulted in Order collisions and griefing. Then we have now IDEX which solved the major issue of decentralized exchange viz no gas cost in cancellation, no order collisions & griefing, real-time order book update, speed of trading, liquidity, etc. IDEX has tried to cover all the core issues of decentralized exchanges to make the user experience better. I can say, IDEX has arrived, after seeing the good average daily trading volume of ERC20 token in IDEX. So far IDEX is the better evolution of a decentralized exchange within Etherum family.


References


State of the DAAPS


Task Reference


Images & Logos have been taken from the respective official sites. The evaluation chart, comparative analysis in tabular form and in graphical form are prepared by me.

Sort:  

Hello @sthitaprajna. Nice review! I am just learning about this project. Personally, I think it is a great project. Cool approach and very nice idea. The team behind the project must be doing a great deal of work.
I am impressed with this review. So many aspects of the project where highlighted which is great. That's said, on the content side, you have used images to represent some text which is not advisable. Using a proper markdown would make your work look more professional. Cite them if you must to allow your reader to go deep in research if they want to.

Overall. Nice information. I am looking forward to seeing more reviews from you on the blog section.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @knowledges! Keep up the good work!

Hi @sthitaprajna!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @sthitaprajna! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 10000 upvotes. Your next target is to reach 11000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Hey, @sthitaprajna!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!