Connect with us

Blockchain

How To Create Liquidity With Kelp On The Stellar Dex

What is Kelp, what is market-making, what is market liquidity and how can you use Kelp to create it?

Republished by Plato

Published

on

What is Kelp, what is market-making, what is market liquidity and how can you use Kelp to create it? I’ll walk you through the most important things you need to know in order to get started. Note that this post does not facilitate trading advice nor does it encourage you to be reckless. Always do your due diligence before you start trading and/or use trading bots.

Kelp Market Making Bot

There are a few key things you have to understand before we can dive into the usage of the market-making bot Kelp. The absolute entry point for understanding is something called the order book. This will also help understanding why prices differ from exchange to exchange.

Alright, first things first. What does it mean when you hear the word exchange? We’re going to look at StellarTerm, it’s a popular interface for the Stellar Dex. The Stellar Dex is the decentralized exchange where you can trade your Stellar (XLM) for other assets on the Stellar network. It’s also called the Stellar Universal Marketplace.

The screenshot below is the order book for Stellar/Bitcoin XLM/BTC. Everything comes in pairs, in order for you to trade good A, someone is willing to give something in return, good B. This can range from money to houses, where for example a market can be USD/house or USD/EUR or EUR/gold, it doesn’t really matter. The thing that matters is the liquidity, meaning how easy/hard it is to trade one thing for another. We’ll talk about this in the next section. Back to the order book.

On the left, you can see the Buy (Bid) offers, and on the right the Sell (Ask) offers. People are buying XLM and selling BTC, XLM/BTC. Of course, it’s the same as buying BTC and selling XLM, BTC/XLM. The first line in the left column is willing to buy 788.4878049 XLM at a price of 0.0000082 BTC. For 1 Stellar, that totals to 0.0064656 BTC. The total market depth is the sum of all orders in each column, that is what the green and red bars represent. You can see that the market is in somewhat of a balance, a lot of people buying and selling. This is a more liquid market. This is the order book, people/bots buying selling an asset pair XLM/BTC.

The so-called spread is the gap between the buying and selling side. In this case, it’s really small, with on one side 0.0000082 XLM and the other 0.0000083 XLM. The spread, in this case, is 0.0000001 XLM. We’ll get to why the spread is important in regards to market-making bots in a later section.

XLM/BTC on StellarTerm

You can imagine that every exchange has its own order book, that’s why the price of each asset differs from exchange to exchange. The price of an asset is mostly defined where the bid and ask orders meet. In low liquidity markets or on low liquidity exchanges the stability of the price is thus not guaranteed and isn’t safe to trade on. Price jumps can occur very rapidly if the bid and ask prices are far from each other. Users that don’t understand the market or don’t understand market/limit orders will mostly pick market orders, which is the lowest ask price, but in reality, can differ a lot from the real price you think the asset is listed at.

I’m not going into this matter too deeply because Nikhil Saraf already did a good explanation in another Medium post on the creation of Kelp. The ability to trade one good for another is the main thing that describes market liquidity. There’s a market for everything and with ‘market’ we mean a place to trade good A for good B. Not every market is liquid, meaning that sometimes it’s not so easy to find people who want to trade goods with you. Take for example the market USD/bread, you can trade your dollars for bread in almost every shop you come across. This is a very liquid market because there are a lot of people selling bread and a lot of people buying bread. An illiquid market is let’s say gold/bread, I’m not sure if there are even places you can sell your gold for bread, there are no sellers that sell bread and want gold. It’s hard to trade assets in illiquid markets.

Let’s look at another example of a market on the Stellar Dex, Citron/Stellar XCT/XLM. This represents people buying XCT and selling XLM. You can see that this market is not balanced and illiquid. The total amount that people/bots want to buy is 355 XLM against the total that people/bots want to sell is 2094610 XLM. The spread is also really big, meaning there’s little chance of buyers and sellers meeting each other to do an actual transaction. This is why a liquid market is important. Illiquid markets are rather stale, no one is meeting each other in terms of selling and buying and the price is not stable. Keep in mind that the bid (buy) price is always lower than the ask (sell) price, if they cross each other, a transaction will take place. There’s always a gap between the buying side and selling side, the spread.

If no one is selling on the Stellar Dex, no one can buy and vice versa. This is the liquidity problem and Kelp is going to help to solve this.

