How It Works
Allways is Bittensor Subnet 7 (SN7). It enables collateral-backed native swaps across independent assets — no wrapped tokens, no bridges, no custodian.
Settlement runs on a Solana smart contract (allways_swap_manager) that manages the entire swap lifecycle. Assets move natively on each chain; validators verify what happened on the source and destination chains and vote the result to the contract, which enforces consensus.
Hub-and-spoke
The subnet is hub-and-spoke. A hub carries the collateral; spokes pair against it:
Hubs: sol, tao — collateral-capable; every pair needs one.
Spokes: btc, eth, arbusdc, hype, bnb, avax, baseusdc, ethusdc, cro, aster, uni, qnt, pol, polusdc, paxg, solusdc
A pair is valid iff at least one leg is a hub — 33 pairs, 66 directions. So sol→btc and btc→sol are both live, as is sol↔tao; btc→eth (spoke↔spoke) is not.
Names, decimals, and explorer links for each: GET /chains.
Every swap therefore has a hub leg. That leg is the pair's backing: collateral and swap sizing are denominated in it. The reservation fee is always SOL, because every reservation settles on Solana. Rates are per-direction and always read "destination per 1 source unit": sol→btc is BTC per 1 SOL, btc→sol is SOL per 1 BTC. (Internally, machines store one canonical number per pair — spoke per 1 hub; every human surface shows and accepts what you receive per 1 of what you send, converted at the display boundary.)
Actors
| Actor | Role | Incentive |
|---|---|---|
| User | Reserves a miner, names the amounts, sends source funds, receives destination funds | Native settlement without intermediaries |
| Miner | Posts hub collateral (SOL or a TAO bond) + per-direction quotes, fulfills swaps (how they source liquidity is up to them) | Subnet emissions, earned per direction while holding the best rate |
| Validator | Runs the draw crank, verifies source + destination transactions on-chain, votes on outcomes, scores miners, sets weights | Subnet validator emissions |
| Solana smart contract | Holds collateral, runs the lottery, records swap state, enforces timeouts / consensus / slashing | — |
The reservation lottery
Every swap begins the same way: one user wins the exclusive right to swap with a single miner. Anyone who wants that miner joins its reservation pool — one pool per miner — and one entrant is drawn the winner.
There are two ways to enter that pool, and which you use decides your odds. The diagram below traces both, from how a user starts a swap all the way to who wins the miner:
The two ways to enter:
- Native (direct). You are your own router and enter the pool yourself, with no stake behind you. This is what
alw swap nowdoes — no validator, no waiting. - Routed (through a validator). You use a validator's app; it enters the pool for you, carrying its stake weight, and finalizes your swap automatically if it wins.
Who wins the draw depends only on who else is in that one pool:
- If every entry is native, the draw is a flat, even lottery — a straight 1-in-N, stake plays no part.
- The moment a staked validator enters, its stake decides the draw and native entries effectively can't win. More stake, better odds.
How validator routing leads to products
Because stake wins reservations, a validator that attracts users and stake wins them more swaps — and how it picks and serves those users is entirely its own design: priority for some, fee tiers, batching, a polished browser experience. The subnet leaves that open on purpose. Entry to the network is permissionless; winning contested seats takes stake; the product built on top is the validator's.
The mechanics, once you're in the pool:
- Joining costs a flat 0.02 SOL fee (anti-spam, non-refundable). The first entry pins the miner's quoted rate for the whole pool, and the miner plus its collateral lock to it.
- When the pool's window closes, anyone can crank the draw.
- The winner then names the recipient and amount — which must fit the miner's min/max bounds and be fully backed: the miner holds 1.1× the swap's SOL value in collateral, so collateral caps its largest fill at
collateral / 1.1. The reservation is now live. Because the amount is named only after the seat is won, you never commit a size to a miner you might not get.
Swap lifecycle
How a swap flows
- Enter. You (or a validator on your behalf) enter a miner's pool and pay the reservation fee.
alw swap nowdoes this for you. - Draw + finalize. The draw is cranked; if your entry wins, your router finalizes it with your amounts. Now you hold the miner. Finalize is also where the contract enforces the reservation invariants directly — the destination can't be the miner's own delivery address, and one source address backs at most one live reservation per miner at a time — so they hold on every lane, router or not.
- Send. Your source funds go to the miner's posted address —
--sendbroadcasts them for you, or you send yourself — the exact pinned amount, from the address the reservation names. - Relay. You run
alw swap post-tx <hash>immediately — do not wait for confirmations. Validators verify the deposit against your reservation (correct sender, recipient, amount, and freshness) and submit the claim, then vote to initiate. Confirmation depth is waited out server-side afterward (see Deferred confirmation). - Fulfill. The miner detects the Active swap, confirms your deposit, and sends 99% of the destination amount to your address. You sent
1.0worth of value in and get0.99worth back — the miner does not keep that0.01; the contract skims it from the miner's collateral in the next step. - Confirm. Validators independently verify both legs and vote to confirm. The contract deducts a
1%fee from the miner's collateral (the same0.01you "missed"), and the swap is Completed.
Deferred confirmation
On slow chains (BTC: ~2 confirmations ≈ 20 min) you don't wait — relay your tx hash with post-tx the moment you broadcast. Validators record the pending deposit immediately, push the swap deadline out while confirmations accrue, and attest once the deposit is confirmed. Relaying instantly is how you keep a reservation; waiting is how you lose it.
What if a miner fails?
For the swap's whole life the miner is locked: 1.1× the swap's value is committed as collateral, no other reservation can claim that purse, and they can't withdraw it. Miss the delivery deadline and validators vote the swap timed out — the full 1.1× is slashed and paid to you, automatically. You're made more than whole.
Which asset you're repaid in, and how fast, follows the quote's backing:
| Quote backing | Where the collateral sits | Your reimbursement |
|---|---|---|
| SOL-backed | the miner's SOL collateral vault on Solana | SOL, immediately — the same transaction that records the timeout pays you |
| TAO-backed | the miner's bond in the Bittensor vault | TAO, minutes later — Solana records the verdict, then validators carry it to Bittensor and the vault pays you there |
The delay on a TAO-backed swap is a timing difference, not a weaker guarantee. Solana closes the swap immediately with the verdict — the amount owed and who it's owed to — and the seizure follows on the vault once validators reach quorum there. Nothing about the payout is discretionary.
Delivered but still gathering confirmations? Validators extend the deadline instead — honest miners aren't punished for block time. This matters most on Bitcoin: a delivery sitting at 0/2 confirmations near the deadline gets the deadline pushed out, up to the extension budget, rather than being treated as a miss.
If a payout ever looks missing, inspect the swap with alw view swap <swap_key>.
One exception pays nothing: Cancelled. If validators prove your destination cannot receive — a blacklisted or paused token, a contract that reverts a correctly-gassed transfer, a reserved Solana account — the swap closes with no slash, no fee, and no strike against the miner. The miner did nothing wrong, so nothing is seized, and your source funds stay with them. Check that your receive address is a plain, unfrozen account before you send.
Fees
A 1% protocol fee applies to each completed swap. The miner offsets it by delivering 99% of the destination amount — so the user bears the fee implicitly through the rate, never as a separate charge.
Where the fee is taken from depends on the backing. On a SOL-backed swap the contract skims 1% of the swap's SOL value from the miner's collateral into the treasury on confirm. On a TAO-backed swap nothing moves on Solana: the fee is recorded as rao owed against the miner's bond, and validators settle the accumulated total onto the vault in periodic batches. Either way the miner's effective bond — the figure every collateral guard reads — drops the moment the fee is earned, not when it's collected.
Separately, every pool entry pays a reservation fee (base 0.02 SOL → treasury) — an anti-spam gate, non-refundable, win or lose. The fee is stake-discounted for the router paying it: the discount is 2 × the router's share of total validator draw weight, capped at 95%, with a 0.001 SOL floor so a pool-open is never free. A self-represented entry (draw weight 0) pays the full base — routing through a well-staked validator is cheaper as well as likelier to win the draw.
Protocol and reservation fees accumulate in the contract's treasury. Separately, any emission a miner leaves on the table (ineligibility, capacity shortfall, no qualifying miner, halted contract) burns back to the network rather than flowing to other miners.
Scoring
Miners earn emission only while they hold the crown on a pair direction — at any instant, the eligible, active, idle miners quoting within a band of the best rate for that direction co-hold it, split in proportion to collateral depth. Credit is time-weighted over a rolling window. The reward is a binary eligibility gate (deliver swaps or earn nothing; lifetime timeout strikes never reset) times crown presence × capacity, paid out of a per-direction pool that follows demand. Nothing unclaimed is redistributed.
The full model — eligibility and strikes, the rate band, capacity, why idle is judged per purse, and how direction pools are sized — lives on the Incentive page.
Supported chains
| Chain | Confirmations | On-chain floor |
|---|---|---|
| Solana (SOL) — hub | 32 | rent-exempt minimum (~0.00089 SOL) |
| Bittensor (TAO) — hub | 6 | existential deposit (500 rao) |
| Bitcoin (BTC) | 2 | 1000 sat |
TAO is both a spoke (swap it against SOL) and a hub (pair it directly with spokes, e.g. tao↔btc). Every pair has exactly one hub leg, and the swap-size bounds apply to that leg.
Key parameters
All of these are on-chain and admin-tunable — read the live values with alw view config, never hardcode them. The table shows the values deployed today; the three timing parameters that differ between clusters are shown as mainnet / testnet.
| Parameter | Value |
|---|---|
| Protocol fee | 1% (skimmed from collateral, offset by the 99% delivery) |
| Reservation fee | 0.02 SOL per pool entry (anti-spam, non-refundable) |
| Min / max swap | 0.1 / 1 SOL (SOL-leg notional) |
| Min / max swap, TAO-backed | 0.1 / 1 τ (TAO-leg notional) |
| Min / max collateral | 0.1 / 10 SOL |
| Min bond, TAO vault | 0.25 τ |
| Collateral requirement | 1.10× the swap's value, in the backing asset |
| Settlement grace | 15 min (a slashed purse is closed to new swaps while the seizure settles) |
| Attestation max age | 24 h (bond mirror staleness before TAO-backed entry is fused off) |
| Pool window | 60s mainnet / 30s testnet (pool-entry window before the draw) |
| Finalize window | 150s mainnet / 60s testnet (seat winner's time to name amounts) |
| Reservation TTL | 8 min mainnet / 10 min testnet (hold before a live reservation expires) |
| Fulfillment timeout | 10 min (miner's delivery deadline once Active) |
| Max total extension | 140 min (deadline-extension budget for confirmations; on-chain clamp 30–140 min) |
| Consensus threshold | 67% of whitelisted validators |
| Scoring window | ~1 hour |
| Program id — same address on mainnet and testnet | 6JVBEj5w27J2SVjERmv2c7wXgFee9nSSBKUJevHehyBD |
| Subnet (finney / mainnet) | netuid 7 · Solana mainnet-beta |
| Subnet (testnet) | netuid 19 · Solana devnet |
Mainnet status: mainnet is the live network — the program id is the same across clusters, only the network differs. Testnet (netuid 19 + Solana devnet) mirrors it with free funds; dry-run there before moving real value.
