跳至主内容

用户指南:Swaps

需要翻译这篇文章吗?

MetaMask Swaps 是 MetaMask 的一项功能,具体用途是加密货币代币两两互换(有关 ERC-20 代币以及这些代币与 NFT 之间区别的更多信息,请参阅我们的用户指南)。 要想获取您感兴趣的代币,使用这项功能可谓非常方便和直接,并且大大减少操作步骤以及第三方智能合约的风险敞口数量。

您可以在 MetaMask Extension、MetaMask Mobile 或 MetaMask Portfolio 上使用 MetaMask Swaps。 Swaps 目前可在以下网络使用:

  • 以太坊主网
  • BNB 智能链
  • Avalanche C-链
  • Polygon
  • Optimism
  • Arbitrum
  • zkSync Era
  • Linea
  • Base

兑换须知:

  • 即使代币符合 ERC-20 标准,也应先研究清楚再购买或获取代币。加密货币和去中心化金融的其中一项创新之处在于其程序化性质;代币未必是静态资产;其某些功能或会影响其使用方式,或者影响您的钱包,请参阅下述举例说明。 当然,还有其他善意告诫:例如,您可以获得某些代币,但为了从中达到预期效用,则需要在特定平台进行质押。
  • 滑移是您点击的价格与 MetaMask Swaps 所能承受的最终交易价格之间的变化量。 由于去中心化金融和加密货币具有高流动性和波动性的特点,价格可能瞬息万变。 正因如此,Swaps 允许在您同意的价格与最终价格之间存在稍许差异,以确保您的交易顺利进行,但差异不要太大,以保护您免受价格突然飙升或下跌的影响。

MetaMask user guide swaps
slippage

  • 自定义代币是 MetaMask 所谓在 MetaMask 的标准代币列表中不常见或非主流的代币,当您在 MetaMask 中选择以太坊主网(及一些其他热门网络)为您的网络时,默认情况下会检测到这些代币。 如果您将一些代币兑换到钱包中,但几分钟后却看不到(记住,区块链速度很快,但并非具有即时性),请尝试手动添加代币
  • 我们的支持文章仅涉及 MetaMask Swaps。 换言之,MetaMask 通过使用 MetaMask Swaps 按钮为兑换提供支持。 如果您直接在不同平台或另一个去中心化交易所(DEX)上执行兑换,MetaMask 可能会提供一些一般入门介绍或指导,但并非权威指导;请联系进行兑换的交易所或平台支持团队或社区获取帮助。
警告

记住:MetaMask 仅作为兑换的中介!

当您使用 MetaMask Swaps 时,请记住 MetaMask 充当聚合器或中介:我们汇总报价并为您提供最有利的报价。 您可以由此决定是否继续与当前平台/流动性提供商进行交易。 MetaMask 不提供流动性、执行交易或向您出售代币。

准备好开始使用了吗?

无论您是使用 MetaMask 扩展程序还是移动版,都无关紧要,要获取所需代币,只需点击几下即可。

Swaps 在 MetaMask Portfolio 中

您还可以在 MetaMask Portfolio 中使用 Swaps。 这些步骤几乎与 MetaMask Extension 中的 Swaps 相同。 在任何情况下,下列概念均适用于所有平台。

On the main MetaMask screen, look for a toggle marked 'swap'.

MetaMask Swaps icon
locate

您将会看到兑换主屏幕:

MetaMask swaps main screen extension

准备兑换

  • 首先,使用顶部的下拉菜单,选择您持有并愿意“支付”的代币。
  • 接下来,使用第二个下拉菜单,选择您有兴趣购入的代币。
  • 将第一种代币的金额调高或调低,直到您对支出金额或购买金额满意为止。

您会看到该应用程序正在搜索最优价格。 这一过程正是 MetaMask Swaps 提供最优惠和最佳兑换服务的秘诀。 您看到 Swaps 进行搜索时,后台正在运行复杂流程。

首先,Swaps 致力于搜索各个去中心化代币交易所以及代币兑换协议,为您找到最有利的汇率。

同时,Swaps 正在运行测试交易,以确保如果您最终确实提交了交易,则该交易可能会顺利完成,如果没有,将过滤掉那些选项。 MetaMask 让这些用户摆脱交易失败的痛苦:由于以太坊主网的燃料费和代币智能合约的复杂性,交易失败不仅产生令人费解的错误代码,而且造成重大经济损失。 Swap 的失败率非常低,目前仍在改进,以求尽可能实现零失败。

一些目光敏锐的用户会注意到,在上个屏幕的左下角,提到了“2% 的滑移”。 滑移是 Swaps 中对您有利的另一个参数,上文已经详细解释。

完成去中心化金融(DeFi)数字运算后,您将看到报价屏幕:

MetaMask swaps quote screen
extension

执行 Swap

此处内容较多,但无需惊慌。 First of all, up at the top, you'll see that MetaMask Swaps is continuing to do all the work that we mentioned previously on an ongoing basis, ensuring that you're getting the most up-to-date price and availability.

屏幕中间显示主要功能:自上次报价以来您将获取的代币金额(请勿忽略滑移)。 您可以查看汇率等详细信息,还可以选择深入了解报价的计算方式以及高级燃料设置。

info

