Code Monkey home page Code Monkey logo

auction-house's Introduction

Zora โ€” Auction House ใ€œ ๐“€จ ใ€œ

Auction House Header Image

The Zora Auction House is an open and permissionless system that allows any creator, community, platform or DAO to create and run their own curated auction houses.

These auction houses run reserve timed auctions for NFTs, with special emphasis given to the role of curators. If an owner of an NFT chooses to list with a curator, that curator can charge a curator fee and has to approve any auction before it commences with that curators auction house.

Anyone is able to run an NFT auction on the protocol for free by simply not specifying a curator.

The Zora ethos is to create public goods that are either owned by the community or by no one. As such, we have deployed this without admin functionality, and is therefore entirely permissionless and unstoppable.

Mainnet address: 0xE468cE99444174Bd3bBBEd09209577d25D1ad673

Rinkeby address: 0xE7dd1252f50B3d845590Da0c5eADd985049a03ce

Table of Contents

Architecture

This protocol allows a holder of any NFT to create and perform a permissionless reserve auction. It also acknowledges the role of curators in auctions, and optionally allows the auction creator to dedicate a portion of the winnings from the auction to a curator of their choice.

Note that if a curator is specified, the curator decides when to start the auction. Additionally, the curator is able to cancel an auction before it begins.

Curators

In a metaverse of millions of NFTs, the act of curation is critical. Curators create and facilitate context and community which augment the value of NFTs that they select. The act of curation creates value for the NFT by contextualizing it and signalling its importance to a particular community. The act of curation is extremely valuable, and is directly recognized by the Auction House system. A curator who successfully auctions off an NFT for an owner can earn a share in the sale.

We have defined a curator role in the auction house. A curator can:

  • Approve and deny proposals for an NFT to be listed with them.
  • Earn a fee for their curation
  • Cancel an auction prior to bidding being commenced

Creators and collectors can submit a proposal to list their NFTs with a curator onchain, which the curator must accept (or optionally reject). This creates an onchain record of a curators activity and value creation.

Creators and collectors always have the option to run an auction themselves for free.

Create Auction

At any time, the holder of a token can create an auction. When an auction is created, the token is moved out of their wallet and held in escrow by the auction. The owner can retrieve the token at any time, so long as the auction has not begun.

Name Type Description
tokenId uint256 The tokenID to use in the auction
tokenContract address The address of the nft contract the token is from
duration uint256 The length of time, in seconds, that the auction should run for once the reserve price is hit.
reservePrice uint256 The minimum price for the first bid, starting the auction.
creator address The address of the current token holder, the creator of the auction
curator address The address of the curator for this auction
curatorFeePercentage uint8 The percentage of the winning bid to share with the curator
auctionCurrency address The currency to perform this auction in, or 0x0 for ETH

Cancel Auction

If an auction has not started yet, the curator or the creator of the auction may cancel the auction, and remove it from the registry. This action returns the token to the previous holder.

Name Type Description
auctionId uint256 The ID of the auction

Set Auction Approval

If a created auction specifies a curator to start the auction, the curator must approve it in order for it to start. This is to allow curators to specifically choose which auctions they are willing to curate and perform.

Name Type Description
auctionId uint256 The ID of the auction
approved bool The approval state to set on the auction

Create Bid

If an auction is approved, anyone is able to bid. The first bid must be greater than the reserve price. Once the first bid is successfully placed, other bidders may continue to place bids up until the auction's duration has passed.

If a bid is placed in the final 15 minutes of the auction, the auction is extended for another 15 minutes.

Name Type Description
auctionId uint256 The ID of the auction
amount uint256 The amount of currency to bid. If the bid is in ETH, this must match the sent ETH value

End Auction

Once the auction is no longer receiving bids, Anyone may finalize the auction. This action transfers the NFT to the winner, places the winning bid on the piece, and pays out the auction creator and curator.

Name Type Description
auctionId uint256 The ID of the auction

Local Development

The following assumes node >= 12

Install Dependencies

yarn

Compile Contracts

npx hardhat compile

Run Tests

npx hardhat test

Bug Bounty

  • 25 ETH for any critical bugs that could result in loss of funds.
  • Rewards will be given for smaller bugs or ideas.
  • Send your bug reports to [email protected] for a member of our security team to further investigate.

Acknowledgements

This project is the result of an incredible community of builders, projects and contributors.

We would like to acknowledge the Mint Fund and the $BOUNTY backers for crowdfunding and coordinating the development of an opensource version of reserve auctions, implemented by Billy Rennekamp.

