Explore the World of FOODNOUNS

NounsDAO has a protocol for proliferating Nouns. FOODNOUNS is a fork of this NounsDAO protocol. The original Nouns Protocol documents have been slightly edited below to account for contract changes.

Introduction

Noun protocol is a suite of smart contracts that generates and auctions a Noun every day. The protocol serves as an open standard for generative art - Nouns. Because all of the art was released under the public domain, developers can build without restriction on the protocol at the smart contract or application layer.

This documentation describes the mechanisms that power the Nouns protocol and what each component entails. If you have any questions, please reach out at FOODNOUNS Discord.

Smart Contract Overview

The Noun protocol, forked for FOODNOUNS, consists of three primary components: FOODNOUNS, auctions and the DAO. The suite of smart contracts gives you full access to the auctions and generative art that powers the protocol.

Untitled Database

<aside> ➡️ To view the source code, visit the Github repository. You can also review the architecture here.

</aside>

Auction lifecycle

Every auction begins where the last one ends. On settlement of an auction, a new FOODNOUNS is minted and the next auction is created, all in the same transaction. *Diagram from Nouns’ Wiki

Timing Diagram

NounsProtocolFlow-Auction.png

Settlement

To settle an auction, the NounsAuctionHouse contract is called. The function settleCurrentAndCreateNewAuction() both settles and creates a new auction:

function settleCurrentAndCreateNewAuction() external override nonReentrant whenNotPaused {
    _settleAuction();
    _createAuction();
}

The _settleAuction() function checks that the current auction has begun, that it has not been settled previously and that the auction time has ended:

function _settleAuction() internal {
    INounsAuctionHouse.Auction memory _auction = auction;
	
    require(_auction.startTime != 0, "Auction hasn't begun");
    require(!_auction.settled, 'Auction has already been settled');
    require(block.timestamp >= _auction.endTime, "Auction hasn't completed");

    auction.settled = true;
    ....
}