Stream-A-Buy lets anyone sell any product and allows it being purchased using token-streams. Users can setup a product to sell with its details: title, description, amount of items, price & token accepted (any ERC20) and the date where the total price will finally be paid by the buyers. The dApp will create the defined amount of NFT in the product contract that will be transferred to the users when the total price has been paid. This NFT represents the ownership of the purchase (a ticket for an event, a flight ticket, a booking ticket...). When a user buys a product, the payment token will be automatically wrapped as Supertoken, and the stream will start sending tokens (with no capital lockup!) to the Smart Contract every second at the required flow rate, depending on the "end payment date" defined by the seller. This means that the user is paying every second, and as long as he keeps a positive token balance, the stream will continue. This opens lots of possibilities, but we find it really interesting for all type of digital products, any booking service (hotels, flights...) and events. For the current version we have support for live online events. Once the payment has been fully completed, the buyer receives an NFT that gives them access to the live event page, where a video stream (Livepeer) and a group chat (Waku) are available. In the future we plan to improve the money-back policy, increasing/decreasing flow rates, automatic investing for the SC funds, more specific NFT functionalities...

Stream-a-buy showcase

How it's made

We used Next.js in the Frontend, deployed in Skynet and using TheGraph as the main Backend. We are using Biconomy for MetaTransactions and to upload our NFT metadata. The live page is using a Livepeer stream and a Waku (Status) chat so the audience can interact. Smart Contracts are built using ERC1155 standard using SuperFluid (for the tokens streams) and Chainlink Keepers (closing the streams) technologies. With the help of Alchemy it was really easy to fork and deployed in both, Kovan and Polygon Mumbai. In Kovan, Chainlink Keepers makes sure user streams are closed when is needed.