⚔️ CW404 on Injective — Porting the ERC404 standard to the fastest L1

DojoSwap
5 min readFeb 23, 2024

--

Launched through the Pandora NFT collection on Opensea, ERC-404 is an experimental token standard and an innovative approach that combines the features of ERC-20 tokens (fungible, divisible like money) and ERC-721 tokens (non-fungible, unique like NFTs). It introduces the concept of “semi-fungible” tokens, allowing individuals to own fractions of a NFT. This unlocks exciting possibilities for fractional ownership of valuable digital assets, increased liquidity for NFTs, and novel DeFi applications.

The hype surrounding the ERC404 standard has spawned many aspiring collections to follow Pandora in its wake. The collections embrace the highly liquid nature of the standard. Beyond that, we start to see huge toolings built to support the ERC404 standard, with Wasabi perpetual on Pandora, and Binance Web3 wallet supporting the ERC404 standard as well! The readiness to support the ERC404 standard shows us how it’s not simply a passing fad, but that the standard is simply awaiting innovative applications.

The Dawn of the CW404 standard

Towards that end, the DojoSwap team has collaborated with the Injective Labs team to build, launch, audit, and open-source the CW404 standard for all developers on Injective and Cosmos.

The CW404 standard aims to be a port of the original ERC404 standard with bug fixes as well as patches that are applied to allow the token standard to conform more similarly to the function signatures of the existing CW20 and CW721 standards. The Leap wallet team has participated in providing opinions on the read/write functions required for proper functioning within different wallet solutions. Also, through the Injective Labs team’s recommendations, we’ve been working with the SCV security audit team to peer review the CW404 standard to ensure that logic adheres to the ERC404 standard.

Without further ado, we take a look at the properties of the CW404 standard:

  • The CW404 token has a fluid identity. It identifies as both a CW20 as well as CW721 token.
  • If a user holds 10 CW404 tokens, and they decide to transfer 1 CW404 to another user, 1 NFT will be burnt, and 1 NFT will be minted in the new user’s wallet. The user that receives the NFT, will also have a token balance of 1.
  • Assuming 0.5 CW404 token was sent to another user, 1 NFT will be burnt, none will be minted, and 0.5 token balance will appear in the other user’s wallet.

The above highlights the fluid nature, as well as the mechanics of the CW404 token. When a user holds 1 full CW404 token, an NFT will be minted into the user’s wallet. The NFT can be freely transferred, or it can be transferred in a fractionalised format in the form of CW20 tokens! This means that the CW20 tokens are highly liquid in nature, and can be used in DEXs such as DojoSwap to supply liquidity, or even to conduct swaps!

Since CW20 tokens are able to be converted into Bank tokens, we can subsequently have these tokens traded on platforms such asHelixas well! The fluid nature of the CW404 standard makes it highly ideal for usage in all manners of DeFi application. This is why the standard was ported over to the Injective chain to kick-start DeFi fever!

Why is CW404 (ERC404) most suited for Injective?

There are a number of reasons why Injective is the perfect home for CW404 assets.

  1. Injective has the lowest gas fees for transactions to occur. This is achieved via Injective’s newly unveiled gas compression technology.Imagine a $60 average ERC404 transaction cost versus an average of $0.05 CW404 transaction cost. This represents a 1000x in savings! Users are free to speculate on their favourite 404 tokens without worrying about gas costs eating into their bottom line.
  2. Mature DeFi infrastructure in the form of DojoSwap and Helix has already been setup to allow CW404 tokens to attain max liquidity and low slippage while trading. DojoSwap aims to deepen CW404 liquidity through the use of yield farms, with aspiring 404 projects gaining liquidity farms to deepen trading liquidity. On the other hand, Helix operates one of the most cutting edge on-chain DEX with liquidity that is way more concentrated than Uniswap V3 CLP. This further lowers trading slippages and costs for users!
  3. Not only that, Injective is about to kick-start an entire DeFi season with the very many DAPPs that are already building for the chain. There’s nothing better than having CW404 as part of the toolkit that developers can utilise in building strongly for the chain!

How does this benefit Injective as a whole?

By being at the bleeding edge of technology that promises to revolutionise the way we use NFTs/tokens, we are able to hop on a strong trend early, and allow DAPPs on Injective to capitalise on each and every initiative. This builds a strong flywheel in attracting both new users and developers on to the chain, given how conducive the environment is for DAPPs.

How does this benefit DojoSwap and its users?

Naturally, the DojoSwap team will open-source all efforts surrounding the CW404 standard to allow more developers to build on Injective. The more builders there are on Injective, the more trading volume that will be present on Injective. As one of the larger DEXs on Injective, we stand to gain from increasing the size of the pie for everyone involved on the chain!

Conclusion

The CW404 standard was made possible through a close collaboration between the DojoSwap team and the Injective Labs team. Championed by DojoSwap, we identified Injective as quite possibly the best blockchain in crypto for CW404 — both for speed & cost factors. Having said that, the DojoSwap team has implemented the first ever usage of CW404 on Injective and launched $SUSHI — Sushi Fighter NFT

https://sushi.dojo.trading/

We hope that our work inspires projects to outdo us, to build something innovative that is truly only possible on Injective. Feel free to reach out to the DojoSwap team and the Injective Labs team, if you are planning to build something awesome with the CW404 standard!

Lastly, we hope that the Injective community finds it useful and we look forward to any community feedback and/or deployments. Let’s cook in the DojoSwap telegram group!

Please remember that the CW404 is open source, and radically experimental. While the DojoSwap team aims to have it fully audited, please use it at your own risk!

--

--