ERC-7832 A sustainable collaborative NFT collection (Sustainable collaborative NFT collections)

Review · NFTs & multi-token · created 2024-12-04

A standard that adds dynamic minting fees, role-based permissions, and a donation participation model to an ERC-721-based collaborative NFT collection, so that creators and communities can operate it in an economically sustainable way.

Why it is needed

As the NFT market has grown, the same problems keep recurring: ever-increasing supply causes inflation, and there is no mechanism for meaningfully engaging the community. When minting fees are fixed, a small number of holders can hoard tokens, leading to concentrated ownership, and creators have no sustainable way to receive community support. Also, if administrators can change core terms such as fees at any time, market stability is undermined and participants lose trust. This standard aims to address these problems by introducing role-based access control, dynamic minting fees that vary with user activity, and a donation model for supporting creators directly, while only allowing changes to operating terms at fixed time intervals.

What to implement

In depth

Three roles and access control

The system defines three role identifiers (bytes32): ADMIN_ROLE, CREATOR_ROLE, and CONTRIBUTOR_ROLE. ADMIN_ROLE and CREATOR_ROLE must be granted to msg.sender in the constructor. The admin is responsible for updating terms (updateTerms), pausing and unpausing (pause, unpause), and withdrawing funds (withdraw), while the creator mints tokens via safeMint and receives donations. The contributor role is granted to users who donate via donate. Role-based access control ensures only trusted parties can execute sensitive functions, preventing arbitrary changes from undermining market stability and trust.

Dynamic minting fee formula

mintFee calculates the fee the caller must pay. If the caller has ADMIN_ROLE, the fee is 0; if the number of mints in the cycle (userMints) is 1 or less, the fee is mintBaseFee as is; if greater than 1, the fee is mintBaseFee divided by the logarithm of userMints. It is RECOMMENDED that the fee decrease gradually on a logarithmic basis, and since Solidity cannot handle decimals, the logarithm value is always rounded to an integer. The reference implementation uses Math.log2 as the divisor. The caller of safeMint must pay this fee.

Minting cycles and limit resets

mintsPerUserInCycle(address user) tracks the number of times a user has minted in the current gradual-discount cycle, and maxMintsPerUserInCycle sets the maximum number of mints per cycle. If the limit is exceeded in safeMint, that user's mint count SHALL reset to 0. Since the discount is structured around the number of mints, the reset serves as a mechanism to restart the discount cycle from the beginning. safeMint can only be called by CREATOR_ROLE, and it is recommended that it require the contract not be paused.

Term update restrictions and UPDATE_INTERVAL

updateTerms can only be called by the admin to update mintBaseFee, creatorSignatureFee, and maxMintsPerUserInCycle, and must emit a CreatorTermsUpdated event after updating. It must be called once as the first update in the contract constructor, and afterward UPDATE_INTERVAL must elapse, measured from lastUpdateTimestamp, before it can be called again. UPDATE_INTERVAL is recommended to be set in units of time, with a minimum of 720 hours (30 days). This restriction, which prevents excessive administrator intervention and protects price discovery and participant trust, is the core of 'economic sustainability'.

Creator signature and donation rules

getCreatorSignature is a function that SHALL grant the CREATOR_ROLE when the caller pays creatorSignatureFee, and it is recommended to require that the contract not be paused. donate can only donate to a valid address holding the CREATOR_ROLE, cannot donate to oneself, and the amount must be greater than 0. After processing, it must emit a DonationReceived event, and the donor receives the CONTRIBUTOR_ROLE. The original Rationale explains that this donation record can be used to grant benefits in later transactions.

Burning, pausing, withdrawal

burn(tokenId) can only be called by the owner of the token. pause and unpause SHOULD only be called by ADMIN_ROLE to block or re-enable contract functions in an emergency. withdraw(amount) can only be called by ADMIN_ROLE to withdraw ETH from the contract. This standard is fully compatible with ERC-721, and extensions like dynamic fees and donations are modular, so they do not affect existing NFT functionality.

Proposal status

This proposal is currently in Review status. Keep in mind that since it is still under review, the specification may change.

Things to watch out for

Original ERC · ← ERCs