# Local Blockchain

Befi's blockchain architecture is a sophisticated blend of efficiency and security, tailored to optimize user experience while maintaining core blockchain principles. The structure is a novel approach, adapting to the constraints of Bitcoin and Ethereum fees through a semi-decentralized model. It comprises three distinct yet interconnected layers

## Immutability Layer

Anchored by an immutable database, this foundational layer ensures the integrity of user operations. Each transaction not only carries the user's signature, validating their consent, but also references the hash of the preceding transaction, thereby preserving chronological consistency. For enhanced transparency and external verification, a Zero-Knowledge (ZK) proof of the database's state is periodically (every 8 hours) transmitted to the Ethereum network, leveraging its robust security.

## Validation Layer

Functioning with rigorous scrutiny, this layer employs validators that continually monitor the blockchain for critical events such as withdrawal requests and trade executions. The validators' primary role is to verify the legitimacy and accuracy of these actions, with a particular focus on the users' balance and transaction history. Withdrawal requests undergo stringent checks; if discrepancies are identified or balances are insufficient, requests are automatically denied, thus safeguarding against unauthorized transactions.

## Executive Oversight Layer

This high-level security measure is engaged for substantial transactions, specifically those exceeding a set threshold (e.g., $1 million). Such transactions require additional authentication in the form of signatures from Befi's C-level executives, adding a human element to the automated validation process. This layer acts as a failsafe, ensuring that high-value transactions receive an extra layer of scrutiny.

By strategically compromising on decentralization, akin to the BNB chain model, Befi's architecture achieves a balance between decentralization and operational efficiency. This design choice, tailored specifically for financial applications, provides a user-friendly, cost-effective, and secure platform.


---

# 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.befilabs.com/architecture/local-blockchain.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.
