Skip to content

Dutch auction is for selling things that can spoil fast. Price starts high and goes lower over time. Whoever bids the current price first, or the last bidder when the auction ends, wins.

Notifications You must be signed in to change notification settings

asmar10/Dutch-Auction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Dutch-Auction

This is a smart contract for a Dutch auction where an item is sold at a decreasing price over time. The item is a non-fungible token (NFT), which is transferred to the highest bidder when the auction ends. The contract has a constructor that sets the starting price, discount rate, start time, and end time for the auction. The getPrice function calculates the current price of the NFT at any given time. The buy function allows bidders to participate in the auction by submitting a bid. If their bid is higher than the current price, they win the auction and get the NFT. The buyAfterAuction function allows bidders to purchase the NFT after the auction has ended at the lowest possible price. If there is any extra amount sent by the bidder, it is refunded back to them. Once the auction is over, the seller receives the funds, and the contract is destroyed.

About

Dutch auction is for selling things that can spoil fast. Price starts high and goes lower over time. Whoever bids the current price first, or the last bidder when the auction ends, wins.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published