Posts

Ripple

How does Ripple Work?

The Ripple protocol builds upon – and in some ways improves on – other digital currencies. Like other digital currencies, the Ripple protocol enables peer-to-peer transaction settlement through a decentralized network of interconnected computers. This eliminates several of the fees and counterparty risk involved in interbank fund transfers.

However, in contrast to other digital currencies, the Ripple protocol is completely currency agnostic and users are not required to convert local currency into Ripple’s native currency (XRP or “ripples”). Additionally, rather than attempt to circumvent traditional financial institutions, Ripple relies on financial institutions to function as gateways into and out of the Ripple network, and market makers to provide liquidity for FX conversion by posting bids/asks for each currency pair. Ripple routes each transaction to the trader(s) with the best price in the network.

Thus, in the same transaction discussed above, the U.S. importer’s bank would directly plug into Ripple and initiate a USD to EUR transaction. Market makers will compete for the transaction by posting bid/ask for EUR/USD. Ripple will ensure the market maker posting the cheapest offer fulfills the transaction. This market maker will thus, buy USD from U.S. Bank and sell Euros to the EU Bank.

The illustrative example points to several potential advantages of using the Ripple Protocol for interbank transfers.

  • First, because, users are not required to convert to XRP in order to transact on the Protocol, the sender of the funds only needs to worry about one fee, which is the FX spread. This spread, moreover, is minimized given Ripple’s algorithm to route transactions to the lowest spread on the network.
  • Second, because Ripple is not intended to be directly customer interfacing, banks continue to control their customers’ experience. Thus, banks could ultimately decide how much of the cost savings to pass on to their customers.
  • Third, transactions on the Ripple network typically settle within a few seconds. This enables banks to grant their customers faster access to their funds, improving their overall customer experience, and improving working capital for businesses.
  • Fourth, since customers continue to interface directly with their bank to access Ripple, KYC/AML and compliance requirements around customer interaction are already in place and can largely remain the same

Key Features of the Protocol

Below are key features of Ripple protocol, which further highlight how it differs from other interbank transfer systems and digital currency protocols:

  1. Consensus: the Driver of Real-Time Settlement

The Ripple network is a shared public ledger administered collectively by a network of servers. This ledger tracks the accounts and balances of Ripple users. Within the Ripple Network, all transactions are authorized and settled through a process called consensus. This process entails a supermajority of Ripple servers mutually agreeing that a transaction within the network is valid before updating the ledger.

Ripple servers use public/private key cryptography to verify whether transactions are valid or not. Each transaction that gets submitted is signed with a unique digital signature, analogous to how people sign paper checks with a unique signature in traditional banking. Ripple servers mathematically verify that the correct signature appears – the signature of the owner of the funds – before including transactions in a new ledger.

Consensus must be reached among a supermajority of connected computers in order to make changes to the ledger. This is what is known as an atomic process – either a transaction is completely verified, or not.

This process is what enables the Ripple Network to offer users real-time settlement (typically between 3 to 6 seconds) and bypass the need of a central operator, which as explained above, circumvents layers of fees that financial institutions, business and/or consumer bear for traditional payments. In other words, the process of consensus is what enables fast, secure and decentralized settlement on the Ripple network. This distinguishes Ripple from other digital currency protocols, such as Bitcoin, which rely on a process called proof of work (i.e. mining) to validate transactions on the block chain. Unlike Bitcoin, Ripple does not rely on mining to reach consensus, so it does not consume the large amounts of energy that Bitcoin does, nor is the network’s security related to the amount of processing power devoted to it.

  1. Currency-Agnostic: a Key Differentiator from Other Digital Currencies

The Ripple protocol also has a native currency called XRP (sometimes pronounced “ripples”) that exists within the network. This is similar to other digital currency protocols, which enable the creation and distribution of a native digital currency. Like other currencies, XRP is known as a crypto currency, or a currency that is verifiable using mathematical properties. These crypto currencies are digital assets, which can be transferred within the network.

