# 什么是 Autoswap

自动换币功能让您只需使用**单一代币**即可提供、提取和管理流动性。无需手动计算比例、执行兑换后再返回操作——Byreal 将兑换与流动性操作合并为一笔原子交易，一步完成。

## Autoswap 的功能

| 功能        | 说明                           |
| --------- | ---------------------------- |
| **创建头寸**  | 使用单一代币（代币 X 或代币 Y）开设新的 LP 头寸 |
| **增加流动性** | 使用单一代币为现有头寸追加流动性             |
| **减少流动性** | 以您选择的单一代币提取流动性               |
| **复制头寸**  | 使用单一代币复制其他 LP 的头寸            |
| **再平衡**   | 一键完成关闭当前头寸并在新价格区间开设新头寸的全流程   |
| **复投**    | 一键领取已赚取的交易手续费，并将其追加为流动性      |

## 运作原理

1. 您选择一种代币并输入金额
2. Byreal 根据您设定的价格区间和当前池价，计算最优兑换比例
3. 兑换通过 [Jupiter](https://jup.ag/) 及 Solana 上其他主流 DEX 聚合器路由，在所有流动性来源中获取最优汇率
4. 兑换与流动性操作以原子方式执行——若任何步骤失败，整笔交易将回滚，资金原路退回

## 安全机制

* **最优路由** — Byreal 将每笔 Autoswap 通过 Jupiter 及其他主流 DEX 聚合器路由，对比 Solana 上所有 DEX 的价格，寻找最优路径
* **原子交易** — 兑换与存入作为一笔交易执行；若任何步骤失败，全部回滚
* **价格影响保护** — 价格影响达 5% 时发出警告，达 10% 时自动阻止交易，防止在低流动性池中遭受重大损失
* **Gas 预留** — 存入 SOL 时，系统自动预留 0.02 SOL 用于支付交易手续费

**准备好开始了吗？** 请参阅[如何提供流动性](/zh-my/liquidity-farming/how-to-provide-liquidity.md)和[如何管理您的头寸](/zh-my/liquidity-farming/manage-lp-position.md)获取分步指南。


---

# 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.byreal.io/zh-my/liquidity-farming/what-is-autoswap.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.
