Skip to content

Academy

Hummingbot Gateway Architecture - Part 2

cover

by Martin Kou

Update (February 2023): Hummingbot Gateway v2 is now available as a standalone Github repository: https://github.com/hummingbot/gateway. Most of the functionality listed in this post has now been implemented, and we welcome contributions from the community.

Introduction

In Part 1 of this series, we have discussed the architectural changes we are making to Hummingbot Gateway v2 to improve its robustness and reliability, to bring it up to the service quality level expected of production trading systems.

Hummingbot Gateway Architecture - Part 1

cover

by Martin Kou

Update (February 2023): Hummingbot Gateway v2 is now available as a standalone Github repository: https://github.com/hummingbot/gateway. Most of the functionality listed in this post has now been implemented, and we welcome contributions from the community.

Introduction

Hummingbot Gateway is a software that allows Hummingbot to connect to decentralized exchanges like Uniswap.

The Hummingbot Gateway is a separate piece of software apart from Hummingbot, because software libraries needed for accessing decentralized exchanges, e.g. the Uniswap Smart Order Router, are usually not written in Python. The gateway provides Hummingbot access to these decentralized exchanges with their differing software stacks, by exposing a secure and unified API interface to Hummingbot. This API interface can also be used by other potential gateway clients, such as proprietary trading software.

Hummingbot Architecture - Part 2

Introduction

In the last article - Hummingbot Architecture - Part 1 - of this series, we've discussed the design motivations behind Hummingbot, the clock and the market connectors. Today, we'll be discussing the architecture behind trading strategies - the very component that decides Hummingbot trades with your money. We will also discuss how you can diagnose problems and debug Hummingbot in live trading.

Technical Deep Dive into the Avellaneda & Stoikov Strategy

cover

In our previous blog post, we introduced the new avellaneda_market_making strategy. This time, we delve deeper into the mathematical aspects of this strategy. We aim to explain how we adapted the original Avellaneda-Stoikov model for the cryptocurrency market and simplified the calculation of key parameters, known as greeks.

This article mathematically substantiates the assumptions and calculations that made the authors' model more suitable for Hummingbot traders.

Original Model and Our Proposed Extensions

Let's start by revisiting the core equations from the Avellaneda-Stoikov paper:

Guide to the Avellaneda & Stoikov Strategy

cover

Welcome back to the Hummingbot Academy!

The latest Hummingbot release (0.38) introduces an exciting strategy based on classical academic market-making models. This article will delve into the Avellaneda & Stoikov paper from 2008 and its implementation in Hummingbot.

For those who enjoy in-depth scientific papers, the original publication is readily accessible online or directly here.

Hummingbot Architecture - Part 1

Introduction

Hummingbot is a modular framework for building highly reliable, and high performance trading bots. While the official Hummingbot package already allows you to run high frequency trading strategies on a number of cryptocurrency exchanges, the underlying framework is freely extensible for building custom strategies, custom market connectors, and more.

In this blog post, we will discuss some of the key architectural features in Hummingbot, and the rationales behind their designs.

Liquidity Mining in Hummingbot vs DeFi - Part 2

cover

While we wrote the original whitepaper and coined the term “liquidity mining”, the concept recently became popularized in DeFi with the emergence of Balancer, Curve.Fi, and, despite being late to the game, Uniswap, who recently introduced token distributions to the original Automated Market Maker (AMM) concept.

Our version of liquidity mining and that of DeFi share the same objective: finding an efficient way for token issuers and protocols to provide liquidity for digital assets. Token liquidity has long been a problem in the cryptocurrency market due to the large and growing number of token assets, exchanges, and exchange protocols, meanwhile there has only been a limited number of sophisticated (and expensive) hedge funds and market makers that could serve the markets.

Hummingbot Miners and AMM liquidity mining both take a decentralized, crowd-sourced approach to market making. They allow the general public, not just the professional market makers, to participate in providing liquidity for digital assets.

One important way in which they enable this is by creating frameworks for compensating a decentralized group of market makers.

Liquidity Mining in Hummingbot vs DeFi

cover

The need for liquidity is as constant a theme in the cryptocurrency market as are death and taxes. However, as we have previously written in other blogs (such as this one, the way in which token issuers and exchanges procure market making in the crypto market is broken. The reliance on high cost, price gouging crypto market makers is just not sustainable or scalable. This led us to propose the concept of liquidity mining and launch the Hummingbot Miners platform for decentralized and crowd-sourced market making.

We have been encouraged to see other projects experiment with community-based liquidity provision, most notably in DeFi with automated market makers (AMM). Whether it’s called “liquidity mining” or “yield farming”, there has been a surge in activity in DeFi as protocols such as Compound, Synthetix, Balancer, Ampleforth, and Loopring aim to propel wider market adoption by rewarding their communities for providing liquidity.

With this heightened interest in liquidity mining, we explain in this blog how our Hummingbot Miner platform fits into the landscape. We also compare and contrast liquidity mining in the order book model popularized by centralized exchanges versus the automatic market maker (AMM) model that is prevalent in DeFi.

Demystifying Liquidity Mining Rewards

We explain in more detail the methodology and mechanics of liquidity mining, a data-driven, objective methodology for quantifying market maker performance.

In our liquidity mining announcement, we introduced a data-driven, objective methodology for quantifying market maker performance. This serves as the basis for determining fair and open compensation for market makers. So how does it all work? In this post, we explain in more detail the methodology and mechanics of the platform.

Exchange Types Explained: CLOB, RFQ, AMM

cover

Since Hummingbot is an open source bot platform that connects to many different exchanges, we have developed a deep understanding of the nuances between various exchange types.

In this post, we discuss the three main methodologies that digital asset exchanges use to facilitate asset transactions. We hope that this post helps crypto traders and developers choose the right exchange for their needs.

TLDR

Exchanges perform the fundamental role in free markets of bringing together and coordinating buyers and sellers. Exchanges provide a venue for these parties to discover one another, negotiate and agree terms, and ultimately transact. Exchanges have adopted multiple methodologies to achieve this: