> For the complete documentation index, see [llms.txt](https://docs.toggle.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toggle.money/how-it-works.md).

# How It Works

Plain language. No extra words.

## You Deposit a Pair

You deposit **USDG + a memecoin** into a Toggle pool. Same idea as providing liquidity anywhere else. Two tokens, one position.

Toggle then splits them.

| Side         | Where It Lives        | What It Does        |
| ------------ | --------------------- | ------------------- |
| **USDG**     | Morpho ERC-4626 vault | Earns lending yield |
| **Memecoin** | Held as the token     | Waits for a swap    |

{% hint style="info" %}
An ERC-4626 vault is a standard savings box. You put USDG in. You get a receipt token back. The receipt grows as borrowers pay interest. That is yield. It is one-sided. There is no second token in the vault, so there is **no impermanent loss on that USDG while it rests**.
{% endhint %}

## Someone Wants to Swap

Aggregators treat Toggle as a liquidity source. Toggle quotes how much it can fill. If the route is good, part or all of the swap comes here.

Then, in **one transaction**:

{% stepper %}
{% step %}
**Pull USDG**

Toggle withdraws only the USDG that trade needs from Morpho.
{% endstep %}

{% step %}
**Pair with the meme**

That USDG sits next to the memecoin as Uniswap v4 concentrated liquidity.
{% endstep %}

{% step %}
**Swap**

Uniswap v4 runs a normal swap. The trader gets what they bought. The pool keeps the LP fee.
{% endstep %}

{% step %}
**Go home**

Leftover USDG goes back into Morpho. The memecoin stays as the memecoin.
{% endstep %}
{% endstepper %}

```mermaid
flowchart LR
    Rest[USDG in Morpho] --> Pull[Pull for swap]
    Meme[Memecoin held] --> Pair[Pair in DualPool]
    Pull --> Pair
    Pair --> Swap[Uniswap v4 swap]
    Swap --> Rest
    Swap --> Meme
```

The liquidity is in the pool only for the swap. Then it goes home.

## After the Swap

USDG is earning again. The meme is still held spot. You did not have to click anything.

If nobody trades for a while, that is fine. The dollars keep earning in the vault. Classic LP pays you nothing between trades. Toggle pays the vault rate the whole time.

{% columns %}
{% column width="50%" %}
**As an LP**

Deposit. Hold. Withdraw when you want (after the pool’s short deposit lock, if any). Your share is a slice of the pool: vault USDG + meme inventory + fees.
{% endcolumn %}

{% column width="50%" %}
**As a swapper**

A normal Uniswap swap. You do not need to know the USDG was in Morpho a moment earlier. Routers that quote Toggle correctly will route through it when the price is right.
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.toggle.money/how-it-works.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
