AELIP-52: POAP support for NFT gated deals

Author
StatusDraft
ImplementorTBD
ReleaseTBD
Created2023-05-17

Simple Summary

This AELIP proposes to add POAP support for NFT gated deals by allowing users to add multiple ID ranges for a collection.

Abstract

POAP tokens follow the ERC721 standard, which allows each token to be uniquely identified by an ID. However, given that multiple identical POAPs are typically minted for a single event, a range of IDs needs to be defined in order to target specific events for an NFT gated deal.

The logic of the NFT gated deal will be enhanced to allow for the specification of multiple ID ranges. This will empower the pool creator with the ability to whitelist several events within the same deal.

Motivation

Incorporating POAP support into NFT gated deals can enhance community engagement by recognizing and rewarding participation in specific events.

This AELIP not only paves the way for POAP integration into NFT gated deals but also extends its scope to encompass any ERC721 collection. This proposed feature is designed to recognize and handle varying traits or attributes associated with the ID range. Therefore, it's not just limited to POAP tokens, but has the potential to support any ERC721-based collection.

Specification

Overview

The NFT gated deal logic will be updated in order to support the addition of ID ranges to an NFT collection. This will apply to both pools and direct deals.

Rationale

While it would have been possible to use distinct attributes of POAP tokens, such as the event ID, the goal of this AELIP was to avoid confining the new feature exclusively to POAPs. As a result, a universally shared property among all ERC721 tokens - the token ID - was chosen for implementation. Moreover, the provision to specify diverse ranges of these IDs was incorporated.

This approach ensures that the new feature can accommodate any ERC721 tokens and not only POAPs.

Technical Specification

An ID range could be define in a solidity struct:

    struct IdRange {
        uint256 begin;
        uint256 end;
    }

AelinNftGating.sol and AelinPool.sol will both require changes. For every collection passed to a pool/deal, the logic will check if whether or not a collection includes a range. If so, only users owning NFTs of this collection with IDs within the specified range will be allowed to invest. If not, the transaction will revert.

Test Cases

N/A

Copyright and related rights waived via CC0.