Unlike other digital currency protocols, however, Ripple provides users complete currency choice and does not require users to transact in XRP. Instead, XRP is there to provide two key functions: to prevent abuse of the system and to act as a bridge currency for market makers providing liquidity within the network (more on both of these features below). Thus, users can hold balances in one currency and transact in another currency without converting to XRPs in the process.

  1. FX In-Stream: Lowering the Cost of FX through Market Maker Competition

Cross currency payments have historically been an area with very healthy margins. The FX component of an international wire transfer can frequently bear a 2% – 4% fee to exchange even the most liquid G10 currencies. Retail remittance pricing is even higher, often at a 5% -10% spread to institutional foreign exchange market pricing.

Ripple has the potential to meaningfully bring down these costs by making payment FX rates competitive on a per transaction basis.

The Ripple network translates currencies by routing orders through market makers competing to earn bid/ask spread. These markets makers are important sources of liquidity within the network and are primarily financial institutions with a business in currency or securities market making (i.e. banks, hedge funds, quantitative trading shops). Market makers compete for business within the Ripple network, posting orders to buy and sell different currency pairs to facilitate payments.

The Ripple Protocol is designed to route every transaction to the cheapest price available in the market. Thus, the only way an order gets filled is if it is posting the best price for a specific currency pair at the particular time the transaction is executed. As a result, the protocol can lower one of the highest financial and operational costs for financial services companies moving funds across national boundaries.

  1. Pathfinding Ripple’s Pathfinding Algorithm further improves on market maker pricing by searching for the cheapest path for payments to move across the network.

In liquid currency crosses, the cheapest path will often be a direct “one hop” path through one market maker, for example directly from USD to EUR. However, the Ripple pathfinding feature will seek the cheapest path even if it is a more complex route through several intermediary currencies.

In the example below, the sender of a payment holds EUR, and the recipient wants to be paid in KRW. Since there may not be a tight market in EUR/KRW, the payment is routed through several order books to improve the price. Unlike in traditional markets, users are not exposed to legging risk. Ripple executes multi-hop paths as a single atomic transaction. The entire transaction either completes or it never happens – there is no way for a payment to get “stuck” en route. Since Ripple transactions are just updates to a distributed ledger, multiple legs can be executed at the same instant as they are all included in the same ledger update. There is no counterparty risk to intermediaries.

Ripple Currency (XRP): Overview

The Ripple protocol has a native currency called XRP (sometimes referred to as “ripples”), which performs several key functions within the network. XRP, like other digital currencies, is a math-based currency (also known as cryptocurrency), which is a digital asset with verifiable mathematical properties. As a digital asset, ownership of XRP can be directly transferred peer-to-peer.

Just like bitcoin exists natively on the blockchain, XRP exists natively on the Ripple network as a counterparty-free currency. Unlike the Bitcoin Protocol, however, Ripple users can opt not to use XRP as a medium of exchange. Instead, XRP performs two key functions within the network: protect the network from abuse and provide a bridge currency for market makers. More on these functions below.

XRP: Protecting Against Network Abuse

Since the Ripple network is based around a shared ledger of accounts, a malicious attacker could create large amounts of “ledger spam” (i.e. fake accounts) and transaction spam (i.e. fake transactions) in an attempt to overload the network. This is commonly known as a denial-of-service (DoS) attack. In a DoS attack, perpetrators attempt to overwhelm a server with so many communication requests that the server is unable to respond to legitimate requests.

XRP’s primary function is to provide a layer of security within the network to protect against these types of attacks.

To protect the network from abusive creation of excess ledger entries, each Ripple account is required to have a small reserve of XRP to create ledger entries. This reserve requirement is 20 XRP (or about $0.12 at the time of writing). This requirement is intended to be a negligible amount for normal users while preventing a potential attacker from amassing a large number of fraudulent accounts to “spam” the network.

As a second line of defense, with each transaction that is processed, 0.00001 XRP is destroyed (roughly $0.000000055 at the time of writing). This is not a fee that is collected by anyone – the XRP is destroyed and ceases to exist. This transaction fee is also designed to be negligible for users. But when the network is under heavy load, such as when it is attacked, this fee rapidly rises.

