There are 2 major sources of profit running a grid bot,
bot_profit = strategy_profit + market_making_rewards
This is the gain by executing the grid strategy 7/24. The bot will constantly enqueue the Buy/Sell orders in a LIFO (Last In, First Out) manner, and make money by earning the price difference of a single (or sometimes multiple) grid interval(s) from a
Profit_i = Profit for the i'th match.
Q = Grid Quantity (or Quantity/Order)
D_i = Price Difference for the i'th match
The total strategy profits is the sum of every single match.
Let's take a look at an example below. Assume we have a grid setup for ETH that goes between 2500 ~ 3500, with a $200 interval, and the qty/order is 1ETH. Then the orders queue would look like this:
At t3, the first order match ([email protected] and [email protected]) happens, and bot helps us make a $200 profit with a grid quantity (Q) of 1ETH, and price difference (Di) of $200.
This comes from rebates received when the bot places limit orders on the orderbook.
Mango Market, for example, gives 3bp (0.03%) Maker rewards currently.
Position profit (P_p) is self explanatory. It is the profit by holding the positions since bot started. This can also be a loss in the case of a reversal market from the time your strategy started.
position_profit = (current_market_price - avg_position_cost) * position_size
We show Bot APR (APR_b) and Total APR (APR_t) throughout the product. They are calculated as following:
You can go to the Portfolios page to check profits of all your running bots.