Smart Contracts
Last updated
Last updated
AllowlistV2 Proxy -
USTB Token Proxy -
USCC Token Proxy -
USTB RedemptionIdle Proxy -
Superstate USTB Continuous Price Oracle -
Chainlink USTB Oracle -
Chainlink USCC Oracle -
Our smart contracts are upgradable and various functions are gated behind the Superstate Admin Address calling them. This includes all minting, adding or removing users from the allowlist, and forcibly burning an investor’s tokens (if required by exogenous legal circumstances, for example).
A standard Upgradable OpenZeppelin ERC-20 implementation with a few changes:
USTB/USCC check that all holders are on the Superstate controlled Allowlist contract and are authorized for that token.
Redeem - Investors can call the offchainRedeem
function or transfer their USTB/USCC to the contract address to kick off a standard redemption
Mint - Superstate can call the mint
function to mint new shares of USTB/USCC when investors subscribe to the fund
USTB/USCC is freely transferrable between Ethereum addresses that are on the Allowlist via transfer
or transferFrom
. Each function checks that the sender and receiver are both on the Allowlist and authorized for that specific token.
The bridge
function allows users to burn their tokens on the source chain, and receive the specified number of tokens on supported destination chains. This functionality makes it easy for users of all types to move their tokens cheaply and efficiently across chains.
An easier to use helper function bridgeToBookEntry
allows users to burn their tokens and hold their shares in book entry with Superstate, instead of onchain as an ERC-20.
Adds/Removes Ethereum addresses to/from the allowlist with certain permissions. Fund tickers are used with fundPermissionsByEntityId
to determine if an entity is allowed to interact with a speciifc fund's token or not
Ethereum addresses are also grouped by their Entity Id. Entity Ids are how Superstate identifies investors.
The USTB/USCC token contract calls isAddressAllowedForFund
on the Allowlist contract to see if the sender and receiver of USTB are allowed to hold it.
Only the Superstate Admin Address can make any changes to the allowlist, using the following functions setEntityAllowedForFund
, setProtocolAddressPermission
, setProtocolAddressPermissions
, setEntityIdForAddress
, setEntityIdForMultipleAddresses
, setEntityPermissionsAndAddresses.
We call these functions when onboarding or offboarding an investor. We only add Ethereum addresses for investors that have made it through our KYC / Investment Agreement processes. However, Superstate Inc. audited DeFi protocols may be added to the allowlist at our discretion.
Protocols can mint USTB by calling the subscribe
function on the Ethereum USTB contract. This function atomically transfers the investor’s USDC to Superstate, and newly minted USTB into the investor’s wallet in one transaction. The price per share is read from the Superstate USTB Continuous Price oracle contract. There are no limits for subscriptions.
Users must call approve
on the USDC contract before calling subscribe
on the USTB contract.
DeFi Protocols will be interested in the calculateSuperstateTokenOut(uint256 inAmount, address stablecoin) returns (uint256 superstateTokenOutAmount, uint256 stablecoinInAmountAfterFee, uint256 feeOnStablecoinInAmount)
function, also on the USTB contract. Given an inAmount
of stablecoin it will give you the superstateTokenOutAmount
you should expect to receive back accounting for fees.
The RedemptionIdle contract holds USDC liquidity while waiting to facilitate USTB redemptions. Investors can call the redeem
function on the contract to burn USTB from the investor’s wallet and receive USDC in one transaction. USDC liquidity will be replenished in this contract regularly to facilitate protocol redemptions. The redeem
function will revert if there is not enough USDC in the contract to match the superstateTokenInAmount
.
Users must call approve
on the USTB contract before calling redeem
on the RedemptionIdle contract.
DeFi Protocols will be interested in the calculateUstbIn(uint256 usdcOutAmount) returns (uint256 ustbInAmount, uint256 usdPerUstbChainlinkRaw)
function. This function takes a desired amount of USDC and returns how much USTB is needed for the superstateTokenInAmount
argument of the redeem
function to reach the usdcOutAmount
. This function always rounds up, so the user will always hit or exceed the usdcOutAmount
.
A custom onchain oracle to facilitate continuous pricing onchain, which powers Atomic Subscriptions and Redemptions. The oracle receives pricing updates from Superstate every time a new Net Asset Value per Share (NAV/S) is calculated by our NAV Calculation Agent partner. When a continuous price is requested, the Oracle does linear extrapolation using the two newest NAV/S checkpoints to calculate it.
This oracle has the daily USTB/USCC NAV/S price and can be used like any other Chainlink oracle.
Superstate encourages the community to audit our contracts and security; we also encourage the responsible disclosure of any issues. This program is intended to recognize the value of working with the community of independent security researchers.
Superstate offers substantial rewards for discoveries that can prevent the loss of assets, the freezing of assets, or material harm to a user, commensurate with the severity and exploitability of the vulnerability. We will pay a reward of $1,000 to $100,000 for unique discoveries that are reported responsibly.
Submit all bug bounty disclosures to security@superstate.co. The disclosure must include clear and concise steps to reproduce the discovered vulnerability in either written or video format. We will follow up promptly with acknowledgement of the disclosure.
AllowlistV2 Proxy -
USTB Token Proxy -
USCC Token Proxy -
At time of writing, fees are set to 0 and only USDC is supported. For more information, please visit .
At time of writing, fees are set to 0 and only USDC is supported or more information please visit .
Any smart contract can request a continuous price onchain. The Oracle contract uses the Chainlink AggregatorV3Interface
, so it works out of the box with any Chainlink data feed integrations.
Chainlink puts the USTB/USCC Net Asset Value per Share price onchain once per day. The Oracle contract uses the AggregatorV3Interface.