diff --git a/deck/index.md b/deck/index.md new file mode 100644 index 0000000000..dbc2660bf6 --- /dev/null +++ b/deck/index.md @@ -0,0 +1,175 @@ +# Ordinals + +# Today's Agenda +- Who am I? +- What are ordinals? +- What does that have to do with NFTs? + +--- + +# Feel free to interrupt and ask questions! + +--- + +# Who am I? +- I'm just this guy, you know? +- Bitcoin, Rust, and generative art programmer +- Last big project was Agora, a server for selling downloads for Lightning + Network payments + +--- + +# Why ordinals? +- Wanted a simple protocol for assets on Bitcoin +- Don't require any modification to the protocol +- Aesthetically appealing, so particularly well-suited for art + +--- + +# What are ordinals? + +--- + +# Ordinals are just serial numbers for satoshis + +--- + +# They start at 0, and go up to 1,906,077,499,999,999 (so far!) + +--- + +# Are transferred with a simple first-in-first-out algorithm + +``` +[2] [1] [3] → [4] [2] +``` + +``` +[a b] [c] [d e f] → [? ? ? ?] [? ?] +``` + +``` +[a b] [c] [d e f] → [a b c d] [e f] +``` + +--- + +# What about fees? + +``` +[2] [1] [3] → [4] +``` + +``` +[a b] [c] [d e f] → [a b c d] +``` + +``` +[SUBSIDY] [e f] → [SUBSIDY e f] +``` + +--- + +# Specification + +```python +# subsidy of block at given height +def subsidy(height): + return 50 * 100_000_000 >> height // 210_000 + +# first ordinal of subsidy of block at given height +def first_ordinal(height): + start = 0 + for height in range(height): + start += subsidy(height) + return start + +# assign ordinals in given block +def assign_ordinals(block): + first = first_ordinal(block.height) + last = first + subsidy(block.height) + coinbase_ordinals = list(range(first, last)) + + for transaction in block.transactions[1:]: + ordinals = [] + for input in transaction.inputs: + ordinals.extend(input.ordinals) + + for output in transaction.outputs: + output.ordinals = ordinals[:output.value] + del ordinals[:output.value] + + coinbase_ordinals.extend(ordinals) + + for output in block.transaction[0].outputs: + output.ordinals = coinbase_ordinals[:output.value] + del coinbase_ordinals[:output.value] +``` + +--- + +# What are ordinals good for? + +If you want a token, you can just pick and ordinal to represent your token, and +use the location of the ordinal to represent ownership. + +The person who controls the private key that corresponds to the public key of +the UTXO that contains the ordinal is the current owner of the token. + +--- + +# What else are ordinals good for? + +- Aesthetics! +- Supporting the fee market! + +--- + +# Wacky aside: Ordinal traits + +- 😏 Rare ordinals +- 🤤 Epic ordinals +- 🥵 Legendary ordinals +- Bounties: https://ordinals.com/bounties/ + +--- + +# Ordinal Index + +- [big](http://api.ordinals.com:8000/list/e11d223685e110c5df93d7ae57f63c535ac59d1d65c16de779f23a9166229c7e:0) +- [small](http://api.ordinals.com:8000/list/81bb70199e0c2cf6a32ee0b8079085eb590c311f6e91bb51c14b85846593a76e:1) +- [spent](http://api.ordinals.com:8000/list/b40375d8e4f50728c18ed292c2e40ed616797592a2f5587c9f72a23a55973f9e:0) + +--- + +# What are ordinals not good for? + +- Not having to make weird multi-step transactions to avoid hitting the dust + limit +- Being efficient with block space +- Very high divisibility +- Small databases + +--- + +# Ordinal NFTs + +1. Hash: (ordinal || content hash || public key) +2. Sign +3. Append signature, data, and then bech32 encode +4. Et voilà: `nft1qqz3psl8mvjm9t573n29l8q0phklcdhg65392pv0gpc79tydeujltn5g2h4fsg...` + +--- + +# Ordinal NFTs + +- No on-chain transaction to mint +- Store the NFT wherever +- Anyone who has access to the NFT will know the secret, hidden meaning of the + ordinal. + +--- + +# DISCLAIMER + +[thicccc transaction](https://mempool.space/tx/c3a7786e164bbc7620a90601a1f284cff1a5e93c59978f566a9c7104bc33975a) diff --git a/docs/deck/index.html b/docs/deck/index.html new file mode 100644 index 0000000000..21f563b608 --- /dev/null +++ b/docs/deck/index.html @@ -0,0 +1,184 @@ + + + + + + + Ordinals + + + + + + +