XCT/XLM on StellarTerm

What can we do about the liquidity problem on the Stellar Dex you say? We can create liquidity. We can make automated buy and sell offers so that people are willing and able to trade on it. What’s in it for me you ask? We’ll get to that with potential arbitrage opportunities!

Let’s get to the spread of the order book and what market-making is all about. In order to create liquidity, you can run a market-making bot, such as Kelp. It will automatically place bid (buy) and ask (sell) orders on each side of the order book to create liquidity. The more orders there are, the more stable the price. Market-making theoretically results in profits being taken from the bid-ask spread of different assets. Let’s say you have 3 markets, ETH/BTC, USD/BTC and USD/ETH. They have the following prices for each pair.

  • 1 BTC / 10000 USD
  • 1 ETH / 0.02 BTC
  • 202 USD / 1 ETH

You can buy 1 BTC for 10000 dollars, sell that 1 BTC for 50 ETH and sell that 50 ETH again to get 10100 dollars. This is possible due to the spread being different in every market. This is why market-making bots create liquidity and are incentivized to do that by taking small profits from the orders they make on the same exchange. Running market-making bots also ensure that you are following the spread on each side of the order book if the price increases or decreases. So you are buying more when the price increases and sell immediately if the price decreases. This is an intra-exchange arbitrage opportunity.

An inter-exchange arbitrage opportunity can be obtained by doing trades between exchanges based on the price difference on those exchanges. These are caused by different order books as explained earlier. It follows the same principle, it’s possible to buy at a lower price on one exchange and sell it again at a higher price on another exchange. There’s no 1 absolute price for an asset, everything depends on the exchange it is traded on and the order book that decides on what the actual price of that asset is on that exchange.

Running Kelp

There are a few ways to run Kelp. It’s possible to run it with the provided binaries on GitHub. It’s your choice how to run it, whether it’s in Docker, on Kubernetes, or on your own computer with the binaries.

I’ve run Kelp for a few months on Kubernetes. I was not able to build the Dockerfile included in the Kelp repository, so a made a Dockerfile myself.

Dockerfile Kelp

In order for this container to run on Kubernetes, a deployment.yml is needed as well as a configmap.yml for the configuration. If you are not familiar with Kubernetes, you can just focus on the 2 files trader.cfg at line 9 and balance.cfg at line 70. There are different strategies that are explained in-depth on the GitHub page of Kelp, we’ll focus on the balanced strategy. The trader.cfg file contains the information Kelp needs to know, what to trade, and where to trade. The balance.cfg file contains a particular strategy and thus explains to Kelp how to trade. In this example, Kelp will start trading on the market XLM/USD. The ISSUER_B is the public id of the provider of that asset, in this case, AnchorUSD. I’m not going into too much detail, the documentation of Kelp covers each setting in detail as well as other trading strategies that can be used.

Kelp configmap.yml

If you don’t plan to run Kelp on Kubernetes, you can skip the following file. In order for Kelp to run it needs a Deployment. This starts up kelp from the previously created Docker container of the Dockerfile. Feel free to use your own image if you have created it. This Deployment will deploy 1 pod in the kelp namespace that is going to run Kelp with a balanced strategy.

Kelp deployment.yml

Potential Risks

Running Kelp is not without risks of course. You’re dealing with a piece of software that is executing real trades on your behalf. Any software glitch may cause potential losses. Price fluctuations of certain assets are also something to keep in mind. You could have a profit from each trade but if the valuation of the token you are trading plummets, it does not really profit you in any way. Market-making is also one of the more difficult ways to trade in my opinion. Everything depends on the order book and how fast you can react on bid or ask orders being created. Some people out there are willing to throw in a lot of money to be as close as possible to the servers of the exchange and want to have the best internet speeds to execute orders at blazing speeds. Be careful out there, always educate yourself first, read the documentation, and start out with a minimal amount of money. Never invest money you can’t afford to lose.

Kelp In Action

If you start Kelp on for example StellarTerm and you log in, you can see the buy and sell orders Kelp has created. It always tries to maintain a spread percentage (that can be defined in the balance.cfg file shown before), by calculating the distance from the middle of the order book where bid and ask orders and thus buyers and sellers meet.

StellarTerm buy and sell offers done by Kelp

