Limit Orders on Lykke 

Limit Orders on Lykke 

By Mihail Nikulin, Lykke co-founder and CTO

What is a limit order?
A limit order enables you to state the price that you are willing to pay for a particular asset. The order waits until someone comes along who is willing to sell or buy the asset at this price, and then the trade takes effect. 

Once you send a limit order, it becomes available to trigger trades with other market participants. The order can be triggered by multiple traders to cover the volume that you wish to buy or sell. 

You can cancel the limit order if you become unhappy with the price or if you do not wish to wait any longer.

Keep in mind that opening a limit order decreases your available trading balance.

Why limit orders took so long to implement
Our trading architecture combines a superfast centralized matching engine on the Lykke Exchange with the Lykke Wallet’s decentralized settlement capability to secure customer funds.

Every transaction must be signed on the client side, so that no one can withdraw the client’s money without this person’s signature, even if Lykke is compromised. This approach provides traders with ample security, but it poses interesting problems for implementing limit orders, since the execution of these orders requires settlement even when the client’s smartphone is offline.

Until the end of May of this year, every Lykke transaction was settled on the bitcoin blockchain as an atomic swap transaction, exchanging two assets between counterparties. The results of this were mixed. We experienced many settlement issues caused by the throughput limit on the bitcoin blockchain, not to mention the skyrocketing miners commission. 

To mitigate these issues, we launched offchain settlement at the end of May. Offchain improves settlement speed and enables us to introduce collateral flow for the settlement of limit orders. 

Collateral flow for limit orders
The collateral flow for limit orders proceeds like this:

When a client sends a buy limit order (such as to buy 1 BTC for 3000 USD; see Figure 1 below), this person also sends money to the exchange for the execution of the order as collateral. Because of offchain settlement, this transfer is confirmed within a second or two, after which the limit order is accepted by the matching engine.

If another client satisfies the limit order with a corresponding sell order, the settlement of the trade is triggered. To settle assets bought with limit orders, the client’s signature is requested with a push notification to this person’s smartphone. If the client is offline, settlement is pending until this person comes back online.

Canceling the order triggers the return of the remaining collateral to the client. 

ETH sell limit orders
Ethers limit orders are currently not available. While Ethereum transactions are settled on the blockchain, this process requires a different collateral flow implementation. We are working on that.

Lykke requires trust
When you place a limit order, you send money from your trading wallet to Lykke to cover 100 percent of the volume of the order, which means that you entrust Lykke to hold these funds as collateral. Until the limit order is executed or canceled, the amount of money to cover the order remains in the custody of the Lykke Exchange.

Why limit orders are not trustless
Potentially trustless limit orders based on smart contracts might be trustless for Ethereum-to-Ethereum trades (for example, ETH to ERC20 trades), but the same does not work for crosschain trades.

If you are selling ETH with a limit order for buying BTC, you would need to freeze Ethers in a smart contract. But the smart contract requires a proof of BTC settlement as the second leg of the trade on the Bitcoin blockchain to unlock the funds for your counterparty. There is a way to do so using BTCRelay, even though there are some restrictions. But in the opposite case when you are selling BTC for ETH with a limit order, you need to freeze BTC in a similar trustless way on Bitcoin blockchain. This is not doable with the Bitcoin blockchain currently.

At the end of the day the trustless limit order is what decentralized exchanges usually provide, but it works very slowly because of the settlement of each individual limit order on the blockchain.

Is it possible to have high-frequency trading with limit orders?
Placing or canceling a limit order triggers the settlement procedure, which leads to some latency, even though the order is executed without hitting the blockchain. We are planning to provide an API for high-frequency trading that assumes trusted deposits on the Lykke side. The trader should delegate the management of his or her funds to Lykke to have high-frequency trading enabled by the low latency API. 

What is the priority execution for limit orders
Currently it’s a price-time priority. We are planning to implement a price-spread-time algorithm in the future. See more details here.

User interface for limit orders
The basic form for limit orders is coming to the Lykke Wallet with the August 25 release. In the near future, we also plan to enable trading directly from charts. 

Comments 3
Arne Postma · 3:51 PM September 20, 2017 ·

could you inform me a bit more about your market making algorithms i found some info in this paper but i would like to know if these are open sourced? If yes, where can it be found? Arne

Arne Postma · 6:28 PM September 19, 2017 ·

will you offer rebates for adding liquidity in the order book?

Daniel Kurniadi Nyoto · 2:35 PM September 15, 2017 ·

If I understand correctly, it means the implication of not being trustless is if Lykke got hacked, potentially all collateral in all limit orders can be gone, and there is no way for Lykke to refund that?

Latest from Lykke.

Subscribe to our newsletter for the latest news, industry insights and product updates straight to your inbox.

Anonymity versus regulation in cryptocurrency trading: what’s the trend?

With mass adoption, hopefully, around the corner, a smaller and smaller proportion of the growing cryptocurrency user base knows where the debate about anonymity - regulation comes from.

Continue reading

Crypto exchange with 0 fees: a level playing field

Lykke Wallet is a blockchain-powered commission-free platform for cryptocurrency trading and forex, on which all exchange operations are executed without fee. At Lykke Wallet, users can trade with zero fee some 50+ cryptocurrencies including Bitcoin and 20+ forex pairs starting from as low as a 1 euro deposit. The 0 crypto fee policy is valid both for retail or corporate and API traders, who can take advantage of the zero taker and maker fees to execute their trading strategies. The very fact that Lykke Wallet is a free cryptocurrency trading platform, makes it different from the majority of other crypto exchanges with lowest fees. Indeed, we consider that the 0 trading fees are an important step in democratizing finance through blockchain and here’s a number of reasons why.

Continue reading

How to buy Cryptocurrency with Swiss Francs (and without Fees)

Are you wondering where and how to buy cryptocurrencies with Swiss francs with as low fees as possible? In this article, we will explain to you how to buy Bitcoin and other top crypto currencies directly with CHF and with no trading fees at Lykke Wallet.

Continue reading

Picking Richard’s brain

Richard is a pioneer in high-frequency finance. With Lykke, he pursues his ambition to transform financial markets into a seamless ecosystem resolving the inefficiencies of the current financial system. 

In the first segment of this short interview, Richard shares with us his views on financial markets’ fairness, the key factors for success in trading and API trading.

Continue reading

Algorithmic Trading

Do you trade with a plan? How many times have you gone back on your trading plan? Was it worth it? Well.. perhaps it is time you go full on with API trading. Continue reading while we digest some of the common issues and address some of the benefits of setting up your trading bot with Lykke.

Continue reading