LogoLogo
  • 🌊Superfluid
  • Protocol Overview
    • 💡What is Superfluid?
    • 📄In-Depth Overview
      • Super Tokens
      • Super Agreements
        • 🚰Money Streaming (CFA)
        • ✳️Distributions (IDA)
        • 🌊Streaming Distributions
      • Super Apps
      • Superfluid Host
    • 🧠Use Cases
      • Recurring Payments
      • DeFi
      • Social & Community
      • Gaming
    • 📔Glossary of Terms
  • Developers
    • 🏃Quickstart
    • 🪙Super Tokens
      • Super Tokens - Solidity
      • Super Tokens - SDK Core
      • Super Tokens - Frontend Examples
      • Types of Super Tokens
      • Deploy a Super Token
        • Deploying a Wrapper Super Token
        • Deploying a Self Governed Super Token
        • Deploying a Pure Super Token
      • In-Depth
        • Tracking Super Token Balances
        • ERC777 in Super Tokens
      • Test Super Token Faucet
    • 🌊Money Streaming (CFA)
      • Solidity
        • Read Methods
          • getFlowInfo
          • getFlowRate
          • getNetFlowRate
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
          • With User Data
          • With Context
      • SDK Core
        • Read Methods
          • getFlow
          • getNetFlow
          • getAccountFlowInfo
        • Write Methods
          • createFlow
          • updateFlow
          • deleteFlow
      • Access Control List (ACL)
        • Solidity
          • createFlowFrom
          • updateFlowFrom
          • deleteFlowFrom
          • setFlowPermissions
          • setMaxFlowPermissions
          • revokeFlowPermissions
          • increaseFlowRateAllowanceWithPermissions
          • decreaseFlowRateAllowanceWithPermissions
          • getFlowPermissions
        • SDK Core
          • createFlowByOperator
          • updateFlowByOperator
          • deleteFlowByOperator
          • updateFlowOperatorPermissions
          • revokeFlowOperatorPermissions
          • increaseFlowRateAllowanceWithPermissions
          • getFlowOperatorData
      • Frontend Examples
      • More...
        • Flow Rate Time Frames
        • Building Batched Streams in Safe
        • Flow NFTs
    • ✳️Distributions (IDA)
      • IDA - Solidity
      • IDA - SDK Core
      • IDA - Frontend Examples
    • 🤖Super Apps
      • Super Apps in Depth
      • Super App Callbacks
        • Calling Agreements In Super Apps
      • User Data
        • NFT Billboard Example
      • SuperAppBaseFlow
      • Super App Examples
      • Super App Deployment Guide
    • 🧺Batch Calls
      • Batch Calls - SDK Core
      • Batch Calls - Frontend Examples
    • ⚙️Automations
      • Auto-Wrap
        • Dev Guide
      • Stream Scheduler
        • Dev Guide
      • Vesting Scheduler
        • Dev Guide
      • Stream Accounting API
        • Dev Guide
      • Automation Subgraphs
        • Stream Scheduler Subgraph
        • Vesting Scheduler Subgraph
        • Auto Wrap Subgraph
    • 🏗️Integration Guides
      • For Your Integration: The Basics
        • Supporting Super Tokens
        • Supporting Money Streams
        • Supporting Instant Distributions
      • Gating with Superfluid Subscriptions & Guild.xyz
      • Displaying Token Balances
      • Useful Queries for Your Integration
        • Instant Distribution Events
        • Money Streaming Events
        • Super Token Events
        • Other Helpful Queries
      • Constructing Links to The Superfluid Dashboard
    • 🔁Superfluid Subscriptions
      • Superfluid Checkout Widget
      • Implementing Subscriptions in your App
    • SDK Core General
      • Initialization
      • Functionality
      • Getting Data
      • Resolver
      • Reference Docs
    • Solidity General
      • Calling Super Agreements
      • Libraries
      • Resolver
    • Testing Guide
      • Hardhat Testing
      • Foundry Testing
      • In-Depth
        • Hardhat Mainnet Fork Testing
        • Super App Testing on Mainnet Forks
    • Subgraph
    • Reference
      • Deploying The Framework
      • EVM Contracts
      • SDK Redux
      • Superfluid Console
      • Superfluid Protocol Addresses
    • Contract Addresses
  • Sentinels
    • 🥅Liquidations & TOGA
    • 🤖Running a Sentinel
    • 🗺️Solvency Dashboard
  • Resources
    • 🌊Superfluid Wave Pool
    • 📜Superfluid on Ethereum Mainnet
    • 💰Bounty Program
    • 🛡️Security & Bug Bounties
    • 💡Project Ideas
    • 🗳️Token Dashboard Submission
    • 🎥Videos
    • Superfluid Deployment Guide
    • Learn about Ethereum
    • Code of Conduct
