# Market-Making Example

When a trader agrees to **both buy and sell** up to a certain number of NFTs, they're doing what's known as "[market-making](https://www.investopedia.com/terms/m/marketmaker.asp)".&#x20;

Market-makers are important because they make markets more [liquid](https://www.investopedia.com/articles/basics/07/liquidity.asp), meaning they let other traders enter/exit the market at a **more favorable price**.

If someone is always willing to buy NFT X at 10 SOL and sell it at 12 SOL, then any trader holding that NFT **know for a fact** that they can always leave the market for 10 and enter back at 12. This gives traders more **confidence** and they're more willing to buy the NFT.

{% hint style="success" %}
Market makers **don't work for free**. That's the entire point of this article. If you're market-making - we're gonna get you paid.

Paid how much? It's **entirely up to you**! TensorSwap lets you configure **your own market-making fee** in the **range of 0-25%**. 💸
{% endhint %}

Below is a detailed example that steps through everything you might want to know about market-making:

* How does it work on TensorSwap?
* What happens as the NFT price falls/rises/stays flat?
* What APY can you expect?
* What are some risks involved?

## Lessdo an example ✏️

{% hint style="info" %}
The below example really zooms in on the **risks/benefits** of market-making.

For a detailed, step-by-step walkthrough of how to set up a market-making order check out our [market-make](https://docs.tensor.trade/trade/get-started-with-tensors-amm/market-make "mention") tutorial.
{% endhint %}

You already know that a [market-maker](https://www.investopedia.com/terms/m/marketmaker.asp) is someone who is offering to both buy and sell a certain number of NFTs. Sounds cool, so you decide to set up a market-making order to **sell up to 10 NFTs** and **buy up to 10 NFTs**.

You pick a [linear curve](https://docs.tensor.trade/provide-liquidity/advanced-concepts/bonding-curves) with a 0.1 step, meaning:&#x20;

* each **consecutive purchase** your order makes will be **0.1 lower**
* each **consecutive sale** your order makes will be **0.1 higher**

You choose a **5% fee**.

You plug all those settings into TensorSwap's UI and it looks something like this:

<figure><img src="https://3364018093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTP1CBEbwTzCoyWl9J8MH%2Fuploads%2FOat8R3mVJZunQ5A4YPfi%2Fimage.png?alt=media&#x26;token=795da07a-0a5f-408c-a4dd-76e7f1551f11" alt=""><figcaption></figcaption></figure>

Let's understand a bit more about what's going on here. Visually, we could represent your order as follows:

<figure><img src="https://3364018093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTP1CBEbwTzCoyWl9J8MH%2Fuploads%2FryKwVjSi40laenAEwQDt%2Fimage.png?alt=media&#x26;token=f058a185-557a-49b5-aa6b-9a151a6bf0f6" alt=""><figcaption></figcaption></figure>

We start off in the middle (10 NFTs and 4.28 SOL).

I guess the first question you might have is - **why 4.28?** Seems a weird (non-round) number?

Here's the calculation:

* You picked a starting price of 1 SOL.&#x20;
* That's your starting SALE price. Starting PURCHASE price is always **one notch down**, which in this case is 1 - 0.1 = 0.9 SOL.
* But then you also picked a 5% market-making fee. That effectively means that you're going to pay 5% less for any NFTs you buy, which means your **true starting purchase price** is 0.9 \* (1-0.05) = **0.86** SOL (you might notice the summary text below the widget conveniently points that out!)
* Ok so now you're saying you want to buy 10 NFTs, each 0.1 lower than the previous. The total is thus:&#x20;
  * (0.9 + 0.8 + 0.7 + 0.6 + 0.5 + 0.4 + 0.3 + 0.2 + 0.1 + 0) \* 0.95 = 4.275 or **rounded to 4.28**.

The math for 18.78 looks similarish, just in the reverse direction. Will leave it as an exercise for the reader 😉

So back to the **middle** ("starting point" in the picture above).

* If we move **left** 👈 on the chart, it means the price is **decreasing**. This means our order is scooping up NFTs. That's why the bottom half of the chart is **green** **= you're buying**.
* If we move **right** 👉 on the chart, it means the price is **increasing**. This means our order is selling off NFTs. That's why the top half of the chart is **red** **= you're selling**.

At the two **extremes**:

* On the very **left 👈** your order has bought the 10 NFTs it wanted to buy. Add the 10 new ones to the 10 you originally had in the order, and you're now **20-NFT rich**! 🎁
* On the very **right** 👉 your order has sold the 10 NFTs it had for SOL. Since the price kept increasing your total is now a **whopping 18.78**, way more than the original 4.28. 🤑

Keep this visual representation in mind as you go through the rest of the page.

## What happens as the NFT price changes?

### Case 1: NFT price ranges/stays flat 〰

The price ranges from 0.9 SOL to 1.1 SOL. Let's say you're lucky, and while there's volatility other traders execute **5 buy and 5 sell** trades against your order.

The result:

* ✅ Your order is **exactly where it started**. It bought 5 NFTs and sold 5 NFTs. You still have 10.
* ✅ You've made some **fees** 💸 in the process! For each round trip (purchase + sale) your order collected a 5% fee, meaning you made 0.25 SOL (5 round trips \* 5% \* 1 SOL)!
* ✅ And don't forget you also earned some juicy [reward points](https://docs.tensor.trade/welcome/rewards) in the process! ⭐️&#x20;

{% hint style="success" %}
Takeaway: when the market **ranges/stays flat**, you **make money from fees**. 💸
{% endhint %}

### Case 2: NFT price falls 📉

The price falls from 1 SOL to 0.5 SOL. Other **traders sell into your order** as the price keeps falling.

Your order now has **more NFTs than before**. Specifically, the following purchases occurred:

* Your order bought its 1st NFT at 0.9
* Your order bought its 2nd NFT at 0.8
* Your order bought its 3rd NFT at 0.7
* Your order bought its 4th NFT at 0.6
* Your order bought its 5th NFT at 0.5

The result:

* ✅ Total **spent: 3.5 SOL**. Your order state: **15 NFTs + 0.78 SOL.** You're NFT-rich! 🎁
* ✅ As the price fell you bought some NFTs **on the cheap**, precisely when you should be buying
* ✅ You made some **fees**! 💸 \~0.125 to be precise (1/2 of what you'd make on 5 round trips)
* ✅ You earned some **reward points**! ⭐️

{% hint style="success" %}
Takeaway: when the market **falls**, you **buy NFTs on the cheap**. 🎁
{% endhint %}

### Case 3: NFT price rises 📈

The price rises from 1 SOL to 1.5 SOL. Other **traders buy from your order** as the price keeps rising.

Your order now has **fewer NFTs than before**, but more SOL. Specifically, the following sales occurred:

* Your order sold its 1st NFT at 1
* Your order sold its 2nd NFT at 1.1
* Your order sold its 3rd NFT at 1.2
* Your order sold its 4th NFT at 1.3
* Your order sold its 5th NFT at 1.4

The result:

* ✅ Total **earned: 6 SOL**. Your order state: **5 NFTs + 10.28 SOL.** You're SOL-rich! 🤑
* ✅ As the price rose you sold some NFTs **at great prices**, precisely when you should be selling
* ✅ You made some **fees**! 💸 \~0.125 to be precise (1/2 of what you'd make on 5 round trips)
* ✅ You earned some **reward points**! ⭐️

{% hint style="success" %}
Takeaway: when the market **rises**, you **sell NFTs at great prices**. 🤑
{% endhint %}

You see how no matter what the market does, market-makers on TensorSwap **win & get paid**.&#x20;

## What APY can you expect? 🤑

APY can be misleading so be careful when reasoning about it. If someone is promising you a huge APY, chances are they're not telling you something.

To help you think through what APY looks like on TensorSwap, we explore a real-world example in: [what-apy-can-you-expect](https://docs.tensor.trade/provide-liquidity/what-apy-can-you-expect "mention")

## What are the risks involved? 🤔

That's a really important question to ask - glad you did it.&#x20;

Check out [what-are-the-risks](https://docs.tensor.trade/provide-liquidity/what-are-the-risks "mention") for a detailed rundown.

## Ready to get started? 🚀

Head on over to <https://www.tensor.trade/> and setup your first order!

{% hint style="info" %}
Want guidance on HOW to set up your order?

Check out [setting-up-your-market-making-order](https://docs.tensor.trade/provide-liquidity/setting-up-your-market-making-order "mention").&#x20;

There you'll find a detailed overview of each of the config params & **3 simple templates** for an MM pool (low risk 🟩, medium risk 🟨, and high risk 🟥).
{% endhint %}