In order for you to easily keep track of what Kelp is doing, you can download Solar Wallet on your computer and see your balance, buy and sell orders in real-time. You just have to add XLM on there and exchange half of it for USD (or EUR, whatever you prefer) in order for the balanced strategy to do its job. The balanced strategy is one of the strategies you can use as explained before. There are also other available strategies. Carefully read the documentation before running a different strategy.

Solar Wallet

Stellar Ecosystem

The Stellar ecosystem needs liquidity to guarantee a stable price. Bringing liquidity to the Stellar Ecosystem ensures that it’s mature enough to be used by everyone. Stellar has amazing potential, besides a currency, the Stellar Dex can be used already to trade a lot of different assets.

Kelp can also be used outside of the Stellar Dex, it can trade on Binance for example by integrating with CCXT, a cryptocurrency trading library. If you’re interested in also running CCXT as a Docker container besides Kelp, the following Dockerfile can help you. You can also run CCXT on Kubernetes the same way as you would run Kelp with the Docker images.

Dockerfile CCXT
CCXT and Kelp docker-compose.yml

The above docker-compose.yml file runs Kelp alongside CCXT, this is needed if you decide to not run Kelp on the Stellar Dex, but on, for example, Binance.

Anyone who likes algorithmic trading, setting up applications, and playing around with cryptocurrency can set up Kelp. You’ll learn a lot about market-making, liquidity, and trading bots.

Source: https://medium.com/axons/how-to-create-liquidity-with-kelp-on-the-stellar-dex-5155928d4986?source=rss——-8—————–cryptocurrency

Blockchain

Facebook’s Libra Could Reportedly Arrive in January 2021 in a Scaled-Down Version

Republished by Plato

Published

on

  • Although Facebook failed to launch Libra in mid-2020 as initially planned, the social media giant could do so in early 2021.
  • Finance Times cited three people working on the project claiming that Libra’s long-awaited launch could come in January 2021 but in a scaled-down version.
  • CryptoPotato reported before that Libra already changed its original idea from being a “single global digital currency” to creating a series of various digital coins. 
  • The FT coverage asserted that Libra could see the light of day after receiving approval to operate as a payments service from the Swiss Financial Market Supervisory Authority (FINMA). However, the Libra Association would initially release just a single coin backed one-for-one by the dollar. The other set of currencies would be rolled out later, should the FINMA application is successful.
  • Facebook rattled the financial world last year after announcing plans to launch its own cryptocurrency called Libra. After receiving scrutiny from world watchdogs, the Libra project underwent numerous changes, including executive replacements.
  • Libra suffered more blows when several notable partners left. Those included PayPal, Mastercard, eBay, Vodafone, and more.
  • In an attempt to salvage the project, the Association decided to make further changes by renaming Libra’s wallet provider from Calibra to Novi.

Featured Image Courtesy of AlJazeera

SPECIAL OFFER (Sponsored)
Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter CRYPTOPOTATO35 code to get 35% free bonus on any deposit up to 1 BTC.

You Might Also Like:


Source: https://cryptopotato.com/facebooks-libra-could-reportedly-arrive-in-january-2021-in-a-scaled-down-version/

Continue Reading

Blockchain

Bitcoin Worth $500 Million Withdrawn From OKEx as Users Look for Other Alternatives

Republished by Plato

Published

on

Users withdrew a record 29,300 BTC from OKEx after the Malta-based cryptocurrency exchange resumed withdrawals yesterday. This comes after bitcoin (BTC) price kickstarted its epic freefall dropping to levels near $16,500 before bouncing back up again. But what is the reason behind the massive bitcoin exodus out of OKEx?

OKEx Sees Significant BTC Withdrawals And Deposits

As per the latest update from on-chain and market analysis firm Glassnode, OKEx users have withdrawn a record 29,300 bitcoins after the exchange gave the green signal for resuming withdrawals yesterday. These BTC transactions amount to roughly $5 billion (considering the current spot rates).

Glassnode also observed a deposit of 21,600 BTC on OKEx. Withdrawals and deposits together had a depreciating effect on the exchange’s overall bitcoin balance which reduced to around 212,000 BTC.

The potential cause behind the massive exodus of bitcoin holdings could be a result of users leaving OKEx in search of other alternatives. Binance, Huobi, and some third party wallets were at the receiving end of the initial bitcoin transfers from the exchange.

Users Dissatisfied With OKex; Seek Other Alternatives

