ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.81k stars 1.35k forks source link

Proposed addition of “price” to “terms” during an etch #3794

Open encloinc opened 3 months ago

encloinc commented 3 months ago

Hey! I wanted to know if we were to submit a PR to ord altering the indexer to do the following if it’s something that has a possibility of being approved.

The addition of a “price” field

Currently an etches “terms” looks like the following:

struct Terms { amount: Option, cap: Option, height: (Option, Option), offset: (Option, Option), }

I propose an OPTIONAL extra field “price” to be added to these terms, expressed as the following: price: Option<u128>

How the “price” field would function

Price is an integer expressed in Satoshi. During an etch, IF the price field is present the following would be added as a requirement:

For the following definition, “Etch Output” refers to the following:

The address owning the first NON-OP_RETURN transaction output of an Etch transaction or, in the case it’s provided, the address owning the transaction output specified by “pointer” of an Etch transaction:

A transaction including a runestone that is minting MUST include a transaction output transferring a MINIMUM of “price” amount of satoshi to ”Etch Output”

If there are no transaction outputs in vout that transfer a MINIMUM of “price” to “Etch Output”, the mint is ignored BUT the transaction is not considered a cenotaph and edicts are still processed.

If no price field is provided, all functionality above is ignored.

Usecase

This would create a decentralized way to create ICOs natively on Bitcoin - allowing the fungibility of Rune to be used as a mechanism to fund innovative projects on the space

Final thoughts

I leave my proposal here for feedback and if there’s interest / probability of merging or being added, I would be happy to implement in ord through a PR.

Thanks for reading :)

ayo-dan commented 3 months ago

This would be a great addition to the protocol.

There are massive risks when it comes to token sales but the mechanism described is much more efficient than a project premining and then selling their runes.

It could be worth checking out OrdinalsBot's approach to rune etching/minting. When setting the details of your Rune you can set a price and revenue address.

encloinc commented 3 months ago

Also had the idea of adding an asset field, which takes in a RuneID. That way, mint can be priced in other runes aswell rather than satoshi.

This would have other usecases too rather than just token raises, for example, wrapped runes that represent other assets (like BTC, USD) which can only be minted by a custodian that has the asset that it costs to mint the wrapped rune (because they would be the only ones that have said asset assuming they premined it)

Runes could even be used to stable coin natively on Bitcoin with this mechanism, with institutions (like tether) being the only ones authorized to mint since they are the only holder of the rune described in the “asset” field which the mint is priced in.

TLDR: granular access to a runes mint function could be granted by leveraging the fungibility of the Runes protocol.