Motivation
This sprint was conducted to research the motivations behind the Hummingbot platform and the problems it was created to solve, as well as whether it would be a suitable quant trading platform. Throughout our other research and due diligence into the platform, we have been thoroughly impressed with its capabilities, and more importantly, its approach to trading and development. The findings from this sprint do not change that opinion.
Platform Overview
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.
Hummingbot originally started out as an algorithmic crypto hedge fund but they quickly learned how corrupt and immoral the institutional and high-liquidity participants were. This motivated them to create hummingbot as an open-source platform that will allow access to market making strategies for everyone.
The problems they solve
Hummingbot was created to address a number of problems that were associated with existing solutions at the time of its conception. The founders identified these as:
- Reliability — Exchange APIs are often unreliable. This should not affect the status of a trading bot.
- Status tracking — Besides reading signals and making orders, a bot should also constantly track the status of the account and active orders.
- Latency — Other trading bots used slow technology or poor design which made them impractical for medium to high frequency trading.
- Backtesting — Most backtesting solutions only have low-resolution data or do not integrate with modern data science tools.¹
Understanding these problems from the beginning enabled the developers to truly create an institutionally capable framework and trading bot.
Additionally, the Hummingbot team identified inherent problems with the way current market makers operated and how unfair they conducted this role in the market. That is why Hummingbot is making accessible to everyone market making strategies while simultaneously trying to prevent malicious market making by using an incentive structure that encourages good types of market making. Through their liquidity mining program, contributors are rewarded for adding liquidity to connected markets².
The amazing thing though, is it doesn’t end there. Although the team has developed a capable and relatively robust product, development still continues. We recently saw the release of v0.45 and the new and improved Hummingbot Gateway v2 is coming soon.
Hummingbot Gateway
Hummingbot Gateway is API middleware that allows Hummingbot to connect to decentralized exchanges on various blockchain protocols. Essentially, Gateway is a light web server that enables Hummingbot client to send and receive data from different blockchain protocols and provides an easier entry point for external devs to build connectors to other protocols.
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.
Version 1 had a relatively simple architecture which did not account for many of the failure modes seen in DEXs such as stuck blockchain transactions. APIs also fail regularly. This made it unreliable. Because of this, V1 is being replaced with V2. It will be much more robust and reliable, and have a great experience for both users and developers.
V2 will protect against nonce errors by making transaction-emitting APIs “nonce-aware”. Where the hummingbot or gateway clients are emitting transactions quickly — faster than the blockchain can process them — the gateway will track the newest nonce locally. That way new nonces will not overwrite the nonce of sent transactions.
V2 will account for stuck and dropped transactions by allowing for the cancellation or retry of stuck transactions. Blockchain node errors and API rate limits will also be handled in V2. Security of the users private keys will be improved through the implementation of better SSL protection and encrypted wallet files.
Gateway V2 is overhauling the current, clunky user experience and making it much smoother; modelled off industry standard user experiences of backend systems like Apache or MySQL. This will make setting up and maintaining Gateway, either with hummingbot or custom client software, much easier. This overhaul will also see an improvement to the developer experience³.
If you want to know more, the team is hosting a webinar on Nov 13th. Check out the events page on their website.
Hummingbot as a quant trading system
Important for our purposes is the assessment of the Hummingbot platform as a quantitative trading platform. In its entirety, it could be used as a quant system. The platform has data feeds from official exchanges, strategy design functionality by extending existing strategies or starting from scratch, backtesting with high-definition data, and trade execution functionality. The potential problem with this is any quant who would use it as such would need to have strong developing skills, specifically with python. A comprehensive and robust strategy builder component would be an amazing feature to improve this already extremely capable platform.
Author: Gavin Stein