OKex announced the resumption of withdrawals on November 19. Few folks welcomed the developments, but most of them seemed miffed with the exchange’s recent bitcoin and crypto withdrawal suspension, with a lot of users demanding compensation else they make their move to other platforms.

Large BTC Deposits Point To ‘Centralized Failure’ Risks

As reported by CryptoPotato, OKEx had more than 200,000 BTC stored in their wallets during the ‘withdrawal lockdown.’

Although OKEx CEO Jay Hao assured users that their funds are safe and that there’s no “cause for alarm,” the vastness of the above bitcoin stash is pretty alarming. Especially because it is controlled by one single organization.

What’s more disappointing is that the official who had access to the private keys was ‘out of touch’ with the management. The OKEx personnel wasn’t able to reach out to him. This is not desirable since it poses huge risks to these BTC stashes falling prey to coordinated attacks that target centralized points of failure.

SPECIAL OFFER (Sponsored)
Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter CRYPTOPOTATO35 code to get 35% free bonus on any deposit up to 1 BTC.

You Might Also Like:


Source: https://cryptopotato.com/bitcoin-worth-5-billion-withdrawn-from-okex-as-users-look-for-other-alternatives/

Continue Reading

Blockchain

Bitcoin: Temporary Correction or No ATH This Year? The Crypto Weekly Market Update

Republished by Plato

Published

on

Bitcoin has a way of surprising people. This week was no exception. A few days ago, almost everyone believed that the cryptocurrency is inevitably headed to a new all-time high. And how could they not? BTC was trading at a few hundred USD below the record from back in 2017. Unfortunately, things took a turn for the worst.

Yesterday was undoubtedly a bad day for bitcoin as it plunged a total of around $3,000 in less than 24 hours. From a high of about $19,500 down to $16,200, the bears poked and showed their faces. The entire market lost around $80 billion of its capitalization as altcoins actually had it worst.

During the market dive, Bitcoin’s dominance actually increased, showing that not only altcoins failed to hold their ground, but they dropped harder than BTC. Since then, there has been a slight recovery and at the time of this writing, the primary cryptocurrency is trading at around $17,000.

The move was seemingly propelled by the news that US regulators might seek to require identity verification from crypto wallet providers. Coinbase’s CEO, Brian Armstrong, commented on the matter, expressing his worries that if the new rules are implemented, they would be rather harmful to the users and the industry, in general.

At the same time, the popular cryptocurrency exchange OKEx opened withdrawals for the first time since they were shut down around a month ago, which might have prompted users to cash out the profits that they have been sitting on. In fact, CryptoPotato reported that around $500 million were withdrawn from the exchange as the crash started to take place.

In any case, the results are here, and it remains particularly interesting to see where will bitcoin go from here.

Market Data

Market Cap: $512B | 24H Vol: 181B | BTC Dominance: 62%

BTC: $17,132 (-7.98%) | ETH: $516.86 (+1.71%) | XRP: $0.56 (+74.08%)

Bitcoin Worth $500 Million Withdrawn From OKEx as Users Look for Other Alternative. Data shows that users withdrew a total of 29,300 BTC from the popular cryptocurrency exchange OKEx right after it resumed full functionality. This happened just as bitcoin plunged $3,000 in a matter of 24 hours. The exchange also resumed the withdrawals a day earlier than announced and during the Chinese trading hours.

Bitcoin Black Friday 2020: The Sales You Better Not Miss. It’s the end of November, and with this comes the long-anticipated shopping season. For many, this is a time to enjoy massive sales. We’ve taken the liberty of listing a few sales within the cryptocurrency field that aficionados might find interesting.

Facebook’s Libra Could Reportedly Arrive in January 2021 in a Scaled-Down Version. Libra, Facebook’s long-awaited cryptocurrency project, might be set to launch in early 2021. However, the version that’s potentially hitting the market is scaled-down and specifically intended to abide by the regulations of Switzerland’s FINMA.

Research Suggests Satoshi Nakamoto Launched Bitcoin From London. New research shows that activities associated with Satoshi Nakamoto from 2008 and 2010 might have taken place in London when Bitcoin’s network went live. This brings the experts a step closer to identifying who’s behind the legendary pseudonym.

6 Possible Reasons For Bitcoin’s $3,000 Daily Price Crash. Bitcoin went through a massive crash two days ago when it lost around $3,000 of its value in a sudden red candle. These are six reasons for which this may have happened and a brief outline of what might be next to come.

