# Overview

> NeuroChain is an AI-native security Layer 1 — Malachite BFT, ML-DSA-65 post-quantum signatures, WASM contracts, and AI audit and anomaly scoring built into the protocol.

Source: https://docs.nro.world/learn/overview

NeuroChain is an **AI-native security Layer 1**. AI takes part in the protocol at a few well-defined seams — contract audit before deploy and transaction anomaly scoring at the mempool — and never at the point that decides whether a block is final.

## What makes it different

| Feature | What it does | Where to read |
|---------|--------------|---------------|
| **VMGuardian** | Audits every WASM contract before deploy (rule engine + embedded neural network) and keeps re-auditing deployed contracts. | [VMGuardian](/ai/vmguardian) |
| **Sentinel** | Scores every incoming transaction for anomalies; an optional policy layer can hold or ask for confirmation instead of rejecting. | [Sentinel](/ai/sentinel) |
| **NeuroWASM** | Contract API in the CosmWasm / NEAR class; host functions that let a contract read AI results (scores, certificates, trust lists) are planned. | [NeuroWASM](/neurowasm/) |
| **Native account abstraction** | Sponsored gas and session keys for AI agents — built into the account model, not added on top. | [Account abstraction](/ai/account-abstraction) |
| **Post-quantum signatures** | Every account and every validator signs with ML-DSA-65 (Dilithium3, FIPS 204). | [Addresses](./addresses) |
| **Identity** | An address stays the same while the keys that control it can be rotated. | [Identity](/ai/identity) |
| **IBC v2 with post-quantum headers** | Transfers and security attestations to other chains (Cosmos first); the counterparty verifies NeuroChain with ML-DSA-65 signatures. Experimental | [IBC v2 & sharding](/operate/ibc) |

## Architecture

![NeuroChain architecture: wallets and AI agents call the gateway; the node verifies signatures, scores transactions with Sentinel, queues them in the mempool, orders them with Malachite BFT across validators, executes them with the VMGuardian gate and WASM VM, and stores state in RocksDB](/diagrams/architecture.svg)

| Layer | Technology |
|-------|-----------|
| Node | Rust, Tokio, RocksDB |
| Consensus | Malachite — Tendermint BFT as a Rust library ([Consensus](./consensus)) |
| Contracts | WASM on the `wasmi` interpreter, fuel-metered gas, host module `env` |
| Signatures | ML-DSA-65 for accounts and validators |
| AI models | Small neural networks compiled into the node (`no_std`, no external runtime) |
| Gateway | Node.js + Fastify — REST and WebSocket in front of the node |
| Web app | Quasar / Vue 3 (`neurochain-web`) |

## How a transaction moves

![Transaction lifecycle: the wallet signs, the gateway forwards, the node verifies and scores it, the mempool queues it, Malachite reaches a 2/3 stake quorum, and every validator applies it](/diagrams/tx-lifecycle.svg)

1. The wallet signs `nc-tx-v2|from|to|value|nonce` with its ML-DSA-65 key — in the browser, through a WASM module.
2. The gateway forwards the transaction to the node unchanged.
3. The node checks the signature, that the address belongs to that key, the nonce and the balance, then scores the transaction with Sentinel.
4. The transaction waits in the mempool (status `pending`), ordered by fee.
5. The next proposer puts it in a block; validators vote; once more than 2/3 of the stake has precommitted, the block is final.
6. Every validator applies the block the same way and reaches the same state root. The status becomes `confirmed`.

## Units

All amounts on chain are in **uNRO**: `1 NRO = 1 000 000 uNRO`. API responses carry ready-formatted `*_human` fields (for example `balance_human`) — display those rather than converting in the client.

## Local ports

The public network is not running yet; examples use a local stack.

| Service | Default port | Override |
|---------|-------------|----------|
| Node RPC | 9933 | `NEUROCHAIN_RPC_PORT` |
| Node P2P | 30333 | `NEUROCHAIN_P2P_PORT` |
| Gateway (REST + WebSocket) | 3000 | gateway environment |
| Web app | 8080 | `WEB_PORT` |
| Docs (this site) | 5173 | `DOCS_PORT` |

## Protocol rules that never bend

- **AI never changes voting power.** The commit quorum is more than 2/3 of stake. AI may only take a validator out (jail or slash to voting power 0), never add weight. See [Consensus](./consensus).
- **Contracts identify callers through the host.** Use `get_caller()`, never a `caller` field in the call payload.
- **Amounts are integers in uNRO.** No floating point in balances, fees or stakes.
