Skip to content
JuniormainaPublic

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

BlockAcre — Fractional Real Estate & Autonomous AI Escrow Audits on Avalanche

BlockAcre is a Web3 fractional real estate ownership and autonomous milestone-based escrow platform built on the Avalanche Fuji C-Chain. It tokenizes high-yield properties in coastal hotspots (like Malindi and Watamu) into liquid, fractional deeds, allowing retail investors and the global Kenyan diaspora to participate in premium property yields starting from just KES 1,000.

To solve the trust deficit in property development, BlockAcre implements an Autonomous Escrow Auditor Agent that evaluates construction progress reports using a Vector RAG pipeline (Chroma DB) and executes on-chain release payloads autonomously upon verified milestone completion.


🚀 Key Innovation Highlights (Judging Criteria)

1. Technical Implementation

  • Solidity Smart Contracts: Custom-built, lightweight, and self-contained contracts:
    • OnChainDeedLog.sol: Tokenizes property assets into ERC20-compliant fractional deeds representing legal ownership shares with property metadata (Valuation, Location, Annual Yield, IPFS Deed Hash).
    • AgenticMilestoneEscrow.sol: Holds developer development funds in stablecoins. Implements verified agent wallet constraints. Only the Auditor Agent can trigger milestone releases.
  • Autonomous RAG Agent: A Python service auditor_agent.py integrating:
    • Chroma DB: Vector database used to ingest construction progress reports, engineering audits, and regulatory certificates.
    • AI Reasoning: Checks completion reports, extracts compliance milestones, and verifies structural sign-offs.
    • Web3.py: Autonomously signs and broadcasts the releaseMilestone(amount, proofHash) transaction on the Avalanche Fuji network when verification passes.

2. Ecosystem Integration (Avalanche & Web3)

  • Avalanche Fuji C-Chain: Leverages Avalanche's near-instant transaction finality and sub-penny gas fees to make micro-fractional investments viable.
  • Core Wallet / Web3 Connection: Seamless browser-wallet connection using Ethers.js in the frontend to track deed balances and interact with the contracts.
  • M-Pesa to USDC Payment Bridge: Integrates a mock mobile-money checkout flow that converts local fiat (KES) to stablecoin value and mints fractional deeds directly to the investor's Avalanche Core wallet in real time.

3. Business Model & Tokenomics

We embed the platform monetization directly into the smart contract escrow settlement layer:

  • 1.5% Transaction Fee: Paid on escrow deposits/token buys.
  • 1.0% Annual Management Fee: Charged for property upkeep/administration.
  • 0.5% Escrow Settlement Fee: Collected upon milestone releases.
  • 97.0% Net Funds: Disbursed to developers upon successful completion.

4. Product-Market Fit & Go-To-Market (GTM)

  • The Problem: Kenyan diaspora members send billions in remittances annually for real estate development but face high exit scams, misallocated funds, and lack of transparency.
  • Product-Market Fit: BlockAcre replaces human trust with on-chain accountability. Investors know their funds are locked in escrow and only released when the independent AI auditor verifies physical progress.
  • Go-To-Market Strategy: Partnering with Kenyan Diaspora Associations in the US, UK, and Middle East to market high-yield coastal properties (Watamu beach villas, Malindi resorts) as transparent, hands-off yield products.

🏗️ Technical Architecture

graph TD
    Investor[Kenyan/Diaspora Investor] -->|1. Connect Core Wallet| Frontend[React Dashboard]
    Investor -->|2. KES Deposit via M-Pesa| Mpesa[M-Pesa Bridge]
    Mpesa -->|3. Mint fractional deeds| DeedToken[OnChainDeedLog Contract]
    
    Developer[Coastal Developer] -->|4. Upload Progress Report| Docs[Report Repository]
    
    Agent[Autonomous AI Auditor] -->|5. Ingest Reports| Chroma[(Chroma Vector DB)]
    Agent -->|6. Perform RAG Audit| Query[RAG Analysis]
    
    Query -->|7. Verify 100% Completion| Escrow[AgenticMilestoneEscrow Contract]
    Escrow -->|8. Deduct Fees & Release Net Funds| DeveloperAddress[Developer Wallet]
