gm web3 frens 👋
Why wait to get paid at the end of every month when you get paid every second? It’s one of those experiences I had been craving for without actually knowing it - until Superfluid came along.
Now I can see my money hit my wallet every second in a payment stream 🤯
The limitations of our existing financial system only allows us to pay salaries every month, but with payment streams, we are now ushering into the real-time finance economy era.
It’s a paradigm shift that provides you the ability to earn, invest, and spend your money in real-time.
This article will help you get started and will cover:
- What is Superfluid
- What are Super tokens (wrapping/unwrapping)
- How to send a Superfluid stream
- Send a streaming invoice in Request Finance
🤨 What is Superfluid
Superfluid is an asset streaming protocol to allow a constant flow of transactions that are executed automatically on-chain. Money streaming supercharges use cases involving recurring transactions with fixed amounts. Some use-cases include, but are not limited to:
- Subscriptions (eg. paying for fixed gym membership)
- Token Vesting (eg. DAOs can lock up funds and release periodically in a stream to contributors)
- Dollar Cost Averaging (eg. stream DAI to accumulate ETH continuously)
Their app allows you to be connected to several blockchains including Polygon, Binance Smartchain, Gnosis Chain, Arbitrum.
What’s cool with using Superfluid is that there is only a transaction cost when you initiate a stream, but no further cost throughout the payment stream.
Important to add that Superfluid is an open source protocol, and any developer can build an application on top. You can view Superfluid’s ecosystem here.
✨ What are Super tokens (wrapping / unwrapping)
What you need to follow this article;
- A Metamask wallet (as an extension on Chrome, Brave)
- Some MATIC and DAI on Polygon chain
- (Optional) Any other ERC20 token other than DAI on Polygon
To start sending streams through the Superfluid app, you do not need to create an account. Simply complete the following steps;
- Head over to their app page,
- Connect your Metamask wallet,
- Switch network to Polygon
If you do not have Polygon added to your Metamask already, you can visit chainlist.org and automatically add it as a network.
In order to use Superfluid’s app, you will 1st need to wrap your ERC20 tokens to a Super Token under the Polygon chain.
In this example, I am wrapping DAI (ERC20 token) into DAIx (Super Token) under the Polygon chain. Once under the Super Token standard, you can start streaming.
Complete the following steps:
- In the sidebar, click ‘Wrap/Unwrap’
- Select DAI token (or other ERC20 token available), insert the amount, and click on ‘Wrap’
- Your Metamask will open, and scroll down to confirm transaction
- To view your new DAIx, hover over to Dashboard
Now that you have your Super Tokens ready (here DAIx) , you can send a payment stream every second.
🌊 How to send a Superfluid stream
To start sending a stream, complete the following steps;
- In the sidebar, click ‘Send Stream’
- Insert the receiver’s wallet address or ENS name
- Select DAIx (or other Super Token)
- Insert Flow Rate
- Choose the time frame of stream , with options such as day, week, month , year. Example: Here I have chosen to send 4 DAIx over 1 day, which means that every second, the recipient is receiving 0.00004629 DAIx.
- Make sure you understand the buffer risk, before starting, and click ‘Yes’. Example: The buffer is an amount equivalent to 4 hours worth of the stream flow rate. In this example 0.0667 DAIx ( 0.00004629DAIx x 14,400 seconds). The buffer is locked and you get it back when you close the stream before your wallet balance hits zero. Therefore, you must always cancel your streams before your Super Token balance hits zero or your buffer will be lost, as streams cannot stop themselves automatically.
- Click ‘Send Stream’
- Your Metamask will open, and scroll down to confirm transaction
Once the stream transaction has been confirmed, you can hover over to your dashboard to see the ongoing stream.
👌Send a streaming invoice in Request Finance
To start accepting and sending payment streams for your business in a compliant way, Request Finance, the web3 tool for invoicing, payroll and accounting, has integrated Superfluid.
If you need help to set up your account and add a client in Request Finance, first go through ‘How to prepare a crypto invoice using Request Finance’
The remaining article will cover how you can issue and pay a streaming invoice, based on what we already learnt on wrapping a Super Token.
📄 Create a streaming invoice
To create a streaming invoice, complete the following steps;
- Click on ‘Invoices’ & ‘New invoice’ in sidebar
- Add invoice number
- Select your client from the drop down list
- (Optional) You may cc another recipient at your client’s company
- Choose the currency you want to denominate your invoice in
Currently for streaming invoice, Request Finance only allows the invoice to be denominated in the Super Token, and not other fiat currencies like USD or Euro. (In this example, my invoice is denominated in DAIx)
(In the below example, I have chosen to be paid on the Polygon network and in DAIx)
That’s it, click ‘Create & Send’, and you will be notified by email that an invoice has been created. Note that your client will also receive an email notification to pay for the invoice.
🚀Pay a streaming invoice
To complete payment as a registered user of Request Finance, log into your account and head over to the dashboard.
Click on streaming invoice titled ‘Awaiting payment’, and complete following steps;
- Connect your wallet to wrap your ERC20 token (DAI) into Super token (DAIx)
- Select your Metamask wallet
- This message appears whenever you do not have enough Super token in your wallet (as explained above, streaming only works when ERC20 tokens have been wrapped under Superfluid’s standard)
- Choose no. of months you wish to deposit, since this is a recurring invoice (in this example, I chose 2 months)
- Approve Deposit
- Your Metamask will open, and scroll down to confirm transaction
What’s cool with using Request Finance for streaming invoices, is that as the invoice issuer, you can use the ‘Withdrawal’ function at any time to withdraw funds in real time.
To do this, head over to the Dashboard, and click on the invoice being streamed in, and complete the following steps:
- Check the amount streamed to date
- Click on the ‘Withdrawal’ button
- Choose DAI to be withdrawn.
Important to note that the tokens are automatically unwrapped from the Super token to the ERC20 token.
(In this case, since I just started the stream over 1 month as the payer, I could not withdraw the stream. But if I waited longer, I would receive DAI, and not DAIx)
That’s it frens. I hope you have enjoyed this tutorial on how streaming works under Superfluid, and how you can start invoicing your clients and be paid in streams using Request Finance.
Umar, a Chartered Accountant and previous External Auditor at Deloitte & BDO, is the creator of The Accountant Quits.
By educating accountants about crypto accounting, Umar aims to help accountants upskill themselves for new career opportunities in Web3.