The goal of this design is to quickly bankrupt attackers and keep the network functioning smoothly. Attacking the Ripple network can get very expensive, very quickly, but for regular users, the cost effectively remains “free.” In this context, XRP can be thought of as a postage stamp for transactions. If the price of XRP were to appreciate significantly to the point where sending transactions becomes a nonnegligible cost for normal users, there is a mechanism in place to lower (or raise) transaction fees by a supermajority vote of server operators.

XRP: A Bridge

Currency for Liquidity XRP can also serve as an ideal bridge for illiquid currency pairs. In theory, users of the Ripple Network could exchange anything of value. This could include fiat currencies, digital currencies, gold and even items like loyalty points, airline miles, or securities.

On a protocol level, Ripple makes a distinction between both the balance type (USD, EUR, XAU) and the issuing counterparty (Bank A, Bank B, etc.). This is important because USD balances issued by two different banks are technically liabilities of different institutions and have different counterparty risk profiles. From the perspective of the protocol, they are different financial instruments. As the number of assets and the number of counterparties in the network grows, the number of currency pairs can quickly become unmanageable for a market maker.

Instead of quoting every possible currency/gateway combination, XRP can serve as a useful bridging tool for market makers. If every currency is liquid to XRP, it is also liquid to other currencies.

Thus, while Ripple users have complete currency choice – meaning they can hold balances in one currency (such as USD) but transact in any other (such as JPY) – the market makers facilitating those transactions may see holding XRP as an ideal bridge currency.

The role of a “bridge currency” or “vehicle currency” is traditionally played by USD in financial markets. Within the Ripple network, there is a functional reason to prefer XRP. Because XRP is a natively digital asset (as opposed to a balance/liability), it is the only instrument within Ripple that has no counterparty risk, so it can be universally exchanged between market makers with no friction. Also, because it has no counterparty, XRP never has third party fees attached to it.

Ripple Labs believes that an increase in the number of counterparties and asset types in the network adds to the utility of XRP and creates demand for XRP in the long run.

Liquidity, the greatest challenge for crypto exchanges

There is a general consensus that liquidity is the most important factor for all tradable markets. The ability or lack thereof, of a market to allow assets to be bought and sold at stable prices, is a major issue associated with cryptocurrencies. 

According to a recent Encrybit report, one in every three investors is worried about the problem of liquidity on crypto exchanges.

 

The importance of the liquidity problem requires tools and methods to manage markets liquidity. This document proposes an approach to monitor and manage liquidity. Monitoring is intended for the exchange management to understand their platform’s current liquidity level and how to improve it. Liquidity management starts with the exchange engaging professional market makers or using proper tools to take care of  liquidity. Last but not least exchanges should track the market impact of trades of different sizes, and oblige their market makers to fulfil certain conditions.

 

Empirica brings experience, tools, know-how and best practices in the area of technology for liquidity analytics and liquidity provision from capital markets to digital assets. We have been active in the market since 2011, working with stock exchanges and market makers with a track record on automated liquidity provision and measurement. 

 

How can an exchange manage its liquidity

 

Both for those who are just launching a new exchange or who have been operating an exchange for some time already, it is crucial to monitor liquidity metrics of all markets.

 

Read more about our tool for monitoring crypto exchange quality – Liquidity Analytics Dashboard

 

As in any tradable market, liquidity is provided by market makers, who mostly use automated market making algorithms. However, crypto exchanges have an alternative to the external market makers, as they are able to take this crucial aspect of exchange – the provision of liquidity – into their own hands.

 

Regardless of whether they use external market makers or an internal market making desk, crypto exchanges should outline to the liquidity providing party certain conditions pertaining to how the liquidity is provided and then constantly monitor the execution of these obligations. 

 

With proper tools, exchanges are able to track liquidity metrics and are able to react accordingly if agreed conditions are not met. Analytic tools also allow exchanges to compare liquidity in their markets to other crypto exchanges.

 

