# 總覽

### 介紹

在區塊鏈中，Bundle（捆綁包）是指將多筆交易打包成一個不可分割的整體，確保交易在鏈上按指定順序執行。Bundle具备如下特性：

* 原子性：Bundle內的所有交易要不全部成功執行，只要其中一筆失敗，整個包都會被撤銷，確保不會出現「買了一半」或「賣不掉」的中間風險。
* 執行順序嚴格固定：Bundle發送者可以精確規定交易的執行次序
* 隱私與抗攻擊：Bundle 通常繞過Public Mempool，直接發送給Builder或Validator，防止遭受惡意MEV攻擊。

### 應用場景

#### 跟單

在跟單場景下，跟隨者（Follower）最擔心的問題是因跟單交易上鏈慢導致買入成本過高。Bundle可以將聰明錢的原始交易與跟隨者的跟單交易打包在同一個 Bundle 中，確保跟隨者的交易緊隨目標之後，在同一個區塊內、甚至緊鄰位置執行，最大程度減少價差損耗。

#### 狙擊

在新幣池子被激活的瞬間，狙擊交易同樣存在由於上鏈慢導致買入成本過高的問題。同時由於新幣開盤初期價格波動大，容易被惡意MEV機器人盯上。如狙擊交易通過Bundle緊貼在新幣激活交易後提交，可以在同區塊上鏈的同時抵禦潛在的惡意MEV攻擊。

#### Backrun

在Backrun場景中，Searcher通過將目標交易與套利交易按順序捆綁，可以確保Backrun交易精確鎖定在目標交易後的第一順位執行，無需擔心競爭插隊。同時利用 Bundle 的原子化特性只有當兩筆交易都能在該區塊內同時成交且產生利潤時，整個Bundle才會被執行；若市場波動導致利潤空間消失，Bundle 則會執行失敗，從而避免產生本金虧損風險。

#### Approve+SWAP

Bundle可以提升SWAP體驗。在`SWAP`交易前，用戶一般需要先`Approve`，授權成功後才能執行`SWAP`。而如果將 `Approve` 與 `Swap` 兩筆獨立交易封裝進同一個 Bundle 中提交，用戶只需一次簽名確認，兩步操作在同一個區塊內完成。同時由於不經過公共 Mempool，恶意攻擊者無法針對您的授權狀態進行提前預判。


---

# 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.blockrazor.io/tc/transaction-submission/bundle/zong-lan.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.
