# OP链的Gas是什么？OP链是什么？

## OP链的Gas是什么？

OP链的Gas是以太坊，在Gas费问题上，由于Optimism业务流程有向以太坊存储数据的步骤，其每笔交易的Gas费=Layer1部分+Layer2部分，而Arbitrum和Metis等其他OP Rollup方案也不外如此。

Layer2部分主要涉及Sequencer节点执行交易的费用。由于Sequencer的TPS上限极高，且当前Optimism的用户较少，其本地Gas Price超低。计算公式为：L2 Gas费=L2 Gas Used×L2Gas Price。

执行步骤越复杂的交易(期权等)，在Optimism上可节省的成本越多。比如，以太坊上一次要100美元的期权操作，在Optimism上只需要1.5美元左右，仅为1/60;以太坊普通转账要3美元，Optimism可能要0.3美元，为1/10。

而Layer1部分的Gas费，公式= 比例系数×(固定开销+存储开销)。其中，固定开销 来自于打包数据和跨域传输的过程，存储开销 是在ETH上存入数据产生的Gas，比例系数 则由Optimism官方设定，主要是为了预留出一部分资金，防止ETH主网Gas价格激增，无法把数据顺利存上链。

目前，Optimism上每笔交易的固定开销Gas为2100。Optimism官方表示，随着未来用户规模扩大，每个Batch收纳的交易数量增加后，固定开销将进一步下调。而在Layer1上存储Batch时，Sequencer会以文本数据Calldata的形式向CTC合约传入Batch信息，一般而言，文本数据只用于存储，不会被用于执行运算。比起普通的合约调用，这一步大量节省了Gas。

## OP链是什么？

Optimism(OP)是以太坊的第2层扩展解决方案，它旨在减轻以太坊网路的负载，被设计为等效于以太坊虚拟机(EVM)的Optimism Rollup链。

Optimism的主要特点是使以太坊应用程序上的交易变得非常便宜，通过将交易从区块链转移到另一个区块链，矿工费就大大降低了，吞吐量也增加了。同时，它为以太坊开发人员提供了无需进行更改就能使用以太坊上所有可用工具的机会。

Optimism采用optimistic Rollups技术，可以将大量交易数据“汇总”成以太坊上的一批数据，从而只收取一笔交易费用。这样，交易的处理速度更快、成本更低，同时依赖于以太坊的安全性。

如有不明白或者不清楚的地方，请加入官方电报群：[**https://t.me/gtokentool**](https://t.me/gtokentool)


---

# 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.gtokentool.com/qu-kuai-lian/op-lian-de-gas-shi-shen-me-op-lian-shi-shen-me.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.
