Universal Transaction Layer
Native transactions across independent assets — no wrapped tokens, no bridges, no custodian. Bittensor Subnet 7 (SN7).
Allways creates a verification layer above independent systems. Assets move natively. Miners complete transactions, validators independently verify the results, and a smart contract enforces outcomes through collateral and slashing.
Currently live with BTC ↔ TAO. Designed to scale to any verifiable asset.
The miner in this repository is reference software. Review the code thoroughly and build it out with your own safety and optimization measures before running it. Running the base miner, or anything you build on top of it, is at your own risk.
- Python 3.10+
- Bittensor wallet
- Docker & Docker Compose
Miner:
docker compose -f docker-compose.miner.yml up -dValidator:
docker compose -f docker-compose.vali.yml up -dBoth require a .env file with PORT and WALLET_PATH configured.
uv sync
# activate the uv virtual environment
source .venv/bin/activate
alw --help- Miners: Post exchange rate pairs and collateral, fulfill swap orders
- Validators: Monitor swaps, verify on-chain transactions, vote on outcomes
- Smart Contract: Manages collateral, swap lifecycle, and validator voting
- CLI: User interface for posting pairs, managing collateral, and executing swaps
Validator state lives in ~/.allways/validator/state.db (SQLite, WAL mode).
Tables: pending_confirms, rate_events, swap_outcomes. Collateral /
active / min_collateral state is held in memory and rebuilt from contract
events each startup; only swap_outcomes (the all-time credibility ledger)
needs to persist across restarts.
BTC_MODE,BTC_PRIVATE_KEY,BTC_RPC_URL, etc. — see.env.example.
Validators read miner rate commitments every ~3 minutes AND stream contract
events every block via the same connection. Pointing at the public finney
entrypoint works but adds latency and RPC pressure — every validator on the
network should run its own lite node for this.
# Minimal lite-node command (adjust --base-path for storage volume)
subtensor \
--chain finney \
--base-path /var/lib/subtensor \
--rpc-external \
--ws-external \
--port 30333 \
--rpc-port 9933 \
--ws-port 9944 \
--pruning 1000Then point the validator at it via .env:
SUBTENSOR_NETWORK=ws://127.0.0.1:9944The dev environment in alw-utils/dev-environment provisions a local chain
automatically — no manual lite-node step is required there.
MIT License
Allways is permissionless, open-source, beta software. Swaps settle directly between counterparty wallets; the protocol never takes custody of user funds, and the protocol fee is charged against miner collateral rather than any user transfer. Validator operators, including those run by the project, verify swap outcomes but cannot redirect or receive any transferred amount. Use at your own risk. This software is provided "as is" without warranty of any kind. Nothing herein constitutes financial advice, and the creators assume no liability for losses arising from use of the protocol.