Synthetix Debt Hedging Bot

Hedge your sUSD debt on centralized exchanges

Synthetix Grants
2 min readSep 30, 2021

Intro

SNX stakers know the pain of fluctuating sUSD debt. Hedging debt as a staker can be a pain and currently there are no tools that properly mirror the debt pool. The grantsDAO commissioned this bot for stakers to automatically hedge their debt on centralized exchanges.

Overview

This bot uses Discord as an interface to a centralized exchange, currently only Binance is supported with others to be added in the future. The hedging bot takes USDT and trades it to the assets that compose the global sUSD debt pool, including short positions. If the asset is not supported on Binance, the USDT will be traded for the base currency (default ETH). The bot will rebalance when the TOLERANCE threshold is met.

The bot in action 🤖

How To Use

Please see the Docs for installation & configuration instructions.

Required:

Basics:

  • Install the dependencies and start the server
  • Create & configure Discord bot & add to personal server
  • Swap sUSD to USDT and deposit to Binance subaccount
  • Run the bot 🤖

Backtesting

The critical question before launching a bot is how to be sure that it won’t burn much money in the long term.

We have conducted a backtest of the bot’s strategy. Here is the hedging portfolio backtesting data for nine months:

Note that there is a steady downward drift over time of the hedging portfolio relative to active debt. This is mostly from exchange fees and slippage, but this doesn’t factor in exchange fees accrued by the staker, which can offset/reverse those losses over time.

In addition, the long-term trend is dependent on the TOLERANCE parameter. The lower TOLERANCE, the more transactions are done, the more fees are paid.

Feedback

Please let us know your feedback and ask any questions you may have in the #grants-dao channel of the Synthetix Discord.

--

--