Blockchain Layer
Hadinet Africa uses a layered blockchain architecture: a Cartesi Rollup for application logic and data storage, settling on Arbitrum (an Ethereum Layer 2) for finality and security.
Cartesi Rollup
What is Cartesi?
Cartesi provides a full Linux virtual machine running on RISC-V architecture inside the blockchain. Unlike traditional smart contracts (which are limited to simple logic and small data), Cartesi allows Hadinet to run a complete Linux environment with:
- SQLite database for structured, deterministic data storage
- Standard libraries and tools available in a Linux environment
- Complex application logic that would be impractical in Solidity
Deterministic Execution
The Cartesi VM is fully deterministic. This means:
- Every validator node processes the exact same inputs
- Every validator arrives at the exact same state
- If any validator produces a different result, it is immediately detectable
- No validator can insert, modify, or delete records without detection
This determinism is what makes the system fraud-provable. The rollup's state transitions are reproducible by anyone, at any time.
What the Rollup Stores
| Data Type | Example | Purpose |
|---|---|---|
| Identity attestations | {verified: true, country: "NG", level: "enhanced"} | Verification records |
| ZK proofs | Cryptographic proof data | Publicly verifiable proof of KYC |
| Document vault metadata | {name: "passport.pdf", type: "passport", ipfs_hash: "Qm..."} | References to encrypted documents |
| Access control records | {did: "did:key:...", granted_to: "did:key:..."} | Who can read which attestations |
SQLite Database
The Cartesi rollup uses SQLite as its internal database. SQLite is deterministic when configured correctly, making it ideal for blockchain use. It provides:
- Structured queries for verification lookups
- Efficient indexing for discovery queries
- ACID compliance for data integrity
- Compact storage optimized for the rollup environment
Arbitrum Settlement Layer
Role of Arbitrum
Arbitrum Sepolia (an Ethereum L2) serves as the settlement layer. It provides three critical guarantees:
1. Finality
The Cartesi rollup's state is periodically anchored to Arbitrum, which in turn is anchored to Ethereum. This creates a chain of finality:
Cartesi Rollup State
-> Arbitrum L2 (settlement)
-> Ethereum L1 (ultimate finality)
Once state is finalized on Ethereum, it is permanent and immutable.
2. Fraud Proofs
Arbitrum uses an optimistic rollup model:
- State transitions are assumed correct by default
- There is a challenge period during which anyone can dispute a state transition
- If a dispute is raised, the challenged state transition is re-executed on Ethereum to determine the correct result
- Validators who publish incorrect state have their stake slashed (economic penalty)
This means validators are economically incentivized to process inputs correctly.
3. Input Ordering
The InputBox smart contract on Arbitrum ensures all inputs to the Cartesi rollup are processed in the same order by all validators. This prevents:
- Reordering attacks — inputs cannot be rearranged to favor certain parties
- Transaction censorship — inputs cannot be selectively dropped
- State inconsistencies — all validators see the same sequence of events
User Interaction
Users do not interact with Arbitrum directly. The Cartesi node handles all settlement operations automatically. From the user's perspective, they interact only with the frontend, which communicates with the attestor and queries the rollup.
Security Properties
| Property | Guarantee | Mechanism |
|---|---|---|
| Immutability | Records cannot be altered after creation | Deterministic execution + Ethereum finality |
| Fraud resistance | Incorrect state transitions are detectable and punishable | Arbitrum fraud proofs + validator staking |
| Censorship resistance | Inputs cannot be selectively dropped | InputBox ordering on Arbitrum |
| Transparency | All state transitions are reproducible | Deterministic RISC-V execution |
| Data integrity | Records cannot be corrupted | SQLite ACID + deterministic replay |
Comparison with Traditional Smart Contracts
| Aspect | Traditional Smart Contract | Cartesi Rollup |
|---|---|---|
| Execution environment | EVM (limited) | Full Linux (RISC-V) |
| Data storage | Key-value mapping | SQLite database |
| Computation limit | Gas limit per transaction | Full VM resources |
| Language | Solidity / Vyper | Any Linux-compatible language |
| Tooling | Blockchain-specific | Standard Linux tools |
| Settlement | Direct on L1/L2 | Via Arbitrum to Ethereum |
Next Steps
- Encryption — How data is encrypted at every layer
- Data Flow — The complete verification flow
- System Overview — All components explained