Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zoralabs/auction-house

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zoralabs/auction-house

This repository contains the contracts that compose the Zora Auction House.

  • 0.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
273
increased by57.8%
Maintainers
9
Weekly downloads
 
Created
Source

Zora Auction House

This repository contains the contracts that compose the Zora Auction House.

The contracts aim to provide an open system for anyone to perform an auction, with special emphasis given to the role of curators.

Further documentation is available at zora.engineering

Table of Contents

  • Architecture
  • Local Development

Architecture

This protocol allows a holder of a Zora 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.

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.

NameTypeDescription
tokenIduint256The tokenID to use in the auction
tokenContractaddressThe address of the nft contract the token is from
durationuint256The length of time, in seconds, that the auction should run for once the reserve price is hit.
reservePriceuint256The minimum price for the first bid, starting the auction.
creatoraddressThe address of the current token holder, the creator of the auction
curatoraddressThe address of the curator for this auction
curatorFeePercentageuint8The percentage of the winning bid to share with the curator
auctionCurrencyaddressThe 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.

NameTypeDescription
tokenContractaddressThe address of the nft contract the token is from
tokenIduint256The tokenID to cancel the auction for

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.

NameTypeDescription
tokenContractaddressThe address of the nft contract the token is from
tokenIduint256The tokenID for the auction approval
approvedboolThe 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.

NameTypeDescription
tokenContractaddressThe address of the nft contract the token is from
tokenIduint256The tokenID to place a bid on
amountuint256The 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.

NameTypeDescription
tokenContractaddressThe address of the nft contract the token is from
tokenIduint256The tokenID for the ending auction

Local Development

The following assumes node >= 12

Install Dependencies

yarn

Compile Contracts

npx hardhat compile

Run Tests

npx hardhat test

FAQs

Package last updated on 20 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc