Tutorial: Stream Tokens with Superfluid

What is Superfluid?

Superfluid is a composable DeFi primitive that allows you to Stream tokens from one address to another on a second-by-second basis. Some use-cases include, but are not limited to:

  • paying for subscriptions by the second instead of yearly/monthly
  • paying or being paid for work in a more granular way
  • receiving rewards every second for holding a particular token

Where is Superfluid?

Superfluid is currently only available on xDai and Polygon, which are EVM smart contract enabled side chains that are very similar to Ethereum. This means that you can use familiar tools like MetaMask to approve transactions. An added benefit is that the transaction fees on these networks are much lower than on Mainnet Ethereum.

In order to get assets onto these chains, you will need to use a bridge. Which you can find here:

ETH<>Polygon bridge
ETH<>xDai bridge

You can look up walkthroughs on how to use those bridges, but in this tutorial, I will be showing you how to complete the Superfluid task which is required to earn the Asset Management Skill on RabbitHole, and that task needs to be completed on Polygon.

How to stream using Superfluid:

What you will need:

  1. A web3 wallet
  2. Some Matic in your wallet on Polygon network
  3. (Optional) Any other ERC20 token: if you want to stream a token other than Matic

I will also assume that you are already familiar with approving transactions with your wallet software.

Once you have everything you need from the list above, we are ready to dive in.

Step 1. Go to your Superfluid Dashboard and connect your wallet

You can get to your dashboard by following this link: https://app.superfluid.finance/ and select the wallet client you would like to use. Depending on network conditions, it can take some time for the page to load. Just be patient. If it is taking more than a couple of minutes I have found it helps to switch to another network and then back to Polygon.

Step 2. Click the “Deposit” button at the top of the screen and a smaller window will pop up

You will first need to deposit some assets into Superfluid before you are able to open a stream.

Step 3. Search for and select the asset you want to deposit, enter the amount and then click “Deposit”

A window will pop-up for you to approve the transaction. You can normally get a transaction through by paying just 1 gwei as the gas price.

Step 4. Click the “Send” button at the top of the screen and a smaller window will pop up

Now that you have some tokens deposited, you can start a stream by clicking “Send”

Step 5. Enter the Stream details.

You will need to fill in the following fields in order to start the stream:

A. The destination address. Here I have cover it up so you don’t accidentally send me money ; )
B. The asset you would like to send
C. The amount you want to send, coupled with…
D. The timeframe over which you wish to send it
The options are month, week, hour and one-off (which is the same as a regular transfer). Here I have chosen hour, which means I will send 0.0331 Matic to the destination every hour, at a rate of 0.00000919 Matic per second.
E. Populated for you to show you how much will be streamed per second
F. Once all the fields are filled out the way you want them, you can click “Start Streaming”

It’s worth mentioning that the UI will not allow you to start a stream if it would consume your entire balance in under 4 hours. So you will need to make the appropriate calculations.

Step 6. Monitor your Stream

Once your stream is flowing you will see the “Current Streams” section will display the outflows (and inflows if you have any) for your account.

There will also be an estimate for when your account balance will run out. It will be important to keep an eye on this, and I’ll explain why in a second.

If you click on the stream that you just started, you will see some more details about it.

By clicking the pencil icon beside the “Estimated amount per month” value, you can adjust how much you are streaming, and over what time period. Editing this will require you to approve another transaction.

Most importantly you will notice that there is an amount held as a deposit.

“This deposit is lost if you run out of funds and the stream gets closed automatically. Make sure to top up your balance or close the stream on time to get your deposit back.”

In order to close the stream you just need to click “Cancel Stream”, and approve a transaction.

Step 7. Redeem the task and claim your XP

Once you have opened the stream, you will have fulfilled the requirements for the task, and all you have to do is go and click the “Redeem” button and sign the message that pops up.

That's it!

You are one step closer to completing the Asset Manager Skill on RabbitHole. If you have any issues completing this skill be sure to reach out in the #skill-help channel in the RabbitHole Discord.

Subscribe to Boost
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.