# Introduction

{% hint style="info" %}
LemmaSwap is a new type of decentralized exchange (DEX) protocol that allows traders to execute spot swaps using an underlying perpetual futures exchange's liquidity.&#x20;
{% endhint %}

## Why use LemmaSwap?

* For traders:
  * Deeper liquidity when executing spot swaps
* For liquidity providers:
  * Highly composable ERC20 assets
  * No impermanent loss
  * Yield generation via spot trading fees and funding rate PnL

## How does it work at a high level?

LemmaSwap holds assets such as ETH, BTC, USDC etc. on its balance sheet and acts as a counterparty to every trade while simultaneously hedging to keep its portfolio delta equal to one.

Liquidity providers can contribute to the assets on the LemmaSwap balance sheet in two ways:&#x20;

<figure><img src="https://2299409159-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKflmlnoQTxv99SMPsfK%2Fuploads%2FwE8leZoLkgQC1XPPFvob%2FFrame%2011027.jpg?alt=media&#x26;token=54159ad4-1932-477d-b9f6-fc91a1acf04f" alt=""><figcaption><p>USDL backed by hETH, hBTC and USDC</p></figcaption></figure>

* By minting USDL  —  the LemmaSwap stablecoin, which is backed by pools of hedged assets (eg. hETH below is ETH + a short ETH position)<br>
* By minting synthetic tokens, which are backed by a mix of spot assets and 1x long perpetual futures positions (eg. ETH\*, a LemmaSwap synthetic asset can be backed by spot ETH and/or a long ETH perp)

<figure><img src="https://2299409159-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKflmlnoQTxv99SMPsfK%2Fuploads%2FKZPtRJbCAblhshaBSBf8%2FFrame%2011028.jpg?alt=media&#x26;token=c77efb6b-a607-4248-a7ec-be3552fdeee4" alt=""><figcaption><p>ETH* backed by spot ETH and/or a 1x ETH long</p></figcaption></figure>

Now let’s say a user wants to swap ETH for BTC, and LemmaSwap has USDL and synthetic BTC (BTC\*) as liquidity on its balance sheet. This liquidity is used to execute swaps in two simple steps:

* The user deposits ETH and LemmaSwap hedges it by increasing its short ETH position by the same amount deposited
* LemmaSwap increases its long BTC position by the same USD amount of ETH deposited and sends back to the user the freed up BTC collateral

<figure><img src="https://2299409159-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTKflmlnoQTxv99SMPsfK%2Fuploads%2Fhi5d4pOcrn8tjYkoZwh2%2Fbt.png?alt=media&#x26;token=38a0b9ec-848e-4d96-bbed-4bd0f65c473c" alt=""><figcaption><p>Swapping ETH for BTC</p></figcaption></figure>

At all times, USDL is backed 1:1 with USDC or a ETH delta neutral position, and BTC\* is backed 1:1 with a BTC spot or a 1x long BTC position.


---

# 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.lemma.finance/introduction.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.