We would also like to credit projects that have pioneered and improved on the reserve auction mechanism and experience, such as SuperRare. Lastly, we'd like to ackowledge Coldie, the original pioneer of the reserve timed auction mechanism.

auction-house's People

Contributors

iainnash avatar j-s avatar kulkarohan avatar tbtstl 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  avatar

auction-house's Issues

Add repo license.

Hi All,

Would you consider adding a license to this repo?
Contracts already have GPL-3.0.

Cheers!

Feature Request: Curator Management Front End

The Zora Auction House has introduced the notion of curators to the standard reserve auction mechanism. We believe that onchain curation will be a very powerful primitive to allows artists and curators tonatively share revenue from profits of individual auctions.

As a curator on the Zora Auction House, an owner of an NFT can submit auction approvals to you. Before the is valid, you as the curator must approve the auction.

There currently does not exist an open-sourced UI for curators to manage their backlog of pending auctions. It would be an immensely powerful admin tool for curators to be able to see a backlog of pending auctions and have the ability to interact with the Auction House contract by either -- approving the auction, cancelling the auction, or editing the reserve price.

Requirements

  • Open sourced front end tool for curators to be able to connect their web3 wallet and view an admin like dashboard of auction requests
  • Curator should be able to see all past AND pending auction requests.
  • Curator should be able to see details of the pending auction including the rendering of the nft and the auction details.
  • Curator should be able to see all past auctions won including the rendering of the nft and details of the auction (reserve price, lister, winning bid, winner address)

Add approve NFT step in the documentation for createAuction

I did not realize you have to approve the NFT with the auction contract before creating an auction, otherwise you will get a high gas fee and the transaction will revert.

This step might be obvious to some people but it took me a long time to figure out. Can you please add something about it in the documentation for createAuction? Thanks!

Can I use Erc1155

Hi all, this code is amazing. Thank you so much everybody for open sourcing this. I want to know if I can auction erc1155s using this code?

Feature Request: Auction Splits Contract

The Zora Auction House is an incredibly useful tool for the owner of an NFT to be able to list their NFT on a reserve auction without needing to pay centralized platform fees.

A feature that we are starting to see popup is the splitting of royalties. Examples:

It could be very useful to architect a permissionless contract factory that would allow the owner of an NFT to permissionlessly initiate the splitting of revenue from a sale on the auction house with a reasonable # of addresses.

Requirements:

  • Allow for a user to initiate a split contract that keeps track of a pool of ownership for a reasonable # of addresses without being too gas intensive. Use mirror implementation with Merkle proofs as inspiration (https://github.com/mirror-xyz/splits/blob/main/contracts/Splitter.sol)
  • Allow for the split contract to interact with Auction House to call functions such as createAuction, setAuctionReservePrice, and cancelAuction
  • Determine a heuristic for the conditions required for the split contract to be able to call AuctionHouse methods (in mvp, it might make sense to allow for the split creator address to call methods that interact with AuctionHouse and punt any sort of governance down the line).
  • Once the split contract has sold an NFT on AuctionHouse, the split particpants have the ability to receive their share. This could be implement by individual claiming functions, or a single function that would divy out the split shares to all members of the split in a single transactions.
  • Allow for the splits contract to split both ETH and / or ERC20 tokens.
  • To simplify the scope of the contract, each split should only be used once, and for a specific auction.

deploying on other evm chains

Hi there,
We'd like to use this protocol on xDai.
Do you want a canonical deployment from your team whose address would be on the readme or should we just go ahead and deploy it?
I am happy to PR the xDai address of the AuctionHouse contract + verify the code on Blockscout (xDai's block explorer).

Allow check for auction creation on approval to handle approval for all

Currently on auction creation the check is if the address calling is approved:

require(msg.sender == IERC721(tokenContract).getApproved(tokenId) || msg.sender == tokenOwner, "Caller must be approved or owner for token id");

However, if you're calling this from a smart contract setApprovalForAll does not work, it needs to be set for each token.

Is it a good idea to add in the isApprovedForAll check here?

require(msg.sender == IERC721(tokenContract).getApproved(tokenId) || IERC721(tokenContract).isApprovedForAll(msg.sender) || msg.sender == tokenOwner, "Caller must be approved or owner for token id");

15% Creator Fee

Can anyone help me understand exactly what the 15% creator fee referenced in the integration test suite refer to? Many thanks!

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.