project screenshot 1
project screenshot 2
project screenshot 3

GhoFlow

Payment widget + smart contacts to streamline creation of superfluid subscriptions/streams of GHO, by depositing ETH or some supported token. From 5-6 transactions to 1 (ETH) or 2 (Token approval)!

GhoFlow

Created At

LFGHO

Project Description

A merchant wants to sell subscriptions - and recieve the payment in a constant flow of stablecoins. A user wants to buy such subscription, but without having to swap his/her assets.

GhoFlow allows the merchant to have a payment widget, streamlines the whole process in 1 transaction (if using ETH for credit, 2 if some token), leveraging AAVE lending pools, stablecoin GHO and Superfluid for the payment streams!

How it's Made

If a user would like to pay a merchant in a stream of GHO stablecoin, the steps would be:

  1. Deposit ETH or tokens (with prior approval) into AAVE pool.
  2. Borrow GHO against the collateral.
  3. Wrap GHO into superfluid token GHOx.
  4. Approve superfluid allowance for GHOx.
  5. Go to superfluid dashboard and create a stream with the right flowrate.

GhoFlow compresses all these steps into a single smart contract function, simplifying the process a lot.

GhoFlow has a main solidity contract - GhoFlowFactory, which spawns/deploys subcontracts for every sender that wants to deposit and create a stream (once this subcontract is created, it is reused in every future interaction). This is done this way because:

  1. This allows each sender address to have its own accrued interest based on the supplied assets.
  2. It is cleaner/simpler.
  3. A limitation of superfluid is that there can only be one stream between each pair of sender/receiver - so several users could not send streams from a single centralised contract to a same merchant.

The user then has the possibility of repaying its GHO debt and withdrawing the deposited assets + interest whenever she/he sees it fit.

Also, the user can:

  • Create new superfluid streams without adding extra collateral if there is enough.
  • Update the flowrate of a stream.
  • Delete a stream.
background image mobile

Join the mailing list

Get the latest news and updates