Skip to content

Commit

Permalink
Remove fluff from BIP (ordinals#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Aug 17, 2022
1 parent 2004842 commit ad9711b
Showing 1 changed file with 19 additions and 188 deletions.
207 changes: 19 additions & 188 deletions bip.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,31 @@

=== Abstract ===

This document defines a scheme for numbering and tracking satoshis across
transactions. These numbers, "ordinal numbers" in the language of this
document, can be used as a useful primitive for a diverse range of
applications, including NFTs, reputation systems, and Lightning
Network-compatible stablecoins.
This document defines a scheme for asigning serial numbers to satoshis.

=== Copyright ===

This work is placed in the public domain.

=== Motivation ===

Bitcoin has no notion of a stable, public account or identity. Addresses are
single-use, and wallet accounts, while permanent, are not publicly visible.
Additionally, the use of addresses or public keys as identifiers precludes
private key rotation or transfer of ownership.
Bitcoin has no notion of stable, public accounts or identities. Addresses are
single-use, and wallet accounts are private. Additionally, the use of addresses
or public keys as stable identifiers precludes transfer of ownership or key
rotation.

Many applications, some of which are detailed in this document, require stable,
public identifiers tracking identity or ownership. This proposal is motivated
by the desire to provide such a system of identifiers.
This proposal is motivated by the desire to provide stable identifiers that may
be used by Bitcoin applications.

== Description ==

=== Design ===

Every satoshi is serially numbered, starting at 0, in the order in which it is
mined. These numbers are termed "ordinal numbers", or "ordinals", as they are
ordinal numbers in the mathematical sense. The word "ordinal" is nicely
unambiguous, as it is not used elsewhere in the Bitcoin protocol[0].
ordinal numbers in the mathematical sense, giving the order of each satoshi in
the totally supply. The word "ordinal" is nicely unambiguous, as it is not used
elsewhere in the Bitcoin protocol.

The ordinal numbers of transaction inputs are transferred to outputs in
first-in-first-out order, according to the size and order of the transactions
Expand All @@ -69,21 +65,6 @@ Underpaying the subsidy does not change the ordinal numbers of satoshis mined
in subsequent blocks. Ordinals depend only on how many satoshis could have been
mined, not how many actually were.

At any given time, the output in which an ordinal resides can be identified.
The public key associated with this output can be used to sign messages, such
as ownership challenges, concerning to the ordinals it contains. The
specification of a standardized message format for such purposes is deferred to
a later BIP.

Ordinal aware software should not mix outputs containing meaningful ordinals
with outputs used for other purposes to avoid inadvertent loss of valuable
ordinals, or privacy leaks allowing links between funds. For this reason,
ordinal aware software using BIP-32 hierarchical deterministic key generation
should use a key derivation path specific to ordinals.

The suggested key derivation path is `m/44'/7303780'/0'/0`. This suggested
derivation path has not been standardized and may change in the future[1].

=== Specification ===

Ordinals are created and assigned with the following algorithm:
Expand Down Expand Up @@ -156,9 +137,9 @@ output below the dust limit.
=== Rationale ===

Ordinal numbers are designed to be orthogonal to other aspects of the Bitcoin
protocol, and can thus be used in conjunction with other layer-one techniques
and applications, even ones that were not designed with ordinal numbers in
mind.
protocol, and can thus be used in conjunction with other layer one and layer
two techniques and applications, even ones that were not designed with ordinal
numbers in mind.

Ordinal satoshis can be secured using current and future script types. They can
be held by single-signature wallets, multi-signature wallets, time-locked, and
Expand All @@ -175,7 +156,7 @@ creation step, the anonymity set of ordinal number users is maximized.

Since an ordinal number has an output that contains it, and an output has a
public key that controls it, the owner of an ordinal can respond to challenges
by signing messages using the public key associated with the controlling UTXO.
by signing messages using the address associated with the controlling UTXO.
Additionally, an ordinal can change hands, or its private key can be rotated
without a change of ownership, by transferring it to a new output.

Expand Down Expand Up @@ -295,8 +276,9 @@ An O(1) index that maps UTXOs to the ordinals that they contain is currently
100GiB. The same index including spent outputs is 10TiB.

An O(1) index supporting the opposite mapping, that of individual ordinals to
the UTXO that contains them, has proven to be challenging to implement without
optimization.
the UTXO that contains them, is likely to be intractable. However, an O(n)
index where n is the number of times an ordinal has changed hands, is fast and
practical.

==== Large Location Proofs ====

Expand All @@ -316,153 +298,6 @@ consists of:
which it was spent, and the coinbase transaction, to determine the location
of the ordinal in the outputs.

=== Compatibility with Existing and Envisaged Applications ===

Ordinals are compatible with many current and planned applications.

==== Covenants ====

Since ordinals are borne by outputs, they can be encumbered by covenants.
[https://github.com/bitcoin/bips/blob/master/bip-0119.mediawiki BIP-119]
specifies OP_CTV, which constraints outputs by pre-committing to a spending
transaction template. This template commits to the number, value, and order of
spending transaction outputs, which allows constraining how specific ordinals
are spent in future transactions.

==== The Lightning Network ====

The Lightning Network cannot be used to selectively transfer individual
non-fungible ordinals, however it can be used to transfer arbitrary amounts of
fungible ordinals. Channels can be created with inputs whose ordinals are all
colored coins of the same type, for example colored coins honored for
redemption by a stablecoin issuer. These channels can be used to conduct
instant, low-fee USD-denominated off-chain payments, and would require only
modest changes to existing Lightning Network nodes.

On channel close, fees would have to be paid by child-pays-for-parent, to avoid
paying stablecoin ordinals as fees.

==== Opendimes and Casascius coins ====

Physical transfer of ordinals can be facilitated by loading them onto bitcoin
bearer artifacts, such as Opendimes and Casascius coins.

==== RGB ====

[https://rgb-org.github.io/ RGB] is a proposed scheme for using sequences of
single-use seals to define state transitions of off-chain,
client-side-validated state machines, for example smart contract platforms.
Such chains of single-use seals could be addressed by an ordinal contained in
the output that starts the chain of single-use seals.

==== State Chains ====

[https://github.com/RubenSomsen/rubensomsen.github.io/blob/master/img/statechains.pdf
The state chain proposal] facilitates off-chain transfer of whole outputs,
which could contain ordinals with specific meanings, for example stable coins
or NFTs, allowing off-chain transfer of such digital assets.

== Applications ==

=== Accounts and Authentication ===

Ordinal numbers can serve as the basis for account and authentication schemes.
The account issuer associates a newly created account with an ordinal number in
an output controlled by the account owner. The account owner can then log in
and take actions related to the account by signing messages with the private
key associated with the public key associated with the output that contains the
account ordinal. This key is only known to the account owner, preventing
unauthorized access.

By transferring the ordinal to a new output, the owner can rotate their private
key, or transfer the account to a new owner. Transferring an ordinal requires
creating a transaction signed by the current outputs private key, preventing
unauthorized transfer of accounts.

=== Colored Coins ===

Ordinals can be used as the basis for colored coin schemes. Unlike other
colored coin schemes which use additional outputs or require manipulation of
other parts of a transaction, ordinal-based colored coin schemes can take
advantage of the full range of available script types, and other base-layer
bitcoin features.

=== The DNS ===

The DNS root of trust could be defined not as a specific set of public keys,
but as a specific set of ordinals, which would allow for easy key rotation and
updates to the set.

=== Name Services ===

A scheme, not described in this document, could be used to assign names to
ordinals based on their number. These names could then be used as account
names. Many such names would be gibberish, but many would be human readable. A
scheme which enumerated strings of the ASCII characters `a` through `z` would
assign as names all length-10 and shorter permutations of these characters.

=== NFTs ===

An artist can issue an NFT by signing a message containing a hash of a work of
art that they have created, along with the number of a particular ordinal. The
owner of that ordinal is the owner of that NFT, allowing ownership to be
proven, and the NFT to be bought and sold, and otherwise change hands.

Such NFTs could be used for art, in-game assets, membership systems, or any
other kind of digital asset.

The signed message, which may contain arbitrary attributes and metadata, is not
sensitive and can be widely disseminated and replicated, to ensure it is not
lost.

Scarcity of such NFTs can be guaranteed by including in the NFT messages the
total number of NFTs to be issued. If this promise is violated, the set of
issued NFTs serves as an easy-to-verify fraud proof that the issuance limit was
exceeded.

A judicious NFT issuer will create a new private key to sign a new set of NFTs
and destroy it afterwards, to ensure the limited nature of the NFT set.
Multi-party-computation can be used to provide additional assurances that
overissuance cannot occur.

=== PKI ===

Instead of individual public keys serving as roots of trust for PKI systems,
individual ordinals could be used, allowing for key rotation.

=== Rare Sats ===

Ordinal numbers are unique, which might encourage collectors and speculators to
collect particular ordinals. Examples of potentially collectable ordinals
include:

* The first ordinal in a block, difficulty adjustment period, or halving epoch.
* Ordinals consisting only of a single repeating digit.
* Ordinals with a large number of 8s, commonly held to be a lucky digit.
* Low ordinals mined early in bitcoin's history.
* Ordinals that were part of unusual blocks or transactions.
=== Reputation Systems ===

Ordinal numbers can serve as the basis for persistent reputation systems, for
example one of Lightning Network node operators. Unlike the current system of
associating reputation with public keys, an ordinal-based reputation system
allows for key rotation and reputation transfer.

=== Stablecoins ===

A stablecoin issuer could promise to allow redemption of a range of ordinals
for one United States dollar each, minus the price of one satoshi times the
number of satoshis so redeemed. Such ordinals could be transacted on-chain
and on a slightly modified Lightning Network, as well as other layers.

=== Voting and DAOs ===

A DAO or other organization may decide to allocate voting rights proportionally
to ownership of a predetermined range of ordinals. Voting rights can thus be
made transferable, and voting may be conducted by signing messages using public
keys associated with the outputs holding vote-bearing ordinals.

== Reference implementation ==

This document, along with an implementation of an ordinal index that tracks the
Expand All @@ -477,9 +312,5 @@ A variation of this scheme was independently invented a decade ago by jl2012
For other colored coin proposals see [https://en.bitcoin.it/wiki/Colored_Coins
the Bitcoin Wiki entry].

For aliases, an implementation of short on-chain identifiers, see BIP 15.

[0] With the exception of being word #1405 in the BIP-39 Portuguese word list.
Me perdoe!

[1] 7303780 is the decimal representation of the ASCII string 'ord'.
For aliases, an implementation of short on-chain identifiers, see
[https://github.com/bitcoin/bips/blob/master/bip-0015.mediawiki BIP 15].

0 comments on commit ad9711b

Please sign in to comment.