project screenshot 1
project screenshot 2
project screenshot 3

SuperExchange

An exchange where users can trade using streams instead of atomic, instant swaps.

SuperExchange

Created At

HackMoney 2021

Project Description

The project allows for trading stablecoins by using streams instead of instant swaps. Also, it allows no liquidity locked in the contract which is pretty convenient. The main feature of the project is that it allows no interaction with the functions of the contract. A user just needs to create one stream to the contract to trade his tokens. If he wants to become a liquidity provider then he will want to create batch transactions (or just two consequent transactions if he's not afraid to lose some funds while the second transaction is being confirmed).

How it's Made

I used Superfluid contracts to make streams on the blockchain. My partner used Superfluid SDK to interact with the contract by creating streams to it. We used React for the front end and Metamask for signing transactions.

The Superfluid protocol helped me a lot. It was not only the core for the project as we used streams but it also allowed for the batch transactions which in their turn allowed us to create two simultaneous flows that allowed us not to interact with the contract because we were also using their feature called hooks to execute some logic when a user creates/updates/deletes streams.

I'd say that the main hacky thing was a whole lot of hooks that would allow us to call 0 functions of the contract for interactinos with it. Didn't finish the blockchain code though(

background image mobile

Join the mailing list

Get the latest news and updates