Tensor
  • 👋Welcome
    • ⚡About
    • 🔗Links
    • 🛣️Roadmap
    • ⭐Rewards
      • 4️⃣Season 4!
      • 🤝Referrals!
      • 3️⃣Season 3!
      • 👾End of Season 2 + Tensorians are coming!
      • 2️⃣Season 2!
  • 👾Tensorians
    • 🖖Tensorians Manifesto
  • 📈TRADE
    • 🪙Fees & Royalties
    • 💻API & SDK
    • ❌Troubleshooting
      • 🙋Share an Error
      • 😭Doesn't load - what do?
      • 🔍Verify an NFT Mint
      • 🤔Weird Phantom Transactions
      • 💎Rarity
    • 🔀Get Started with Tensor's AMM
      • 🎁Buy or Bid
      • 🤑Sell or List
      • 🔁Market-Make
      • ⛔Closing an Order
      • 🛑Purchase Caps
      • 📺Video Tutorials
    • 🎲YOLO Buy
    • ↔️Shared Escrow
  • PROVIDE LIQUIDITY
    • 🤔Why Provide Liquidity?
    • 🌊How to Provide Liquidity
    • ✏️Market-Making Example
    • 🤑What APY can you expect?
    • 🛑What are the Risks?
    • ⚙️Setting up your Market-Making Order
    • 🔬Advanced Concepts
      • 📈Bonding Curves
      • ⚠️Impermanent Loss
  • 🤝Work with us
    • 🧑‍🎨Creator Portal
      • 📒Claiming or Updating an Existing Collection
      • 📖Verifying a new NFT Collection
      • 📚How to get a Creator Page?
    • 🎨Creator Partnerships
    • 🤙Contact us
Powered by GitBook
On this page
  • What are bonding curves?
  • BUY example 📉
  • SELL example 📈
  • Types of curves
  • Why are bonding curves useful?
  • Do I HAVE to use a curve?
  1. PROVIDE LIQUIDITY
  2. Advanced Concepts

Bonding Curves

PreviousAdvanced ConceptsNextImpermanent Loss

Last updated 4 months ago

TensorSwap lets you setup 3 types of orders:

  1. Collection-wide bids

  2. List orders

  3. Market-making orders

All 3 make use of .

What are bonding curves?

A "bonding curve" is just a fancy way of saying "when someone executes a trade against my order, I want the price to change".

BUY example 📉

You decide you want to buy up to 5 NFTs, starting at 1 SOL, with a delta or "step" of 0.1 SOL.

This means you're setting up an order to do the following purchases:

  1. 1st purchase: 1 SOL

  2. 2nd purchase: 0.9 SOL (1 - step of 0.1)

  3. 3rd purchase: 0.8 SOL (1 - 0.1 * 2)

  4. 4th purchase: 0.7 SOL (1 - 0.1 * 3)

  5. 5th purchase: 0.6 SOL (1 - 0.1 * 4)

Thus in total, you're prepared to spend 4 SOL on 5 NFTs.

Here's what it would look like in Tensor UI:

SELL example 📈

This means you're setting up an order to do the following sales:

  1. 1st sale: 1 SOL

  2. 2nd sale: 1.1 SOL (1 * 1.1)

  3. 3rd sale: 1.21 SOL (1 * 1.1^2)

  4. 4th sale: 1.331 SOL (1 * 1.1^3)

  5. 5th sale: 1.4641 SOL (1 * 1.1^4)

Thus in total, you're standing to make 6.11 SOL from 5 NFTs.

Here's what it would look like in Tensor UI:

Types of curves

Currently Tensor supports 2 types of curves:

  1. Linear (step measured in SOL)

  2. Exponential (step measured in %)

Choose a linear curve if you want a more gradual/static change in price. Exponential curves will adapt better depending on the current price (smaller steps if the price is low, larger steps if the price is high).

For example, a SELL order starting at 1 SOL:

  1. using a linear curve with a 0.1 SOL difference, after 100 trades will be selling at 11 SOL (1 + 0.1 x 100)

  2. using an exponential curve with a 10% difference, after 100 trades will be selling at 13,780 SOL (1 x 1.1^100)

Similarly, a BUY order starting at 1 SOL:

  • using a linear curve with a 0.1 SOL difference, after 5 trades will be selling at 0.5 SOL (1 - 0.1 x 5)

  • using an exponential curve with a 10% difference, after 5 trades will be selling at 0.62 SOL (1 / 1.1^5)

Why are bonding curves useful?

Bonding curves let you DCA in and out of a trade.

Let's say you want to acquire up to 5 NFTs of a certain collection, but you're unsure how low the price will go. The lower it goes, the more you want to buy.

You can set up a BUY order with a linear bonding curve, saying "I'm prepared to buy 1st NFT at 1 SOL, 2nd at 0.9 SOL, etc). That way you don't need to care about what the market does - if the market stays put, well great you bought one if the market goes lower, well great you bought more than one!

Similarly for selling - maybe you want to sell your portfolio, but you don't know how high the market will go. The higher it goes, the more you want to sell.

You can set up a SELL order which increases the price by eg 10% with each sale... you get it.

In theory, there's nothing stopping you from putting in bids/listings at different prices by hand - but doing so using a bonding curve is just much faster and more flexible. If you ever change your mind it only takes 2 clicks (1 to cancel old order - 1 to set up a new order) and you're done, vs having to place/cancel multiple bids/listings by hand.

Do I HAVE to use a curve?

You don't have to. If you'd like to list 5 NFTs all at the same price or buy 5 NFTs all at the same price, just set the delta or "step" to 0.

You decide you want to sell up to 5 NFTs, starting at 1 SOL, with a delta or "step" of 10% (note previously we used a SOL value, now we're using a % value - more about this ).

🔬
📈
bonding curves
later