Pool BTC with friends, teams, or DAOs for shared goals. Funds are locked in a Bitcoin L1 smart contract β only released when conditions are met. No custodian, no bridge, no EVM.
- π¨ Elite Design - Glass morphism UI with custom branding
- π Real-time BTC Price - Live price widget with 24h changes
- π΅ Background Music - Auto-play with premium audio
- π¦ Trustless Escrow - Bitcoin L1 smart contract security
- π³οΈ Democratic Voting - Group fund release decisions
- π± Mobile Responsive - Works seamlessly on all devices
- Create Group Funds β Trip, Gift, Rent, DAO, Business, Emergency, Custom
- Invite Code System β Share a short code for anyone to join
- Progress Tracking β Real-time funding bar with participant count
- 3 Payout Rules:
- β‘ Auto β Funds release automatically when target reached
- π³οΈ Vote β Majority threshold (configurable 51β100%)
- π Unanimous β All participants must approve
- Deadline + Auto-Refund β If target not reached by deadline, full refund
- OP_NET Wallet β Connect your Bitcoin wallet for on-chain transactions
- Demo Mode β Works fully without deployed contracts (local simulation)
BTCGather/
βββ src/ β React + Vite + Tailwind frontend
β βββ main.jsx
β βββ App.jsx β Root: state, routing, demo simulation
β βββ index.css β Dark BTC theme + custom components
β βββ data/mockData.js β Mock groups, states, templates
β βββ hooks/
β β βββ useOPNetWallet.js β Wallet connect/disconnect/refresh
β β βββ useGroupContract.js β Contract method bindings
β βββ services/
β β βββ opnetWallet.js β OP_NET wallet extension API
β β βββ contractService.js β SDK + ABI + RPC layer
β βββ components/
β βββ Header.jsx β Logo, wallet, nav
β βββ StatsBar.jsx β Protocol stats
β βββ GroupList.jsx β Grid + search + filters
β βββ GroupCard.jsx β Individual group card
β βββ GroupDetail.jsx β Full group view + actions
β βββ ParticipantsPanel.jsxβ Contributor list
β βββ VotingPanel.jsx β Vote release/refund
β βββ CreateGroupModal.jsx β 3-step wizard
β βββ JoinGroupModal.jsx β Invite code + browse
β βββ Footer.jsx
β
βββ contracts/ β AssemblyScript OP_NET smart contracts
β βββ src/
β β βββ escrow/EscrowContract.ts β Core escrow + state machine
β β βββ factory/GroupFactoryContract.ts β Global group registry
β β βββ voting/VotingContract.ts β Standalone vote module
β β βββ registry/RegistryContract.ts β Contribution tracker
β βββ asconfig-{escrow,factory,voting,registry}.json
β βββ deploy.ts β Universal deployment script
β βββ package.json
β βββ .env.example
β
βββ index.html β Contract address placeholders
βββ package.json
βββ vite.config.js
βββ tailwind.config.js
cd BTCGather
npm install
npm run dev
# β http://localhost:3000Works in demo mode (mock data, local simulation) without deployed contracts.
cd BTCGather/contracts
cp .env.example .env
# Edit .env β add your MNEMONIC and RPC_URL
npm installnpm run build:allThis produces 4 WASM files in build/:
BTCGatherEscrow.wasmBTCGatherFactory.wasmBTCGatherVoting.wasmBTCGatherRegistry.wasm
# Deploy EscrowContract (main contract)
npm run deploy:escrow
# Deploy GroupFactoryContract
npm run deploy:factory
# Deploy VotingContract
npm run deploy:voting
# Deploy RegistryContract
npm run deploy:registryEach deploy prints the contract address. Copy each address into index.html:
<script>
window.BTCGATHER_ESCROW_CONTRACT = 'opt1...your_escrow_address';
window.BTCGATHER_FACTORY_CONTRACT = 'opt1...your_factory_address';
window.BTCGATHER_VOTING_CONTRACT = 'opt1...your_voting_address';
window.BTCGATHER_REGISTRY_CONTRACT = 'opt1...your_registry_address';
</script>cd ..
npm run devThe app now switches from demo mode to live OP_NET mode.
Open (1) ββ[deposits]βββΆ Funded (2)
β
βββββββββββββββββΌβββββββββββββββββββββ
βΌ βΌ βΌ
Auto Rule Vote Rule All Rule
β β β
βΌ βΌ βΌ
Released (4) Voting (3) Voting (3)
β β β β
votes votes votes votes
β β β β
βΌ βΌ βΌ βΌ
Released Refunded Released Refunded
(4) (5) (4) (5)
Open (1) ββ[deadline passed]βββΆ Expired (6) βββΆ Refunded (5)
Not Started (0) ββ[openVote]βββΆ Active (1)
β
βββββββββββ΄βββββββββββ
[threshold] [deadline]
β β
βββββββ΄ββββββ Expired (4)
βΌ βΌ
Release (2) Refund (3)
- Funds are locked in Bitcoin L1 smart contracts β no custody
- Deadline-based auto-refund prevents permanent fund lockup
- Vote thresholds are configurable per group (51%β100%)
- 0.3% protocol fee only on successful release
- No bridges, no EVM, Bitcoin L1 native only
| Method | Type | Description |
|---|---|---|
createGroup(target, deadline, rule, pct) |
Write | Initialize a new group escrow |
deposit(amount) |
Write | Contribute BTC to the fund |
castVoteRelease() |
Write | Vote to release funds to beneficiary |
castVoteRefund() |
Write | Vote to refund all contributors |
finalizeRelease() |
Write | Trigger release if vote threshold passed |
claimRefund() |
Write | Claim BTC refund |
checkExpiry() |
Write | Set expired state if deadline passed |
getGroupInfo() |
View | Full group state + amounts |
getVoteInfo() |
View | Vote counts + threshold |
getProtocolStats() |
View | Global protocol stats |
| Method | Type | Description |
|---|---|---|
registerGroup(groupId) |
Write | Register escrow in global registry |
recordRelease(amount) |
Write | Track released amount |
getGroupCount() |
View | Total registered groups |
getFactoryStats() |
View | Full factory statistics |
| Method | Type | Description |
|---|---|---|
openVote(duration, pct, total) |
Write | Start a vote round |
castVote(0|1) |
Write | Cast refund(0) or release(1) vote |
finalizeVote() |
Write | Check + finalize outcome |
getVoteInfo() |
View | Votes, state, deadline |
| Method | Type | Description |
|---|---|---|
recordDeposit(amount) |
Write | Log a contribution |
closeRegistry() |
Write | Close registry to new deposits |
getRegistryInfo() |
View | Participant count + totals |
getAverageDeposit() |
View | Average contribution size |
| Network | RPC URL |
|---|---|
| Testnet | https://testnet-rpc.opnet.org |
| Mainnet | https://rpc.opnet.org |
Explorer: https://opscan.org
- Phase 5 β Integration testing (multiple wallets, edge cases)
- Phase 6 β UX polish (animations, tooltips, loading skeletons)
- Contribution history per wallet address
- Group invitation via URL share
- Multi-group dashboard per wallet
- Mobile PWA support
MIT β Build freely on Bitcoin L1.
