LQDEX
LQDEX
Sep 21, 2018 · 3 min read

The first two technical blogs addressed the primary components of LQDEX Bridge.

LQDEX Bridge can be used for all Ethereum decentralized exchanges (DEX), not just EtherDelta, as Bridge’s sole purpose is to tokenize non-ERC20 assets. As an example and demonstrable feature, we built direct integration to EtherDelta’s smart contract.

In this blog, we will explain the trading components of LQDEX Bridge, where traders can place orders directly into EtherDelta and fill orders that originated on Bridge. Although users can directly trade the ERC20 LQ-Assets from EtherDelta without using the Bridge’s trading UI, we wanted to offer potential Bridge users the ability to trade them directly from the Bridge. This part of the trade flow requires MetaMask for signing the following transactions:

  1. Approve
  2. Deposit
  3. Order
  4. Trade

Placing An Order Into EtherDelta Through Bridge:

The following screen displays how traders can add an order directly to EtherDelta’s order books. The one condition is that users should have a balance in LQ tokens (e.g. LQ-BTC, LQ-LTC etc.) This is so traders can actually place an order against any ERC20 tokens listed on EtherDelta. Bridge will maintain an internal database of orders that originates from the Bridge itself in order to provide options to fill the existing orders.

ERC20 token contracts have the two following functions that EtherDelta’s smart contract utilizes:

  1. Approve X tokens to EtherDelta’s contract address by the owner of the tokens.
  2. Deposit X (or anything less than approval amount) to EtherDelta’s contract address.

The above steps must be in order because the deposit function of EtherDelta’s contract requires the tokens to be approved before it is transferred to its own address.

Bridge provides the following functionalities to directly accomplish, approve, and deposit to EtherDelta’s contract before placing an order:

  1. Approve: As seen below it has two inputs (i.e your specific Ethereum address holding LQ-BTC) and the amount you are willing to approve using MetaMask.

2) Deposit: Bridge makes it easy for users to deposit their tokens directly to EtherDelta’s contract before placing or filling an order.

To avoid any confusion, Bridge provides the ability to fill orders that have originated only from LQDEX Bridge. Pictured below is the fill screen for an existing order:

Fill flow, which ends up calling EtherDelta’s trade function will also need to have the filling token be approved and deposited. Therefore, the fill flow will also involve the approval and deposit screens for the filling token, similar to the order flow. Then from the Bridge you can post the trade to EtherDelta through the following screen:

As we near the launch of Bridge version 1.0, the LQDEX development team is focused on testing and adding user-friendly features to the flows of Bridge to eliminate any distraction or unnecessary UI components.

We aspire to have a complete, functioning version of Bridge that includes the following:

  1. Minting ERC20 version of Bitcoin, LiteCoin, ZCash, BCash, etc.
  2. Withdrawing ERC20 version of the above
  3. Placing Order on EtherDelta for ERC20 vs Non-ERC20 versions
  4. Filling Orders on Bridge/EtherDelta Order Book

Connect with LQDEX:
Telegram | Twitter | Reddit | Email

LQDEX

LQDEX (pronounced "liquid-ex") is a decentralized, trustless, cross-chain digital asset exchange.

LQDEX

Written by

LQDEX

LQDEX (pronounced "liquid-ex") is a decentralized, trustless, cross-chain digital asset exchange. LQDEX.com

LQDEX

LQDEX

LQDEX (pronounced "liquid-ex") is a decentralized, trustless, cross-chain digital asset exchange.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade