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:
- Validate dependencies against allowlist, scan for forbidden patterns
- Generate deterministic manifest.json with file hashes
- 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:
- Fetch approved source from IPFS by
rootCid - Verify every file against
manifest.json - Build locally with injected
package.json+vite.config.ts - Serve over
app://protocol in sandboxed webview - Inject
window.ethereum(EIP-1193) bridged to wallet backends via IPC - 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
| Directory | Role | Stack |
|---|---|---|
contracts/ | Protocol control plane | Solidity / Foundry |
cli/ | Packaging + governance operator interface | Bun / TypeScript |
client/ | Deterministic dapp runtime | Rust / Wry |
packages/shared/ | Shared ABIs, config, IPFS, client utilities | TypeScript |
e2e/ | Integrated validation of the full flow | Bun / TypeScript |
dapp-examples/ | Reference dapps demonstrating constraints | React / TypeScript |
studio/ | Future: UI for composing proposals and previewing dapps | TBD |