Skip to content
View Opwabtc's full-sized avatar
  • Joined Feb 27, 2026

Block or report Opwabtc

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
OPWABTC/README.md

OPWA Protocol

Real estate tokenization on Bitcoin L1 via OP_NET.
Fractional property ownership using BTC natively — no bridges, no wrapped assets.

Testnet Live OP_NET Hackathon License


What is OPWA?

OPWA Protocol lets property owners tokenize real estate on Bitcoin L1. Investors buy fractional ownership using native BTC — no intermediary token required. Yield from rental income is distributed on-chain in USDOP (protocol stablecoin) via a pull-model distributor, proportional to each holder's fraction.

V2 introduces four distinct financial instruments with non-overlapping roles:

Token Standard Role
OPWACoin (OPWA) OP-20 Protocol governance. Fixed supply 1B. Not an investment instrument.
OPWAYield (OPWAY) OP-20 Protocol bond. Stake in YieldVault → ~15% APY in USDOP.
FractionToken OP-1155 Fractional property ownership. Bought with native BTC. Each tokenId = one property.
USDOP OP-20 Yield stablecoin. Pays YieldVault (OPWAY bond) and YieldDistributor (rental yield).

Architecture V2

Investor ──BTC──▶ FractionToken.invest(tokenId, amount)
                         │
                         ├─ BTC → Treasury P2TR
                         └─ Mints FractionToken(tokenId) to investor

Property Owner ──▶ PropertyVault_v2.listProperty(nftTokenId, maxSupply, name)
                         │
                         ├─ Locks PropertyNFT in vault
                         ├─ Pays listing fee → Treasury
                         └─ Calls FractionToken.listProperty() atomically

OPWA Operator ──▶ YieldDistributor.distributeYield(tokenId, usdopAmount)
                         │
                         └─ yieldPerShare[tokenId] += amount / totalSupply(tokenId)

Holder ──────────▶ YieldDistributor.claim(tokenId)
                         │
                         └─ Receives: balance × yieldPerShare − alreadyClaimed (USDOP)

Smart Contracts

Deployed — Testnet OP_NET

Contract Address Version
OPWACoin opt1sqpz0m0uql87kz425y6h99p2k0lqut59vsgaxq8t2 v3
OPWAYield opt1sqpp23havwmyn6fykg2x8pr4vkqzw848suq828lwz v4
PropertyNFT opt1sqrg9k8u6m4a2w6p7w5vgrze296euhncq65d60ng0 v7
USDOP opt1sqpy0t34k0s6fkn76art8uv6rg8uphvna5ydgd4mu v1
YieldVault opt1sqqna5kthnryd4e44q0urp4veg6y6xp5k65jgj9mv v3
Treasury P2TR opt1ptma69xdfhxqvve9zl2pwva288lj8rtm7w3ww5xavf6xfp8uegevqq58h3t
NFT P2TR opt1pcxvldqnpuz5wghfky3l9dh9039eddx5gl6tk8twayttgdxsw906s4xnrfp
FractionToken (deploy in progress — V2 sprint) v1
PropertyVault_v2 (deploy in progress — V2 sprint) v1
YieldDistributor (deploy in progress — V2 sprint) v1

Canonical source of truth: contracts/deployed-addresses.json


Protocol Parameters

Parameter Value Notes
Price per fraction 1,000 sats Fixed. 1 FractionToken = 1,000 sats of BTC
Funding deadline 25,920 blocks (~180 days) After this, status → REFUNDABLE if not fully funded
Lock period 6,480 blocks (~45 days) After full funding — property owner waits before claiming
Listing fee (fixed) 100,000 sats (0.001 BTC) Paid by property owner at listing time
Listing fee (variable) 50 bps (0.5%) On total property value
Captação fee 150 bps (1.5%) Deducted when owner claims proceeds
Performance fee 1,000 bps (10%) On yield distributed via YieldDistributor

Fee Structure

Listing (paid by owner):   0.001 BTC fixed  +  0.5% of total value
Captação (on completion):  1.5% of total capital raised
Gestão anual:              1.0% of total property value / year
Performance:               10% of yield distributed

Example — $200k property (2 BTC):
  Listing fee:    0.011 BTC
  Captação fee:   0.030 BTC
  Owner receives: 1.970 BTC (after 45-day lock)
  OPWA revenue (year 1): ~0.082 BTC (~$8,200 at $100k/BTC)

