> For the complete documentation index, see [llms.txt](https://docs.botanixlabs.com/botanix/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.botanixlabs.com/botanix/get-to-know-botanix/advanced/reth.md).

# Reth

### What is Reth?

[Reth](https://github.com/paradigmxyz/reth/) (short for Rust Ethereum) is a high-performance Ethereum execution client implementation written in Rust. It's a full-node implementation of the Ethereum protocol that focuses on being user-friendly, highly modular, fast, and efficient. Originally built by [Paradigm](https://paradigm.xyz/) and released under Apache/MIT licenses, Reth serves as the execution layer that handles transaction processing, state management, and smart contract execution.

As an execution client, Reth is compatible with all Ethereum consensus layer implementations that support the [Engine API](https://github.com/ethereum/execution-apis/tree/59e3a719021f48c1ef5653840e3ea5750e6af693/src/engine). It can sync the complete Ethereum blockchain from genesis and provide full interaction capabilities with the Ethereum network, including sending and receiving transactions, accessing smart contracts, and maintaining historical state data.

### Why Do We Use Reth?

Botanix chose Reth as its execution client because it aligns perfectly with the project's performance and modularity requirements. Reth's architecture offers several key advantages that make it ideal for Layer 2 implementations like Botanix.

**Performance is Critical**: Reth was designed from the ground up for optimal performance, using Rust's memory safety and zero-cost abstractions combined with the proven Erigon staged-sync architecture. This results in faster sync times, lower resource consumption, and better overall efficiency compared to traditional Ethereum clients. For a Layer 2 that needs to process high transaction volumes with low latency, this performance advantage is essential.

**Modular Design**: Reth's highly modular architecture allows components to be unbundled and customized for specific use cases. This modularity is particularly valuable for Layer 2 implementations that need to modify certain aspects of the execution environment while maintaining compatibility with Ethereum tooling and standards.

**EVM Compatibility**: Since Botanix provides full EVM compatibility, using an execution client that implements the Ethereum specification precisely ensures seamless compatibility with existing Ethereum tools, wallets, and applications. Reth's strict adherence to Ethereum specifications means developers can port their applications to Botanix with confidence.

### How Botanix Uses Reth

Botanix leverages Reth as its core execution engine, adapting it to work within the unique Spiderchain architecture while maintaining full EVM compatibility. The integration involves several key components and modifications.

Reth handles all smart contract execution and state management on the Botanix Layer 2. When users interact with DeFi applications, trade tokens, or execute any smart contract operations, Reth processes these transactions using the same EVM implementation that powers Ethereum mainnet. This ensures that applications behave identically on both networks.

The execution client manages Botanix's account-based state model, which differs from Bitcoin's UTXO model. Reth maintains account balances, smart contract storage, and transaction history in an efficient database structure optimized for fast queries and updates. This state management is crucial for supporting the complex interactions required by DeFi protocols.

Botanix uses Reth's JSON-RPC interface to provide standard Ethereum API compatibility. This means wallets like MetaMask, development tools like Hardhat, and other Ethereum ecosystem tools work seamlessly with Botanix without requiring any modifications. The API provides access to transaction history, contract state, gas estimation, and all other standard Ethereum functionality.

The integration also takes advantage of Reth's advanced tracing and debugging capabilities. These features are essential for developers building on Botanix, as they provide detailed insights into transaction execution, gas usage, and contract interactions that help optimize applications and troubleshoot issues.

### Sources

* Reth Book - <https://reth.rs/intro.html>


---

# 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.botanixlabs.com/botanix/get-to-know-botanix/advanced/reth.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.
