Superfluid 101: Super Tokens

Superfluid
Superfluid Blog
Published in
4 min readApr 28, 2022

At the core of the Superfluid Protocol lies the Super Token: a new token standard that facilitates everything from streaming and distributions to batch calls and one-off transfers. While the Super Token standard is backwards compatible with existing token standards like ERC20, its extended functionality requires a way of ensuring that existing tokens can be used in the Superfluid Protocol.

In today’s article, we’ll dive into the different types of Super Tokens that enable builders to take advantage of Superfluid’s functionalities!

The 3 Super Token Types: Wrappers, Natives, and Pures 🦸

There are three types of Super Tokens, all of which are functionally identical apart from their underlying asset type:

  1. The Wrapper Super Token wraps existing ERC20 tokens such as USDC, WETH, DAI, among others.
  2. The Native Asset Super Token wraps the native asset of the respective EVM chain — MATIC for Polygon, xDAI for Gnosis, and so on.
  3. The Pure Super Token exists without an underlying asset, meaning that the Super Token is the asset! A few examples of Pure Super Tokens include Ricochet DAO’s ‘RIC’ and Minerva Wallet’s ‘MIVA’.

Wrapper Super Tokens

The Wrapper Super Token includes an `upgrade` and `downgrade` function to handle the wrapping and unwrapping of ERC20 tokens. The `upgrade` function is what wraps the ERC20 and returns the Super Token. The `downgrade` function is what unwraps the Super Token and returns the ERC20.

By convention, the name of a Wrapper Super Token is the name of the underlying asset prefixed by ‘Super ‘. For example, the DAI token becomes “Super DAI” and Wrapped Bitcoin becomes “Super Wrapped Bitcoin.” The symbol for a Wrapped Super Token is the symbol, suffixed by a lowercase ‘x’. The DAI token thus becomes “DAIx” and WBTC becomes “WBTCx.”

Native Asset Super Tokens

The Native Asset Super Token includes two ways to upgrade the blockchain’s native asset, similar to how the Wrapped Ether contract does. The first method is by calling the appropriate function with a non-zero amount of the native asset, and the second is by simply transferring the native asset directly to the contract.

The same aforementioned naming convention applies here, where the name MATIC becomes “Super MATIC” and the symbol MATIC becomes “MATICx.”

Pure Super Tokens

As mentioned above, the Pure Super Token has no underlying asset — it is the asset itself. In terms of UX, this is a great option for new tokens being deployed, as the process of wrapping and unwrapping (upgrading/downgrading) is non-existent. There are no special naming conventions for Pure Super Tokens, as they are simply tokens with built in Superfluid capabilities.

How to Deploy Super Tokens 🚀

Deploying Wrapper Super Tokens

To deploy a Wrapper Super Token, you can interact with the Super Token Factory contract that is deployed on every network where Superfluid is deployed! You’ll need to provide the address of the ERC20 token to wrap, a number indicating upgradeability (more info below), the name of the Super Token, and the symbol of the Super Token. Don’t forget to add the “Super “ prefix to the start of the name and an “x” to the end of the token symbol!

One more thing — there are two functions called `createERC20Wrapper`. One includes a ‘decimals’ option, which references the number of decimals the underlying token has. Unless you’re sure you know what you’re doing, you should always use the `createERC20Wrapper` without the decimals option.

Deploying Native Asset Super Tokens

The Native Asset Super Token is deployed with the rest of the Superfluid Protocol, so there’s need to deploy this! If you’re looking to deploy this in a test environment, refer to the `SETH` contract in the monorepo.

Deploying Pure Super Tokens

Pure Super Tokens can be deployed a handful of ways. Since Pure Super Tokens can have any custom logic on top of any other logic, the rabbit hole goes deep.

If you simply want a Pure Super Token whose supply is pre-minted and has no other functionality beyond streaming, distributions, transfers, and agreements, you can use the deploy script created by Superfluid in the protocol monorepo.

If you want to add custom functionality such as a custom minting and burning policy (or maybe approval with permit), you can find some base contracts plus example contracts in the Custom Super Tokens repo.

Interested in deploying your own Custom Super Token? Check out our livestream walkthrough on how to do so here!

Super Tokens Supercharge Money Streaming ⚡️

Superfluid isn’t the only money streaming protocol that web3 users and developers can take advantage of — but with sophisticated primitives like Super Tokens, it’s the most powerful solution available today. As token types continue to evolve, we’ll ensure that Super Tokens evolve alongside them, and develop new functionalities that further extend their usefulness.

--

--