Ordinals

+

Today’s Agenda

+
+

Feel free to interrupt and ask questions!

+

Who am I?

+
+

Why ordinals?

+
+

What are ordinals?

+

Ordinals are just serial numbers for satoshis

+

They start at 0, and go up to 1,906,077,499,999,999 (so far!)

+

Are transferred with a simple first-in-first-out algorithm

+
[2] [1] [3] → [4] [2]
+
+
[a b] [c] [d e f] → [? ? ? ?] [? ?]
+
+
[a b] [c] [d e f] → [a b c d] [e f]
+
+

What about fees?

+
[2] [1] [3] → [4]
+
+
[a b] [c] [d e f] → [a b c d]
+
+
[SUBSIDY] [e f] → [SUBSIDY e f]
+
+

Specification

+
# subsidy of block at given height
+def subsidy(height):
+  return 50 * 100_000_000 >> height // 210_000
+
+# first ordinal of subsidy of block at given height
+def first_ordinal(height):
+  start = 0
+  for height in range(height):
+    start += subsidy(height)
+  return start
+
+# assign ordinals in given block
+def assign_ordinals(block):
+  first = first_ordinal(block.height)
+  last = first + subsidy(block.height)
+  coinbase_ordinals = list(range(first, last))
+
+  for transaction in block.transactions[1:]:
+    ordinals = []
+    for input in transaction.inputs:
+      ordinals.extend(input.ordinals)
+
+    for output in transaction.outputs:
+      output.ordinals = ordinals[:output.value]
+      del ordinals[:output.value]
+
+    coinbase_ordinals.extend(ordinals)
+
+  for output in block.transaction[0].outputs:
+    output.ordinals = coinbase_ordinals[:output.value]
+    del coinbase_ordinals[:output.value]
+
+

What are ordinals good for?

+

If you want a token, you can just pick and ordinal to represent your token, and +use the location of the ordinal to represent ownership.

+

The person who controls the private key that corresponds to the public key of +the UTXO that contains the ordinal is the current owner of the token.

+

What else are ordinals good for?

+
+

Wacky aside: Ordinal traits

+
+

Ordinal Index

+
+

What are ordinals not good for?

+
+

Ordinal NFTs

+
    +
  1. Hash: (ordinal || content hash || public key)
  2. +
  3. Sign
  4. +
  5. Append signature, data, and then bech32 encode
  6. +
  7. Et voilà: nft1qqz3psl8mvjm9t573n29l8q0phklcdhg65392pv0gpc79tydeujltn5g2h4fsg...
  8. +
+

Ordinal NFTs

+
+

DISCLAIMER

+

thicccc transaction

+ + diff --git a/docs/index.html b/docs/index.html index 4b41e02efc..24b97223ef 100644 --- a/docs/index.html +++ b/docs/index.html @@ -19,6 +19,8 @@

THERE WILL ONLY EVER BE 2,099,999,997,690,000 ORDINALS

Check out the bounties for a little ordinal treasure hunt.

+

A slide deck with mostly the same content as this page is available here.

+

What are ordinals?

Ordinals are numbers, like this: 804766073970493. Every satoshi, which is ¹⁄₁₀₀₀₀₀₀₀₀ of a bitcoin, has an ordinal, and every ordinal has a satoshi. When a satoshi changes hands, so does its ordinal. There are a lot of satoshis, and so there are a lot of ordinals. Two quadrillion ninety-nine trillion nine hundred ninety-nine billion nine hundred ninety-seven million six hundred ninety thousand, to be precise. diff --git a/justfile b/justfile index ea47928598..7e46986b7f 100644 --- a/justfile +++ b/justfile @@ -36,6 +36,9 @@ status: serve: python3 -m http.server --directory docs +deck: + slidedeck deck/index.md > docs/deck/index.html + generate-private-key: cargo run generate-private-key