RFC: NFT contract to control access to physical goods/services (aka ticketing)

What the idea is

Create an extension of NFT contract that can be easily integrated with a physical word check to allow the owner of the NFT token to be a valid subject to access a physical good/service.

The contract will register on-chain the use/redemption of the service, and can be used for

  • One time access (ex. concert tickets)
  • Seasonal access (ex. football pass)
  • Recurring access (ex. Gym, club) etc…

The basic idea can be enrich with an in contract list of functionalities like:

  • Max # usages in a given period of time
  • Max # resales in a given period of time
  • List of allowed sub-services by current holder of ticket

Why the Champions think the idea is important

The use of NFTs to control access to digital goods/services is wide extended, but there is still a need to facilitate and easy the adoption of NFTs to control access to physical goods/services

How the Champions believe the idea should be executed

I think this concept can be implemented extending an ERC721 with the following functionality:

  • add/remove-gatekeeper(addr) . This function will maintain an on-chain list of valid addresses for gatekeepers(human or machine) that will be allowed the consumption of a service(ex. allow the entrance to the concert). This can be a human acting as gatekeeper using an app in his/her phone, or can be extended to a scanner-enabled entrance machine.

  • Consume-service (id, signature) Check if the service can be consumed, register consumption and/or invalidate.

A front-end app will facilitate the interaction with the contract for each agent, displaying a QR with the nft token#, facilitate the signature, call the contract the contract to validate access, display results.

The process can be summarized like this:

  1. Owner of NFT, using the FE app, shows a QR code with the details of the NFT token.

  2. Gatekeeper, using the FE app, scans the QR code, get contract addr, token# and can perform some early validations. This is optional as full validations will be performed on (6).

  3. Gatekeeper creates a message with service + timestamp and sends it to the owner to be signed.

  4. Owner sign the message received, and send the signature back to gatekeeper

  5. Gatekeeper receives signature and interact with smc to validate/register consumption of the service

  6. NFT contract will validate:

    • Caller address is an authorized gatekeeper validator
    • Signature is a valid signature by nft holder
    • Timestamp in message is current (within tolerance)
    • Service requested is allowed for requested token (not yet consumed, etc…)
    • Register consumption of service on-chain
  7. Event with output of (6) is presented to owner/gatekeeper to allow/deny the service (green/red light)

This process involves on-chain status registration, so should be implemented on an L2 or low gas fee network.

9 Likes

Thanks for writing this up. I really like this idea & will pay close attention to how this project grows!

3 Likes

Solid plan… Put it on Polygon!

Would be cool to bake in an optional Royalty that goes back to issuer for secondary sales.

2 Likes

I think this makes sense, and there should be something like a “paper hands tax” some NFTs have done, but tuned so that it targets scalping behavior.

2 Likes

Yep, I’ve had almost this exact idea in my head for some time. I’m starting to develop a platform to tokenize hotel room nights as NFTs (in this case ERC1155s), and there would need to be something like this for check in. What you are proposing is an important piece of infrastructure to link real world goods with web3, and I would be happy to help in any way I can. Would be great if we could implement it into existing POS systems. Here are some other use cases:

  1. “Coupons/Discounts”: I feel like many irl businesses would like to tap into some of these NFT communities. They could issue their own NFTs where owners would be entitled to discounts or, they could offer discounts to members of an existing community (i.e., BAYC members get a free Big Mac). This gives utility to existing NFTs and provides a marketing opportunity for the irl business.

  2. Hotels/Cruises/Flights: Like I mentioned above, I am working on a project like this, but it can certainly be generalized like you laid out above. Allowing travel providers to issue their inventory as NFTs saves them tremendous time and headaches with inventory management, accounts payable, etc. If they could issue their products as NFTs and make them web3 primitives, it would open up the opportunity for anyone to sell it and receive the commission without having to worry about how many rooms, etc have been allocated to which travel sites. Also, travelers would own the room night, and be able to sell it on the secondary market if they are not able to travel, avoiding cancellation penalties, etc.

I come from the travel world, and not the development world, but I have learned solidity, and have started to build the first smart contracts with the travel project. I’d be happy to shift focus to this infrastructure, and build the travel project on top of it, however. Don’t have a lot of UI/UX /js experience, but willing to learn.

1 Like

Thanks @rahobbs88. The use cases you expose fit pretty well with this functionality. For the first use case, I see at least a couple of flavors:
a) using already minted NTF´s and
b) using an NFT extension with the functionality built in.

Right now, I´m working on the PoC only for the second scenario just to limit the scope and start rolling the ball, but I see a lot of features that can be included to enhance the product and cover additional use cases.

The Hotels/Cruise/Flights reservations seems a very exiting use case. I´m not familiar with the insights of how that market works, but we can review together the minimum requirements you see on it and which additional functionalities will be needed to support it.

I´m using polygon right now, but didn´t explore that much yet if there is another evm option that fits better: very low transaction cost and latency.

Currently I have a very limited PoC that includes:

  • deploy nft contract with:
    • a cap on the number of tokens
    • an optional price to mint the tokens.
    • an optional fee collected for the service
  • on-chain maintenance of the allowed gatekeepers
  • token minting and QR code display to show the details to the gatekeeper
  • QR reader for gatekeeper to get token details, send signature request to token holder device, wait for signature and validate&update token consumption on chain.

If there is enough interest on this, I will like to upload it to the D_D GitHub to grow the poc within the DAO community.

Awesome! Would love to see what you have so far. I assume you are using ERC 721s? I agree that Polygon would make a lot of sense. To issue travel products, it will certainly require some customization, but I am super interested in how you are handling the “check-in” process with QR codes.

Good idea, I think this is a very important direction of NFT in the future.
This is a bit like a reverse oracle. I think the role of Gatekeeper is an organization like Chainlink. The interaction process is a bit complicated, and I think it is possible to merge some of these steps.