Coinbase CEO Fears Rumored Regulations Proposed By The Trump Administration. Brian Armstrong, the CEO of the leading US-based cryptocurrency exchange Coinabse, has said that he’s worried about the rumored regulations concerning third-party wallet providers having to identify their users. He said that this might harm users and the entire ecosystem.

Charts

This week we have a chart analysis of Bitcoin, Ethereum, Ripple, Chainlink, and Stellar Lumens – click here for the full price analysis.

SPECIAL OFFER (Sponsored)
Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter CRYPTOPOTATO35 code to get 35% free bonus on any deposit up to 1 BTC.

Disclaimer: Information found on CryptoPotato is those of writers quoted. It does not represent the opinions of CryptoPotato on whether to buy, sell, or hold any investments. You are advised to conduct your own research before making any investment decisions. Use provided information at your own risk. See Disclaimer for more information.

Cryptocurrency charts by TradingView.

You Might Also Like:


Source: https://cryptopotato.com/bitcoin-temporary-correction-or-no-ath-this-year-the-crypto-weekly-market-update/

Continue Reading
Blockchain4 days ago

Ethereum 2.0 All Set For December 1st Launch As ETH Rallies Past $600

Home5 days ago

TramsToken (TRAMS): A Rising Star of the Fast Moving DeFi Space

Blockchain5 days ago

Crypto.com Launches Visa Cards for Canadians

Blockchain4 days ago

Bithumb Temporarily Shuts Down Some Offices As Korea Faces Another Possible COVID-19 Outbreak

Blockchain1 day ago

Five Reasons Ethereum Has Entered a New Bull Market

Blockchain5 days ago

The BitPay Black Friday Deals are Here!

Blockchain3 days ago

6,700 investors lock $10.5M in Oasis Network’s token-drop

Blockchain3 days ago

Bithumb Temporarily Shuts Down Some Offices As Korea Faces Another Possible COVID-19 Outbreak

Blockchain5 days ago

Crypto.com Launches Visa Cards for Canadians

Blockchain5 days ago

Over $200 Million Has Been Stashed Into Ethereum 2.0 Staking Contract

Blockchain5 days ago

Ethereum (ETH) Clears $600, Making A Retest Of All-Time Highs Imminent

Blockchain5 days ago

Polkadot Aims to Become The New Home for The $14 Billion DeFi Industry

Blockchain4 days ago

TRONADZ – The First Decentralized AdNetwork

Blockchain4 days ago

Bitcoin SV, Cosmos, BAT Price Analysis: 24 November

Blockchain4 days ago

Billion-Dollar SBI Japan Launches “Reliable” Interest on Bitcoin Deposits

Blockchain4 days ago

Blockchain-based voting systems have potential despite security concerns

Blockchain2 days ago

ViaBTC launches new cloud mining service with BTC and ETH contracts available

Blockchain2 days ago

Five Reasons Ethereum Has Entered a New Bull Market

Blockchain5 days ago

Bitcoin short-term Price Analysis: 23 November

Blockchain5 days ago

YFI’s Andre Cronje Unveils Multi-Purpose DeFi Protocol Deriswap

Blockchain4 days ago

Blockchain4 days ago

IDEX Announces Multi-Chain Solution and Expands to Polkadot and Binance Smart Chain

Blockchain4 days ago

Too Many Active Bitcoin Whales On Coinbase Suggest Price Is Likely To Go Down Soon – CryptoQuant CEO Warns

Blockchain3 days ago

Bitcoin Bullish Run Buoyed By Positive Sentiments from Institutions

Blockchain3 days ago

IDEX Announces Multi-Chain Solution and Expands to Polkadot and Binance Smart Chain

Blockchain3 days ago

Analysts Eye New Top of $74,000 as Bitcoin Comes Within 3% of ATH

Blockchain3 days ago

IDEX Announces Multi-Chain Solution and Expands to Polkadot and Binance Smart Chain

Blockchain4 days ago

3 reasons why Bitcoin price faces a major hurdle at $20,000

Blockchain4 days ago

The Ripple Effect: 5 Key Factors Behind The 100% XRP Surge

Blockchain3 days ago

IDEX Announces Multi-Chain Solution and Expands to Polkadot and Binance Smart Chain

Trending