Skip to content
Veilnet v1.0

Architecture

Architecture Overview

The Veilnet system consists of several key components:

  • User wallet: Standard Web3 wallets (MetaMask, Rabby, etc.)
  • Veilnet frontend: The dApp interface for interacting with the protocol
  • Custom Smart Contract: The VeilNet EVM smart contract deployed on Base and Ethereum
  • Shielded Sequencer Network: A secure proving layer that processes encrypted user intents and maintains the state
  • Merkle tree structure: The cryptographic accumulator that represents all user balances
  • Settlement / verification flow: The process of updating the on-chain Merkle root to reflect off-chain state changes

Shielded State + Merkle Tree Approach

Why Veilnet Uses a Stateless Execution Model

To achieve high throughput and low gas costs, Veilnet computes state transitions out-of-band within secure, encrypted environments.

Role of Encrypted Commitments

User balances are represented as encrypted commitments. Only the user and the secure sequencing layer can decrypt or modify them.

These encrypted commitments are currently implemented using core FHE concepts. The Shielded Sequencer Network works over the underlying plaintext values inside its own secure environment, then re‑encodes them as new commitments and updates the Merkle root. This is different from Zama fhEVM or Fhenix, where the FHE coprocessor or rollup itself exposes homomorphic operations as part of the chain’s execution layer

Role of Merkle Trees

The Merkle tree aggregates all individual user commitments into a single Root. The smart contract only needs to know this Root to verify the integrity of the entire system.

How Private State is Represented

State is represented as leaves in the Merkle tree. Each leaf corresponds to a user's shielded balance.

How Balances Can Be Proven or Updated

To withdraw or update a balance, a Merkle Proof is provided demonstrating that the specific commitment exists within the current Root, alongside a cryptographic signature authorizing the change.

Shielded Balances and Addresses

How Balances are Hidden

The smart contract only holds the total pooled liquidity. Individual allocations are managed in the shielded state tree.

How Address Linkability is Reduced

Internal transfers only update the shielded state tree. No on-chain transaction links Sender A to Receiver B.

How Users Receive Privately

Users share a "Shielded Address" or public key, which the sender uses to encrypt the transfer payload.

How Users Spend Privately

Spends are authorized via signatures that update the shielded state without broadcasting the spend amount on-chain.

Difference Between Public and Private State

  • Public wallet state is visible on block explorers (Etherscan)
  • Veilnet private state is only visible to the user via the Veilnet dApp

Contract-Level Privacy

Why Privacy Logic Sits Inside the Custom Contract

By handling deposits, withdrawals, and Root updates at the contract level, Veilnet ensures trustless verification. The sequencing layer cannot steal funds; it can only propose mathematically valid state updates.

Difference Between App-Level and Contract-Level Privacy

  • App-level privacy often relies on centralized databases
  • Contract-level privacy relies on cryptographic proofs verified by the blockchain

Future DeFi Composability

In the future, the Veilnet contract will be able to execute external calls (like swaps on Uniswap) using the pooled funds, while internally updating the specific user's shielded balance to reflect the outcome.

Privacy layer for EVM chains