# Consensus and Execution Layer

The technical architecture of APChain is built upon **four main pillars: high-performance consensus, AI-native enhancements, modular design, and cross-chain interoperability**, aiming to deliver a blockchain infrastructure that balances **security, scalability, and intelligence**.

### <mark style="color:orange;">Consensus: PoS + Real-World PoS Computing Power System</mark>

APChain adopts an **innovative dual-staking mechanism**:

* **Token Staking (APX):** All validator nodes must stake native APX tokens to participate in network validation.
* **Computing Power Staking (GPU/ASIC):** Nodes must also contribute real computing power (GPU, NPU, ASIC, etc.) to earn computing power credits.

This **dual-staking model** ensures validator nodes are not only economically incentivized but also rewarded for **actual computing contributions**, improving their ranking and rewards. Computing power scores directly affect node weight allocation, encouraging more nodes to execute real AI tasks—enhancing network **security and execution capacity**.

### <mark style="color:orange;">Execution Layer: EVM-Compatible + AI Optimization</mark>

* **100% EVM compatibility**, supporting seamless migration of Solidity/Vyper smart contracts.
* **Parallel transaction scheduling** with read/write set conflict detection to improve throughput.
* **AI-optimized gas pricing and smart scheduling** that predict network load and dynamically adjust fees to avoid congestion.
* **Precompiles and system contracts** like `ai_call`, `model_ref`, `verify_inference`, `price_oracle`, and `risk_score`, providing native support for AI inference and risk control logic.


---

# 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://apchain.gitbook.io/apchain-docs/technical-architecture/quickstart.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.
