90% Fill Market Buy Orders

Why Are Market Buy Orders Only Being 90% Filled?

In some cases, rhino.fi only executes approximately 90% of your market buy order. This article will explain why this happens, and outline two of the potential remedies that the rhino.fi team is exploring.

Background

Traders on self-custodial Ethereum exchanges (including rhino.fi) sign each order that they place with their Ethereum key (on our exchange this links to the trader’s unique rhino.fi trading key). Each message contains a price, quantity and signature for the order the trader would like to submit to the exchange.

In this article, we refer to the numerator in a currency pair as the ‘base’ currency and the denominator as the ‘quote currency’ For example, in an ETH/USD(t) order, ETH is the base currency and USD(t) is the quote currency.

Market Sell Orders

In the case of a market sell order on rhino.fi, the trader simply signs a message specifying they would like to sell 'X' quantity of token at a price up to 10% worse than the best bid.

This is easy for the exchange to process, as provided that each subsequent partial taker fill is within the specified price parameters of the original message, the order will continue to be processed until the full quantity of the order is filled.

There is no danger of the order being overfilled as the max quantity is specified in the original message and the trader can only sell the maximum quantity of the token that they hold in their exchange account.

Market Buy Orders

In the case of a market buy order on rhino.fi or another self-custodial exchange, specifying a quantity, as well as a price in the signed order message, makes handling a true market buy order more challenging.

On a centralised exchange, instead of specifying the quantity of token that they would like to buy, the trader instead specifies the quantity in terms of the quote currency (e.g. 100 USDT worth of ETH/USDT). The centralised exchange matching engine then just keeps filling the order until the quantity (in terms of the quote currency, e.g. 100 USDT) has been bought. This loop of increasingly smaller and smaller orders is easy for the centralised exchange to process, since it does not require permission from the user.

However, when a trader signs for a market buy order on rhino.fi, they are signing only one message for 'X' quantity's worth of token, at a price that is 10% worse than the best offer. In practice, this means they are signing an order for a 10% lower quantity than they originally intended, because rhino.fi takes the specified original quantity and calculates the same equivalent quantity at a 10% worse price. This new quantity is then submitted to the order book and is matched until the new full quantity is reached.

rhino.fi uses the above logic to process market buy orders, as otherwise the trader could end up signing one order for a total order value that is greater than their account balance. For example, signing one order message to buy 100 USDT worth of ETH, at a 10% worse price, could result in the total value of the signed message being greater than the trader's quote currency account balance - for example if they only had 100 USDT in their account at the time.

Allowing traders to sign for orders that are greater than the total amount of their account balance is not currently possible on rhino.fi, as this would go against the trustless concept of the system.

Potential Resolutions

1) Multiple Signing

A centralised exchange can simply keep submitting orders in line with the trader’s original request until the full quantity of token (in terms of the quote currency) is acquired. However, on rhino.fi, the trader would have to keep submitting smaller and smaller separate order messages until an amount approaching the full total quantity (in terms of quote currency) was filled. This is not something that is practical at speed using private wallets, where each order needs to be manually and individually confirmed.

2) Market Order ‘Plus’

A more viable alternative would be to ask the trader to sign for an amount of token 'X' that is worth 10% more than the equivalent value of the denominator. For example, if the trader wished to make an ETH purchase equivalent in value to 100 USDT, then rhino.fi would ask them to sign for an amount worth 110USDT.

This is a relatively easy feature to implement, and would purely rely on the trader having a balance 10% greater than the base pair currency. For example, if the trader wished to buy 100 USDT of ETH, they would need to have 110 USDT in their rhino.fi exchange wallet.
Was this article helpful?
Cancel
Thank you!