Skip to main content

Deploy a Wrapped Super Token

This guide offers detailed instructions for deploying Wrapped Super Tokens using the Super Token Factory contract.

info

Learn more about Wrapper Super Tokens in the Types of Super Tokens section.

Prerequisites

Before you start, ensure you have:

  • Basic understanding of blockchain and smart contracts.
  • Access to a compatible cryptocurrency wallet (like MetaMask).
  • ETH or relevant cryptocurrency for transaction fees.

Super Tokens Factory Contract

The Super Token Factory contract is used to create Super Tokens:

  • It is permissionless and can be used by anyone to create Super Tokens.
  • It is deployed on all the networks where you can find the Superfluid Protocol.

We will describe the steps for deploying each type of Super Token in the following chapters.

Contract addresses

For addresses of the Super Token Factory contract on different networks, refer to The Superfluid Console, the Protocol section.

SuperFluidConsole

SuperFluid Console: Protocol Section


Deploying a Wrapper Super Token

You can deploy your own Wrapper Super Token using the Super Token Factory contract through the interface below. Please ensure you have the required parameters ready before proceeding:

  • Underlying Token: The address of the ERC20 token to wrap.
  • Upgradability: We recommend to keep this parameter as '1'. This allows Superfluid Protocol Governance to upgrade the Super Token contract in the future and stay compatible with the latest features.
    • '0': Not Upgradable: The contract cannot be upgraded.
    • '1': Semi-Upgradability: The contract can be upgraded by Superfluid Protocol Governance but only under certain conditions.
    • '2': Fully Upgradable: The contract can be upgraded by Superfluid Protocol Governance without any restrictions.
  • Name: The name of the underlying token. We always recommend using the same name as the underlying token prefexed with 'Super' (eg. 'Super DAI').
  • Symbol: The symbol of the Super token. We recommend using the same symbol as the underlying token suffixed with 'x' (eg. 'DAIx').

You can choose to deploy your Wrapper Super Token using the interface on your favourite scanner (eg. Etherscan). You can also use the interface below to deploy your Wrapper Super Token:

Create your Wrapped Super Token


Check Parameters

Double-check the parameters to avoid deployment errors.

Verifying and Adding Token to Superfluid Console

Locate the new Super Token's address in the "SuperTokenCreated" event log. To add your Super Token to the Superfluid Console, Submit your request through this form.

Super Token Address

Super Token Address on Etherscan


Deploying a Self-Governed Super Token

Self-Governed Super Tokens give you the ability to control and update Super Token logic.

Deployment Process

  1. Using SuperTokenFactory: Interact with the createERC20Wrapper function with the admin parameter on the SuperTokenFactory contract.
  2. Updating Logic: Use updateCode to apply custom logic or update to the latest Superfluid token contract.
tip

For more information, see the Self-Governed Super Token Wiki or seek assistance on Superfluid Discord.

Check Parameters

Unless you know what you are doing, deploying a self-governed Super Token is not recommended.


Deploying a Pure Super Token

Deploying a Pure Super Token allows for custom non-Superfluid logic integration.

Detailed Steps

  1. Repository Setup: Clone the custom-supertokens repository and follow the setup instructions.
  2. Logic Selection: Choose from existing logic examples or develop your own based on PureSuperToken.sol.
  3. Deployment: Create a .env file, configure it for your network, and follow the repository's deployment steps.
Custom Logic Caution

If developing custom logic, ensure to rename the contract in the .sol file to avoid conflicts during the build.