Token Gating
A more detailed look at our token-gating solution
Overview
As Web3 brings new experiences to users, token gating is exploding in popularity. This new authorization method provides access to static or dynamic content based on the user’s ownership of one or more tokens. It can be used to access private discord channels, Shopify perks, digital content, and exclusive IRL events. As brands adopt Web3 and the Metaverse continues to expand, more and more projects will need to implement their own gating mechanism. From an end user's perspective, the experience of unlocking a gate should be silky smooth: a one-click process that takes milliseconds to complete. Unfortunately, in many cases today this standard isn't quite met, and as token-gating becomes more common, users will increasingly demand a 10x faster experience than traditional log-in systems.
Implementing token gating should also be effortless for developers. However, this isn't always as simple as it seems. Need to check how long a user has held a specific token? Are multiple NFT collections involved? Is the collection a Rarible or OpenSea contract with millions of different projects? Each of these scenarios require rolling your own logic and takes time away from your actual goal: bringing a delightful experience to your users.
With 3mint's token gating API, developers can create even the most complicated gating mechanics with a single call and end users are guaranteed fast response times.
If you would like to request an API key please reach out at dev@3mint.io or fill out this form!
Example Use Cases
Gate access to:
Single article or blog post
Website
Product on an eCommerce site
Webinar
Account
Live event
Virtual experience
Example Gating Conditions
User owns an NFT with a specific TokenID
User owns one or more NFTs within a collection
User holds at least 0.1 ETH or other ERC-20s
User has held an NFT within a collection for at least 6 months
User has an NFT with specific metadata attributes
How it all works
Contract Checking
Once the backend receives the list of requirements the address must meet, the tool verifies each condition individually by calling the respective Smart Contract endpoints.
Checking ERC721 balance
Checking ERC1155 balance
Checking ERC20 balance
Checking Eth balance
Checking time requirements
Time requirements cannot be used for requests that have a Type of "combo", it must be used with "ercnft", "erc20", "coin", etc.
For minTime and minTimestamp conditions, we pull all transfer events related to the specific NFT, token, or native coin for the wallet address included in the request and ensure the balance expected stays the same throughout these events.
Speedy Responses
We cache all long-running requests and verify their conditions asynchronously to ensure speedy response times for even the most complicated token gating requirements.
Last updated