NFT spam labels on Polygon and Ethereum
No one is a stranger to spam on the Internet, we all have been dealing with spam for as long as email, and other user generated content platforms existed.
Web3 is a no stranger to spam problem either. As the gas prices lower and new chains offer more scalability spam is becoming a problem that developers and users have to deal with on a daily basis.
At best, spam pollutes a wallet with random NFTs that a person does not expect to see, never purchased or interracted with before, leading to a sub-par user experience. In the worst case, spam NFTs can compromise wallet's security if a user interracts with those NFTs in some way.
Often times spam comes in the form of unwarranted airdrops into a user's wallet, but how do you know which airdrop is expected, and which one is fraudulent? How do you know which transfers to a wallet were expected, and which were not?
This is where the power of big data and ML comes into play.
Mnemonic solves this problem by constantly ingesting, aggregating and analyzing every single transaction, wallet and historical wallet's behavior on the blockchain using proprietary real-time indexing engine and ML models and labeling collections and NFTs accordingly.
Removing spam NFTs from a wallet with Mnemonic's API
Mnemonic's spam filtering APIs are wallet-centric by design. This approach enables developers to easily remove spam from a user's wallet to make sure that their users are protected.
Use Wallet Intelligence API and NFTs by Wallet endpoint to remove spam.
Specify the spam
parameter in the request to further tune the results
SPAM_UNSPECIFIED
: returns all tokens (default if not provided).SPAM_EXCLUDE
: excludes spam NFTs from the response.SPAM_ONLY
: returns only spam NFTs in the response.
The above approach enables easy paging through the results without having to implement additional filtering on the client side.
curl -i -X GET \
'https://ethereum-rest.api.mnemonichq.com/wallets/v1beta2/0x3eb4b12127EdC81A4d2fD49658db07005bcAd065/nfts?spam=SPAM_FILTER_ONLY' \
-H 'X-API-Key: YOUR-API-KEY'
The response provides a list of NFTs by a given wallet address filtered and label according to the parameters specified above.
{
"tokens": [
{
"contractAddress": "0x0ded8542fc8b2b4e781b96e99fee6406550c9b7c",
"tokenId": "9213",
"metadata": {
"metadataUri": {
"uri": "ipfs://QmSU3XaVnjUmnJSxxTq7Mn8V1wXnHVEKema6dTptU5K8V6",
"mimeType": "application/json"
},
"name": "Gutter Punks Flyer - BEANZ",
"description": "BEANZ holders are invited to join the Gutter Punks - a woman-led project building tools to level the playing field and support creators. Details on Twitter @GutterPunksNFT or visit https://mint.gutterpunks.co to mint now!",
"image": {
"uri": "https://ethereum.cdn.mnemonichq.com/0x0ded8542fc8b2b4e781b96e99fee6406550c9b7c/9213/ff7a994638b8e2198212aa3b23eae640a0ea14ad1ded0c2c5eb66191c4b86ec4.png",
"uriOriginal": "ipfs://Qmct6hHqXaHoWxUHUti4SJrZV5MMrEa5MeZjRFg6smgCdB",
"mimeType": "image/png"
}
},
"quantity": "1",
"spam": true
},
{
"contractAddress": "0x1be4a124861c1f909ff3de69ddcc7283db401881",
"tokenId": "238",
"metadata": {
"metadataUri": {
"uri": "https://superfatapes.link/ipfs/238",
"mimeType": "application/json"
},
"name": "Super Fat Ape #238",
"description": "[Super Fat Academy](https://superfatapes.link) is a place where Apes can learn to become true (or almost true) SuperHeroes. Visit [Website](https://superfatapes.link) and get your SuperHero.",
"image": {
"uri": "https://ethereum.cdn-proxy.mnemonichq.com/0x1be4a124861c1f909ff3de69ddcc7283db401881/238",
"uriOriginal": "ipfs://QmZkNkG1CdipFdF5PwMTmezj73SExgvQTvb6mNFd23hysp",
"mimeType": "image/png"
}
},
"quantity": "1",
"spam": true
}
]
}
Both NFTs in the response above are labeled as spam
.
You can use additional parameter contractAddress
to fulter filter down the results.
Labeling accuracy
Mnemonic supports all collections and NFTs that exist on the blockchain and labels them accordingly by default, historical or freshly minted.
Our models update daily at the moment, which means that it is possible that some collections could be classified as false positives or false negatives, although the overal percentage of such cases is very low.
We are constantly working on improving and fine tuning our models to produce the most accurate results.
If you found a collection or NFT which was misclissified either as a false positive or a false negative, please let us know.