-
High - 100xp
-
Medium - 20xp
-
Low - 2xp
-
Starts: September 25, 2025 Noon UTC
-
Ends: October 02, 2025 Noon UTC
- nSLOC: 170
- Complexity Score: 116
This smart contract implements a basic auction-based NFT marketplace for the BidBeasts ERC721 token. It enables NFT owners to list their tokens for auction, accept bids from participants, and settle auctions with a platform fee mechanism.
The project was developed using Solidity, OpenZeppelin libraries, and is designed for deployment on Ethereum-compatible networks.
-
Listing:
- NFT owners call
listNFT(tokenId, minPrice)to list their token. - The NFT is transferred from the seller to the marketplace contract.
- NFT owners call
-
Bidding:
- Users call
placeBid(tokenId)and send ETH to place a bid. - New bids must be higher than the previous bid.
- Previous bidders are refunded automatically.
- Users call
-
Auction Completion:
- After 3 days, anyone can call
endAuction(tokenId)to finalize the auction. - If the highest bid meets or exceeds the minimum price:
- NFT is transferred to the winning bidder.
- Seller receives payment minus a 5% marketplace fee.
- If no valid bids were made:
- NFT is returned to the original seller.
- After 3 days, anyone can call
-
Fee Withdrawal:
- Contract owner can withdraw accumulated fees using
withdrawFee().
- Contract owner can withdraw accumulated fees using
- Minimum price enforcement for listings.
- Minimum bid enforcement for bidders.
- Auction deadline of exactly 3 days.
- Automatic refunding of previous highest bidder.
- Only owner access for withdrawing platform fees.
-
Seller (NFT Owner)
- Owns a
BidBeastsNFT and lists it for auction. - Receives payment if the auction is successful.
- Owns a
-
Bidder (Buyer)
- Places ETH bids on active auctions.
- Receives the NFT if they win the auction.
-
Contract Owner (Platform Admin)
- Deployed the marketplace contract.
- Can withdraw accumulated platform fees.
├── lib/
├── src/
│ ├── BidBeasts_NFT_ERC721.sol
│ └── BidBeastsNFTMarketPlace.sol
- Chain: Ethereum
- Token Standard: ERC721
git clone <repository-url>
cd <repository-folder>
forge compile
forge test
[//]: # (getting-started-close)
[//]: # (known-issues-open)
None Reported! ;)
[//]: # (known-issues-close)