Property Lifecycle

ACTIVE      → Funding open. Investors can call invest(tokenId, amount).
FUNDED      → 100% funded. 45-day lock begins.
COMPLETED   → Lock period passed. Owner can claimProceeds(). Yield distribution starts.
REFUNDABLE  → 180-day deadline passed before full funding. Investors can refund().

Stack

  • Contracts: AssemblyScript + @btc-vision/btc-runtime → WASM deployed on OP_NET
  • Standards: OP-20 (fungible), OP-721 (NFT), OP-1155 (multi-token / fractions)
  • Frontend: Vanilla JS/HTML single-file (index.html) — no framework dependencies
  • RPC: https://testnet.opnet.org
  • Explorer: opscan.org
  • Deploy: Vercel (push to main → auto-deploy)

Repository Structure

OPWABTC/
├── contracts/
│   ├── op20/
│   │   ├── OPWACoin.ts          # Governance token
│   │   ├── OPWAYield.ts         # Protocol bond
│   │   └── USDOP.ts             # Yield stablecoin
│   ├── op721/
│   │   └── PropertyNFT.ts       # Property title NFT
│   ├── op1155/
│   │   └── FractionToken.ts     # Fractional ownership (NEW — V2)
│   ├── vault/
│   │   ├── YieldVault.ts        # OPWAY staking vault
│   │   ├── PropertyVault_v2.ts  # Property listing vault (NEW — V2)
│   │   └── YieldDistributor.ts  # Rental yield distributor (NEW — V2)
│   ├── build/                   # Compiled WASM artifacts
│   └── deployed-addresses.json  # Canonical contract addresses
├── scripts/
│   ├── deploy-*.ts              # Deployment scripts per contract
│   └── set-*.ts                 # Post-deploy configuration scripts
├── src/                         # React/TypeScript migration (in progress)
├── index.html                   # Production frontend (single file)
├── AGENTS.md                    # Rules for AI coding agents
├── CLAUDE.md                    # Context for Claude Code sessions
└── SECURITY.md                  # Security policy and incident response

Development

Prerequisites

  • Node.js ≥ 18
  • An OP_NET testnet wallet with BTC testnet funds
  • OPNET_MNEMONIC environment variable

Build Contracts

cd contracts
npm install
npm run build

⚠️ btc-runtime patches — two patches must be re-applied after any fresh npm install:

  1. @btc-vision/btc-runtime/runtime/script/Networks.tscase Testnet: return 'opt' (not 'tb')
  2. @btc-vision/btc-runtime/runtime/global.ts — remove declare function verifySchnorrSignature

Deploy a Contract

cd /path/to/OPWABTC
OPNET_MNEMONIC='your twelve word mnemonic here' npx tsx scripts/deploy-fraction-token.ts

Deployment order for V2:

  1. deploy-fraction-token.ts
  2. deploy-property-vault-v2.ts (needs FractionToken address)
  3. set-vault-address.ts (links vault → FractionToken)
  4. deploy-yield-distributor.ts
  5. set-minter.ts (authorizes YieldDistributor on USDOP)

Run Frontend Locally

# No build step required — open directly
open index.html
# Or serve with any static server
npx serve .

Security

  • Audit v1: 107 findings — all resolved
  • Audit v2: 15 findings — all resolved in code (some require contract redeployment)
  • Active bug bounty: see SECURITY.md
  • Never commit mnemonics or private keys. See .env.example for required vars.

Hackathon — OP_NET Week 3 (Mar 13, 2026)

Submission categories:

  • NFT Marketplace — PropertyNFT (OP-721) + FractionToken (OP-1155) on Bitcoin L1
  • Yield Aggregator — YieldVault (OPWAY bond ~15% APY) + YieldDistributor (rental yield)

Live evidence on-chain: 102.27 USDOP accumulated in YieldVault · PropertyNFT minted and transferable · FractionToken V2 in active deploy sprint.


Links

🌐 App opwa-protocol.vercel.app
🔍 Explorer opscan.org
📜 Whitepaper V2 docs/whitepaper-v2.md
📦 OP_NET opnet.org
🐙 GitHub github.com/Opwabtc/OPWABTC

License

MIT — see LICENSE

Popular repositories Loading

  1. OPWABTC OPWABTC Public

    Bitcoin-native real estate tokenization platform built on OP_NET | React + TypeScript + Vite

    TypeScript 3 1