-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
364 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="google" content="notranslate" /> | ||
<title>Ordinals</title> | ||
<script> | ||
const SLIDES = 18; | ||
let current = parseInt(window.location.hash.substring(1)) || 0; | ||
window.location.hash = current; | ||
document.addEventListener("keydown", function(event) { | ||
let next = current; | ||
switch (event.key) { | ||
case " ": | ||
case "ArrowDown": | ||
case "ArrowRight": | ||
case "Enter": | ||
next += 1; | ||
break; | ||
case "ArrowLeft": | ||
case "ArrowUp": | ||
next -= 1; | ||
break; | ||
} | ||
|
||
if (next < 0 || next + 1 > SLIDES) { | ||
return; | ||
} | ||
|
||
window.location.hash = next; | ||
|
||
current = next; | ||
}); | ||
</script> | ||
<style> | ||
html { | ||
background-color: black; | ||
color: white; | ||
font-size: 200%; | ||
} | ||
|
||
section { | ||
background-color: black; | ||
padding-left: 2em; | ||
padding-right: 2em; | ||
bottom: 0em; | ||
left: 0em; | ||
position: absolute; | ||
right: 0em; | ||
top: 0em; | ||
z-index: 0; | ||
overflow: hidden; | ||
} | ||
|
||
section:target { | ||
z-index: 1; | ||
overflow: auto; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="index.css"> | ||
<script src="index.js" defer></script> | ||
</head> | ||
<body> | ||
<section id="0"><h1>Ordinals</h1> | ||
<h1>Todayβs Agenda</h1> | ||
<ul> | ||
<li>Who am I?</li> | ||
<li>What are ordinals?</li> | ||
<li>What does that have to do with NFTs?</li> | ||
</ul></section> | ||
<section id="1"><h1>Feel free to interrupt and ask questions!</h1></section> | ||
<section id="2"><h1>Who am I?</h1> | ||
<ul> | ||
<li>Iβm just this guy, you know?</li> | ||
<li>Bitcoin, Rust, and generative art programmer</li> | ||
<li>Last big project was Agora, a server for selling downloads for Lightning | ||
Network payments</li> | ||
</ul></section> | ||
<section id="3"><h1>Why ordinals?</h1> | ||
<ul> | ||
<li>Wanted a simple protocol for assets on Bitcoin</li> | ||
<li>Donβt require any modification to the protocol</li> | ||
<li>Aesthetically appealing, so particularly well-suited for art</li> | ||
</ul></section> | ||
<section id="4"><h1>What are ordinals?</h1></section> | ||
<section id="5"><h1>Ordinals are just serial numbers for satoshis</h1></section> | ||
<section id="6"><h1>They start at 0, and go up to 1,906,077,499,999,999 (so far!)</h1></section> | ||
<section id="7"><h1>Are transferred with a simple first-in-first-out algorithm</h1> | ||
<pre><code>[2] [1] [3] β [4] [2] | ||
</code></pre> | ||
<pre><code>[a b] [c] [d e f] β [? ? ? ?] [? ?] | ||
</code></pre> | ||
<pre><code>[a b] [c] [d e f] β [a b c d] [e f] | ||
</code></pre></section> | ||
<section id="8"><h1>What about fees?</h1> | ||
<pre><code>[2] [1] [3] β [4] | ||
</code></pre> | ||
<pre><code>[a b] [c] [d e f] β [a b c d] | ||
</code></pre> | ||
<pre><code>[SUBSIDY] [e f] β [SUBSIDY e f] | ||
</code></pre></section> | ||
<section id="9"><h1>Specification</h1> | ||
<pre><code class="language-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] | ||
</code></pre></section> | ||
<section id="10"><h1>What are ordinals good for?</h1> | ||
<p>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.</p> | ||
<p>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.</p></section> | ||
<section id="11"><h1>What else are ordinals good for?</h1> | ||
<ul> | ||
<li>Aesthetics!</li> | ||
<li>Supporting the fee market!</li> | ||
</ul></section> | ||
<section id="12"><h1>Wacky aside: Ordinal traits</h1> | ||
<ul> | ||
<li>π Rare ordinals</li> | ||
<li>π€€ Epic ordinals</li> | ||
<li>π₯΅ Legendary ordinals</li> | ||
<li>Bounties: https://ordinals.com/bounties/</li> | ||
</ul></section> | ||
<section id="13"><h1>Ordinal Index</h1> | ||
<ul> | ||
<li><a href="http://api.ordinals.com:8000/list/e11d223685e110c5df93d7ae57f63c535ac59d1d65c16de779f23a9166229c7e:0">big</a></li> | ||
<li><a href="http://api.ordinals.com:8000/list/81bb70199e0c2cf6a32ee0b8079085eb590c311f6e91bb51c14b85846593a76e:1">small</a></li> | ||
<li><a href="http://api.ordinals.com:8000/list/b40375d8e4f50728c18ed292c2e40ed616797592a2f5587c9f72a23a55973f9e:0">spent</a></li> | ||
</ul></section> | ||
<section id="14"><h1>What are ordinals not good for?</h1> | ||
<ul> | ||
<li>Not having to make weird multi-step transactions to avoid hitting the dust | ||
limit</li> | ||
<li>Being efficient with block space</li> | ||
<li>Very high divisibility</li> | ||
<li>Small databases</li> | ||
</ul></section> | ||
<section id="15"><h1>Ordinal NFTs</h1> | ||
<ol> | ||
<li>Hash: (ordinal || content hash || public key)</li> | ||
<li>Sign</li> | ||
<li>Append signature, data, and then bech32 encode</li> | ||
<li>Et voilΓ : <code>nft1qqz3psl8mvjm9t573n29l8q0phklcdhg65392pv0gpc79tydeujltn5g2h4fsg...</code></li> | ||
</ol></section> | ||
<section id="16"><h1>Ordinal NFTs</h1> | ||
<ul> | ||
<li>No on-chain transaction to mint</li> | ||
<li>Store the NFT wherever</li> | ||
<li>Anyone who has access to the NFT will know the secret, hidden meaning of the | ||
ordinal.</li> | ||
</ul></section> | ||
<section id="17"><h1>DISCLAIMER</h1> | ||
<p><a href="https://mempool.space/tx/c3a7786e164bbc7620a90601a1f284cff1a5e93c59978f566a9c7104bc33975a">thicccc transaction</a></p></section> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters