Skip to main content

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 TypeExamplePurpose
Identity attestations{verified: true, country: "NG", level: "enhanced"}Verification records
ZK proofsCryptographic proof dataPublicly 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

PropertyGuaranteeMechanism
ImmutabilityRecords cannot be altered after creationDeterministic execution + Ethereum finality
Fraud resistanceIncorrect state transitions are detectable and punishableArbitrum fraud proofs + validator staking
Censorship resistanceInputs cannot be selectively droppedInputBox ordering on Arbitrum
TransparencyAll state transitions are reproducibleDeterministic RISC-V execution
Data integrityRecords cannot be corruptedSQLite ACID + deterministic replay

Comparison with Traditional Smart Contracts

AspectTraditional Smart ContractCartesi Rollup
Execution environmentEVM (limited)Full Linux (RISC-V)
Data storageKey-value mappingSQLite database
Computation limitGas limit per transactionFull VM resources
LanguageSolidity / VyperAny Linux-compatible language
ToolingBlockchain-specificStandard Linux tools
SettlementDirect on L1/L2Via Arbitrum to Ethereum

Next Steps