Git Product home page Git Product logo

openordex's Introduction

OpenOrdex - Open Ordinals Decentralized Exchange

OpenOrdex is an open source zero-fee trustless Bitcoin NFT marketplace based on partially signed bitcoin transactions

How it works

The seller creates a partially signed bitcoin transaction (PSBT) specifying the price of the ordinal.
The buyer can then sign the PSBT and broadcast it to the network.

How to add your collection

All inscriptions can be viewed directly via their inscription number or ID.

In addition, the homepage features collections in a random order.
The collection data is taken from the ordinal-collections repo.

In order to have your collection listed, create a pull request on the ordinal-collections repo.

How to run Openordex in your localhost

Build docker image

$ docker build -t openordex .

Run Openordex with docker

$ docker run -it -d -p 8080:80 openordex

Screen Shot 2023-03-06 at 9 40 15 AM

openordex's People

Contributors

dannydeezy avatar muthusleuths avatar octobocto avatar orenyomtov avatar orkunkilic avatar pimax1 avatar stevel408 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openordex's Issues

Site becoming too slows.

What is the purpose of having the collection on the site? it's causing issues, slowing the site to the point can't be used. Should we consider just having the listings only and remove the collections? It's worth noting that there are other sites that could host the collection instead.

Filtering options for inscriptions listed in order book

It would be great to be able to filter the display inscriptions listed in the decentralized order book on various attributes

The obvious ones I can think of are:

  • Inscription type (image/video/text/etc)
  • Collection (only show inscriptions from that collection)

How to get the nft sale price

How to get the item sale price,Look at the code to get the nft price through this link
wss://nostr.openordex.org/

image

Suggestion: Make content of event type JSON with optional additional fields

I think it would be nice if the content on the 802 event were a json instead of the raw PSBT. The reason is that it would be nice for a "listing" to have some additional comment on it so that it can show up nicely as a post in normal nostr feeds.

For example, if i want to sell an Astral Babe, I might want to add a comment: "Check out my sub 10k Astral Babe!", and the nostr clients may add some cool UI on top of these events that adds a button to "buy" it

Sparrow Wallet PBST error

When I open the PBST in Sparrow wallet, it says, "Invalid message length, was 122 not 126". How to fix it?
image

When I manually paste in the message, Sparrow asks for an address. When I put my wallet address, the 'Sign' button is not clickable.

Suggestion for true open ordinals collections standard

I'm writing this as I am very disappointed in ordinals-wallet repo mods. They created a standard they control. Can't we build a merge workflow that will not be dependent on a few biased mods who are skipping pull requests? Right now as I'm writing this, their repo has no activity for three days already.

I'm suggesting that we build a true trustless ordinals collection standard that will also use circleci which will automatically merge with the main branch if all checks are green. Ordinals wallet can use its own standard to list collections on its website but OpenOrdex should be open for all without the middle man. Middle man could only be CircleCi checker.

Less than Ideal Mapping to New Outputs

Main Net Example Transaction: https://mempool.space/tx/eed97b6a306b7350784f3a573b46396b6cce404d9ffd67fa982ac757cd6588eb

Resulting location of the inscription: https://ordinals.com/inscription/6dcb3ed8eb96793b7c2917cdeda37197be78af928356167a385814ddcd45014bi0

As the taker constructs the new outputs, they map the first input as 1000 sats, second input as the inscription output and first output as 1000 + inscribedInputSize sats

The result is that the inscribed sat is at satIndex=1000 in the new output

This can result in downstream UX issues where the inscription is likely to be sent to the miner as a fee (not possible so long as the satIndex=0 and the inscribed UTXO is always the first input in the transaction that spends it)

Failed to sign transaction

Specified sighash value does not match value stored in PSBT.

  • Run bitcoin-qt
  • Load psbt from clipboard
  • Copy psbt f rom openordex
  • Paste psbt from openordex into bitcoin-qt
  • Tap sign

I confirmed inscription id is listed in ord wallet inscriptions, receive address set to default

Stuck on Submitting

So I followed all the steps and got the PSBT on bitcoin-cli, but upon submitting I get stuck on this screen:
I used a different receive address. I tried Segwit and Taproot addresses.
image

Improvements to signature validation to prevent fake listings

Currently in openordex sell offer PSBT inputs are prematurely finalized which makes it difficult for the buyer to verify the signatures. This makes it easy to create fake listings which are commonplace on decentralized marketplaces.

Example of inscription #0 listed on openordex for 456 sats.
https://openordex.org/inscription?number=6fb976ab49dcec017f1e201e84395983204ae1a7c2abf7ced0a85d692e442799i0

PSBT inputs are not intended to be finalized until they no longer need to be validated by third parties. In the sell order workflow, the marketplace should not finalize the seller input prior to broadcasting the offer which would allow easier subsequent validation of the signature. Similarly, the buyer workflow should validate the signature on input 0 and finalize it prior to broadcasting.

Recommended changes to openordex:

  1. Do not finalize the input of a sell offer (wallet specific flags need to be sent to prevent finalization, update bitcoin-cli instructions)
  2. Do not require that inputs are finalized when validating sell offer psbts. Instead, if it is not finalized, validate the signature and discard if it is invalid.
  3. Alert users when viewing sell offers that were prematurely finalized since the signature may be invalid and thus may fail when broadcast to the mempool
  4. Update the NIP to clarify that the PSBT inputs should not be finalized

I'm not sure if this project is actively maintained or just a proof of concept, but wanted to post this here in the hope that others working on decentralized marketplaces will take this into consideration.

Sorting options for collections

It would be useful to be able to sort collections based on the lowest inscription number in the collection. Might be dependent on #14

It also may make sense for the default sort to be via lowest inscription # (or maybe random each time the page loads)

Possibly other sorting options, but can't think of any good ones right now.

btcToSat conversion precision

btcToSat(btc) function is unsafe due to javascript floating point imprecision.

> let price = 0.01000014;
> price === satToBtc(btcToSat(price));
false

it may cause problems in generating and validating psbt offers.

I suggest using a safe arbitrary-precision decimal library for btc-denominated values and arithmetic.

Show offer to buy on collection page

For a collection page, if an inscription in the collection has been listed in the order book show that it is available to buy similar to what is shown in the listings page.

eg. this inscription is listed for sale https://openordex.org/inscription?number=59edb28a4c0c6a9fb319ae6f4e8d5f979b44e786fa127ad012d1eeda83cd944ei0

but it's not reflected on the collections page https://openordex.org/collection?slug=timechain

I would guess this one might be tricky to implement, as I'm not sure if there is any way to query the nostr relay for only offers which belong to a particular collection?

Listing just sits there on 'Submitting', after the tx was signed

I used unisat on taproot. I signed the transaction and the signed version appeared in the box. Then I clicked the 'List inscription for sale' button, and it just sits there on 'Submitting'. I saw bug #82 so I then tried PW2PKH but I got the same problem that's in that bug.

SetWitness Bug

'Output' in this snippet is of type 'string'

for (const output in tx.outs) 
    try { tx.setWitness(output, []) } catch { } 
}

but tx.setWitness expects a 'number', which results in an exception

Is it a normal behavior?

Show inscription number for each inscription on overview page

When looking at the overview page of inscriptions listed in "latest listings" it does not currently show the inscription number. I think that would be a useful peice of information to add. Many collectors are interested in the inscription number, and currently you need to click into each one to see what it is.

PS. I love openordex ❤️

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.