Skip to main content

Architecture Overview

VibeFi splits trust between on-chain governance, content addressing, and local runtime execution. No single party controls what code users run.

End-to-End Flow

Developer → CLI package → IPFS publish → rootCid

CLI dapp:propose → VfiGovernor proposal → vote → queue → execute

DappRegistry stores rootCid on-chain

Client reads registry → fetches from IPFS → verifies manifest → builds locally → serves in sandboxed webview

Control Plane (Contracts)

On-chain governance decides which dapps are approved:

  • VfiGovernor + VfiTimelock — proposal → vote → queue → execute lifecycle with configurable delays
  • DappRegistry — canonical store of approved dapp versions (rootCid, status)
  • ConstraintsRegistry — governance-updatable build constraint references
  • Security Council — emergency veto, pause, and deprecation powers

See Contracts.

Data Plane (CLI + IPFS)

Dapp source is packaged deterministically by the CLI:

  1. Validate dependencies against allowlist, scan for forbidden patterns
  2. Generate deterministic manifest.json with file hashes
  3. Publish to IPFS, receive rootCid

Only rootCid is stored on-chain. Human-readable metadata emitted as events for off-chain indexing.

See CLI.

Execution Plane (Client)

The Rust client provides a secure, sandboxed runtime:

  1. Fetch approved source from IPFS by rootCid
  2. Verify every file against manifest.json
  3. Build locally with injected package.json + vite.config.ts
  4. Serve over app:// protocol in sandboxed webview
  5. Inject window.ethereum (EIP-1193) bridged to wallet backends via IPC
  6. Enforce CSP: connect-src 'none' — dapps cannot make outbound HTTP

All external data access is mediated through the injected provider → Rust host → RPC.

See Client.

Repo Responsibilities

DirectoryRoleStack
contracts/Protocol control planeSolidity / Foundry
cli/Packaging + governance operator interfaceBun / TypeScript
client/Deterministic dapp runtimeRust / Wry
packages/shared/Shared ABIs, config, IPFS, client utilitiesTypeScript
e2e/Integrated validation of the full flowBun / TypeScript
dapp-examples/Reference dapps demonstrating constraintsReact / TypeScript
studio/Future: UI for composing proposals and previewing dappsTBD