Skip to content

ApeWorX/dumptruck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
title Dumpy the Token Dumptruck
author ApeWorX LTD.
keywords
DeFi
Trading
Uniswap
required_configuration
BUY_TOKEN
SELL_TOKEN
AVG_SELL_RPM

Overview

Dumpy is a bot that automates selling some tokens you have into some tokens you want at a defined frequency, using an RSI signal based on the near-term historical price trends to sell more tokens when the market sentiment is overly positive, and sell less when the market sentiment is overly negative.

When compared to a traditional DCA strategy, this strategy has been shown to increase sales revenues 2.5% or more in practice.

Configuration

Swap Configuration

Configuration variables used to execute the swap via the uniswap-sdk package.

BUY_TOKEN

required

Token to buy using SELL_TOKEN. Can be either a symbol (lookup via ape-tokens) or address. The ratio of BUY_TOKEN to SELL_TOKEN is used to produce the price metric.

SELL_TOKEN

required

Token to sell using BUY_TOKEN. Can be either a symbol (lookup via ape-tokens) or address. The ratio of BUY_TOKEN to SELL_TOKEN is used to produce the price metric.

AVG_SELL_RPM

required

The average amount of SELL_TOKEN to sell during each sample period. If rsi is 50, then the bot will sell exactly AVG_SELL_RPM (times SAMPLE_PERIOD). If rsi is 100, it will sell this amount times RATE_MULTIPLIER. If rsi is 0, it will sell this amount divided by RATE_MULTIPLIER.

TODO: Make this a parameter? (Default to 0)

MIN_SELL_SIZE

optional

The minimum amount of SELL_TOKEN to sell in order to trigger a trade. Can be either a float value (converted to decimal.Decimal), or an amount that is convertible via ape-tokens, e.g. "100 SELL".

TODO: Make this a parameter? (Default to 0)

RATE_MULTIPLIER

optional

The multiple to use to determine sale size, in conjunction to measured rsi. If rsi is 50, then the bot will sell exactly AVG_SELL_RPM (times SAMPLE_PERIOD). If rsi is 100, it will sell AVG_SELL_RPM times this multiple. If rsi is 0, it will sell AVG_SELL_RPM divided by this multiple.

TODO: Make this a parameter (Defaults to 10)

SWAP_SLIPPAGE

optional

The value to use for "slippage" (the difference between the market price and the trade price), when performing a trade. Is unitless, and must be a floating point value less than 1 (suggestion is ~"0.01", or 1%).

TODO: Make this a parameter

INTERMEDIATE_TOKENS

optional

The token(s) to index for trading routes besides SELL_TOKEN and BUY_TOKEN. Must be a comma-separated string of either addresses or token symbols, e.g. "WETH,WBTC,USDT,USDC". Defaults to using the configuring tokenlist via ape-tokens.

BENEFACTOR_ADDRESS_OR_ALIAS

optional

Set this to add receiver= to the uni.swap command, sending all swap proceeds to the given benefactor address or alias. Defaults to unused (bot.signer receives all proceeds).

RSI Filter Configuration

Parameters that set the RSI indicator filter.

Defaults to 10hr/600min window

SAMPLE_PERIOD

optional

Number of minutes between sampling price for RSI filter. Defaults to 5 mins.

RSI_PERIOD

optional

Number of samples to hold in the RSI filter's sampling window. Defaults to 12 samples (12 x 5 mins = 1hr).

TODO: Make this a parameter? (Would have to dynamically adjust the window)

RSI_FILTER

optional

Relative window size of the simple moving average (SMA) filter applied to RSI filter. Used for smoothing the RSI signal. This is the value that the rsi metric reports (not the raw RSI, which is noisy). Defaults to 0.5 (or half of the RSI filter's sampling window).

TODO: Make this a parameter? (Would have to dynamically adjust the window)

Metrics

inventory

Metric that tracks the amount of SELL_TOKEN inventory the bot has access to. In units of SELL_TOKEN.

revenue

Metric that tracks the amount of BUY_TOKEN received when a trade occurs. In units of BUY_TOKEN.

price

The exchange rate of BUY_TOKEN to SELL_TOKEN, based on current market conditions.

rsi

The smoothed RSI filter value of price used to trigger trades.

amount_to_sell

The computed amount of SELL_TOKEN to sell based on rsi.

May not correspond exactly to a sale if the bot does not have enough inventory, or in paper trading mode.

About

Dumpy the Token Dumptruck

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages