LQDEX, a decentralized, trustless, cross-chain digital asset exchange has announced the direct integration of crypto exchange EtherDelta on LQDEX Bridge. Since November 1st, 2018, the LQDEX Bridge has been available on testnet.

The LQDEX team is now hard at work resolving UI/UX issues with the integration. The mainnet launch of LQDEX Bridge is scheduled to commence during the next several weeks.

LQDEX Bridge features a simplistic design, which is dictated by EtherDelta’s smart code for posting and filling an order.

See below: the initial order page where there are options to post an order or bid on the EtherDelta order books directly.

Order Step 1: Select the Bid

Most of the input elements in the above the screen are self-explanatory. It shows that LQDEX owns 0.0001 LQ-BTC and they are about to bid on buying 0.001 LQ-LTC. This is just bidding and not filling an order as it just placing a user’s bid on EtherDelta’s order books. Metamask is required for using EtherDelta integration.

Order Step 2: Approve the token amount

The next step in the process is to approve the specific amount of LQ-BTC that you own to EtherDelta’s contract address.

As you can see above, LQDEX’s Ethereum address is automatically picked up from the Metamask login. Here, LQDEX is about to approve 0.0001 LQ-BTC to EtherDelta contract as the owner. Once the approve button is selected, Metamask will be used to sign and send the transaction to the LQ-BTC token contract to approve.

The next step in the process is to deposit the tokens to the EtherDelta contract in which EtherDelta’s deposit function will be called.

The contract code where Bridge integrates with EtherDelta for depositing LQ-BTC that is minted by Bridge is shown below.

function depositToken(address token, uint amount) {
//remember to call Token(address).approve(this, amount) or this contract will not be able to do the transfer on your behalf.
if (token==0) throw;
if (!Token(token).transferFrom(msg.sender, this, amount)) throw;
tokens[token][msg.sender] = safeAdd(tokens[token][msg.sender], amount);
Deposit(token, msg.sender, amount, tokens[token][msg.sender]);

Order Step 3: Deposit the LQ-BTC token

The image above enables users to deposit their tokens to the EtherDelta contract directly — this must be done after at least deposit amount of tokens have been approved in the previous step, as EtherDelta’s contract uses the transferFrom function. The Etherscan URL for the approval step is also provided. It shows that LQDEX is about to deposit 0.0001 LQ-BTC to the EtherDelta contract.

Order Step 4:

This is the final step in which the order (bid) will post on the EtherDelta’s order books. The following screenshot shows this final step:

As shown in the above screenshot, by posting a bid on the order books of EtherDelta, the user is agreeing to sell 0.0001 LQ-BTC for 0.001 LQ-LTC as long as there is a taker willing to fill the order.

To reemphasize, all of the above steps require Metamask for signing the transaction, calling the EtherDelta contract method. This step will happen after approval and token deposit step.

The final confirmation screen is shown below — the order has been posted on EtherDelta. Please check the EtherScan URLs below to confirm the order was placed.

The above screenshot is the final screen that confirms that your bid was safely placed on the EtherDelta’s order book.

LQDEX Bridge provides users the ability to fill the orders directly from the Bridge UI, and only orders that have been bid from the Bridge UI are available to fill on the Bridge UI.

The following set of steps are required for filling an existing order that is on EtherDelta’s order book. Although these orders can be posted or filled without using Bridge integration, we went a step ahead to provide smooth integration.

Fill Step 1: Choosing the order to fill page.

The above screenshot shows that there are several orders that are sorted by time added. Users can select any of the above active orders to fill, unless they have been filled by other app or EtherDelta, these orders should be active.

LQDEX Bridge will periodically check which orders are still active on EtherDelta, in the case that orders have been filled outside of the Bridge UI.

Suppose LQDEX chooses to fill the first order in the list, the next step would approve the 0.001 LQ-LTC token.

Fill Step 2: Approve LQ-LTC token.

Once approve button is clicked, Metamask pops up requesting a signature for the transaction to approve the tokens to be filled. Below shows the screenshot of it.

This process is similar to approving the tokens during the posting a bid phase.

Fill Step 3: Deposit the filling token.

This step involves depositing the exact amount of tokens necessary to fill the order — at this LQDEX is not supporting partial orders but the team currently is developing the capabilities to do so.

The deposit screen (captured above) shows how much of LQ-LTC a user is depositing, and from which Ethereum address. This is pulled from the base account on Metamask.

The final two steps are similar to the order flow.

Above is the final confirmation screen that is showing the status of order fill.

The LQDEX team also reported that they will be adding other coins such as Dash, Monero to its list of supported coins in the near future.

Source link


Please enter your comment!
Please enter your name here