Back to blog
Why You Should Use IPFS With Your Memecoins
If you haven’t been following the memecoin trend, you’re missing out on some of the most interesting, most pointless, and maybe even some of the funniest speculative fuel for web3 since NFTs. A memecoin is simply a token launched around a meme. Anyone can create them, and some even result in massive followings.
Memecoins are tokens. On Solana, these are SPL tokens and in the EVM world, they are ERC20 tokens. Both token types have been around for years now and have powered the entire decentralized finance space from ICOs (initial coin offerings) to stablecoins. Now, they power the memes.
Similar to the standard for NFTs, memecoins are made up of JSON-based metadata files and images or videos. While memecoins are less a collector’s item than NFTs, and much more actively traded than NFTs, the availability of their metadata files and media files is equally important.
The Anatomy of a Memecoin
Creating a memecoin can be as simple as using a service such as pump.fun or as complex as writing your own smart contract and customizing the token however you’d like. Ultimately, a memecoin is rather simple, so regardless of the path you take, you’ll find the majority of your focus is on the metadata associated with the token.
The shape of the metadata will differ depending on the blockchain, but the basic details will be very similar. Here’s an example from Solana:
"root":{
"key":4
"updateAuthority":"TSLvdd1pWpHVjahSpsvCXUbgwsL3JAcvokwaKt1eokM"
"mint":"34USav9Hf2jRnUzEAxtjoYLZogG8h6UzpyoZvbzBpump"
"data":{
"name": "Sendog"
"symbol": "sDOG"
"uri":"<https://gateway.pinata.cloud/ipfs/QmdcBXauXtCVM87p1Gx3xgNqhNAEkuBkYHHroBB1JqTzJK>"
"sellerFeeBasisPoints":0
"creators":undefined
}
"primarySaleHappened":0
"isMutable":0
"editionNonce":254
"tokenStandard":2
"collection":undefined
"uses":undefined
}
The details that help render the coin on a trading platform are in the data
section. Notice how the token’s image URI is on IPFS. The metadata itself is also on IPFS.
Let’s take a look at a memecoin on the Base blockchain:
{
"name": "Bows",
"description": "Bows before bros",
"external_url": "<https://bows.life/terms>",
"decimals": 18,
"image": "ipfs://QmctRN2Tgi4bjWkBZ9iYdc1dWtnreCd6BzGWJJxvGFmVuh"
}
As you can see, the metadata is very similar. The JSON itself is stored on IPFS and the image is stored on IPFS.
Why does IPFS matter for memecoins?
Just like with NFTs, if the data associated with a memecoin were to be stored on traditional storage systems, every trader and every trading platform would be beholden to that storage system working and properly serving the file. Should the original creator remove the file from the storage service, the data is lost.
With IPFS this isn’t true. Anyone can store copies (pin data) of any piece of data on IPFS. All of it can be done without permission of the original owner or of the pinning service (if one is used). If the original creator changes or removes the file from their account, it will still be available for all traders and platforms if at least one copy of the data is one one IPFS node somewhere.
This is a powerful paradigm shift from traditional storage, and it puts the control in the hands of the people that interact with that data.
How to store metadata and images on IPFS
When creating a memecoin, if you’re building it from scratch and writing the smart contract yourself, you have full control. You can store your memecoin metadata and media in just a few lines of code using Pinata.
Here’s a quick example with JSON:
const upload = await pinata.upload.json({
name: "Pinnie COIN",
description: "A Pinnie for your thoughts",
image: "ipfs://bafkreih5aznjvttude6b3wbvqeebb6rlx5wkbzyppv7garjiubll2ceym4"
})
As we’ve recommended in the past with NFTs, if the blockchain you are using supports the IPFS protocol URI (ipfs://
), you should always use that rather than entering a specific gateway URL. If the blockchain does not support the protocol URI, using a custom domain with your IPFS gateway through Pinata is the best alternative.
And that’s it. That’s all it takes to upload to IPFS.
Conclusion
Memecoins are hot, and IPFS remains the best solution for all things web3. Combining the portability and flexibility of IPFS with memecoin metadata and media is simple and powerful.
If you’re ready to get started, sign up for a free account on Pinata today!