Powered by GitBook
On this page
  • Definition
  • Real-Time Balance
  • Types of Super Tokens
  • Wrapper
  • Pure

Was this helpful?

  1. Protocol Overview
  2. In-Depth Overview

Super Tokens

Tokens that possess Superfluid functionality

PreviousIn-Depth OverviewNextSuper Agreements

Last updated 2 years ago

Was this helpful?

Definition

We usually experience on-chain value transfer through the ERC20 token. ERC20 token contracts work like bank balances, moving value through discrete lump-sum transfers (i.e. my balance goes down "X" and your balance goes up "X").

The Super Token is our extension of the ERC20 token standard that plugs into the Superfluid Protocol to include powerful new value transfer functionalities such as streams or instant distributions. We refer to these new value transfer functionalities as Super Agreements. Super Tokens come in two forms: wrapper and custom.

Super Tokens can do everything that a traditional ERC20 token can PLUS new modes of value transfer enabled by Superfluid (i.e., money streaming)

Real-Time Balance

The real-time balance is what lets Super Tokens keep track of an account's balance across changes caused by both regular transfers and Super Agreements. An account's actual current Super Token balance is the sum of its static balance and its real-time balances.

  • Static Balance: balance figure that is affected by basic lump-sum transfers (the usual ERC20 stuff)

  • Real-Time Balances: the individual impact that each Super Agreement has on an account's balance. That impact can either be positive or negative.

By combining these two parts, we can get an account's actual current balance.

Current Balance = Real-Time Balances* + Static Balance

* Bear in mind that there are multiple Super Agreements ( and ) each with their own real-time balances. So to arrive at the current balance, the real-time balance for each one is added to the static balance.

Example

  • Account A's Static Balance: 1,000 USDCx

  • Account A has an active CFA stream going that has streamed out 100 USDCx so far.

    • CFA Real-Time Balance = -100 USDCx

  • Account A has received 200 USDCx through IDA distributions.

    • IDA Real-Time Balance = +200 USDCx

Current Balance = 1000 + -100 + 200 = 1100 USDCx

The bottom line is that while a regular ERC20 just tracks a static balance which it shows when you call balanceOf(), a Super Token's balanceOf() takes that and layers on real-time balances to account for Super Agreements.

Types of Super Tokens

Wrapper

A wrapper Super Token is an existing underlying token that's been "wrapped" into a Super Token to gain Super Agreement functionality.

Wrapping and Unwrapping

When getting wrapper Super Tokens, you first deposit the underlying tokens into its wrapper Super Token contract after which you are minted an equal quantity of wrapper Super Tokens. Basically, you gave up the plain underlying token and got the "Super Token version" of it.

To unwrap, the opposite happens; a desired amount of Super Tokens are burned and an equal amount of the underlying token is returned.

Example

Pure

Pure Super Tokens don't have an underlying token. They exist only as Super Tokens so there's no wrapping or unwrapping required. Pure Super Tokens are deployed directly as Super Tokens with all of the associated Superfluid functionality out of the box. These tokens inherently have all the functionality of a basic ERC20 token plus Superfluid's Super Agreement abilities.

Example

$RIC is a governance token deployed by , a community building Superfluid-powered investment tools. Knowing that they would be heavily using Super Agreements (money streaming and instant distributions) on $RIC, they chose to deploy it directly as a Pure Super Token, rather than a plain ERC20 with an accompanying Wrapper Super Token.

📄
CFA
IDA
Ricochet DAO