How could Kelp Bot help Stellar?

Kolten
Stellar Community
Published in
4 min readMay 3, 2019

With the recent release of Kelp v1.6.1, I thought it would be a good time to discuss what trading bots are and how they can contribute to the growth and maturity of financial markets (e.g. the Stellar DEX).

Trading Bots

Trading bots are software that facilitate algorithmic trading and the ability to deploy many types of trading strategies — without requiring the user to be at their computer.

Kelp is a free, customizable, open-source trading bot for the Stellar universal marketplace. You can use it to create liquidity, set a spot price for tokens, make spreads and make markets, price and trade your own stablecoins, and mimic orders from other exchanges. It also works on some centralized exchanges such as Kraken, Binance, and CoinbasePro.

Fast moving markets that operate 24/7 can be daunting for even the most experienced traders. Running a trading bot with a fixed strategy can ease the stress of trading by automating the process. Bots also allow market makers to keep orders flowing quickly with desirable spreads. Additionally, automating orders in a 24/7 market benefits buyers and sellers regardless of where they are in the world. As the Stellar DEX grows, it’s important that users have quick access to liquidity regardless of their timezone, currency, etc.

Like all good trading bots, Kelp helps provide liquidity and maintain a good market spread. Here’s why that’s important:

Liquidity

One of the biggest challenges for any exchange is to address the issue of liquidity. Liquidity refers to how much of an asset can be bought/sold on the market with a minimal effect on the price.

Traders, whether individual or institutional, want their orders to be executed in a timely manner, with minimal slippage. That’s only possible on exchanges with deep order books, which is why most traders only use a handful of exchanges; they’re simply following the liquidity.

Bots provide liquidity by keeping order books stocked with offers that other traders can take. With Kelp, for instance, you can dynamically balance an order book to adjust to changing demand.

Say you have a Stellar-based token priced in XLM. You can use Kelp to place both buy and sell offers, and set it up to keep an eye on order book activity. When traders buy the token, demand goes up, and Kelp creates new sell offers at an incrementally higher price. When traders sell the token, demand goes down, and Kelp creates new offers at an incrementally lower price. As demand drives the token price up or down, Kelp adjusts its offers to keep the order book full and to keep the market liquid.

Market-Making

In the example above, Kelp is serving as a market maker: it’s placing both buy and sell offers, and making new offers as traders take existing offers off the books.

Bots are great at market-making: they have a high degree of precision, and they can work around the clock. With a bot, it’s easy to control the spread, which is the difference between the highest buy offer and the lowest sell offer. Narrow spreads are important for other market participants because it allows their orders to be filled at a fair price.

In addition to using Kelp to keep a narrow spread while allowing the price of a token to drift based on market dynamics, you can also use it to keep a narrow spread while controlling the price of a token.

Say you issue a USD stablecoin on Stellar. You want to keep the price of that coin pegged to an external reference: if the world at large is buying 10 XLM for $1, you want the price of your coin to hew to that price. You can set up the bot to place buy and sell offers, only this time, instead of responding to price fluctuations by incrementally changing the price, the bot checks the price against an external feed (like Kraken), and, if the price of the token on the DEX starts to drift, it places offers to bring it back in line.

As people use tools like Kelp Bot to devise trading strategies, provide liquidity, mirror other market orders, and create healthy spreads, we’ll see the Stellar marketplace mature and appeal to even more traders and services outside of the crypto ecosystem. After all, Stellar isn't just for exchanging cryptocurrencies and tokens. FIAT currency traders, asset traders, anchors, financial services, and more could be incentivised to use Stellar if volume is growing, liquidity is abundant, and the market is showing signs of maturity.

What’s Next?

For the time being, Kelp bot can only be used through your PC’s command line, but if you’re interested in trying Kelp, don’t be intimidated: the documentation is easy to follow, and gives step-by-step walk-throughs and pre-configured strategies to get you started. Soon, the Kelp devs will be rolling out a graphical user interface to make it easy for non-command-line users to get up and running quickly.

--

--