# Comparing Bound Witness Trees and Rollups

### Rollup

A **Rollup** can be viewed simply as a linked list of data. In XYO Layer One, Rollups bundle multiple transactions into a single hash, which is submitted to the blockchain. The final hash allows you to walk backwards through the data to find the specific item you're looking for. This allows validation without storing each transaction individually. Rollups can reduce on-chain data, which improves blockchain efficiency and keeps transaction costs low.

{% @mermaid/diagram content="flowchart RL
Data2\[Data 2] -- You Need Hash <br>to Access Previous Data --> Data1\[Data 1]
Data5\[Final Bound Witness for XYO Layer One] -- You Need Bound Witness Hash to Access <br>Previous Data --> Data2\[Data 2]" %}

<figure><img src="https://2772193239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FksLB8OMIe18LYmW7pYCd%2Fuploads%2FknahAZc9hFGaMSyOEgAz%2FRollups.webp?alt=media&#x26;token=91506398-5062-4bf0-b99a-471f08758fbc" alt="" width="375"><figcaption></figcaption></figure>

Rollups bring information on-chain, but through a singular "line", where you must check every item in the list to get to the last item.

### Bound Witness Tree

A Bound Witness Tree is a type of Rollup that contains multiple, unrelated data points. Most often, a Bound Witness Tree is comprised of many [Bound Witnesses](https://docs.xyo.network/xyo-layer-one/xyo-layer-one-features/bound-witness).

{% @mermaid/diagram content="flowchart TD
Block5\[Final Transaction for XYO Layer One] -- Can Walk Back Data --> Data1\[Data 1]
Block5\[Final Transaction for XYO Layer One] -- Can Include Other Bound Witnesses --> Data4\[Bound Witness 1]
Block5\[Final Transaction for XYO Layer One] -- Can Walk Back Data --> Data2\[Data 2]" %}

<figure><img src="https://2772193239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FksLB8OMIe18LYmW7pYCd%2Fuploads%2FblxeuGrzcjvcKLcFEetC%2FBound%20Witness%20Tree.webp?alt=media&#x26;token=1064665b-f179-4b2e-9247-4f0268f44fc7" alt="" width="375"><figcaption></figcaption></figure>

Bound Witness Trees allow rollups to have a bigger breadth of data inside them: instead of a single list, you can combine multiple rollups into one final payload. The final payload goes on-chain and enables a lightweight way to verify large amounts of data with one simple hash.

For an example of a more complex Bound Witness Tree with a real-world example, see [here](https://docs.xyo.network/xyo-layer-one/xyo-layer-one-features/bound-witness/bound-witness-real-world-examples).