Monitoring liquidity

 

When executing a transaction, most investors only consider explicit transaction costs (taxes, commissions, fees). But that is only a part of the total cost. The larger the trade, the more dominant the part of the cost taken over by implicit costs.

 

Total transaction costs = Explicit transaction costs + Implicit transaction costs

 

One of the most important implicit costs to consider is market impact, also referred to as slippage. Market impact is a result of the price slipping down or edging up when you trade an asset. As the investor can not execute the entire order at the best offer, the trade is moved down the order book.

 

Exchanges, which want to attract not only small but also bigger investors, should monitor market impact and other important liquidity metrics in all of their markets.

 

Liquidity provision

 

To increase liquidity, crypto exchanges use market making services from external parties. This is a standard practice in any financial market.

 

Market makers

 

A market maker is a company or individual that regularly buys and sells financial assets at a publicly quoted price to provide liquidity to the markets. Their role is to satisfy market demand.

 

Crypto exchanges need market makers. If liquidity is low on a venue, exchanges usually try to attract market makers by the following methods:

  • Decreasing maker trading fees
  • Sharing profit from taker fees
  • Paying market makers for their activity

 

It’s  a “chicken or egg” problem. New exchanges and exchanges with low liquidity need market makers to attract other investors. The market makers, however, do not want to enter illiquid markets as there is not much volume to be made from takers and there is also additional business risk involved. Hence many illiquid exchanges need to pay market makers for their services. 

 

While working with crypto exchanges we often hear multiple reasons as to why crypto exchanges are not happy with their market makers. The main problems include:

  • Market makers choosing to support trading pairs that are most liquid; they are not interested in making markets on less liquid pairs
  • Spreads maintained by market makers are too wide
  • Market makers come and go in the markets that they promise to take care of, so exchanges would like to have tools tracking the activity of their liquidity providers
  • Market makers do not keep the order sizes as promised

Liquidity provision tools for crypto exchanges

 

Crypto exchanges have an alternative to market makers, or a complementary approach. They are able to run an automated market making desk themselves. In order to do that, though, they need funds, proper liquidity provision algos and a trader to monitor them.

 

Market making requires a good combination of technology and some trading skills. The algos must be low-latency and capable of scaling to thousands of orders per second, on numerous trading pairs. It needs a disciplined approach to trading and risk management. 

 

There are many market making tools on the market. They range from simple black-box bots to sophisticated algorithmic engines with market making capabilities.

 

When searching for self liquidity provision tools one should be considering the following criteria:

 

  • Reliability

 

Market making algorithms should work 24/7, and be able to recover from unexpected situations like connection problems with an exchange.

 

  • Security

 

Market making systems have  access to the funds of the exchange, so it is important to choose from proven solutions.

 

  • Transparency

 

In the case of black-box algorithms, the bot developers should be widely known in the community. Exchanges should consider skipping bots and going for proven institutional-grade market making solutions available on the market.

 

  • Parametrization

 

In the case of algorithmic market making it is good practice to choose solutions that enable parametrization and tuning up of execution according to the current market situation.

  • Access to source code and custom changes

Ideally crypto exchanges should have an option to take over the market making algorithms source code and let their team develop and tune it further. Very often exchanges might want to add secret sauce to the algorithms that will create their competitive advantage in the market. 

 

Read more about our tool for market making strategies for crypto exchanges  – Liquidity Engine

 

Competing with other exchanges is a challenge today. In July 2019 services like CoinMarketCap or coinpaprika listed about 260 exchanges. However, Empirica’s internal research shows that there are currently more than 600 crypto exchanges in various stages of maturity, and further new exchanges being launched every month. Every exchange is trying to attract new investors, but it is clear that at some point only those exchanges with the best liquidity will survive. That is why crypto venues should not only manage their own liquidity but also observe the liquidity level of their competition, and identify inefficiencies that can be addressed.

 

Empirica specializes in liquidity measurement and liquidity provision software that can help exchanges manage their liquidity.