// docs
How the night shift runs.
The protocol in six short sections: what happens to a job, how results are checked, and where the money goes.
# Job lifecycle
- [1] submitA job names a model, an input and a replication factor. The price is quoted before anything runs.
- [2] shardThe scheduler cuts the job into independent shards: chunks of text, audio segments, batches of rows.
- [3] assignEach shard is sent to 3 machines drawn at random among those with enough memory and stake.
- [4] computeMachines load the model, run the shard with a fixed seed and return the output with its hash.
- [5] quorumHashes are compared. A strict majority wins. No majority means the shard is sent out again.
- [6] settleThe buyer is charged, the majority is paid, dissenters are slashed and the receipt is written.
# Verification
Nightshift checks work by redundancy. The same shard is computed by 3 machines that cannot see each other, and their result hashes are compared. This only works if honest machines produce identical bytes, so every job runs with a fixed seed, pinned model weights and deterministic sampling.
A machine whose hash loses the vote is not paid and loses part of its stake. A buyer can raise the replication factor for work that matters and lower it for work that does not: the cost scales with the number of replicas.
On top of the vote, a share of every payment funds verifiers that re-run a random sample of finished jobs, so a colluding majority on one shard can still be caught later.
# Handoff and failures
Home machines leave without notice: the owner comes back, the laptop lid closes, the connection drops. Jobs write a checkpoint at short intervals. When a machine leaves, its shard resumes from the last checkpoint on another machine, and the first machine is paid for the seconds it completed.
A machine that goes silent without a checkpoint is simply replaced. It is not slashed for leaving, only for returning a wrong result.
# Pricing
Compute is billed by the GPU second, by class of card. Prices are quoted in dollars and settled in $SHIFT.
| class | memory | per second | per hour |
|---|---|---|---|
| A | 20 GB and up | $0.00012 | $0.432 |
| B | 10 to 16 GB | $0.00006 | $0.216 |
| C | under 10 GB | $0.00003 | $0.108 |
Of each payment, 90% goes to the machines that did the work, 5% to the verifier pool and 5% is burned.
# Privacy and sandboxing
Jobs run in a sandbox on the provider's machine with no access to the owner's files or network. That protects the owner. It does not hide your input from the owner, who controls the hardware. Treat anything you send as readable: use Nightshift for open models and inputs that are public or low in sensitivity.
# API
One endpoint takes a job, one returns its receipt. Models available today:
- llama-3.1-8b8 GB and up
- whisper-large-v36 GB and up
- sdxl-turbo12 GB and up
- bge-small-en4 GB and up
curl https://api.usenightshift.fun/v1/jobs \
-H "Authorization: Bearer $NIGHTSHIFT_KEY" \
-d '{
"model": "llama-3.1-8b",
"input": "Summarize the Bitcoin whitepaper in three sentences.",
"replicas": 3
}'
# -> { "id": "summarize-1b9x2k", "status": "settled",
# "output": "...", "receipt": "https://usenightshift.fun/r/summarize-1b9x2k" }