为什么我的钱包中没有显示已兑换的代币?

与所有区块链交易一样,并非即时完成,但很快就能在钱包中看到代币。 如果您的代币并不常见,或者由于某种原因,而没有显示在钱包中,请按照我们此处的说明添加代币。

燃料费

Gas fees estimate

Within the MetaMask Swaps interface, you’ll see two values, the estimated gas fee, displaying the expected cost of executing the transaction, and the max fee, which is the maximum amount you’ll pay for gas. Depending on network activity, the actual cost of gas may be higher or lower than the estimated gas fee, but will never be higher than the max fee shown on this screen.

To learn more about gas fees, please visit this guide.

What if I don't have enough gas?

Don’t have enough gas to cover your swap? Don't worry – MetaMask now offers a convenient gas station, allowing you to fill up on gas and swap your tokens in one transaction.

Prerequisites

Prerequisites for using MetaMask Gas Station:

  • The swap must be on Ethereum Mainnet
  • You do not have enough ETH in your wallet to cover gas
  • The value of your swap is greater than the cost of gas
  • You have Smart Transactions enabled
  • You use version 12.6.0 or higher of the MetaMask Extension, or version 7.43 or higher of MetaMask Mobile

If your swap meets these prerequisites, we will automatically include gas costs in the quote you receive. For example, let’s say you want to swap 400 USDC into DAI, but you don’t have enough ETH to cover gas. If the max gas fee is estimated to be $9.41, that amount is subtracted from the amount of DAI you would receive.

MetaMask Gas Station
screen

Using MetaMask Gas Station allows you to proceed with your swap without having to manually purchase & transfer more ETH to your wallet, because MetaMask handles this in the transaction. The ‘max fee’ associated with your swap will be priced into the quote, and if the actual gas fee is lower than this estimated amount, any unused ETH will be added to your wallet following completion of your transaction.

常见问题解答

What if the value of my swap is less than the cost of gas?

  • You’ll be unable to use the MetaMask Gas Station if the value of your swap is less than the cost of gas. In this case, you can always buy more ETH to cover gas.

Can I use MetaMask Gas Station on other networks?

  • MetaMask Gas Station is only available on Ethereum Mainnet. For other networks, MetaMask offers the ability to buy tokens directly from your wallet. This provides you with a convenient way to top-up your gas balance and continue with your swap.

What tokens can I use MetaMask Gas Station with?

  • You’ll be able to use the MetaMask Gas Station for swaps that include one or more of the following tokens:
    • USDT
    • USDC
    • DAI
    • ETH
    • wETH
    • wBTC
    • wstETH
    • wSOL

Can I use MetaMask Gas Station if I have enough gas already?

  • MetaMask Gas Station is only intended for you to use when you do not have enough gas. If you have enough gas, you will be able to review and complete your swap like normal.

If you're ready to go, click the Swap button!

同时发送和兑换加密货币

无论何时您将资金从一个账户发送到另一个账户,均可选择要使用的代币,并选择对方想要接收的代币。 这样,您就不必先将一个代币兑换成另一个代币,然后创建另一个交易再发送给某人;为您节省时间和燃料。

要使用 MetaMask 的“发送和兑换”功能:

  1. 打开 MetaMask 界面,然后点击“发送”。
  2. 选择您要向其汇款的链上地址。
  3. Choose the asset you wish to send from your account.
  4. Choose the asset you wish the recipient account to receive.
  5. 查看报价,确认您的交易!

此功能目前可在 MetaMask Extension 中使用,即将在 MetaMask Mobile 和 Portfolio 推出。 请注意,此方法尚不支持智能交易

兑换为确切的输出金额

现在,您可以指定希望收款人收到的确切资金金额,而不是仅选择要兑换多少代币。 这将自动计算并填写您需要发送的必要数量的代币。

此功能目前可在 MetaMask Portfolio 中使用,即将在 MetaMask Extension 和 MetaMask Mobile 推出。

进入 SwapVerse

MetaMask 其中一项真正卓越之处,及其能够提供无与伦比的代币兑换体验的原因之一,就在于其构建与网络无关:只要您连接的区块链网络兼容以太坊,就可以配置 MetaMask 在该网络上使用。 这有何好处?

所以,您也可以在其他网络上使用 MetaMask Swaps。 您不一定要在以太坊主网上使用 Swaps;比如说您也可以在 Polygon 上使用 Swaps。 随着其他侧链和自定义网络上线,不妨进行尝试。 Swaps 使您能够从钱包中在任何兼容以太坊的网络上交易代币,无需直接对接第三方平台,从而减少您暴露于潜在黑客攻击或恶意智能合约的风险。

您甚至可以通过 Swaps 在 主网上 获取非以太坊代币。 但请记住:始终通过跨链桥和门户在多元宇宙中导航。

常见问题解答

为什么 MetaMask Swaps 中缺少某些代币?

使用 MetaMask Swaps 购买代币时,如何查看代币价格

为什么 MetaMask 兑换会失败?

为什么 MetaMask 的兑换按钮不可用/灰化?

我兑换了一次,但收到的代币或法定货币价值比我预期的要少。 为什么?

获取报价时出错

Uniswap 支持和故障排除提示

用户指南:自定义网络和侧链