# ButtonSwap

## Overview

ButtonSwap is an Automated Market Maker (AMM) designed to solve several problems with existing AMMs. Namely, it is the only AMM suitable for use with rebasing tokens. In every other AMM, token rebases will affect the price of tokens in a pool, resulting in mispriced assets and losses for liquidity providers (LPs). ButtonSwap allows users to provide liquidity for a variety of assets without the need of additional pool incentives to compensate LPs.

The types of assets for which ButtonSwap is comparatively best-suited include:

* Liquid staking derivatives (Lido’s stETH, Rocketpool’s rETH)
* Appreciating collateral tokens (Aave aTokens, Compound cTokens)
* Reward-bearing tokens (FOXy, OHM)
* Elastic commodities (AMPL)
* Buttonwood bwTokens (bwETH)

ButtonSwap is also a constant-product market maker, meaning its invariant is also of the form [`x*y=k`](#user-content-fn-1)[^1], much as in Uniswap v2. However, there are a few key differences.

ButtonSwap pools:

1. Allow users to swap for any rebasing asset at a fair value
2. Allow LPs to mint share tokens by only depositing a single asset (with constraints)
3. Allow LPs to redeem share tokens for a single asset (with constraints).&#x20;

<br>

[^1]:


---

# 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.prl.one/buttonwood/learn/buttonswap.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.
