# 4to.day protocol v1

Coverage begins **2026-08-01T00:00:00Z** permanently. Hours are assigned chronologically without gaps. Retain all assignments; never reset the coverage date or recycle day codes.

## Trust anchor

Use drand quicknet, chain hash `52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971`, scheme `bls-unchained-g1-rfc9380`.

Public key:

```
83cf0f2896adee7eb8b5f01fcad3912212c437e0073e911fb90022d3e760183c8c4b450b6a0a6c3ac6a5776a2d1064510d1fec758c921cc22b0e17e63aaf4bcb5ed66304de9cf809bd274ca73bab4af5a6e9c76a4bc09e76eae8991ef5ece45a
```

For UTC Unix seconds `t`, round = `floor((t - 1692803367) / 3) + 1`. Use midnight's round for the day and the exact hour's round for its suffix. Verify the expected round and BLS signature against the pinned key using the quicknet scheme. Randomness is `SHA256(decoded_signature_bytes)`, not a hash of its hex text.

## Derivation

Concatenate the following byte sequences, with no separators beyond the literal prefix:

1. UTF-8 `4today-day-v1:` or `4today-hour-v1:`.
2. The 32 decoded randomness bytes.
3. Counter as unsigned four-byte big-endian integer, initially zero.

SHA-256 that input. Read the first 20 bits (day) or first 10 bits (hour), most-significant bit first. Encode with alphabet `0123456789ABCDEFGHJKMNPQRSTVWXYZ`, using exactly four or two characters, respectively. Preserve leading zeros.

For each day, choose the first candidate not assigned to an earlier date. For each hour, choose the first candidate not assigned to an earlier hour on that date. Increment the counter by one on collision. Store the accepted counter. Exhaustion must fail rather than wrap. Published assignments are immutable.

Example vectors using 32 zero randomness bytes and counter zero (synthetic derivation inputs, not beacon evidence): day `KPXD`, hour `7Z`. The first coverage round is `30913012`.

## Replay

Check exported configuration against independently trusted constants. Verify every signature and its randomness. Starting at coverage inception, require exactly one record per consecutive UTC hour, and one day record at each midnight. Recompute the first available candidate for every assignment and compare both code and counter. Reject duplicates, incorrect rounds, missing evidence, unused evidence, extra day records, and inconsistent coverage endpoints.

A valid export verifies only its included interval. It cannot prove that no more recent records exist. Compare its latest hour to an independently chosen expected endpoint when freshness of the export matters.

Short codes are public freshness references; they do not authenticate external items. Day-only codes identify a UTC date; full codes identify the assigned UTC hour. A later observation does not establish an upper time bound.
