# Market Maker Incentives

## Quick Overview

Users who provide liquidity to the Spin order book can participate in an incentivized liquidity mining program.

The goal of this program is to ensure the deep liquidity of the Spin Perpetual Futures and Spot markets. In addition to onboarding professional market-making firms, Spin aims to allow market-making in a more decentralized way: Any user can participate in the liquidity mining program by depositing funds to a special Liquidity Mining Vault or setting up their [Market Making Bot](https://github.com/spin-fi/spin-market-maker). The final reward will depend on the user’s KPIs.

**There are four metrics that will impact the final reward:**

1. Spread from the middle of the market for provided liquidity;
2. Liquidity size;
3. Uptime of providing liquidity;
4. Maker volume.

According to the algorithm described below, the final S-score of each participating user is calculated. The user receives a share of the total rewards pool for the epoch corresponding to his share of the Final S-score.

## Incentive program visualization

<figure><img src="/files/etbJTYFrPkaJTzOuq0pU" alt=""><figcaption></figcaption></figure>

## Incentives calculation algorithm

**Step 1.** Calculate the sum of the user’s S-Scores for an epoch.

<figure><img src="/files/o2qaHmPoXKQnOoqUggdG" alt=""><figcaption></figcaption></figure>

During each epoch, Spin takes a snapshot of the order book once a minute at a random moment. For every minute the user gets an S-Score depending on the amount of liquidity provided and spread from the middle of the market. After each epoch, all S-Scores for each minute are summed up.

Below is the list of parameters that should be met by users' orders to be taken into account during the calculation of the S-score:

1. Minimum order volume: $300.
2. Maximum spread from mid-price: 30 bps or 0.3% for NEAR (i.e. total spread is 60 bps, it varies for different markets).
3. Liquidity is provided for both bids and asks.

**Step 2.** Our snapshot counter calculates the amount of time the market maker worked during an epoch: The number of snapshots where the users' S-Scores are higher than 0.

<figure><img src="/files/b5zUZzDzwWhSNJoofImC" alt=""><figcaption></figcaption></figure>

**Step 3.** Calculate the user's maker volume for a given market over an epoch.

**Step 4.** Calculate the Final S-Score value for the user.

<figure><img src="/files/URkfOL1ssg05l8WZqbv4" alt=""><figcaption></figcaption></figure>

**Step 5.** The Final S-score of each user is divided by the total amount of the S-scores. This determines the share of the total rewards for the given instrument the user will get.

<figure><img src="/files/ordo9c9wkALeSXCUEfdO" alt=""><figcaption></figcaption></figure>

*Amount  of NEAR the user receives:*

<figure><img src="/files/KJryZVC8klub9X6DphPU" alt=""><figcaption></figcaption></figure>

![](/files/E4ijmHMJAxTId7WDb5Mz)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spin.fi/spin-token/market-maker-incentives.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