Loading

⚙️ Quick Start & Setup

Prerequisites

  • Node.js (v18+)
  • Python (v3.10+)
  • Metamask or Avalanche Core Wallet extension configured to Avalanche Fuji Testnet.

1. Install Dependencies

# Install frontend and compiler dependencies
npm install

# Install python requirements for AI Auditor Agent
pip install web3 chromadb python-dotenv

2. Compile Smart Contracts

Solidity contracts are compiled, generating JSON artifacts for Deno Edge Functions and Python Web3.py execution:

node scripts/compile.cjs

3. Deploy/Mock Contracts

Initialize simulation addresses in the project configs:

python scripts/deploy.py

Note: To run on-chain, configure AVALANCHE_CHAIN_PRIVATE_KEY in a .env file first.

4. Run the Frontend Dashboard

npm run dev

5. Run the Autonomous AI Auditor Agent

Ingest developer documents and trigger the autonomous RAG compliance checks and on-chain release execution:

python scripts/agent/auditor_agent.py
# RAG only (no broadcast):
python scripts/agent/auditor_agent.py --dry-run

Reasoning logs are written to public/agent_logs.json and stream live on the Web UI.


Fuji runbook (Phase 1)

Network: Avalanche Fuji C-Chain — chain ID 43113 (0xa869), RPC https://api.avax-test.network/ext/bc/C/rpc, explorer testnet Snowtrace. Do not use Mainnet (43114).

Roles

Role Env Purpose
Deployer / minter AVALANCHE_CHAIN_PRIVATE_KEY scripts/deploy.py and edge mint-deed / mint-usdc (must own the deed and MockUSDC contracts)
Agent AGENT_PRIVATE_KEY (optional; defaults to deployer) Must match AgenticMilestoneEscrow.agentAddress
Developer DEVELOPER_ADDRESS (optional; defaults to deployer) Receives 97% of each releaseMilestone
  1. Copy .env.example to .env. Fund the deployer and agent with Fuji AVAX from the Core faucet.
  2. node scripts/compile.cjs
  3. python scripts/deploy.py — writes live addresses to src/lib/addresses.json, public/addresses.json, and public/deployments/fuji.json.
  4. Deploy edge functions (project mfxkgqrwwyvpdjvdtuwj) with the same deployer key the contracts use:
    npx supabase login
    npx supabase link --project-ref mfxkgqrwwyvpdjvdtuwj
    npx supabase secrets set AVALANCHE_CHAIN_PRIVATE_KEY="$AVALANCHE_CHAIN_PRIVATE_KEY"
    npx supabase functions deploy avalanche
    npx supabase functions deploy ai-assistant
    npx supabase functions deploy wallet-auth
    Enable Web3 (Ethereum) under Authentication → Providers, or rely on wallet-auth after deploy. Wallet sign-in always switches the wallet to Fuji first.
  5. Apply supabase/migrations/20260829_deed_purchases.sql in the Supabase SQL editor (or npx supabase db query -f supabase/migrations/20260829_deed_purchases.sql). Until that table exists, the Hub falls back to localStorage.
  6. Connect Core/MetaMask; the app will add/switch to Fuji.
  7. Mint from the Hub (STK UI is demo; mint fails closed if contracts have no bytecode).
  8. python scripts/agent/auditor_agent.py — structured checklist, then releaseMilestone on Fuji. Hub tails the log and only treats a real tx hash as released.

Until step 3 succeeds, the Hub banner reads Simulation — contracts not on Fuji and will not invent 0x hashes.


👥 Hackathon Team

  • Team 1 Kenya Mini Hack Cohort 3
  • Focus: Building Agentic Systems (Problem Statement 01: Fractional Real Estate Ownership)

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages