Skip to main content

Deploy Super Tokens

This guide offers detailed instructions for deploying different types of Super Tokens within the Superfluid ecosystem, allowing you to customize and deploy all types of Super Tokens.

Understanding Super Tokens

Super Tokens are the integral to the Superfluid ecosystem, providing the functionality needed for real-time finance. There are three main types of Super Tokens: Wrapper Super Tokens, Pure Super Tokens, and Native Super Tokens.

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.
  • Solidity knowledge for custom or self-governed Super Tokens.

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

info

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

Steps for Deployment

  1. Community Deployer Interface: For ease of use, try the community deployer interface created by serox.eth.
  2. Block Explorer Deployment: Access the Super Token Factory contract for your network (links available in the Superfluid Console). Connect your wallet and use the createERC20Wrapper function with the necessary parameters.

CreateERC20Wrapper

Create ERC20Wrapper

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.


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.