Modular programmable Bitcoin vault infrastructure for DeFi integration across chains.
0x21 Finance provides application-specific personal Bitcoin vaults that can be unlocked under programmable conditions. Instead of wrapping BTC into fungible tokens (wBTC, cbBTC, etc.), users create vaults controlled by threshold keys on the Internet Computer, enabling native Bitcoin custody with cross-chain programmability.
Key use cases: Staking collateral, lending, stablecoins, perpetual DEXs - scenarios where collateral stays in user ownership under normal conditions but can change hands upon liquidation.
| Service | URL | Description |
|---|---|---|
| Main App | app.0x21.finance | Primary vault management interface |
| Staking Demo | staking-demo.0x21.finance | Stake BTC to earn Bitcoin Staking Token (BST) on Ethereum |
| Swap Demo | swap-demo.0x21.finance | Create and take BTC/ETH swap orders |
| Documentation | docs.0x21.finance | Technical documentation and integration guides |
| Monitoring | monitoring.0x21.finance | Grafana dashboards for system metrics |
| Bitcoin Explorer | mempool.0x21.finance | Mempool.space instance for Bitcoin regtest |
| EVM Explorer | evm-explorer.0x21.finance | Otterscan for Ethereum/Anvil transactions |
Note: The live environment runs on hosted test networks (Bitcoin regtest, Anvil, IC replica) for demonstration purposes.
- Timelocked Vaults - Unlockable programmatically during lifetime, reclaimable by user after expiry
- Perpetual Vaults - Only unlockable programmatically via unlock modules
Unlock modules define conditions under which vaults can be released:
- Ethereum Unlock Module - Syncs vaults with a VaultRegistry contract on Ethereum. Authorized addresses can unlock vaults by calling
unlockVault()on-chain. - Bitcoin Price Threshold - Unlocks based on BTC price conditions
- Mock Unlock Module - For testing and development
Each module is an independent canister on the Internet Computer, enabling protocol integrations without IC development - only chain-specific contract work is required.
src/
├── btc_vault_backend/ # Rust canister: vault logic, scheduler, state management
├── btc_vault_app/ # Main application frontend
└── btc_vault_landing/ # Landing page
examples/
├── apps/
│ ├── staking/ # Bitcoin staking demo application
│ └── swap/ # BTC/ETH swap demo application
└── unlock_modules/
├── ethereum_vault_unlock/
├── bitcoin_price_threshold/
└── mock_unlock/
docs/ # VitePress documentation site
scripts/ # Deployment and testing scripts
monitoring/ # Prometheus, Grafana, Loki configuration
docker/ # Docker infrastructure and entrypoints
- Rust 1.70+ with
wasm32-unknown-unknowntarget - DFX 0.15+ (Internet Computer SDK)
- Node.js 20+ with pnpm
- Docker (for full stack)
# Start full local stack (bitcoind, anvil, dfx replica) and deploy canisters
make setup
# Run tests
make test # Full integration tests
make test-quick # Faster iteration
make unit-tests # Rust unit tests only
# Development
make build # Build all canisters
make generate-bindings # Regenerate TypeScript bindings
make frontend-dev # Start frontend dev server
make status # Check all services and canisters
make stop # Stop all servicesmake fmt && make clippy # Format and lint Rust code
make logs # View canister logs
make endpoints # Show all service URLsSee docs.0x21.finance for:
- Integration guides
- Architecture deep-dive
- Security model
- API reference
Interested in building with 0x21? Contact us to discuss integration opportunities.
MIT License - see LICENSE for details.