> For the complete documentation index, see [llms.txt](https://docs.pancakeswap.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pancakeswap.finance/chinese/jiao-yi-gong-ju/pancakeswap-auto-slippage.md).

# PancakeSwap Auto Slippage

PancakeSwap 推出了自动滑点（Auto Slippage）功能，让交易更轻松、更高效。自动滑点会根据当前市场状况自动为您调整滑点，有助于防止交易失败，并降低因滑点错误而造成损失的风险。

## 什么是滑点？

当您期望的交易价格与交易实际成交价格不同时，就会产生**滑点**。这可能由多种原因导致：

* 市场波动 —— 在您下单和确认之间，价格可能快速变动
* 流动性不足 —— 在您期望的价格下没有足够的代币可供交易
* 区块链延迟 —— 确认时间可能导致价格在交易最终完成前发生变化

{% hint style="info" %}
示例：

您尝试将 100 CAKE 兑换为 BNB，期望 1 CAKE = 0.01 BNB。但当您的交易成交时，价格已经变动，您每个 CAKE 只能获得 0.0098 BNB。这一微小差异就是我们所说的滑点。
{% endhint %}

## 什么是滑点容差？

**滑点容差**是指在您的交易被取消之前，您愿意接受的最大价格差异。如果价格变动超过您设置的容差，您的交易将会失败，以防止任何意外损失。

{% hint style="info" %}
示例：

如果您将滑点容差设置为 1%，而在交易完成前价格变动超过 1%，则交易将无法成交。
{% endhint %}

## 如果我的滑点容差设置得太低会怎样？

如果您的滑点容差**设置得太低**，交易失败的几率会更高 —— 尤其是在以下情况：

* 市场波动剧烈
* 您兑换的是流动性较低的代币
* 使用带有税费或机制复杂的代币

{% hint style="warning" %}
重要提示：即使交易失败，您仍会因尝试交易而消耗 gas 费。
{% endhint %}

## 介绍自动滑点 —— 自动滑点为何有用？

自动滑点会根据当前市场状况自动调整您的滑点，为您节省时间并降低交易失败的风险。

有了**自动滑点**，您无需手动调整滑点容差。这有助于避免以下常见问题：

* **滑点设置过低**，可能因执行过程中的微小价格变化而导致交易失败。
* **滑点设置过高**，可能因接受了更宽的价格区间而导致收到的代币比预期更少。

{% hint style="info" %}
为确保最佳交易体验，自动滑点已**自动开启**。如果此前已设置了手动滑点容差，则将应用新的滑点设置。
{% endhint %}

## 自动滑点如何运作？

<pre class="language-html"><code class="lang-html"><strong>Auto Slippage (%) = (Gas Cost in USD / Output Token Value in USD) * 100%
</strong></code></pre>

* 如果 gas 成本相对于输出代币的价值较高，自动滑点将设置较高的滑点，以确保交易能够成交。
* 如果 gas 便宜且输出代币的价值较大，则会使用较小的滑点。

自动滑点将根据代币和网络状况，在 **0.5%** 至 **5.0%** 之间选择一个数值。

## 自动滑点是否在所有网络上都可用？

不 —— 自动滑点仅支持 Layer 1（L1）链，如 BNB Chain、Ethereum 等。

它不支持 Layer 2（L2）链，原因如下：

* 自动滑点公式依赖于有意义的 gas 成本数值来计算出有用的滑点设置
* 由于 L2 的 gas 费极低，在 L2 上应用自动滑点并不会提高交易成功率

{% hint style="success" %}
如果某个网络**不支持**自动滑点：

* 将应用您此前使用过的滑点设置
* 如果您此前从未设置过，则默认为 0.5%
  {% 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://docs.pancakeswap.finance/chinese/jiao-yi-gong-ju/pancakeswap-auto-slippage.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.
