Skip to content

Super Token Overview

Miao ZhiCheng edited this page Oct 3, 2023 · 6 revisions

Overview

Super token is a ERC20-compatible token implementation that supports wrapping existing ERC20-token or being natively a super token. Its precise classification can be found here. Super token has super powers that are enabled through various agreements.

Implementation Guide

Relevant Smart Contracts

  • contracts/superfluid/SuperfluidToken.sol: this is an abstract contract that is independent of the actual token standards (such as ERC20, ERC777, ...), and it provides all the necessary "Super Token" features
  • contracts/superfluid/SuperToken.sol: this logic contract includes the SuperfluidToken, and implements the ERC20 and some ERC777 (see About ERC-777) interfaces.
  • contracts/superfluid/SuperTokenFactory.sol: this factory provides different ways one instantiate a new "Super Token".

History

  • The initial scaffolding of the Super Token is a copy of OpenZeppelin ERC-777. Afterwards, the balanceOf function was modified to be able to calculate real time balance.
    • Why ERC-777? At the time it seemed a good idea.

Futher Topics

References

Clone this wiki locally