Hey all, does anyone know if there are any existing repos with templates for a bid / ask systems for erc721s?
Apr 17, 2021, 12:41 AM
Crypto punks had this mechansim built in but not melt in the ERC721 standard. We have this in house but have not made it publicly available yet.
Apr 17, 2021, 3:16 AM
thanks, I'll take a look at their repo. What's the trick to automatically match outstanding bids to asks?
Apr 17, 2021, 3:23 AM
The trick is maintaining a separate struct.
and keeping only one bid and one ask
lol
quite a simplified approach. It's ok since the liquidity for a NFT is not that high anyways.
Apr 17, 2021, 3:24 AM
but on a marketplace like rarible / opensea, you have multiple bids / asks at different prices to account for
Apr 17, 2021, 3:25 AM
Hope contract companies like OZ can develop an extension for this.
not sure if they do it on chain or not, if yes, that's quite expensive, if no, that is nothing impressive.
Apr 17, 2021, 3:26 AM
I suppose if they are onchain, you can keep an array / mapping of bids and asks, and on sending one check the other list to see if you're beating out the minimum, price, and if so match those two orders
Apr 17, 2021, 3:29 AM
I'm not an expert on this, but I would assume maintaining an ordered data structure to resemble an orderbook on-chain is quite expensive.
Apr 17, 2021, 3:30 AM
yes, it would be expensive to call and manipulate
Apr 17, 2021, 3:30 AM
Curious about how rarible and opensea did it.
Apr 17, 2021, 3:31 AM