ERC20 Wrapper Tokens
Super Tokens that Exist as Wrappers Around ERC20 Assets

ERC20 Wrapper Super Tokens

This is the simplest version of a Super Token, and should be used whenever an ERC20 token already exists. Anyone can create a wrapper for any existing ERC20 token. The developer community has already deployed some of the more popular tokens in the ecosystem like DAI, USDC, and TUSD for you. See πŸ”— Network Directory for the full list.

What is a Wrapper Super Token?

These tokens allow you to use existing ERC20 assets within the Superfluid protocol. These contracts inherit from the ISuperfluidToken interface and serve as an extension on the ERC20 standard. You can't stream existing ERC20 tokens directly, but wrapping these assets using an ERC20 Wrapper contract will give your existing ERC20 assets super powers. Super Tokens can be streamed and used within other Superfluid agreements because they contain Superfluid specific methods like the realTimeBalanceOf() function and are directly plugged into the rest of the protocol.
The main step for creating a new ERC20 Wrapper for your token is calling createERC20Wrapper() on the SuperTokenFactory contract.

Create ERC20 Wrapper Tokens from a Block Explorer

  1. 1.
    Go to the Superfluid Network Directory and search for the token explorer in the right network.
  2. 2.
    Click on the "SuperTokenFactory" for your preferred network
  3. 3.
    Navigate the tabs to Contract > WriteAsProxy. Here are direct links for Polygon, Gnosis Chain, Optimism, and Arbitrum.
  4. 4.
    Connect your wallet to be able to write
  5. 5.
    Search for the createERC20Wrapper function, and input the required parameters, with no additional characters
    1. 1.
      underlyingToken (address) β‡’ The address of the token you want to wrap
    2. 2.
      upgradeability (uint8) β‡’ 1 will give the Superfluid Governance semi-upgradeability
    3. 3.
      name (string) β‡’ Super + the current name of your token (ex. Super Dog Token)
    4. 4.
      symbol (string) β‡’ The current symbol in upper case + lower case x (ex. DOGx)
  6. 6.
    Confirm by pressing write and confirming through your wallet. Congrats, you've created a new Super Token Wrapper!
  7. 7.
    Search for the new token's address in the event log of the transaction, or use the top right search tab (input DOGx and wait for your newly created token to appear in the dropdown)

Deploy an ERC20 Wrapper

Anyone can deploy the ERC20 wrapper for any ERC20 token. The deployer account does not receive any control or admin powers, and all Super Token logic upgrades are handled by Superfluid Protocol Governance.
We've created some handy scripts for deploying the ERC20 Wrapper contract.
1
git clone https://github.com/superfluid-finance/protocol-monorepo/
2
yarn install --frozen-lockfile
3
yarn build
4
cd packages/ethereum-contracts
5
cp .env.template .env
6
​
7
# edit .env file and configure the correct mnemonic and rpc endpoint
8
# check truffle-config.js for what environment variables are required
Copied!
Now you can use the deploy-unlisted-super-token.js script to deploy the wrapper:
1
RELEASE_VERSION=v1 npx truffle --network <xdai or matic> \
2
exec scripts/deploy-unlisted-super-token.js : \
3
<Underlying Token Address> \
4
<SuperToken Name> \
5
<SuperToken Symbol>
Copied!
If you are wrapping an existing token, like DAI or USDC, please use suffix "x" in the SuperToken symbol.