> For the complete documentation index, see [llms.txt](https://components.agoric.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://components.agoric.com/smart-contracts/defi/like-peg-swap-amm.md).

# Like-peg Swap AMM

{% hint style="warning" %}
**Limited Developer Support**

All assets represented in this library are community built, which means limited support from the Agoric OpCo development team. Please use components, APIs, and front-ends with caution. &#x20;
{% endhint %}

## **Summary**

This component implements a curve for Agoric's Automated Market Maker (AMM) which minimizes slippage for like-asset pairs, similar to curve.fi's StableSwap in Ethereum.

It includes:

1. A new version of bondingCurves.js using a new curve structure
2. An update to Agoric's MultiPool Autoswap contract to include a term that chooses which bonding curve to use

## **Details**

Standard X\*Y=K automated market maker (AMM) curves are meant for asset pairs which have relative volatility and require price responses (slippage) based on trades. However, there is a large demand for AMM swaps of like-assets (e.g., USDC-USDT, WBTC-TBTC, ETH-sETH) - particularly stable token pairs - for which the slippage driven by X\*Y=K curves is not desirable. [Curve.Fi](http://curve.fi/)'s StableSwap implementation on Ethereum has had great success driving high volume of these trades. Agoric's stable local currency, IST, will need to trade against other stable tokens with minimal slippage. This adjusted curve implementation will allow for that.

## **Explore on GitHub**

<https://github.com/robor-systems/agoric-amm-curve/>

{% hint style="info" %}
Built by [Robor Systems](https://github.com/robor-systems)
{% endhint %}


---

# 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://components.agoric.com/smart-contracts/defi/like-peg-swap-amm.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.
