blit.onenft.click

From one number to one blit

The only input is the clock of the Base chain: the timestamp of the current block. Nobody sets it and nobody can roll it back.

A day is that timestamp divided by 86,400, rounded down. That gives one calendar day in UTC, with the boundary at midnight UTC. The number itself counts days since 1 January 1970; day one of this project is day number 20701.

The originals are the 100 Blitmaps that 17 artists drew on Ethereum in 2021 and released as CC0: 32 by 32 pixels, four colors, 268 bytes each. The contract on Base holds all 100, byte for byte as they sit in the Ethereum contract. Blitmap's own rule let a holder pair the composition of one original with the palette of another; 1,600 such siblings were made there. Here nobody chooses. The clock does.

The pair for day n is number perm(n - 1) out of the 9,900 possible pairs: 100 compositions times 99 other palettes. perm is a fixed shuffle of 0 to 9,899, so every pair appears exactly once in 9,900 days, about 27 years. After that the shuffle changes key and the next 9,900 days run in a new order. An original is never paired with itself; you can see the originals themselves on Ethereum.

The remix is 268 bytes: the first 12 (four RGB colors) from the palette original, the other 256 (1,024 pixels, two bits each) from the composition original. The same rule Blitmap used for its siblings, so when a pair already exists there the page says so and links to it.

The image is one SVG: a rect in the most used color, then one rect per horizontal run of any other color. A few kilobytes. The contract returns it as a data: URI, with no server in between. This page takes its colors from today's four, so it looks different every day. Today: Jupiter in the colors of Fishy. See every original and how often it has come up.

The traits in the token are the composition and its artist, the palette and its artist, Blitmap's affinity (Fire, Earth or Water from the first three colors) and the Ethereum sibling when one exists.

Build it yourself

The same day number gives the same blit every time, ten years from now and with this page switched off. The generator is in the repository, in TypeScript and in Solidity, with a test that keeps the two byte for byte equal. The shuffle is below; the originals, their names and the sibling list are in spec.json.

u64 mix(u64 x):
  x += 0x9e3779b97f4a7c15
  x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9
  x = (x ^ (x >> 27)) * 0x94d049bb133111eb
  return x ^ (x >> 31)

feistel(x, cycle):              # a permutation of 0..16383
  l = x >> 7; r = x & 127
  for round in 0..3:
    f = mix(r | round << 8 | cycle << 16) & 127
    l, r = r, l ^ f
  return l << 7 | r

perm(i, cycle):                 # a permutation of 0..9899
  x = feistel(i, cycle)
  while x >= 9900: x = feistel(x, cycle)
  return x

n = day - 1
index = perm(n mod 9900, n / 9900)
a = index / 99                  # composition
b = index mod 99; if b >= a: b += 1   # palette
blit = originals[a] with bytes 0..11 from originals[b]

Everything here is CC0, like the originals. If you build it, write to me. That is the one thing I am waiting for here.

Back to today. Every daily collection, including the knot: onenft.click.